/* ==========================================================================
   Custom Shop Layout Styles
   ========================================================================== */

/* ── Header height token — update here when the header changes ──
   Desktop  (>1024px): padding(30+30) + single-line logo + nav row
   Mobile   (≤1024px): padding(14+14) + two-line logo, no nav
   Small    (≤480px):  padding(12+12) + two-line logo, no nav
   ──────────────────────────────────────────────────────────────── */
:root {
    --shop-header-h: 132px;
}

@media (max-width: 1024px) {
    :root { --shop-header-h: 72px; }
}

@media (max-width: 480px) {
    :root { --shop-header-h: 68px; }
}

/* Product Zoom Out Animation */
@keyframes productZoomOut {
    0% {
        opacity: 0;
        transform: scale(1.15);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.product-card {
    opacity: 0;
    overflow: hidden;
}

.product-card.animate-in {
    opacity: 1;
    transition: opacity 0.6s ease-out;
}

.product-card .product-card-inner {
    transform: scale(1.15);
}

.product-card.animate-in .product-card-inner {
    animation: productZoomOut 0.6s ease-out forwards;
}

/* Stagger animation delays for sequential effect */
.product-card.animate-in:nth-child(1) .product-card-inner { animation-delay: 0.05s; }
.product-card.animate-in:nth-child(2) .product-card-inner { animation-delay: 0.1s; }
.product-card.animate-in:nth-child(3) .product-card-inner { animation-delay: 0.15s; }
.product-card.animate-in:nth-child(4) .product-card-inner { animation-delay: 0.2s; }
.product-card.animate-in:nth-child(5) .product-card-inner { animation-delay: 0.25s; }
.product-card.animate-in:nth-child(6) .product-card-inner { animation-delay: 0.3s; }
.product-card.animate-in:nth-child(7) .product-card-inner { animation-delay: 0.35s; }
.product-card.animate-in:nth-child(8) .product-card-inner { animation-delay: 0.4s; }
.product-card.animate-in:nth-child(9) .product-card-inner { animation-delay: 0.45s; }
.product-card.animate-in:nth-child(10) .product-card-inner { animation-delay: 0.5s; }
.product-card.animate-in:nth-child(11) .product-card-inner { animation-delay: 0.55s; }
.product-card.animate-in:nth-child(12) .product-card-inner { animation-delay: 0.6s; }

/* Shop Wrapper */
.custom-shop-wrapper {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0 !important;
    position: relative;
    margin-top: 0px;
}

.post-type-archive .main-content{
    padding: 0 !important;
}

.site-content,
.main-page-wrapper,
.container,
.woocommerce {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Shop Toolbar */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0;
    background: white;
    margin-top: 40px;
    position: sticky;
    top: var(--shop-header-h); /* tracks header height via CSS variable */
    z-index: 400;
}

/* Filters Toggle Button */
.filters-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: none;
    padding: 20px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.2s ease;
    color: #333;
}

#filtersToggle{
    background-color: #fff;
    border-right: 1px solid #e0e0e0;
    padding: 20px;
}

.filters-toggle:hover {
    opacity: 0.7;
}

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

/* Sort Toggle Button */
.sort-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.2s ease;
    color: #333;
}

.sort-toggle:hover {
    opacity: 0.7;
}

.sort-toggle svg {
    width: 12px;
    height: 8px;
}

/* Sort Dropdown */
.shop-sort {
    position: relative;
    padding: 10px !important;
    border-left: 1px solid #e0e0e0;
}

.shop-sort select,
.woocommerce-ordering select {
    background: transparent;
    border: none;
    padding: 0 20px 0 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    color: #333;
    background-image: url("data:image/svg+xml,%3Csvg width='8' height='5' viewBox='0 0 8 5' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L4 4L7 1' stroke='%23333' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
    min-width: auto;
}

.shop-sort select:hover,
.woocommerce-ordering select:hover {
    opacity: 0.7;
}

.shop-sort select:focus,
.woocommerce-ordering select:focus {
    outline: none;
}

/* Sort Sidebar (Right Side) */
.sort-sidebar {
    position: absolute;
    top: 90px;
    right: 0;
    width: 0;
    min-width: 0;
    background: white;
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    border-right: none;
    z-index: 1000;
}

.sort-sidebar.active {
    width: auto !important;
    min-width: 220px !important;
}

.sort-content {
    width: auto;
    background: white;
    height: auto;
}

.sort-header-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #333;
}

.sort-header-new svg {
    width: 14px;
    height: 8px;
}

.sort-options {
    padding: 10px 0;
}

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

.sort-item {
    padding: 4px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #5c4033;
    line-height: 1.5;
    margin: 0;
}

.sort-item:hover {
    background: #f9f9f9;
    color: #000;
}

