/* ===== WOOCOMMERCE SHOP STYLES ===== */
/* Shop Header */
.shop-header {
    margin-bottom: 2rem;
}

.shop-breadcrumbs .breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-link {
    color: var(--grey);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: var(--dark);
}

.breadcrumb-separator {
    color: var(--grey);
}

.breadcrumb-current {
    color: var(--dark);
}

.shop-results-count {
    margin-top: 0.5rem;
}

/* Shop Header Content */
.shop-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.shop-header-left {
    flex: 1;
}

.shop-header-right {
    flex-shrink: 0;
}

/* Filter Toggle Button */
.btn-toggle-filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--white);
    border: 1px solid var(--linegrey);
    border-radius: 4px;
    color: var(--dark);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-toggle-filters:hover {
    background: var(--light);
    border-color: var(--dark);
}

.btn-toggle-filters svg {
    width: 20px;
    height: 20px;
}

/* Shop Layout - Full Width for Products */
.shop-layout {
    margin-bottom: 2rem;
}

/* Product Grid */
.shop-products {
    min-width: 0;

    /* Prevents grid overflow */
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Product Cards */
.product-card {
    /* position: relative */
    /* background: white */
    /* border-radius: 8px */
    /* overflow: hidden */
    /* transition: transform 0.3s ease, box-shadow 0.3s ease */
}

/* .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
} */
/* Product Link */
.product-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.product-link:hover {
    text-decoration: none;
    color: inherit;
}

.product-image {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f8f8f8;
}

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

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

.product-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-actions {
    opacity: 1;
}

.btn-favorite {
    background: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    color: var(--grey);
}

.btn-favorite:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.1);
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    margin: 0 0 0.5rem 0;
    font-weight: 500;
    line-height: 1.3;
}

.product-brand {
    margin: 0 0 0.75rem 0;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-category {
    background: var(--lightgrey);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
}

/* Pagination */
.shop-pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.btn-load-more {
    padding: 0.75rem 2rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-load-more:hover {
    background: var(--dark);
}

/* Filter Sidebar - Slide-in Panel */
.shop-filters-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.1);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.shop-filters-overlay.active {
    opacity: 1;
    visibility: visible;
}

.shop-filters-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: white;
    padding: 1rem;
    /* This is the scrollable area with Lenis */
    /* overflow-y: hidden; */
    overflow-x: hidden;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);

    /* Let Lenis handle smooth scrolling */
    -webkit-overflow-scrolling: touch;

    /* CRITICAL: Tell Lenis to ignore this element */
    /* overscroll-behavior: contain; */
}

/* Custom scrollbar for filter panel */
.shop-filters-panel::-webkit-scrollbar {
    width: 4px;
}

.shop-filters-panel::-webkit-scrollbar-track {
    background: var(--light);
    border-radius: 2px;
}

.shop-filters-panel::-webkit-scrollbar-thumb {
    background: var(--linegrey);
    border-radius: 2px;
}

.shop-filters-overlay.active .shop-filters-panel {
    transform: translateX(0);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e5e5;
}

.filters-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filters-title {
    margin: 0;
    font-weight: 600;
    font-size: 1.25rem;
    color: #1a1a1a;
}

.btn-clear-filters {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s ease;
    font-size: 0.875rem;
    padding: 0;
}

.btn-clear-filters:hover {
    color: #1a1a1a;
}

.btn-close-filters {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #1a1a1a;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.btn-close-filters:hover {
    background: #f5f5f5;
    transform: scale(1.1);
}

.btn-close-filters svg {
    width: 20px;
    height: 20px;
}

/* Filter Content Wrapper - Normal container, scrolling handled by parent panel */
.filter-accordion-wrapper {
    position: relative;
}

/* Body scroll lock when filter overlay is open - preserve scroll position */
body.filters-overlay-open {
    overflow: hidden;
    /* Don't use position: fixed to avoid scroll jumping */
}

/* Filter Sections (Accordion Style) */
.filter-section {
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 0;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.filter-header:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.filter-title {
    margin: 0;
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1a1a1a;
}

.filter-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    transition: transform 0.2s ease;
    color: #666;
}

.filter-toggle[aria-expanded="true"] {
    transform: rotate(180deg);
}

.filter-content {
    padding-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.filter-content[style*="display: none"] {
    display: none !important;
}

/* Filter Options */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filter-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0.25rem 0;
}

.filter-option:hover {
    color: #1a1a1a;
}

.filter-option input[type="checkbox"] {
    display: none;
}

