﻿/* Products Page Styles */

/* ============================================
   PRODUCT CATEGORIES WITH IMAGES
   ============================================ */
.categories-section {
    background: var(--bg-primary);
}

.product-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.product-category-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.4s ease;
}

.product-category-card:hover {
    box-shadow: 0 30px 60px rgba(15, 94, 168, 0.2);
    transform: translateY(-8px);
}

.product-category-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-category-card__image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.product-category-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-category-card:hover .product-category-card__image img {
    transform: scale(1.1);
}

.product-category-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 94, 168, 0.1) 0%, rgba(15, 94, 168, 0.5) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.product-category-card:hover .product-category-card__overlay {
    opacity: 1;
}

.product-category-card__body {
    padding: 1.5rem 2rem;
    text-align: center;
}

.product-category-card__body h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.product-category-card:hover .product-category-card__body h3 {
    color: var(--primary-500);
}

.product-category-card__count {
    display: inline-block;
    background: var(--primary-100);
    color: var(--primary-600);
    padding: 0.375rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.product-category-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-500);
    font-weight: 700;
    font-size: 0.95rem;
    transition: gap 0.3s ease;
}

.product-category-card:hover .product-category-card__cta {
    gap: 0.75rem;
}

.product-category-card__cta .icon {
    width: 18px;
    height: 18px;
}

/* Badge for subcategories count */
.product-category-card__badge-folder {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #059669;
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.product-category-card__badge-folder svg {
    width: 14px;
    height: 14px;
}

/* ============================================
   PRODUCT CATEGORY PAGE HERO
   ============================================ */
.product-category-page .page-hero.category-hero {
    position: relative;
    padding: 140px 0 60px;
    min-height: 320px;
    display: flex;
    align-items: center;
}

.product-category-page .page-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--primary-700);
}

.product-category-page .page-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 20, 35, 0.92) 0%, rgba(15, 70, 130, 0.88) 100%);
}

.product-category-page .page-hero__content {
    position: relative;
    z-index: 10;
    color: white;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    /* Ensure no background box */
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    backdrop-filter: none !important;
}

/* Category Breadcrumbs - Clean Design */
.category-breadcrumbs {
    margin-bottom: 1rem;
}

.category-breadcrumbs ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.category-breadcrumbs li a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: white;
    /* Increased form rgba(255, 255, 255, 0.8) */
    text-decoration: none;
    font-size: 0.95rem;
    /* Slightly larger */
    font-weight: 600;
    /* Increased weight */
    padding: 6px 0;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    /* Added shadow */
}

.category-breadcrumbs li a:hover {
    color: var(--secondary-400);
    /* clearer hover color */
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.category-breadcrumbs li a svg {
    width: 15px;
    height: 15px;
    opacity: 1;
    /* Full opacity */
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
}

.category-breadcrumbs li.separator {
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
}

.category-breadcrumbs li.separator svg {
    width: 12px;
    height: 12px;
}

.category-breadcrumbs li.current span {
    color: var(--secondary-400);
    font-weight: 700;
    font-size: 0.95rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Category Title */
.product-category-page .page-hero__content h1 {
    font-size: 2.75rem;
    /* Larger */
    font-weight: 800;
    margin-bottom: 0.75rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    /* Stronger shadow */
    color: white;
    letter-spacing: -0.5px;
}

/* Category Description */
.category-description {
    font-size: 1.1rem;
    /* Larger */
    opacity: 1;
    /* Full opacity */
    line-height: 1.6;
    max-width: 650px;
    /* Wider for better reading */
    margin: 0 auto 1.5rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    /* Added shadow */
    font-weight: 500;
}

/* Category Meta / Products Count */
.category-meta {
    margin-top: 0.75rem;
}

.products-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: white;
    color: var(--primary-700);
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.products-count-badge svg {
    width: 16px;
    height: 16px;
    color: var(--secondary-500);
}

/* Responsive */
@media (max-width: 768px) {
    .product-category-page .page-hero.category-hero {
        padding: 110px 0 40px;
        min-height: auto;
    }

    .product-category-page .page-hero__content h1 {
        font-size: 1.75rem;
    }

    .category-breadcrumbs li a {
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    .category-breadcrumbs li.current span {
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    .products-count-badge {
        font-size: 0.8rem;
        padding: 6px 14px;
    }
}

/* Inline Section Header */
.section-header--inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--neutral-100);
}

.section-header--inline .section-header__title {
    font-size: 1.5rem;
    margin: 0;
}

.section-header--inline .section-header__count {
    background: var(--primary-100);
    color: var(--primary-600);
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Other Categories Grid */
.other-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.other-category-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.other-category-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateX(-5px);
}

.other-category-card__icon {
    width: 28px;
    height: 28px;
    color: var(--primary-500);
    flex-shrink: 0;
}

.other-category-card__content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.other-category-card__content span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* OLD Category Box (keep for backward compatibility) */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.category-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.category-box:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.category-box__icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    transition: background 0.3s ease;
}

.category-box:hover .category-box__icon {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
}

.category-box__icon svg {
    width: 28px;
    height: 28px;
    color: var(--primary-500);
    transition: color 0.3s ease;
}

.category-box:hover .category-box__icon svg {
    color: white;
}

.category-box h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.category-box:hover h3 {
    color: var(--primary-500);
}

.category-box__count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================
   PRODUCTS LAYOUT (Sidebar + Content)
   ============================================ */
.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
}

