/* ========================================
   SHOP PAGE
   Product grid, filters, and sidebar
======================================== */

.shop-section {
    min-height: 100vh;
    padding: 120px 0 80px;
    background: var(--bg-primary);
}

.shop-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    position: relative;
}

/* ========================================
   SIDEBAR FILTER
======================================== */

.shop-sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
    max-height: calc(100vh - 160px); /* Ensure it doesn't leave the screen */
    overflow-y: auto; /* Fallback internal scroll */
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-light);
    margin: 0;
}

.filter-reset {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-light);
    font-size: 1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    margin-right: 12px;
}

@media (hover: hover) {
    .filter-reset:hover {
        background: rgba(241, 168, 23, 0.1);
        border-color: var(--accent-color);
        color: var(--accent-color);
    }
}

.filter-reset:focus {
    outline: none;
    box-shadow: none;
    background: transparent; /* Reset background on focus */
    border-color: rgba(255, 255, 255, 0.2); /* Reset border */
    color: var(--text-light); /* Reset color */
}

/* Only apply focus styles if keyboard navigation is used */
.filter-reset:focus-visible {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(241, 168, 23, 0.5);
}

.filter-reset:active {
    background: rgba(241, 168, 23, 0.2);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.filter-group {
    margin-bottom: 28px;
}

.filter-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-title i {
    color: var(--accent-color);
    font-size: 0.9rem;
}

/* Filter Tags Container */
.filter-tags {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal shifts */
    margin-right: -21px; /* Offset: Padding (15px) + Scrollbar (6px) = 21px */
    padding-right: 15px; /* Push buttons back into sidebar alignment */
    padding-top: 2px;
    padding-bottom: 2px;
    padding-left: 2px; /* Ensure hover transform doesn't clip */
}

/* Custom Scrollbar for Sidebar & Tags - Fixed Width Gold */
.filter-tags::-webkit-scrollbar,
.shop-sidebar::-webkit-scrollbar {
    width: 6px !important;
}

.filter-tags::-webkit-scrollbar-track,
.shop-sidebar::-webkit-scrollbar-track {
    background: transparent !important;
    margin: 8px 0;
}

/* Base thumb - fully invisible when not hovered */
.filter-tags::-webkit-scrollbar-thumb,
.shop-sidebar::-webkit-scrollbar-thumb {
    background-color: transparent !important;
    border-radius: 20px !important;
    border: none !important;
    box-shadow: none !important;
}

/* Show with Solid Gold on Hover of container - NO transitions */
.filter-tags:hover::-webkit-scrollbar-thumb,
.shop-sidebar:hover::-webkit-scrollbar-thumb {
    background-color: #f1a817 !important; /* Fixed Gold Hex */
}

/* Whiter thumb on direct hover - Color change only */
.filter-tags::-webkit-scrollbar-thumb:hover,
.shop-sidebar::-webkit-scrollbar-thumb:hover {
    background-color: #ffffff !important;
}

/* Firefox Support - Matching Colors */
.filter-tags,
.shop-sidebar {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.filter-tags:hover,
.shop-sidebar:hover {
    scrollbar-color: var(--accent-color) transparent;
}

.tag-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.tag-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tag-btn i {
    font-size: 0.85rem;
    opacity: 0.7;
}

.tag-btn:hover {
    background: rgba(255, 255, 255, 0.08); /* Match filter-radio-label hover */
    color: rgba(255, 255, 255, 0.9);
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.1);
}

.tag-btn.active {
    background: linear-gradient(135deg, rgba(241, 168, 23, 0.2), rgba(193, 132, 11, 0.2));
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 20px rgba(241, 168, 23, 0.2);
}

.tag-btn.active i {
    opacity: 1;
}

/* Price Range */
.price-range {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.price-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.price-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

.price-separator {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.apply-price-btn {
    background: var(--accent-color);
    border: none;
    color: #000;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apply-price-btn:hover {
    background: #c1840b;
    box-shadow: 0 4px 20px rgba(241, 168, 23, 0.4);
}

/* Sort Select - Removed (Moved to Header) */

/* Header Filters Dropdown */
.dropdown-menu {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fill container, crop excess */
    object-position: center; /* Center the image */
    transition: transform 0.6s ease;
}

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

.dropdown-item {
    color: var(--text-light);
    padding: 8px 16px;
    transition: all 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(241, 168, 23, 0.1);
    color: var(--accent-color);
}

.dropdown-item.active,
.dropdown-item:active {
    background: var(--accent-color);
    color: #000;
}

.dropdown-header {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.dropdown-divider {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* Price Slider Displays */
.price-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 4px 8px;
    gap: 4px;
    flex: 1;
    transition: all 0.3s ease;
}

.price-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(241, 168, 23, 0.2);
}

.currency-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}

.currency-symbol {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-color);
}

.price-num-input {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-weight: 700;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    width: 100%;
    outline: none;
    padding: 0;
    -moz-appearance: textfield;
}

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

.price-slider-container {
    padding: 10px 5px;
}

/* Header Filter Buttons Styling */
.shop-controls .btn-dark.dropdown-toggle {
    background: rgba(40, 40, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.shop-controls .btn-dark.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 20px rgba(241, 168, 23, 0.2);
}

/* Dual Range Slider */
.form-range {
    pointer-events: none;
    background: transparent;
    height: 5px;
    /* Adjust if needed */
    -webkit-appearance: none;
    /* Hide default for customization */
    appearance: none;
}

.form-range::-webkit-slider-thumb {
    pointer-events: auto;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -6px;
    /* Center thumb vertically */
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    z-index: 10;
    position: relative;
}

.form-range::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: transparent;
    /* Track is handled by container or pseudo-elements if simpler */
    border-radius: 2px;
}

/* For Firefox */
.form-range::-moz-range-thumb {
    pointer-events: auto;
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    z-index: 10;
    position: relative;
}

.form-range::-moz-range-track {
    background: transparent;
    height: 4px;
}

/* Slider Track Background */
.price-slider-container .position-relative::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    transform: translateY(-50%);
    z-index: 0;
}