.sort-item.active {
    color: #000;
    font-weight: 500;
}

/* Shop Main Content - Flexbox Container */
.shop-main-content {
    display: flex;
    gap: 0;
    align-items: flex-start;
}

/* Filters Sidebar */
.filters-sidebar {
    width: 0;
    min-width: 0;
    height: 0;
    background: white;
    transition: width 0.3s ease, min-width 0.3s ease;
    overflow: hidden;
    border-right: 1px solid #e0e0e0;
    order: 1;
}

.filters-sidebar.active {
    width: 260px;
    min-width: 260px;
    height: auto;
    overflow: visible; /* allow sticky on inner content */
}

.filters-content {
    width: 260px;
    background: white;
    height: auto;
    position: sticky;
    top: 144px; /* header (90px) + toolbar (~54px) */
}

.filters-sidebar.active .filters-content {
    transform: translateX(0);
}

/* Filters Widgets */
.filters-widgets {
    padding: 0 20px 20px;
}

/* Individual filter widget */
.filter-widget {
    border-bottom: 1px solid #e8e8e8;
    padding: 0;
    margin: 0;
}

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

/* Section title row: AVAILABILITY ^ */
.filter-title-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    cursor: pointer;
    user-select: none;
}

.filter-title {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #111;
    margin: 0;
}

.filter-collapse-icon svg {
    display: block;
    transition: transform 0.2s ease;
}

.filter-widget.collapsed .filter-collapse-icon svg {
    transform: rotate(180deg);
}

.filter-body {
    overflow: hidden;
    padding-bottom: 18px;
}

.filter-widget.collapsed .filter-body {
    display: none;
}

/* Filter List — checkboxes */
.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-list li {
    margin-bottom: 10px;
}

.filter-list li:last-child {
    margin-bottom: 0;
}

.filter-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 12px;
    letter-spacing: 0.5px;
    color: #333;
    transition: opacity 0.2s ease;
}

.filter-list label:hover {
    opacity: 0.6;
}

/* Square custom checkboxes */
.filter-list input[type="checkbox"] {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #999;
    border-radius: 0;
    cursor: pointer;
    position: relative;
}

.filter-list input[type="checkbox"]:checked {
    background: #111;
    border-color: #111;
}

.filter-list input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 2px;
    top: -1px;
    width: 8px;
    height: 10px;
    border-right: 1.5px solid #fff;
    border-bottom: 1.5px solid #fff;
    transform: rotate(35deg);
}

/* Price Filter */
.price-filter {
    padding-top: 4px;
}

/* Dual range slider */
.price-slider-wrap {
    position: relative;
    height: 2px;
    background: #e0e0e0;
    margin: 24px 0 20px;
}

.price-slider-track {
    position: absolute;
    height: 100%;
    background: #111;
    top: 0;
}

.price-range-input {
    position: absolute;
    width: 100%;
    height: 2px;
    top: 0;
    left: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    outline: none;
    pointer-events: none;
}

.price-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #111;
    cursor: pointer;
    pointer-events: all;
}

.price-range-input::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #111;
    border: none;
    cursor: pointer;
    pointer-events: all;
}

/* Price text inputs */
.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.price-input-group {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    padding: 7px 10px;
    flex: 1;
}

.price-input-group span {
    font-size: 12px;
    color: #333;
    margin-right: 4px;
    flex-shrink: 0;
}

.price-input-group input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 12px;
    color: #333;
    background: transparent;
    -moz-appearance: textfield;
}

.price-input-group input::-webkit-outer-spin-button,
.price-input-group input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.price-separator {
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
}

/* Products Grid */
.products-grid-container {
    margin-top: 0;
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex: 1;
    width: 100%;
    order: 2;
}

.products {
    display: grid;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 5px !important;
    list-style: none;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

ul.products {
    gap: 5px !important;
    padding: 0 !important;
}

.woocommerce ul.products {
    gap: 5px !important;
    padding: 0 !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    padding: 0 !important;
    margin: 0 !important;
}

/* Product Item */
.product {
    position: relative;
    text-align: left;
}

.product-image {
    position: relative;
    overflow: hidden;
    background: #f9f9f9;
    aspect-ratio: 1/1;
    margin-bottom: 15px;
}

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

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

/* Product Info */
.product-title,
.woocommerce-loop-product__title {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.product-title a,
.woocommerce-loop-product__title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-title a:hover,
.woocommerce-loop-product__title a:hover {
    color: #666;
}

.price {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

/* Sold Out Badge */
.sold-out-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 2;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .products {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 5px !important;
    }
}

@media (max-width: 768px) {
    .products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 5px !important;
    }

    .filters-content {
        width: 100%;
    }

    .shop-toolbar {
        gap: 15px;
        align-items: stretch;
        display: flex;
    }

    .shop-toolbar .filters-toggle,
    .shop-toolbar .sort-toggle,
    .shop-toolbar .shop-sort select {
        flex: 1;
        min-width: 0;
        width: auto;
    }
}

@media (max-width: 480px) {
    .products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 5px !important;
    }
    
    .filters-content {
        width: 100%;
    }

    .shop-toolbar {
        display: flex;
        gap: 8px;
        align-items: stretch;
    }

    .shop-toolbar .filters-toggle,
    .shop-toolbar .sort-toggle,
    .shop-toolbar .shop-sort select {
        flex: 1;
        min-width: 0;
        width: auto;
        padding: 12px;
        justify-content: center;
    }
}