.products-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.sidebar-block {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.sidebar-block h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-100);
}

.sidebar-categories {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-categories a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: #f8fafc;
    border: 1px solid var(--neutral-100);
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark-600);
    transition: all 0.2s ease;
    text-align: right;
    text-decoration: none;
}

.sidebar-categories a:hover {
    background: white;
    border-color: var(--primary-200);
    color: var(--primary-600);
    box-shadow: 0 4px 12px rgba(15, 94, 168, 0.08);
    transform: translateX(-5px);
}

.sidebar-categories a.active {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: white;
    box-shadow: 0 4px 12px rgba(15, 94, 168, 0.2);
}

.sidebar-categories a .icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.sidebar-categories a:hover .icon,
.sidebar-categories a.active .icon {
    opacity: 1;
}

.sidebar-categories a span {
    margin-right: auto;
    background: rgba(0, 0, 0, 0.06);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--dark-500);
}

.sidebar-categories a.active span {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.products-content {
    min-width: 0;
}

/* ============================================
   PRODUCTS SEARCH
   ============================================ */
.products-search {
    position: relative;
    margin-bottom: 2rem;
}

.products-search .search-icon {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    color: var(--primary-500);
}

.products-search input {
    width: 100%;
    padding: 1.1rem 1.5rem 1.1rem 3.5rem;
    background: white;
    border: 2px solid var(--neutral-200);
    border-radius: 16px;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--dark-800);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.products-search input::placeholder {
    color: var(--neutral-400);
}

.products-search input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(15, 94, 168, 0.1);
}

/* ============================================
   PRODUCTS GRID
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.products-grid--small {
    grid-template-columns: repeat(4, 1fr);
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.product-card:hover {
    box-shadow: var(--shadow-xl);
}

.product-card__image-link {
    display: block;
}

.product-card__image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-card__image img {
    transform: scale(1.1);
}

.product-card__badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(15, 94, 168, 0.9);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-card__brand {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-primary);
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.product-card__body {
    padding: 1.5rem;
}

.product-card__body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.product-card__body h3:hover {
    color: var(--primary-500);
}

.product-card__body p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__body .btn {
    width: 100%;
    justify-content: center;
}

.product-card__body .btn .icon {
    width: 18px;
    height: 18px;
}

.product-card__view-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-500);
    font-weight: 600;
    font-size: 0.9rem;
}

.product-card__view-btn .icon {
    width: 16px;
    height: 16px;
}

.product-card--clickable {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* ============================================
   PRODUCT DETAIL PAGE
   ============================================ */
.page-hero--compact {
    padding: 140px 0 60px;
}

.breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: white;
}

.breadcrumb-link .icon {
    width: 18px;
    height: 18px;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.product-detail__image {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.product-detail__image img {
    width: 100%;
    height: 450px;
    object-fit: cover;
}

.product-detail__category-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
}

.product-detail__content {
    padding: 1rem 0;
}

.product-detail__brand {
    display: inline-block;
    background: var(--primary-100);
    color: var(--primary-600);
    padding: 0.375rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.product-detail__content h2 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.product-detail__description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 2rem;
}

/* Product Price */
.product-detail__price {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-right: 4px solid var(--primary-500);
}

.product-detail__price .price-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.product-detail__price .price-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-600);
}

