/* Products Page Styles */

.products-page {
    width: 100%;
    overflow-x: hidden;
}

/* Page Header */
/* Page Header */
.page-header {
    padding: calc(var(--navbar-height) + 2rem) 2rem 3rem;
    background: linear-gradient(135deg, #001f3f 0%, #003366 100%);
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.page-header h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
    background: linear-gradient(45deg, #fff, #d4af37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.page-header p {
    font-size: 1.3rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Product Lines Section */
.product-lines {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-white);
}

.product-line-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

/* Bathrooms cards - 2 columns side by side (larger size) */
.product-line-cards.bathrooms-cards {
    grid-template-columns: repeat(2, 1fr);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.kitchen-lines-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Bathroom subcategories - 3 smaller cards side by side */
.bathroom-subcategories-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem !important;
    max-width: 900px !important;
    margin: 0 auto !important;
}

.bathroom-subcategories-grid .product-line-card {
    max-width: 280px;
}

.bathroom-subcategories-grid .product-line-card .product-line-image {
    aspect-ratio: 3/4 !important;
    height: auto !important;
}

.bathroom-subcategories-grid .product-line-card .product-line-image img {
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 900px) {
    .bathroom-subcategories-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem !important;
        max-width: 100% !important;
    }
}

@media (max-width: 600px) {
    .bathroom-subcategories-grid {
        grid-template-columns: 1fr !important;
        max-width: 300px !important;
    }
}

/* Products Grid Section */
.products-grid {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-white);
    position: relative;
    width: 100%;
}

/* Full width layout for accessories with filter */
.products-grid .container.with-filter {
    max-width: 100%;
    padding: 0;
    margin: 0;
    width: 100%;
    position: relative;
}

.product-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-top: 0;
}

/* ... existing code ... */

/* For accessories page with filter */
.products-content .product-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

@media (max-width: 1200px) {
    .products-content .product-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Products with Filter Layout (for accessories) */
.container.with-filter {
    display: flex;
    gap: 0;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

.products-with-filter {
    display: flex;
    gap: 0;
    width: 100%;
    align-items: flex-start;
    position: relative;
}

/* Mobile Filter Toggle - Hidden on desktop */
.mobile-filter-toggle {
    display: none;
}

.mobile-filter-overlay {
    display: none;
}

/* Filter Sidebar - positioned at absolute left */
.filter-sidebar {
    flex-shrink: 0;
    width: 400px;
    background-color: var(--color-white);
    border: none;
    border-radius: 0;
    padding: var(--spacing-md) var(--spacing-sm);
    box-shadow: none;
    position: sticky;
    left: 0;
    top: calc(var(--navbar-height) + var(--spacing-md));
    max-height: calc(100vh - var(--navbar-height) - var(--spacing-xl));
    overflow-y: auto;
    z-index: 10;
    margin-left: 30px;
    margin-right: 0;
}

.filter-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding: 0;
    border-bottom: none;
}

.filter-icon {
    color: var(--color-charcoal);
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.filter-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-charcoal);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-category-item {
    margin-bottom: 0;
}

.filter-category-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background-color: #F5F5F5;
    border: 1px solid #E0E0E0;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.filter-category-button:hover {
    background-color: #EEEEEE;
    border-color: #D0D0D0;
}

.filter-category-button.active {
    background-color: #9E9E9E;
    border-color: #9E9E9E;
    color: var(--color-white);
}

.filter-category-button.active .filter-category-name {
    color: var(--color-white);
}

.filter-category-button.active .filter-arrow {
    color: var(--color-white);
}

.filter-category-name {
    font-size: 1.1rem;
    color: var(--color-charcoal);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex: 1;
}

.filter-arrow {
    color: var(--color-charcoal);
    transition: transform var(--transition-fast);
    flex-shrink: 0;
    margin-left: var(--spacing-sm);
    width: 14px;
    height: 14px;
}

.filter-sub-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
    padding-left: 0;
}

