/* =========================================
   KinHar Energy - Products Page Styles
   ========================================= */

/* Note: Top nav dropdown styles are in style.css (.has-dropdown) */

/* ---------- Page Hero ---------- */
.page-hero {
    background: linear-gradient(135deg, #0f1e3a 0%, #1a3a6e 100%);
    padding: 60px 0 80px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(45, 212, 122, 0.15), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.breadcrumb {
    margin-bottom: 18px;
    font-size: 14px;
    opacity: 0.85;
}

.breadcrumb ol {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin: 0 10px;
    opacity: 0.5;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.15s;
}

.breadcrumb a:hover {
    color: #2dd47a;
}

.breadcrumb li[aria-current="page"] {
    color: #2dd47a;
}

.page-hero h1 {
    font-size: 48px;
    margin: 0 0 18px;
    color: white;
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.page-hero-sub {
    font-size: 17px;
    line-height: 1.65;
    max-width: 760px;
    margin: 0 auto 36px;
    color: rgba(255, 255, 255, 0.85);
}

.page-hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    margin-top: 36px;
}

.page-hero-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-hero-stats .stat strong {
    font-size: 36px;
    color: #2dd47a;
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
}

.page-hero-stats .stat span {
    margin-top: 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: rgba(255, 255, 255, 0.7);
}

/* ---------- Products Layout (sidebar + main) ---------- */
.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
    padding-top: 60px;
    padding-bottom: 80px;
    align-items: start;
}

.products-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.sidebar-sticky {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(15, 30, 58, 0.06);
    padding: 22px 0 26px;
}

.sidebar-title {
    margin: 0 22px 16px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #6b7a99;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 1px solid #e6ecf3;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-category {
    border-bottom: 1px solid #f3f6fa;
}

.sidebar-category:last-child {
    border-bottom: none;
}

.sidebar-cat-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 22px;
    color: #0f1e3a;
    font-weight: 600;
    font-size: 14.5px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
    position: relative;
}

.sidebar-cat-link::after {
    content: '\25B8';
    position: absolute;
    right: 50px;
    font-size: 12px;
    color: #9ca8bd;
    transition: transform 0.2s ease;
    pointer-events: none;
}

.sidebar-category.expanded .sidebar-cat-link::after {
    transform: rotate(90deg);
}

.sidebar-cat-link:hover,
.sidebar-cat-link.active {
    background: #f4f7fb;
    color: #2dd47a;
}

.sidebar-count {
    background: #e6ecf3;
    color: #6b7a99;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 12px;
}

.sidebar-cat-link.active .sidebar-count {
    background: #2dd47a;
    color: white;
}

.sidebar-subnav {
    list-style: none;
    padding: 0 0 10px 32px;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sidebar-category.expanded .sidebar-subnav {
    max-height: 600px;
}

.sidebar-subnav li {
    list-style: none;
}

.sidebar-subnav a {
    display: block;
    padding: 6px 18px 6px 0;
    font-size: 13.5px;
    color: #4a5b78;
    text-decoration: none;
    transition: color 0.15s, padding-left 0.15s;
    border-left: 2px solid transparent;
    padding-left: 14px;
    margin-left: -16px;
}

.sidebar-subnav a:hover,
.sidebar-subnav a.active {
    color: #0f1e3a;
    border-left-color: #2dd47a;
    padding-left: 18px;
}

.sidebar-cta {
    margin: 22px;
    padding: 22px;
    background: linear-gradient(135deg, #0f1e3a 0%, #1a3a6e 100%);
    border-radius: 12px;
    color: white;
    text-align: center;
}

.sidebar-cta h4 {
    margin: 0 0 10px;
    font-size: 16px;
    color: white;
}

.sidebar-cta p {
    margin: 0 0 18px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

.btn-full {
    width: 100%;
}

/* ---------- Category section ---------- */
.category-section {
    margin-bottom: 80px;
    scroll-margin-top: 100px;
}

.category-header {
    display: flex;
    gap: 22px;
    align-items: flex-start;
    padding-bottom: 24px;
    margin-bottom: 36px;
    border-bottom: 2px solid #0f1e3a;
}

.category-number {
    font-family: 'Manrope', sans-serif;
    font-size: 48px;
    font-weight: 800;
    color: #2dd47a;
    line-height: 1;
    letter-spacing: -2px;
}

.category-titles h2 {
    font-size: 32px;
    margin: 0 0 10px;
    color: #0f1e3a;
    letter-spacing: -0.5px;
}

.category-tagline {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #4a5b78;
}

/* ---------- Product grid ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.product-card {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(15, 30, 58, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid #eef2f7;
    scroll-margin-top: 100px;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(15, 30, 58, 0.12);
}

.product-image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f4f7fb;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.04);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #2dd47a;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-info {
    padding: 20px 22px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    margin: 0 0 4px;
    font-size: 17px;
    color: #0f1e3a;
    line-height: 1.3;
}

.product-sub {
    margin: 0 0 14px;
    font-size: 13px;
    color: #6b7a99;
    font-weight: 500;
}

.product-features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    font-size: 13.5px;
    color: #4a5b78;
    flex: 1;
}

.product-features li {
    padding: 4px 0;
    position: relative;
    padding-left: 18px;
}

.product-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 13px;
    width: 8px;
    height: 2px;
    background: #2dd47a;
    border-radius: 1px;
}

.product-features strong {
    color: #0f1e3a;
    font-weight: 600;
}

/* Details / spec */
.product-details {
    margin: 6px 0 16px;
    border-top: 1px solid #f0f3f8;
    padding-top: 12px;
}

.product-details summary {
    cursor: pointer;
    color: #2dd47a;
    font-size: 13px;
    font-weight: 600;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

.product-details summary::-webkit-details-marker {
    display: none;
}

.product-details summary::before {
    content: '+';
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.product-details[open] summary::before {
    content: '−';
}

.product-specs {
    padding: 12px 0;
    font-size: 13px;
    line-height: 1.65;
    color: #4a5b78;
}

.product-specs p {
    margin: 0 0 6px;
}

.product-specs strong {
    color: #0f1e3a;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.product-actions .btn {
    flex: 1;
    text-align: center;
    font-size: 13px;
    padding: 10px 16px;
}

/* ---------- Bottom CTA ---------- */
.products-bottom-cta {
    background: linear-gradient(135deg, #0f1e3a 0%, #1a3a6e 100%);
    color: white;
    padding: 50px 32px;
    border-radius: 16px;
    text-align: center;
}

.products-bottom-cta h2 {
    margin: 0 0 12px;
    font-size: 28px;
    color: white;
}

.products-bottom-cta p {
    margin: 0 0 26px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 15px;
}

/* ---------- Mobile Responsive ---------- */
@media (max-width: 1024px) {
    .products-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .products-sidebar {
        position: static;
        margin-bottom: 36px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-hero h1 {
        font-size: 34px;
    }

    .page-hero-stats {
        gap: 32px;
    }

    .page-hero-stats .stat strong {
        font-size: 28px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .category-header {
        flex-direction: column;
        gap: 8px;
    }

    .category-number {
        font-size: 36px;
    }

    .category-titles h2 {
        font-size: 24px;
    }
}