.product-detail__specs {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.product-detail__specs h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.product-detail__specs ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-detail__specs li {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.product-detail__specs li:last-child {
    border-bottom: none;
}

.product-detail__specs .spec-key {
    font-weight: 600;
    color: var(--text-primary);
}

.product-detail__specs .spec-value {
    color: var(--text-secondary);
}

.product-detail__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.product-detail__actions .btn {
    flex: 1;
    justify-content: center;
    min-width: 160px;
}

.product-detail__actions .btn .icon {
    width: 20px;
    height: 20px;
}

.btn--whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
}

.btn--whatsapp:hover {
    background: linear-gradient(135deg, #128c7e, #075e54);
}

/* ============================================
   OTHER CATEGORIES GRID
   ============================================ */
.other-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.other-category-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.other-category-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.other-category-card__icon {
    width: 18px;
    height: 18px;
    color: var(--primary-500);
}

.other-category-card__content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.other-category-card__content span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================
   NO RESULTS
   ============================================ */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.no-results .icon {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.no-results h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.no-results p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ============================================
/* ============================================
   CTA SECTION
   ============================================ */
.products-page .cta-section {
    position: relative;
    padding: 5rem 0;
    text-align: center;
    overflow: hidden;
}

/* ============================================
   PRODUCT GALLERY ENHANCEMENTS
   ============================================ */
.product-detail__image-area {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-detail__image {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.product-detail__image:hover .btn-pdf-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.btn-pdf-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-600);
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
    text-decoration: none;
    backdrop-filter: blur(5px);
}

.btn-pdf-overlay:hover {
    background: white;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    color: var(--primary-700);
}

.btn-pdf-overlay svg {
    width: 24px;
    height: 24px;
}

.product-gallery-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-gallery-thumbnails {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 0.75rem;
    padding-bottom: 5px;
    /* For scrollbar if visible */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    flex: 1;
}

.product-gallery-thumbnails::-webkit-scrollbar {
    display: none;
}

.gallery-thumb {
    flex: 0 0 80px;
    /* Fixed width for thumbnails */
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.gallery-nav {
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--dark-500);
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.gallery-nav:hover {
    background: var(--primary-50);
    color: var(--primary-600);
    border-color: var(--primary-200);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.gallery-thumb:hover img,
.gallery-thumb.active img {
    opacity: 1;
}

.gallery-thumb.active {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(15, 94, 168, 0.1);
}

.btn--pdf {
    border-width: 2px;
    font-weight: 700;
}

.btn--pdf:hover {
    background: var(--primary-500);
    color: white;
}

/* ============================================
   PRODUCT USES SECTION
   ============================================ */
.product-uses-section {
    background: white;
    padding-top: 3rem;
    padding-bottom: 3rem;
    border-top: 1px solid var(--neutral-100);
}

.product-uses-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item-lightbox {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 250px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-item-lightbox:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.gallery-item-lightbox img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item-lightbox:hover img {
    transform: scale(1.05);
}

.products-page .cta__bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    z-index: -1;
}

.products-page .cta-content h2 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
}

.products-page .cta-content p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-grid--small {
        grid-template-columns: repeat(3, 1fr);
    }

    .other-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .products-layout {
        grid-template-columns: 1fr;
    }

    .products-sidebar {
        position: static;
    }

    .sidebar-categories {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar-categories button {
        flex: 0 0 auto;
    }

    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-detail__image img {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-categories-grid {
        grid-template-columns: 1fr;
    }

    .product-category-card__image {
        height: 180px;
    }

    .products-grid,
    .products-grid--small {
        grid-template-columns: 1fr;
    }

    .other-categories-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .category-box {
        padding: 1.5rem 1rem;
    }

    .category-box__icon {
        width: 50px;
        height: 50px;
    }

    .category-box h3 {
        font-size: 1rem;
    }

    .product-detail__image img {
        height: 260px;
    }

    .product-detail__content h2 {
        font-size: 1.75rem;
    }

    .product-detail__actions {
        flex-direction: column;
    }

    .product-detail__actions .btn {
        width: 100%;
    }

    .products-page .cta-content h2 {
        font-size: 1.75rem;
    }

    .products-page .cta-content p {
        font-size: 1rem;
    }
}

/* ============================================
   HIERARCHICAL SIDEBAR CATEGORIES
   ============================================ */

/* Base children styling - always visible */
.sidebar-categories .children {
    display: block;
    padding-right: 0.75rem;
    margin-top: 4px;
    margin-bottom: 4px;
    list-style: none;
    border-right: 2px solid var(--primary-100);
    margin-right: 0.75rem;
}

/* Nested children (grandchildren) */
.sidebar-categories .children .children {
    border-right-color: var(--neutral-200);
}

.sidebar-categories .cat-item {
    margin-bottom: 2px;
}

/* Category link base styles */
.sidebar-categories .cat-item>a {
    position: relative;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--dark-700);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    text-decoration: none;
    background-color: transparent;
}

/* Parent categories - Main level (0) */
.sidebar-categories>.cat-item>a {
    font-weight: 700;
    font-size: 1rem;
    background-color: var(--neutral-50);
    border-right: 3px solid var(--primary-500);
}

/* Child categories - Level 1 */
.sidebar-categories .children>.cat-item>a {
    font-weight: 600;
    font-size: 0.92rem;
    padding-right: 1rem;
    color: var(--dark-600);
}

/* Grandchild categories - Level 2+ */
.sidebar-categories .children .children>.cat-item>a {
    font-weight: 500;
    font-size: 0.88rem;
    padding-right: 0.75rem;
    color: var(--dark-500);
}

/* Hover effects */
.sidebar-categories .cat-item>a:hover {
    background-color: var(--primary-50);
    color: var(--primary-600);
}

/* ===== ACTIVE/CURRENT CATEGORY - PROMINENT STYLING ===== */
.sidebar-categories .cat-item.current-cat>a {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white !important;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(15, 94, 168, 0.3);
    border-right: 3px solid var(--secondary-400) !important;
}

.sidebar-categories .cat-item.current-cat>a .icon {
    color: white !important;
    opacity: 1;
}

.sidebar-categories .cat-item.current-cat>a .cat-count {
    background-color: rgba(255, 255, 255, 0.25);
    color: white;
}

/* ===== ANCESTOR OF CURRENT - SUBTLE HIGHLIGHT ===== */
.sidebar-categories .cat-item.current-cat-ancestor>a {
    background-color: var(--primary-50);
    color: var(--primary-700);
    border-right: 3px solid var(--primary-400);
}

.sidebar-categories .cat-item.current-cat-ancestor>a .icon {
    color: var(--primary-500);
    opacity: 1;
}

/* Icon styling */
.sidebar-categories .cat-item>a .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.6;
    transition: all 0.25s ease;
}

.sidebar-categories .cat-item.current-cat>a .icon,
.sidebar-categories .cat-item>a:hover .icon {
    opacity: 1;
    color: var(--primary-500);
}

/* Count badge */
.sidebar-categories .cat-item>a span:last-child {
    margin-right: auto;
    margin-left: 0;
    font-size: 0.75rem;
    padding: 2px 8px;
    background-color: var(--neutral-100);
    border-radius: 999px;
    color: var(--dark-500);
    font-weight: 600;
}

.sidebar-categories .cat-item.current-cat>a span.cat-count {
    background-color: var(--primary-200);
    color: var(--primary-800);
}

/* Indent icon for sub-categories */
.sidebar-categories .indent-icon {
    display: none;
}

/* Category name styling */
.sidebar-categories .cat-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Category count badge */
.sidebar-categories .cat-count {
    font-size: 0.75rem;
    padding: 2px 8px;
    background-color: var(--neutral-100);
    border-radius: 999px;
    color: var(--dark-500);
    font-weight: 600;
    flex-shrink: 0;
}

/* Depth-based styling */
.sidebar-categories .cat-item.depth-0 {
    position: relative;
}

.sidebar-categories .cat-item.depth-1 {
    position: relative;
}

.sidebar-categories .cat-item.depth-2,
.sidebar-categories .cat-item.depth-3 {
    position: relative;
}

/* Hierarchy visual indicators */
.sidebar-categories .children>.cat-item {
    position: relative;
}

.sidebar-categories .children>.cat-item::before {
    content: '';
    position: absolute;
    right: -0.5rem;
    top: 50%;
    width: 6px;
    height: 1px;
    background-color: var(--primary-200);
}

/* ============================================
   PRODUCT DETAIL GRID LAYOUT
   ============================================ */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    margin-bottom: 4rem;
}

@media (max-width: 992px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ============================================
   PRODUCT LIGHTBOX
   ============================================ */
.product-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.product-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    z-index: 1000;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    transition: all 0.3s;
    z-index: 1000;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav--prev {
    right: 30px;
    /* RTL context */
}

.lightbox-nav--next {
    left: 30px;
    /* RTL context */
}

/* Center Datasheet Button */
.product-detail__datasheet {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 1.5rem 0;
}

.btn-datasheet {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 2px solid var(--primary-100);
    padding: 12px 24px;
    border-radius: 50px;
    color: var(--primary-600);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-datasheet:hover {
    border-color: var(--primary-500);
    background: var(--primary-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-datasheet .pdf-badge {
    background: #ff4747;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
}

/* Clean up duplicate descriptions if any */
.product-category-page .category-description:not(.hero-description-text),
.product-category-page .taxonomy-description:not(.hero-description-text),
.product-category-page .term-description:not(.hero-description-text) {
    display: none !important;
}

/* Service Page Enhancements */
.service-text-lg {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-primary);
    max-width: 100%;
}

.service-text-lg p {
    margin-bottom: 1.5rem;
}

.gallery-item-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.gallery-item-caption {
    text-align: center;
    margin-top: 0.75rem;
    color: var(--primary-600);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #eee;
}

.gallery-item-inner {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item-wrapper:hover .gallery-item-inner {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.lightbox-caption {
    text-align: center;
    color: white;
    margin-top: 10px;
    font-size: 1.1rem;
    font-weight: 500;
}