/* Pagination */
.woocommerce-pagination {
    margin-top: 60px;
    text-align: center;
}

.woocommerce-pagination ul {
    display: inline-flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-pagination li {
    display: inline-block;
}

.woocommerce-pagination a,
.woocommerce-pagination span {
    display: block;
    padding: 10px 15px;
    border: 1px solid #e5e5e5;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
}

.woocommerce-pagination a:hover,
.woocommerce-pagination .current {
    background: #333;
    color: white;
    border-color: #333;
}

/* ==========================================================================
   Product Card Styles
   ========================================================================== */

/* Product Card Container */
.product-card {
    position: relative;
    list-style: none;
    padding: 0 !important;
    margin: 0 !important;
}

.product-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    margin: 0;
}

/* Product Image Container */
.product-card-image {
    position: relative;
    overflow: hidden;
    background: #000;
    aspect-ratio: 1/1;
    margin-bottom: 0;
    border-radius: 0;
}

.product-image-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

/* Product Images */
.product-main-image,
.product-hover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.5s ease;
}

/* Hover Image Effect */
.product-hover-image {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

/* Image Overlay - Shows product name and stock status on hover */
.product-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.product-card:hover .product-image-overlay {
    opacity: 1;
}

.product-overlay-title {
    font-size: 14px;
    font-weight: 400;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.product-overlay-price {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 5px;
}

.product-overlay-price span {
    color: #fff;
}

.product-overlay-price del {
    color: rgba(255, 255, 255, 0.6);
    margin-right: 8px;
}

.product-overlay-price ins {
    text-decoration: none;
    color: #fff;
}

.product-overlay-stock {
    font-size: 12px;
    font-weight: 300;
    color: #fff;
    text-transform: capitalize;
}

/* Remove all badges, buttons, and product content - image only */
.product-badges,
.quick-view-btn,
.wishlist-btn,
.product-card-content,
.product-category,
.product-title,
.product-price,
.product-rating,
.product-swatches,
.product-actions {
    display: none;
}

/* Product Badges */
.product-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}

.badge-sale {
    background: #ff4444;
    color: white;
}

.badge-sold-out {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border: 1px solid #ddd;
}

.badge-new {
    background: #4CAF50;
    color: white;
}

.badge-featured {
    background: #FFB74D;
    color: white;
}

/* Quick View Button */
.quick-view-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: white;
    border: none;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.quick-view-btn svg {
    width: 16px;
    height: 16px;
}

.product-card:hover .quick-view-btn {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.quick-view-btn:hover {
    background: #333;
    color: white;
}

/* Wishlist Button */
.wishlist-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 4;
}

.product-card:hover .wishlist-btn {
    opacity: 1;
}

.wishlist-btn:hover {
    background: white;
    transform: scale(1.1);
}

.wishlist-btn:hover svg path {
    fill: #ff4444;
    stroke: #ff4444;
}

.wishlist-btn.active svg path {
    fill: #ff4444;
    stroke: #ff4444;
}

/* Product Content */
.product-card-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 4px;
}

/* Product Category */
.product-category {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #999;
}

.product-category a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-category a:hover {
    color: #666;
}

/* Product Title */
.product-title {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.4;
    margin: 0;
    color: #333;
}

.product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-title a:hover {
    color: #666;
}

/* Product Price */
.product-price {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-top: 4px;
}