/* Active part of track (Optional - requires JS to update width/left) */

/* ========================================
   SHOP MAIN CONTENT
======================================== */

.shop-main {
    width: 100%;
    min-width: 0; /* Crucial for flex child shrinking */
    overflow: hidden; /* Prevent horizontal spill */
}

.shop-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
    width: 100%;
    min-width: 0; /* Crucial for flex child shrinking */
}

.shop-search {
    max-width: 400px;
}

.shop-search .form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border-radius: 50px;
}

.shop-search .form-control::placeholder {
    color: rgba(255, 255, 255, 0.45); /* Much lighter for visibility */
    font-weight: 400;
    opacity: 1; /* Firefox fix */
}

.shop-search .form-control:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    box-shadow: none;
}

.shop-search i {
    color: var(--text-light);
    opacity: 0.7;
    transition: color 0.3s ease;
}

.shop-search:hover i,
.shop-search:focus-within i {
    color: var(--accent-color);
    opacity: 1;
}

.results-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px; /* Tighter spacing */
    padding-bottom: 0;
}

.results-count {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    font-weight: 500;
}

.mobile-filter-toggle {
    display: none;
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-filter-toggle:hover {
    background: rgba(241, 168, 23, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.mobile-filter-toggle i {
    margin-right: 6px;
}

/* ========================================
   PRODUCTS GRID
======================================== */

/* ========================================
   PRODUCTS GRID
======================================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    min-height: 800px;
    align-content: start;
}

/* Product Card */
.product-card {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: rgba(241, 168, 23, 0.5);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(241, 168, 23, 0.2);
}

.product-card.in-cart {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 20px rgba(241, 168, 23, 0.15) !important;
    position: relative;
}

.product-card.in-cart::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 30px rgba(241, 168, 23, 0.45);
    pointer-events: none;
    z-index: 20;
}

.product-image {
    position: relative;
    width: 100%;
    height: 180px; 
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

/* ... image styles ... */

/* Product Info */
.product-info {
    padding: 20px 20px 28px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    position: relative;
    gap: 6px;
    margin-bottom: 12px;
    height: 66px; /* Restored fixed height for layout stability */
    overflow: hidden;
    align-content: flex-start;
    align-items: flex-start;
}

.product-tag {
    background: rgba(241, 168, 23, 0.1);
    border: 1px solid rgba(241, 168, 23, 0.3);
    color: var(--accent-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
    display: inline-block;
    vertical-align: middle;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-light);
    margin: 0 0 8px 0;
    line-height: 1.3;
    height: 3.12rem; /* Fixed height for exactly 2 lines (1.2rem * 1.3 * 2) */
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    line-clamp: 2;
    overflow: hidden !important;
    text-overflow: ellipsis;
    word-break: break-word;
    overflow-wrap: break-word;
}

.product-rating {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    flex-wrap: nowrap; /* Keep stars and sold count on one line if possible */
    justify-content: space-between; /* Push sold count to the right */
    margin-top: auto;
    margin-bottom: 6px;
    gap: 2px; /* Very tight gap for stars */
}

.product-rating i {
    margin-right: -2px; /* Even tighter star spacing */
}

.product-rating .sold-count {
    margin-left: auto; /* Ensure it stays on the right */
    padding-left: 8px; /* Some room from the stars */
}

.rating-group {
    display: flex;
    align-items: center;
    gap: 4px; /* Small gap between stars */
}

.rating-group i {
    margin-right: -1px; /* Tighter star spacing */
}

.sold-count {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.product-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Align bottom */
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 6px; /* Removed margin-top: auto so it follows rating */
}

.product-price {
    height: 52px; /* Restored fixed height to prevent layout shifts */
    position: relative;
}

.price-vnd, .price-usd {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    height: 100%;
    gap: 0;
}

.product-badges {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    z-index: 10;
    pointer-events: none; /* Let clicks pass through to overlay/image */
}

.status-badge {
    position: relative; /* Inside flex container */
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.7rem;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.discount-badge {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
}

.new-badge {
    background: linear-gradient(135deg, #00d2ff, #3a7bd5);
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.4);
}

.out-of-stock-badge {
    background: linear-gradient(135deg, #747d8c, #a4b0be);
}

.old-price {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
    text-decoration: line-through;
    font-family: 'Roboto', sans-serif;
    line-height: 1.2;
    margin-bottom: 2px;
}

.current-price {
    color: var(--accent-color);
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Roboto', sans-serif;
}

.add-to-cart-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-to-cart-btn:hover, .add-to-cart-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #000;
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(241, 168, 23, 0.4);
}

/* ========================================
   PAGINATION
======================================== */
.shop-pagination .pagination {
    gap: 8px;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    justify-content: center;
}

.shop-pagination .page-link {
    background: rgba(40, 40, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    /* Slightly rounded squares */
    transition: all 0.3s ease;
    font-weight: 500;
}

.shop-pagination .page-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(241, 168, 23, 0.2);
}

.shop-pagination .page-item.active .page-link {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(241, 168, 23, 0.4);
    font-weight: 700;
}

/* Fix for appearance lint */
select, .form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.shop-pagination .page-item.disabled .page-link {
    background: rgba(30, 30, 30, 0.3);
    color: rgba(255, 255, 255, 0.2);
    border-color: transparent;
    cursor: not-allowed;
}

/* Pagination Input */
.shop-pagination .page-input {
    width: 50px;
    text-align: center;
    padding: 0;
    -moz-appearance: textfield;
    appearance: textfield;
}

.shop-pagination .page-input::-webkit-outer-spin-button,
.shop-pagination .page-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.shop-pagination .page-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 10px rgba(241, 168, 23, 0.3);
}

/* ========================================
   RESPONSIVE
======================================== */

/* Tablet */
@media (max-width: 992px) {
    .shop-container {
        grid-template-columns: 240px 1fr;
        gap: 24px;
        padding: 0 20px;
    }

    .shop-sidebar {
        padding: 20px;
    }

    .shop-search {
        max-width: 100%;
        margin-bottom: 0;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 Columns on Tablet */
        gap: 20px;
    }
}

/* Category Container */
/* Category Container */
/* Category Container */
.categories-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%; /* Critical for Flexbox children */
    overflow: hidden; /* Ensure nothing visually spills out */
}

.shop-categories {
    width: 100%;
    max-width: 100%;
    display: flex; /* Ensure horizontal flow */
    flex-wrap: nowrap;
    max-width: 100%; /* Ensure it doesn't overflow parent */
    background: rgba(30, 30, 30, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0 16px;
    overflow-x: auto;
    /* We keep native scrollbar functionality but hide visuals for 'mobile feel' */
    /* Users can scroll with trackpad or Shift+Wheel. */
    /* If they can't scroll with mouse drag, we might need JS drag imp later. */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE */
    position: relative;
    white-space: nowrap; /* Force pills in one line */
}

.shop-categories::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Custom Scroll Progress Bar - Global */
.shop-scroll-indicator {
    position: relative; /* Changed from absolute to flow naturally below */
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px; /* Space from categories */
}

.shop-scroll-progress {
    height: 100%;
    background: var(--accent-color);
    width: 0%; /* Initial width, updated by JS */
    border-radius: 2px;
    transition: width 0.1s linear, margin-left 0.1s linear;
}

/* Category Pills (Buttons) */
.category-pill {
    background: transparent;
    border: none;
    color: var(--text-light);
    padding: 14px 24px;
    border-radius: 0;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    margin: 0;
}

/* The Bottom Line */
.category-pill::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
    transition: width 0.3s ease;
    border-radius: 3px 3px 0 0;
    z-index: 2;
}

/* Radial Glow from Bottom Line */
.category-pill::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0.5);
    width: 80%;
    height: 35px;
    background: radial-gradient(ellipse at bottom, rgba(241, 168, 23, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.category-pill:hover {
    background: linear-gradient(to top, rgba(241, 168, 23, 0.1) 0%, transparent 100%);
    color: #fff;
}

.category-pill:hover::after {
    width: 15%;
    opacity: 0.7;
}

.category-pill.active,
.category-pill:focus,
.category-pill:active {
    background: transparent;
    color: var(--accent-color);
    outline: none;
    box-shadow: none;
    text-shadow: 0 0 10px rgba(241, 168, 23, 0.3);
}

.category-pill.active::after,
.category-pill:focus::after,
.category-pill:active::after {
    width: 40%;
}

.category-pill.active::before,
.category-pill:focus::before,
.category-pill:active::before {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
}

/* Mobile */
/* Mobile */
@media (max-width: 768px) {

/* ========================================
   POPOVER OVERRIDES
======================================== */
.popover {
    z-index: 1070 !important; /* Ensure above everything */
    max-width: 300px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.popover-header {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.popover-body {
    color: var(--text-light);
    padding: 8px;
}

.bs-popover-top .popover-arrow::after {
    border-top-color: rgba(30, 30, 30, 0.95) !important;
}

.bs-popover-bottom .popover-arrow::after {
    border-bottom-color: rgba(30, 30, 30, 0.95) !important;
}

    .shop-section {
        padding: 100px 0 60px;
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }

    .shop-container {
        grid-template-columns: 1fr;
        padding: 0 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .shop-main {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        /* Clip any internal overflow */
        box-sizing: border-box;
    }

    .shop-sidebar {
        display: none;
        /* Hidden by default */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(20, 20, 20, 0.95);
        backdrop-filter: blur(15px);
        z-index: 1000;
        padding: 80px 20px 20px;
        overflow-y: auto;
        border: none;
        border-radius: 0;
    }

    .shop-sidebar .filter-tags {
        max-height: 60vh; /* Increase height for mobile */
    }

    .shop-sidebar.active {
        display: block !important;
        animation: fadeIn 0.3s ease;
        z-index: 9999 !important;
    }

    /* Add close button for sidebar on mobile if not present,
       but for now we rely on the toggle button acting as close or clicking outside */

    .shop-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        width: 100%;
        max-width: 100%;
    }

    .categories-wrapper {
        position: relative;
        width: 100%;
        margin-bottom: 20px;
        padding-bottom: 8px;
        overflow: visible;
        /* Allow glow to overflow wrapper */
    }

    .shop-categories {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        overflow-y: visible;
        /* Allow glow to overflow vertically */
        padding-bottom: 0;
        /* Pills sit flush at bottom */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none !important;
        margin-bottom: 0;
        width: 100%;
        max-width: 100%;
        display: flex;
        gap: 8px;
        /* Dynamic mask - will be updated by JS */
        mask-image: linear-gradient(to right, black 0%, black 90%, transparent 100%);
        -webkit-mask-image: linear-gradient(to right, black 0%, black 90%, transparent 100%);
    }

    .shop-categories::-webkit-scrollbar {
        display: none !important;
        /* Hide native webkit */
        width: 0;
        height: 0;
    }

    /* Custom Scroll Progress Bar Style */
    .shop-scroll-indicator {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
        overflow: hidden;
        z-index: 10;
        margin: 0;
    }

    .shop-scroll-progress {
        height: 100%;
        background: var(--accent-color);
        width: 20%;
        border-radius: 2px;
        transition: width 0.1s linear;
    }

    .shop-categories::-webkit-scrollbar-thumb {
        background: var(--accent-color);
        border-radius: 4px;
    }

    .shop-categories::-webkit-scrollbar-thumb {
        background: var(--accent-color);
        border-radius: 4px;
    }

    .shop-controls {
        flex-direction: column;
        align-items: stretch !important;
        gap: 16px;
        width: 100%;
        max-width: 100%;
    }

    .shop-search {
        width: 100%;
        max-width: none;
    }

    .shop-controls .d-flex {
        width: 100%;
        gap: 10px;
    }

    /* Make dropdowns take available width */
    .shop-controls .dropdown {
        flex: 1;
        min-width: 0;
        /* Prevent flex item from overflowing */
    }

    .shop-controls .dropdown .btn {
        width: 100%;
        justify-content: space-between;
    }

    .results-info {
        width: 100%;
        justify-content: space-between;
        margin-top: 8px;
        margin-bottom: 20px;
        /* Add space below results info */
    }

    .mobile-filter-toggle {
        display: flex;
        align-items: center;
        background: var(--accent-color);
        color: #000;
        border: none;
        padding: 6px 14px;
        /* Smaller padding */
        font-size: 0.85rem;
        /* Smaller font */
        border-radius: 6px;
        height: 32px;
    }

    .products-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        /* Force 2 columns that can shrink */
        gap: 12px;
        width: 100%;
        box-sizing: border-box;
        margin: 0;
    }

    .product-card {
        max-width: none;
    }

    .product-image {
        height: 160px;
        /* Smaller image on mobile */
    }

    .product-info {
        padding: 12px 12px 20px 12px;
    }

    .product-title {
        font-size: 0.95rem;
        margin-bottom: 4px;
    }

    .product-tags {
        height: 32px; /* Much smaller height on mobile for 1 row */
        margin-bottom: 8px;
        gap: 4px;
    }

    .product-tag {
        padding: 2px 8px;
        font-size: 0.7rem;
        max-width: 80px;
    }

    .product-rating {
        font-size: 0.75rem;
        gap: 4px 8px;
        flex-wrap: wrap; /* Allow wrap on mobile if content is too dense */
    }

    .rating-group {
        gap: 3px;
    }

    .sold-count {
        font-size: 0.7rem;
        margin-left: 0; /* Reset auto margin on wrap-heavy mobile if needed, but flex-wrap will handle it */
    }

    .product-footer {
        padding-top: 8px;
    }

    .current-price {
        font-size: 0.9rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .shop-section {
        padding: 90px 0 50px;
    }

    .shop-title {
        font-size: 1.5rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        /* Stack on very small screens */
    }

    .product-image {
        height: 200px;
    }

    .product-info {
        padding: 16px 16px 24px 16px;
    }

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

    .product-tags {
        height: 36px; /* Slightly more space for slightly larger text */
        margin-bottom: 10px;
    }

    .current-price {
        font-size: 1.15rem;
    }
}

/* ========================================
   SKELETON LOADER (Matched to Original Card)
   ======================================== */
@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.skeleton-image {
    width: 100%;
    height: 180px; /* Matched to .product-image height */
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.05) 25%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-info {
    padding: 20px 20px 28px 20px; /* Matched to .product-info padding */
    flex: 1;
    display: flex;
    flex-direction: column;
}

.skeleton-text {
    border-radius: 4px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.03) 25%, 
        rgba(255, 255, 255, 0.08) 50%, 
        rgba(255, 255, 255, 0.03) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-category {
    height: 12px;
    width: 30%;
    margin-bottom: 12px;
}

.skeleton-title {
    height: 24px;
    width: 85%;
    margin-bottom: 12px;
}

.skeleton-tags {
    height: 66px; /* Matched to .product-tags height */
    width: 100%;
    margin-bottom: 12px;
}

.skeleton-rating {
    height: 14px;
    width: 100%;
    margin-top: auto;
    margin-bottom: 12px;
}

.skeleton-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 6px;
}

.skeleton-btn {
    height: 44px; /* Matched to .add-to-cart-btn */
    width: 44px;
    border-radius: 12px;
}

/* Tablet Adjustments */
@media (max-width: 768px) {
    .skeleton-image {
        height: 160px;
    }
    .skeleton-info {
        padding: 12px 12px 20px 12px;
    }
    .skeleton-tags {
        height: 32px;
    }
    .skeleton-price {
        height: 48px; /* Slightly adjusted for mobile density */
    }
}

/* Small Mobile Adjustments */
@media (max-width: 480px) {
    .skeleton-image {
        height: 200px;
    }
    .skeleton-info {
        padding: 16px 16px 24px 16px;
    }
    .skeleton-tags {
        height: 36px;
    }
}

/* ========================================
   CUSTOM FILTER STYLES (Status)
======================================== */
/* ========================================
   CUSTOM FILTER STYLES (Status)
======================================== */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Global Utilities */
.cursor-pointer {
    cursor: pointer;
}

/* Premium Status Toggle (Separate) */
.status-action-item {
    transition: all 0.2s ease;
    border-radius: 12px;
}

.status-label-bold {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.action-icon {
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Vertical Glass Radio Group */
.filter-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 2px 0 2px 2px; /* Simplified: matching tags' content alignment */
}

.filter-radio {
    display: none; /* Hide native radio */
}

.filter-radio-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
}

.filter-radio-label:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.1);
}

.filter-radio:checked + .filter-radio-label {
    background: rgba(241, 168, 23, 0.15);
    border-color: var(--accent-color);
    color: var(--accent-color);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(241, 168, 23, 0.1);
}

.filter-radio:checked + .filter-radio-label::after {
    content: '\F633'; /* check-lg */
    font-family: 'bootstrap-icons';
    font-size: 1rem;
    font-weight: bold;
    animation: fadeInSlide 0.3s forwards ease-out;
}

/* Premium Toggle Switch (Standalone) */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    appearance: none;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
    background-color: #000;
}

/* Animations */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(-5px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}