.filter-item {
    width: 100%;
    text-align: left;
    padding: 16px 24px 16px 40px;
    background: none;
    border: none;
    cursor: pointer;
    color: #555;
    transition: all var(--transition-fast);
    font-family: inherit;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
}

.filter-item:hover {
    background-color: #f9f9f9;
    color: #000;
    padding-left: 45px;
}

.filter-item.active {
    background-color: #f0f0f0;
    color: #d4af37;
    font-weight: 600;
    border-left-color: #d4af37;
}

/* Products Content Area */
.products-content {
    flex: 1;
    padding: 0 var(--spacing-lg);
    width: calc(100% - 430px);
}

.products-header {
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
}

.products-count {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-charcoal);
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: var(--font-heading);
}

/* Products grid when filter is present */
.products-with-filter .product-cards {
    margin-top: 0;
}

.product-card-skeleton {
    background: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.no-products {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--color-charcoal-light);
    grid-column: 1 / -1;
}

.product-line-card-skeleton {
    background: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.error-message {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--color-charcoal-light);
}

.error-message h2 {
    color: var(--color-secondary);
    margin-bottom: var(--spacing-sm);
}

.error-message .btn {
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color var(--transition-fast);
}

.error-message .btn:hover {
    background-color: var(--color-primary-dark);
}

/* ===========================
   Product Line Card (from React ProductLineCard.css)
   =========================== */
.product-line-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    background-color: var(--color-white);
    cursor: pointer;
}

.product-line-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-line-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-line-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: var(--color-grey-light);
}

.product-line-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.product-line-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    transition: background var(--transition-normal);
}

.product-line-card:hover .product-line-overlay {
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.5) 100%);
}

.product-line-info {
    padding: var(--spacing-md);
    text-align: center;
}

.product-line-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
}

.product-line-tagline {
    font-size: 1rem;
    color: var(--color-charcoal-light);
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
}

.product-line-link {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 600;
    transition: color var(--transition-fast);
}

.product-line-card:hover .product-line-link {
    color: var(--color-secondary);
}

/* ===========================
   Product Card (from React ProductCard.css)
   =========================== */
.product-card {
    background: var(--color-white);
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    max-width: 100%;
    width: 100%;
    border: 1px solid transparent;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    width: 100%;
    position: relative;
    z-index: 1;
}

.card-image-wrapper {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    position: relative;
    background: var(--color-white);
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.card-images-container {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    align-items: center;
    justify-items: center;
}

.card-images-container:has(.card-image-secondary) {
    grid-template-columns: 1fr 1fr;
}

.card-image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    display: block;
}

.card-image-secondary {
    border-left: 1px solid var(--color-grey-medium);
    padding-left: 0.5rem;
}

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