.product-price .price {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Regular and Sale Price */
.product-price del {
    color: #999;
    font-weight: 400;
    font-size: 14px;
}

.product-price ins {
    text-decoration: none;
    color: #ff4444;
}

/* Product Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.star-rating {
    position: relative;
    font-size: 14px;
    line-height: 1;
    width: 70px;
    height: 14px;
    overflow: hidden;
}

.star-rating::before {
    content: "★★★★★";
    color: #ddd;
    letter-spacing: 2px;
}

.star-rating span {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    white-space: nowrap;
}

.star-rating span::before {
    content: "★★★★★";
    color: #FFB74D;
    letter-spacing: 2px;
}

.rating-count {
    font-size: 12px;
    color: #999;
}

/* Color Swatches */
.product-swatches {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px #333;
}

.color-count {
    font-size: 11px;
    color: #999;
    margin-left: 4px;
}

/* Product Actions */
.product-actions {
    margin-top: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateY(0);
}

/* Buttons */
.add-to-cart-btn,
.select-options-btn,
.out-of-stock-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: #333;
    color: white;
    border: none;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover,
.select-options-btn:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.add-to-cart-btn svg {
    width: 16px;
    height: 16px;
}

.out-of-stock-btn {
    background: #e5e5e5;
    color: #999;
    cursor: not-allowed;
}

.out-of-stock-btn:hover {
    background: #e5e5e5;
    transform: none;
    box-shadow: none;
}

/* Loading State */
.add-to-cart-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.add-to-cart-btn.loading::after {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Added to Cart State */
.add-to-cart-btn.added span::after {
    content: " ✓";
    margin-left: 4px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .products {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 5px !important;
    }
    
    .product-title {
        font-size: 13px;
    }
    
    .product-price {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 5px !important;
    }

    .filters-content {
        width: 100%;
    }

    .shop-toolbar {
        gap: 100px;
        align-items: stretch;
        display: flex;
        justify-content: space-between !important;
    }

    #filtersToggle {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 14px !important;
    }

    .shop-sort {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 !important;
    }

    .shop-toolbar .filters-toggle,
    .shop-toolbar .sort-toggle,
    .shop-toolbar .shop-sort select {
        flex: 1;
        min-width: 0;
        width: auto;
        padding: 14px;
        justify-content: center;
    }

    .filters-toggle,
    .sort-toggle {
        font-size: 14px;
    }

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

    .sort-toggle svg {
        width: 10px;
        height: 6px;
    }

    /* Mobile: make overlay always visible and disable hover image (no hover on touch devices) */
    .product-image-overlay {
        opacity: 1 !important;
        transition: none !important;
        padding: 16px 6px 4px;
        max-height: 40%;
    }

    .product-overlay-title {
        font-size: 9px;
        line-height: 1.2;
        margin-bottom: 2px;
        letter-spacing: 0.5px;
    }

    .product-overlay-price {
        font-size: 11px;
    }

    .product-overlay-stock {
        font-size: 9px;
    }

    .product-hover-image {
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* Ensure hover styles do not override on touch devices */
    .product-card:hover .product-hover-image {
        opacity: 0 !important;
    }
    .product-card:hover .product-image-overlay {
        opacity: 1 !important;
    }
}

@media (max-width: 480px) {
    .products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 5px !important;
    }
    
    .filters-content {
        width: 100%;
    }
}


/* ==========================================================================
   Mobile Filter Panel (≤1024px) — fixed slide-in overlay
   ========================================================================== */

/* Backdrop */
.filters-mobile-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Mobile header inside panel: "FILTERS  X" */
.filters-mobile-header {
    display: none;
}

@media (max-width: 1024px) {

    /* Show backdrop */
    .filters-mobile-backdrop {
        display: block;
        pointer-events: none;
    }

    .filters-mobile-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Override sidebar to become a fixed side drawer */
    .filters-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 82% !important;
        max-width: 320px !important;
        height: 100dvh !important;
        min-width: unset !important;
        border-right: 1px solid #e8e8e8 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        transform: translateX(-105%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 10002;
        /* Reset height-based hide — use transform instead */
        height: 100dvh !important;
    }

    .filters-sidebar.active {
        transform: translateX(0) !important;
        width: 82% !important;
        max-width: 320px !important;
        overflow-y: auto !important;
    }

    /* Disable desktop sticky inside fixed panel */
    .filters-content {
        position: static !important;
        width: 100% !important;
    }

    /* Prevent body scroll when panel is open */
    body.filters-panel-open {
        overflow: hidden;
    }

    /* Toolbar: flush with header, no top gap */
    .shop-toolbar {
        margin-top: 0 !important;
        top: var(--shop-header-h) !important; /* set via :root override above */
        border-bottom: 1px solid #e0e0e0 !important;

    }

    /* Mobile panel header: FILTERS + close X */
    .filters-mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        border-bottom: 1px solid #e8e8e8;
        background: #fff;
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .filters-mobile-header span {
        font-size: 11px;
        font-weight: 500;
        letter-spacing: 1.5px;
        text-transform: uppercase;
        color: #111;
    }

    .filters-mobile-close {
        background: none !important;
        border: none !important;
        padding: 0 !important;
        cursor: pointer;
        display: flex;
        align-items: center;
        color: #111;
        box-shadow: none !important;
    }
}

/* Print Styles */
@media print {
    .quick-view-btn,
    .wishlist-btn,
    .product-actions {
        display: none;
    }
}
