/* ==========================================================================
   Accessories Archive Custom Styling
   ========================================================================== */

/* Page Section */
.accessories-archive-section {
    padding: 30px 40px 80px;
    background-color: #fff;
}

/* Control Bar (Filters + switcher + sort) */
.accessories-control-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 16px;
    margin-bottom: 35px;
}

/* Filter Bar Left */
.accessories-filters-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.filter-dropdown-wrapper {
    position: relative;
}

.filter-dropdown-btn {
    background: none;
    border: none;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #4F4F4F;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 0;
    transition: color 0.25s ease;
}

.filter-dropdown-btn i {
    font-size: 10px;
    margin-top: 1px;
}

.filter-dropdown-btn:hover {
    color: var(--theme-color);
}

.filter-dropdown-wrapper.active .filter-dropdown-btn {
    color: #000;
    font-weight: 700;
}

.filter-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    min-width: 180px;
    z-index: 1000;
    display: none;
    margin-top: 6px;
    padding: 12px 16px;
}

.filter-dropdown-wrapper.active .filter-dropdown-menu {
    display: block;
}

.filter-dropdown-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-dropdown-menu ul li {
    margin-bottom: 8px;
}

.filter-dropdown-menu ul li:last-child {
    margin-bottom: 0;
}

.filter-dropdown-menu ul li a {
    font-family: 'Lato', sans-serif;
    font-size: 13.5px;
    color: #5F5F5F;
    text-decoration: none;
    display: block;
    padding: 4px 0;
    transition: color 0.2s ease, font-weight 0.2s ease;
}

.filter-dropdown-menu ul li a:hover,
.filter-dropdown-menu ul li a.active {
    color: var(--theme-color);
    font-weight: 600;
}

/* Color Circle Filters */
.color-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.color-circle-item {
    display: flex;
    align-items: center;
}

.color-option-link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-decoration: none;
}

.color-circle {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.color-label {
    font-family: 'Lato', sans-serif;
    font-size: 13.5px;
    color: #5F5F5F;
}

.color-option-link:hover .color-label,
.color-option-link.active .color-label {
    color: var(--theme-color);
    font-weight: 600;
}

.color-option-link.active .color-circle {
    outline: 2px solid var(--theme-color);
    outline-offset: 1px;
}

/* Size List Filters */
.size-options-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Controls Right */
.accessories-controls-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.accessories-products-count {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    color: #5f5f5f;
    border-right: 1px solid #e5e5e5;
    padding-right: 20px;
}

.accessories-products-count .count-value {
    color: #000;
    font-weight: 600;
}

/* Layout Switcher */
.accessories-layout-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    border-right: 1px solid #e5e5e5;
    padding-right: 20px;
}

.layout-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px;
    opacity: 0.35;
    transition: opacity 0.2s ease;
    height: 24px;
}

.layout-btn:hover,
.layout-btn.active {
    opacity: 1;
}

.layout-btn .bar {
    display: inline-block;
    background-color: #000;
    border-radius: 0.5px;
    height: 18px;
}

/* 2 columns switcher bars */
.layout-btn[data-cols="2"] .bar {
    width: 6px;
}

/* 4 columns switcher bars */
.layout-btn[data-cols="4"] .bar {
    width: 3px;
}

/* 5 columns switcher bars */
.layout-btn[data-cols="5"] .bar {
    width: 2px;
}

/* Sorting */
.accessories-sorting {
    display: flex;
    align-items: center;
    gap: 8px;
}

.accessories-sorting .sort-label {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    color: #5F5F5F;
}

.accessories-sorting .sort-select {
    border: none;
    background: transparent;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    outline: none;
    cursor: pointer;
    padding: 4px 0;
}

/* Outer Grid Loader Spinner */
.accessories-grid-container-outer {
    position: relative;
    min-height: 300px;
}

.accessories-grid-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 50;
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding-top: 100px;
}

.accessories-grid-container-outer.loading .accessories-grid-loader {
    display: flex;
}

.accessories-grid-loader .spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--theme-color);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Products Grid */
.accessories-products-grid {
    display: grid;
    gap: 35px 24px;
    width: 100%;
    transition: opacity 0.2s ease;
}

.accessories-grid-container-outer.loading .accessories-products-grid {
    opacity: 0.5;
}

/* Column Rules */
.accessories-products-grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.accessories-products-grid.cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.accessories-products-grid.cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* Product Card Styling */
.product-item-wrapper {
    width: 100%;
    min-width: 0;
}

.collection-product-block {
    position: relative;
    background-color: #fff;
    overflow: hidden;
}

