.product-card {
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.product-card .image-container {
    position: relative;
}

/* --- DESKTOP ONLY: Hover Effects --- */
@media (min-width: 1024px) {
    .product-card:hover {
        border-color: #e5e7eb; 
    }
}

/* --- MOBILE ONLY: No Borders --- */
@media (max-width: 1023px) {
    .product-card:hover, .product-card:active, .product-card:focus {
        border-color: transparent !important;
    }
}

/* --- Wishlist Button Styles --- */
.product-card .wishlist-button {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    padding: 0.5rem;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease-in-out;
    z-index: 5; /* Ensure it's above images */
    cursor: pointer;
}

/* Show on hover on desktop, always visible if active */
.product-card:hover .wishlist-button,
.wishlist-button.active {
    opacity: 1;
    transform: scale(1);
}

.wishlist-button.active svg {
    fill: #D32F2F;
    stroke: #D32F2F;
}

/* --- Image Arrow Navigation Styles (Desktop) --- */
.product-card .image-nav {
    position: absolute;
    top: 50%;
    left: 0.25rem;
    right: 0.25rem;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 15;
}

.product-card:hover .image-nav {
    opacity: 1;
    pointer-events: auto;
}

.product-card .nav-arrow {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #eee;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}
.product-card .nav-arrow:hover {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* --- Mobile Image Scroll Container --- */
.image-scroll-container {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
}
.image-scroll-container::-webkit-scrollbar { 
    display: none; /* Chrome/Safari */
}

/* --- Modal Styles --- */
.request-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 2000; opacity: 0; visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.request-modal-overlay.visible { opacity: 1; visibility: visible; }
.request-modal-content {
    background: white; padding: 2.5rem; width: 90%; max-width: 500px;
    border-radius: 8px; position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: scale(0.95); transition: transform 0.3s;
}
.request-modal-overlay.visible .request-modal-content { transform: scale(1); }
.modal-close-btn {
    position: absolute; top: 1rem; right: 1rem; background: none;
    border: none; font-size: 1.5rem; color: #9ca3af; cursor: pointer;
}
.modal-close-btn:hover { color: #111827; }

/* --- Range Slider Styles --- */
.slider-range {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: transparent;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    pointer-events: none;
    z-index: 20;
}
.slider-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: auto;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #202328;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    cursor: pointer;
    margin-top: -8px;
}
.slider-range::-moz-range-thumb {
    pointer-events: auto;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #202328;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    cursor: pointer;
}

/* --- Mobile Filter Scroll Lock --- */
body.mobile-filter-open {
    overflow: hidden !important;
    height: 100vh;
    position: fixed;
    width: 100%;
}
.mobile-filter-drawer-content {
    overscroll-behavior: contain;
}
/* --- Desktop filter sidebar: always on screen, with a hint that there's more below --- */
@media (min-width: 1024px) {
    /* Doubled class name on purpose: this has to beat BOTH .mobile-filter-drawer (style.css)
       and Tailwind's lg:* utilities, whichever the CDN happens to inject last. */
    .filters-aside.mobile-filter-drawer {
        position: sticky;
        top: 6.5rem;                       /* clears the fixed header */
        left: auto; bottom: auto; width: auto;
        height: auto;
        max-height: calc(100vh - 8rem);
        transform: none;
        background: transparent;
        padding: 0;
        border-radius: 0;
        z-index: auto;
        display: flex;
        flex-direction: column;
        overflow: hidden;                  /* the inner list scrolls, not the column */
    }
    .filters-scroll {
        overflow-y: auto;
        overscroll-behavior: contain;
        padding-right: 0.6rem;
        padding-bottom: 3.25rem;           /* room for the fade + pill */
        scrollbar-width: thin;
        scrollbar-color: #cfc8ba transparent;
    }
    .filters-scroll::-webkit-scrollbar { width: 6px; }
    .filters-scroll::-webkit-scrollbar-track { background: transparent; }
    .filters-scroll::-webkit-scrollbar-thumb { background: #d9d3c6; border-radius: 999px; }
    .filters-scroll:hover::-webkit-scrollbar-thumb { background: #bdb4a2; }

    /* Soft fade at the bottom edge: a visual "the list keeps going". */
    .filters-fade {
        position: absolute;
        left: 0; right: 0.6rem; bottom: 0;
        height: 4.5rem;
        background: linear-gradient(to top, #ffffff 30%, rgba(255,255,255,0));
        pointer-events: none;
        opacity: 1;
        transition: opacity 0.25s ease;
    }
    .filters-more {
        position: absolute;
        left: 50%; bottom: 0.35rem;
        transform: translateX(-50%);
        display: inline-flex; align-items: center; gap: 0.4rem;
        padding: 0.4rem 0.9rem;
        background: #ffffff;
        border: 1px solid #e5e1d8;
        border-radius: 999px;
        font-size: 0.68rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        white-space: nowrap;
        color: #6b675e;
        cursor: pointer;
        box-shadow: 0 2px 10px rgba(32,35,40,0.08);
        transition: opacity 0.25s ease, color 0.2s ease, border-color 0.2s ease;
    }
    .filters-more svg { animation: filters-nudge 1.8s ease-in-out infinite; }
    .filters-more:hover { color: #202328; border-color: #C09B48; }
    @keyframes filters-nudge {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(3px); }
    }
    /* Scrolled to the end, or nothing to scroll: no fade, no pill. */
    .filters-aside.filters-at-end .filters-fade,
    .filters-aside.filters-at-end .filters-more,
    .filters-aside.filters-no-overflow .filters-fade,
    .filters-aside.filters-no-overflow .filters-more { opacity: 0; pointer-events: none; }

    @media (prefers-reduced-motion: reduce) {
        .filters-more svg { animation: none; }
    }
}
/* Mobile keeps the drawer: no sticky, no fade, no pill. */
@media (max-width: 1023px) {
    .filters-fade, .filters-more { display: none; }
}