.product-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #D4AF37;
    color: var(--color-white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.card-content {
    padding: 1rem;
    text-align: left;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-product-line {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--color-charcoal);
    line-height: 1.3;
    letter-spacing: 0.3px;
    font-family: var(--font-heading);
}

.card-desc {
    color: var(--color-charcoal-light);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.card-product-id {
    color: var(--color-charcoal-light);
    margin: 0;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.4;
}

/* ===========================
   Mobile Responsive
   =========================== */
@media (max-width: 768px) {
    .page-header {
        padding: calc(var(--spacing-md) + var(--navbar-height)) var(--spacing-sm) var(--spacing-md);
    }

    .page-header h1 {
        font-size: clamp(1.75rem, 6vw, 2rem);
        margin-bottom: 0.75rem;
        line-height: 1.2;
    }

    .page-header p {
        font-size: clamp(0.9rem, 3vw, 1rem);
        line-height: 1.5;
        padding: 0 var(--spacing-sm);
    }

    .product-line-cards {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        padding: 0 var(--spacing-sm);
    }

    /* On mobile, bathrooms cards stack vertically */
    .product-line-cards.bathrooms-cards {
        grid-template-columns: 1fr;
    }

    .product-cards {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        padding: 0 var(--spacing-sm);
    }

    /* Mobile: Stack filter above products */
    .container.with-filter {
        flex-direction: column;
        padding: 0;
    }

    .products-with-filter {
        flex-direction: column;
        gap: 0;
    }

    /* Mobile Filter Toggle - Visible on mobile */
    .mobile-filter-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 12px 16px;
        background-color: var(--color-white);
        border: 1px solid var(--color-grey-medium);
        border-radius: 4px;
        font-family: var(--font-heading);
        font-weight: 700;
        text-transform: uppercase;
        color: var(--color-charcoal);
        margin-bottom: var(--spacing-sm);
        cursor: pointer;
        transition: all var(--transition-fast);
        box-shadow: var(--shadow-sm);
    }

    .mobile-filter-toggle:hover {
        background-color: var(--color-grey-light);
    }

    .mobile-filter-toggle.active {
        background-color: var(--color-primary);
        color: var(--color-white);
        border-color: var(--color-primary);
    }

    .mobile-filter-toggle.active svg {
        color: var(--color-white);
        transform: rotate(180deg);
    }

    .mobile-filter-toggle svg {
        transition: transform var(--transition-fast);
    }

    .mobile-filter-overlay {
        display: block;
        /* Used for JS toggle */
    }

    /* Filter Sidebar - Dropdown style on mobile */
    .filter-sidebar {
        width: 100%;
        position: relative;
        left: 0;
        top: 0;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        margin-left: 0;
        margin-right: 0;
        border-radius: 4px;
        box-shadow: none;
        transition: max-height 0.3s ease-out, padding 0.3s ease, margin 0.3s ease;
        opacity: 0;
        border: 1px solid transparent;
    }

    .filter-sidebar.active {
        max-height: 800px;
        /* Large enough to show content */
        padding: var(--spacing-md) var(--spacing-sm);
        margin-bottom: var(--spacing-md);
        opacity: 1;
        box-shadow: var(--shadow-md);
        border-color: var(--color-grey-medium);
        overflow-y: auto;
    }

    .filter-header {
        margin-bottom: var(--spacing-sm);
    }

    .filter-header h2 {
        font-size: 1.1rem;
    }

    .filter-category-button {
        padding: 16px 20px;
        font-size: 0.95rem;
    }

    .filter-category-name {
        font-size: 1rem;
    }

    .products-content {
        width: 100%;
        padding: var(--spacing-md) var(--spacing-sm);
    }

    .products-with-filter .product-cards {
        width: 100%;
        padding: 0;
    }

    .products-count {
        font-size: clamp(1.25rem, 5vw, 1.5rem);
        margin-bottom: var(--spacing-sm);
    }

    .products-grid {
        padding: var(--spacing-md) 0;
    }

    /* Product Line Card Mobile */
    .product-line-name {
        font-size: 1.5rem;
    }

    .product-line-tagline {
        font-size: 0.9rem;
    }

    /* Product Card Mobile */
    .product-card {
        border-radius: 0;
        margin-bottom: var(--spacing-sm);
    }

    .card-image-wrapper {
        padding: 0.75rem;
    }

    .card-images-container {
        gap: 0.25rem;
    }

    .card-image-secondary {
        padding-left: 0.25rem;
        border-left-width: 1px;
    }

    .card-content {
        padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-md);
    }

    .card-product-line {
        font-size: clamp(1.05rem, 3.5vw, 1.15rem);
        margin-bottom: 0.25rem;
    }

    .card-desc {
        font-size: clamp(0.85rem, 2.5vw, 0.9rem);
        margin-bottom: 0.25rem;
    }

    .card-product-id {
        font-size: clamp(0.8rem, 2vw, 0.85rem);
    }

    .product-tag {
        top: 6px;
        right: 6px;
        padding: 3px 10px;
        font-size: 0.7rem;
    }
}