.option-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.checkmark {
    width: 16px;
    height: 16px;
    border: 1px solid #ccc;
    border-radius: 2px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.filter-option input[type="checkbox"]:checked + .option-left .checkmark {
    background-color: #1a1a1a;
    border-color: #1a1a1a;
}

.filter-option input[type="checkbox"]:checked + .option-left .checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.option-text {
    font-size: 0.875rem;
    color: #666;
    text-transform: capitalize;
}

.option-count {
    color: #999;
    font-size: 0.75rem;
    margin-left: auto;
}

/* Color Swatches */
.filter-colors {
    padding: 0.5rem 0;
}

.color-swatches {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
}

.color-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.color-swatch input[type="checkbox"] {
    display: none;
}

.color-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: all 0.2s ease;
    position: relative;
    border: 2px solid transparent;
}

.color-swatch input[type="checkbox"]:checked + .color-info .color-circle {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #1a1a1a;
}

.color-swatch:hover .color-circle {
    transform: scale(1.1);
}

.color-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.color-name {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

/* Filter Accordion Styles */
.filter-accordion-wrapper {
   /*  border: 1px solid var(--lightgrey);
    border-radius: 8px; */
    overflow: hidden;
}

.filter-accordion {
    border-bottom: 1px solid var(--lightgrey);
}

.filter-accordion:last-child {
    border-bottom: none;
}

.filter-accordion__button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.filter-accordion__button:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.filter-accordion__title {
    margin: 0;
}

.filter-accordion__title h3 {
    margin: 0;
    font-weight: 500;
}

.filter-accordion__icon {
    position: relative;
    width: 1.25rem;
    height: 1.25rem;

    /* Remove CSS transitions - GSAP handles icon animations */
    /* transition: transform 0.3s ease; */
}

.filter-accordion__line {
    position: absolute;
    background-color: var(--dark);

    /* Remove CSS transitions - GSAP handles line animations */
    /* transition: all 0.3s ease; */
    width: 2px;
    height: 1.25rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.filter-accordion__line:last-child {
    /* Horizontal line - matches the centralized accordion pattern */
    transform: translate(-50%, -50%) rotate(90deg);
}

.filter-accordion__content {
    /* Remove problematic padding that causes content overflow */
    padding: 0;
    overflow: hidden;

    /* Remove CSS transitions - let GSAP handle animations */
    /* height: 0; */
    /* transition: height 0.3s ease; */
}

/* Remove CSS-based active states - GSAP handles these */
/* .filter-accordion.is-active .filter-accordion__content {
    height: auto;
}

.filter-accordion.is-active .filter-accordion__line:first-child {
    transform: translateX(-50%) rotate(90deg);
} */
.filter-accordion-margin-bottom {
    /* This class provides consistent spacing like other accordions */
    margin-bottom: 0;

    /* Add padding here instead of on the parent container to prevent overflow */
    padding: 1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .shop-header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .btn-toggle-filters {
        align-self: flex-end;
        width: auto;
    }

    .shop-filters-panel {
        width: 350px;
        padding: 1.5rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .product-actions {
        opacity: 1;

        /* Always show on mobile */
    }

    .color-swatches {
        grid-template-columns: repeat(4, 1fr);
    }

    .filters-title {
        font-size: 1.1rem;
    }

    .filter-title {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .shop-filters-panel {
        width: 100%;
        padding: 1rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .shop-layout {
        gap: 1.5rem;
    }

    .product-info {
        padding: 1rem;
    }

    .color-swatches {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .color-circle {
        width: 20px;
        height: 20px;
    }

    .color-name {
        font-size: 0.7rem;
    }

    .filters-title {
        font-size: 1rem;
    }

    .filter-title {
        font-size: 0.75rem;
    }

    .option-text {
        font-size: 0.8rem;
    }

    .option-count {
        font-size: 0.7rem;
    }
}

.shop-breadcrumbs .breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-link {
    color: var(--text-color-grey);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: var(--text-color-primary);
}

.breadcrumb-separator {
    color: var(--text-color-grey);
}

.breadcrumb-current {
    color: var(--text-color-primary);
}

.shop-results-count {
    margin-top: 0.5rem;
}

/* Shop Layout */
.shop-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

/* Product Grid */
.shop-products {
    min-width: 0;

    /* Prevents grid overflow */
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Product Cards */
.product-card {
    /* position: relative */
    /* background: white */
    /* border-radius: 8px */
    /* overflow: hidden */
    /* transition: transform 0.3s ease, box-shadow 0.3s ease */
}

/* .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
} */
.product-image {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f8f8f8;
}

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

/* .product-card:hover .product-img {
    transform: scale(1.05);
} */
.product-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-actions {
    opacity: 1;
}

.btn-favorite {
    background: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    color: var(--text-color-grey);
}

.btn-favorite:hover {
    background: var(--color-primary);
    color: white;
    transform: scale(1.1);
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    margin: 0 0 0.5rem 0;
    font-weight: 500;
    line-height: 1.3;
}

.product-brand {
    margin: 0 0 0.75rem 0;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-category {
    background: var(--background-color-light);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
}

/* Pagination */
.shop-pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.btn-load-more {
    padding: 0.75rem 2rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-load-more:hover {
    background: var(--color-primary-dark);
}