/* Image + Hover Overlay */
.collection-product-block .product-img {
    position: relative;
    overflow: hidden;
    background-color: #f7f7f7;
}

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

.collection-product-block:hover .product-img img {
    transform: scale(1.02);
}

/* Add to Bag Button Overlay */
.add-to-bag-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    padding: 16px 10px;
    text-align: center;
    transform: translateY(101%);
    transition: transform 0.3s ease-in-out;
    z-index: 15;
}

.collection-product-block:hover .add-to-bag-overlay {
    transform: translateY(0);
}

.add-to-bag-btn {
    font-family: 'Lato', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    text-transform: uppercase;
    color: #121212;
    text-decoration: none !important;
    letter-spacing: 1.5px;
    display: block;
    transition: color 0.2s ease;
}

.add-to-bag-btn:hover {
    color: var(--theme-color);
}

/* Slick Slider controls on Cards */
.product-gallery-slider {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Hide subsequent gallery slides before slick is initialized to avoid vertical stack layout shift */
.product-gallery-slider:not(.slick-initialized) .slide-item:not(:first-child) {
    display: none;
}

.product-gallery-slider .slick-list,
.product-gallery-slider .slick-track {
    height: 100%;
}

/* Arrow Navigation */
.product-gallery-slider .slick-prev,
.product-gallery-slider .slick-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 50%;
    color: #000;
    font-size: 12px;
    z-index: 10;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease, background-color 0.2s ease;
}

.product-gallery-slider .slick-prev {
    left: 12px;
}

.product-gallery-slider .slick-next {
    right: 12px;
}

.product-gallery-slider .slick-prev:hover,
.product-gallery-slider .slick-next:hover {
    background-color: #fff;
    color: var(--theme-color);
}

/* Show arrows on hover */
.collection-product-block:hover .product-gallery-slider .slick-prev,
.collection-product-block:hover .product-gallery-slider .slick-next {
    opacity: 1;
    visibility: visible;
}

/* Underline Product Title on Hover */
.collection-product-block:hover .collection-product-details p a {
    border-bottom: 2px solid #FFA600;
    padding-bottom: 2px;
    color: #000;
}

.collection-product-details p a {
    transition: border-color 0.2s ease;
    text-decoration: none !important;
}

/* Load More Section */
.accessories-load-more-wrapper {
    margin: 50px 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.accessories-load-more-wrapper.hidden {
    display: none;
}

.accessories-load-more-btn {
    padding: 12px 36px;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    border: 1px solid #000;
    background: #000;
    color: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
}

.accessories-load-more-btn:hover {
    background: var(--theme-color);
    border-color: var(--theme-color);
    color: #fff;
}

.load-more-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--theme-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 0.8s linear infinite;
    display: none;
}

.accessories-load-more-wrapper.loading .accessories-load-more-btn {
    display: none;
}

.accessories-load-more-wrapper.loading .load-more-spinner {
    display: block;
}

/* No products message */
.no-products-found {
    grid-column: 1 / -1;
    text-align: center;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    color: #5F5F5F;
    padding: 60px 0;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1200px) {
    .accessories-products-grid.cols-5 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .accessories-products-grid.cols-4,
    .accessories-products-grid.cols-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .accessories-control-bar {
        padding: 0 10px 16px;
    }
    
    .accessories-archive-section {
        padding: 20px 20px 60px;
    }
}

@media (max-width: 768px) {
    .accessories-control-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding-bottom: 20px;
    }

    .accessories-filters-left {
        flex-wrap: wrap;
        gap: 12px 18px;
        width: 100%;
    }

    .accessories-controls-right {
        width: 100%;
        justify-content: space-between;
        gap: 15px;
    }
    
    /* Touch UI settings */
    .product-gallery-slider .slick-prev,
    .product-gallery-slider .slick-next {
        opacity: 0.8;
        visibility: visible;
    }
    
    .add-to-bag-overlay {
        transform: translateY(0);
        padding: 10px;
        background: rgba(255, 255, 255, 0.9);
    }

    .accessories-products-grid.cols-2,
    .accessories-products-grid.cols-4,
    .accessories-products-grid.cols-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .accessories-products-grid.cols-2,
    .accessories-products-grid.cols-4,
    .accessories-products-grid.cols-5 {
        grid-template-columns: minmax(0, 1fr);
    }
    
    .accessories-controls-right {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .accessories-layout-switcher {
        display: none; /* Layout switching not needed on single column mobile */
    }
    
    .accessories-products-count {
        border-right: none;
        padding-right: 0;
    }
}
/* Force sync comment */
