/* =====================================================
           GLOBAL
        ====================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {

    margin: 0;

    font-family:
        'Merriweather',
        Georgia,
        serif;

    background: #f8f9fc;

    color: #1f2937;

}

button,
select,
input {
    font-family: inherit;
}

::selection {

    background: #2D427B;

    color: #ffffff;

}


/* =====================================================
           PAGE HEADER
        ====================================================== */

.page-header {

    background:

        radial-gradient(circle at 10% 20%,
            rgba(45, 66, 123, 0.08),
            transparent 35%),

        radial-gradient(circle at 90% 80%,
            rgba(45, 66, 123, 0.06),
            transparent 35%),

        #ffffff;

}


.breadcrumb-link {

    transition:
        color 0.2s ease;

}


.breadcrumb-link:hover {

    color: #2D427B;

}
/* =========================================================
   FILTER BAR — BASE
========================================================= */

.sidebar {
    position: relative;
    top: auto;
    left: auto;
    right: auto;

    width: 100%;
    max-width: 100%;
    min-width: 0;

    height: fit-content;
    max-height: none;

    box-sizing: border-box;
}

.sidebar-card {
    width: 100%;
    border: 1px solid #edf0f6;
    box-shadow: 0 10px 35px rgba(26, 42, 82, 0.06);
}


/* =========================================================
   Z-INDEX LAYERING
   Navbar = 9999
========================================================= */

/* Mobile filter button */
#mobileFilterToggle {
    z-index: 10000 !important;
}

/* Dark overlay */
#sidebarOverlay {
    z-index: 10001 !important;
}

/* Filter drawer */
/* #sidebar.sidebar {
    z-index: 10002 !important;
} */

/* =========================================================
   DESKTOP — HORIZONTAL FILTER BAR
========================================================= */

@media (min-width: 1024px) {

    #sidebar.sidebar {
        position: relative !important;

        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;

        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        height: auto !important;
        max-height: none !important;

        margin: 0 !important;

        transform: none !important;
        visibility: visible !important;

        overflow: visible !important;

        border-radius: 1rem !important;

        box-shadow: none;
    }

    #sidebarOverlay {
        display: none !important;
    }

    /*
       Desktop accordion content is controlled
       by JavaScript.
    */
    #sidebar #filterAccordionContent {
        width: 100%;
    }
}


/* =========================================================
   LARGE DESKTOP
========================================================= */

@media (min-width: 1280px) {

    #sidebar.sidebar {
        width: 100% !important;
        max-width: 100% !important;
    }
}


/* =========================================================
   EXTRA LARGE DESKTOP
========================================================= */

@media (min-width: 1536px) {

    #sidebar.sidebar {
        width: 100% !important;
        max-width: 100% !important;
    }
}


/* =========================================================
   MOBILE + TABLET FILTER DRAWER
========================================================= */

@media (max-width: 1023px) {

    /*
       Drawer
    */
    #sidebar.sidebar {

        position: fixed !important;

        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;

        width: min(88vw, 380px) !important;
        max-width: 380px !important;
        min-width: 0 !important;

        height: 100dvh !important;
        max-height: 100dvh !important;

        margin: 0 !important;

        z-index: 10001 !important;

        overflow-x: hidden !important;
        overflow-y: auto !important;

        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;

        background: #ffffff;

        border: 0 !important;
        border-radius: 20px 0 0 20px !important;

        /*
           Closed position
        */
        transform: translateX(105%) !important;

        visibility: hidden;

        opacity: 1;

        box-shadow:
            -12px 0 40px rgba(15, 23, 42, 0.16);

        transition:
            transform 0.32s cubic-bezier(.4, 0, .2, 1),
            visibility 0.32s ease;

        padding-bottom:
            max(
                1rem,
                env(safe-area-inset-bottom)
            );
    }


    /* =====================================================
       OPEN DRAWER
    ===================================================== */

    #sidebar.sidebar.mobile-filter-open {

        transform: translateX(0) !important;

        visibility: visible;
    }


    /* =====================================================
       FILTER HEADER
    ===================================================== */

    #sidebar #filterAccordionToggle {

        position: sticky;

        top: 0;

        z-index: 10000;

        width: 100%;

        background: #ffffff;

        border-bottom: 1px solid #edf0f6;
    }


    /* =====================================================
       MOBILE FILTER CONTENT

       Important:
       Always show filters once drawer is opened.
       Desktop accordion JS can still hide/show it.
    ===================================================== */

    #sidebar #filterAccordionContent {

        display: block !important;

        width: 100%;

        height: auto !important;

        max-height: none !important;

        overflow: visible !important;

        opacity: 1 !important;

        visibility: visible !important;
    }


    /* =====================================================
       FILTER INNER GRID
    ===================================================== */

    #sidebar .grid {

        display: grid !important;

        grid-template-columns: 1fr !important;

        gap: 12px !important;

        width: 100%;
    }


    /* =====================================================
       FILTER SELECTS
    ===================================================== */

    #sidebar .filter-select,
    #sidebar .sort-select {

        width: 100% !important;

        max-width: 100% !important;

        height: 40px !important;

        min-height: 40px !important;

        font-size: 11px !important;

        box-sizing: border-box;
    }


    /* =====================================================
       PRICE RANGE
    ===================================================== */

    #sidebar .price-range {

        width: 100% !important;

        max-width: 100% !important;

        height: 6px !important;
    }


    /* =====================================================
       ACTION BUTTONS
    ===================================================== */

    #sidebar #apply-filters,
    #sidebar #reset-sidebar-filters {

        width: 100% !important;

        min-height: 40px !important;

        height: 40px !important;
    }


    /* =====================================================
       CLOSE BUTTON
    ===================================================== */

    #sidebar #closeSidebar {

        display: flex !important;

        align-items: center;
        justify-content: center;

        width: 34px !important;

        height: 34px !important;

        min-width: 34px !important;

        min-height: 34px !important;

        padding: 0 !important;
    }


    /* =====================================================
       HIDE ACCORDION ARROW IN MOBILE DRAWER
    ===================================================== */

    #sidebar #filterAccordionIcon {

        display: none !important;
    }


    /* =====================================================
       OVERLAY
    ===================================================== */

    #sidebarOverlay {

        position: fixed !important;

        inset: 0 !important;

        width: 100% !important;

        height: 100dvh !important;

        z-index: 10000 !important;

        background: rgba(10, 20, 40, 0.55);

        backdrop-filter: blur(3px);

        -webkit-backdrop-filter: blur(3px);

        opacity: 0;

        visibility: hidden;

        pointer-events: none;

        transition:
            opacity 0.3s ease,
            visibility 0.3s ease;
    }


    /* =====================================================
       OPEN OVERLAY
    ===================================================== */

    #sidebarOverlay.mobile-filter-overlay-open {

        opacity: 1;

        visibility: visible;

        pointer-events: auto;
    }


    /* =====================================================
       BODY LOCK WHEN FILTER DRAWER IS OPEN
    ===================================================== */

    body.mobile-filter-lock {

        overflow: hidden !important;

        touch-action: none;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    #sidebar.sidebar {

        width: min(90vw, 350px) !important;

        max-width: 350px !important;

        border-radius: 18px 0 0 18px !important;
    }
}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 360px) {

    #sidebar.sidebar {

        width: 92vw !important;

        max-width: 92vw !important;
    }
}


/* =========================================================
   TABLET
========================================================= */

@media (min-width: 481px) and (max-width: 1023px) {

    #sidebar.sidebar {

        width: min(82vw, 380px) !important;

        max-width: 380px !important;
    }
}


/* =========================================================
   PRICE RANGE
========================================================= */

.price-range {

    appearance: none;
    -webkit-appearance: none;

    display: block;

    width: 100%;
    max-width: 100%;

    height: 5px;

    margin: 0;
    padding: 0;

    border: 0;

    border-radius: 999px;

    background: #e5e9f2;

    outline: none;

    cursor: pointer;

    box-sizing: border-box;
}


/* =========================================================
   CHROME / EDGE / SAFARI THUMB
========================================================= */

.price-range::-webkit-slider-thumb {

    appearance: none;
    -webkit-appearance: none;

    width: 20px;
    height: 20px;

    margin-top: 0;

    border-radius: 50%;

    background: #2D427B;

    border: 3px solid #ffffff;

    box-shadow:
        0 2px 8px rgba(45, 66, 123, 0.3);

    cursor: grab;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}


.price-range::-webkit-slider-thumb:hover {

    transform: scale(1.08);

    box-shadow:
        0 4px 12px rgba(45, 66, 123, 0.35);
}


.price-range::-webkit-slider-thumb:active {

    cursor: grabbing;

    transform: scale(1.15);
}


/* =========================================================
   FIREFOX THUMB
========================================================= */

.price-range::-moz-range-thumb {

    width: 20px;
    height: 20px;

    border-radius: 50%;

    background: #2D427B;

    border: 3px solid #ffffff;

    box-shadow:
        0 2px 8px rgba(45, 66, 123, 0.3);

    cursor: grab;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}


.price-range::-moz-range-thumb:hover {

    transform: scale(1.08);
}


.price-range::-moz-range-thumb:active {

    cursor: grabbing;

    transform: scale(1.15);
}


/* =========================================================
   FIREFOX TRACK
========================================================= */

.price-range::-moz-range-track {

    width: 100%;

    height: 5px;

    border: 0;

    border-radius: 999px;

    background: #e5e9f2;
}


/* =========================================================
   PRICE RANGE FOCUS
========================================================= */

.price-range:focus-visible {

    outline: 2px solid rgba(45, 66, 123, 0.25);

    outline-offset: 5px;
}


/* =========================================================
   FILTER BUTTON
========================================================= */

.filter-button {

    min-height: 40px;

    width: auto;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.filter-button:hover {

    transform: translateY(-1px);

    box-shadow:
        0 8px 22px rgba(45, 66, 123, 0.25);
}


.filter-button:active {

    transform: scale(0.97);
}


/* =========================================================
   SORT SELECT
========================================================= */

.sort-select {

    appearance: none;
    -webkit-appearance: none;

    display: block;

    width: 100%;
    max-width: 100%;

    min-height: 40px;

    box-sizing: border-box;

    background-color: #ffffff;

    /*
       Custom dropdown arrow
    */
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%232D427B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

    background-repeat: no-repeat;

    background-position:
        right 12px center;

    background-size:
        18px 18px;

    padding-right: 42px;

    cursor: pointer;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.sort-select:focus {

    border-color: #2D427B;

    box-shadow:
        0 0 0 3px rgba(45, 66, 123, 0.08);
}


/* =========================================================
   MOBILE TOUCH CONTROLS
========================================================= */

@media (max-width: 1023px) {

    #sidebar .filter-button,
    #sidebar .sort-select,
    #sidebar #reset-sidebar-filters,
    #sidebar #closeSidebar {

        min-height: 40px !important;
    }

    #sidebar .price-range {

        height: 6px !important;
    }
}


/* =========================================================
   MOBILE FILTER FAB
========================================================= */

@media (max-width: 1023px) {

    #mobileFilterToggle {

        display: flex;

        align-items: center;
        justify-content: center;

        position: fixed;

        right: 16px;
        bottom: 16px;

        width: 48px;
        height: 48px;

        z-index: 10000;

        border-radius: 999px;

        background: #2D427B;

        color: #ffffff;

        box-shadow:
            0 8px 24px rgba(45, 66, 123, 0.3);

        transition:
            transform 0.2s ease,
            background 0.2s ease,
            box-shadow 0.2s ease;
    }


    #mobileFilterToggle:hover {

        transform: translateY(-2px);

        background: #233563;

        box-shadow:
            0 12px 28px rgba(45, 66, 123, 0.35);
    }


    #mobileFilterToggle:active {

        transform: scale(0.94);
    }
}


/* =========================================================
   MOBILE FILTER COUNT
========================================================= */

#mobile-filter-count {

    position: absolute;

    right: -2px;
    top: -2px;

    min-width: 17px;

    padding: 0 4px;

    border-radius: 999px;

    background: #E85D75;

    color: #ffffff;

    font-size: 8px;

    font-weight: 700;

    line-height: 15px;

    text-align: center;

    border: 2px solid #ffffff;
}


/* =========================================================
   REDUCE MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .sidebar,
    .sidebar-overlay,
    .filter-button,
    .price-range::-webkit-slider-thumb,
    .price-range::-moz-range-thumb {

        transition: none !important;
    }
}
/* =====================================================
   PRODUCT CARD
====================================================== */

.product-card {
    position: relative;
    height: 100%;
    background: #ffffff;
    border: 1px solid #edf0f6;
    border-radius: 20px;
    overflow: hidden;

    display: flex;
    flex-direction: column;

    transition:
        transform 0.35s cubic-bezier(.25, .8, .25, 1),
        box-shadow 0.35s cubic-bezier(.25, .8, .25, 1),
        border-color 0.35s ease;
}

.product-card:hover {
    transform: translateY(-7px);
    border-color: rgba(45, 66, 123, 0.12);

    box-shadow:
        0 20px 45px rgba(30, 45, 85, 0.12);
}


/* =====================================================
   PRODUCT IMAGE
====================================================== */

.product-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f4f6fb;
}

.product-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;

    transition:
        transform 0.65s cubic-bezier(.25, .8, .25, 1);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}


/* =====================================================
   IMAGE OVERLAY
====================================================== */

.image-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.02),
            transparent 55%,
            rgba(0, 0, 0, 0.08)
        );

    pointer-events: none;
}


/* =====================================================
   TOP LEFT — HOT DEAL / RELATED BADGE
====================================================== */

.discount-badge {
    position: absolute;

    top: 13px;
    left: 13px;

    z-index: 5;

    display: inline-flex;
    align-items: center;
    gap: 4px;

    padding: 6px 10px;

    border-radius: 999px;

    background: #ffffff;
    color: #d92f48;

    font-size: 10px;
    font-weight: 800;

    line-height: 1;
    white-space: nowrap;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.13);
}


/* =====================================================
   TOP RIGHT — OFFER / DISCOUNT
====================================================== */

/*
   Add this class to the discount/offer badge
   that should appear on the top-right.
*/

.offer-badge {
    position: absolute;

    top: 13px;
    right: 13px;

    z-index: 6;

    display: inline-flex;
    align-items: center;
    gap: 4px;

    padding: 6px 10px;

    border-radius: 999px;

    background: #2D427B;
    color: #ffffff;

    font-size: 10px;
    font-weight: 800;

    line-height: 1;
    white-space: nowrap;

    box-shadow:
        0 5px 18px rgba(45, 66, 123, 0.22);
}


/* =====================================================
   BADGE ICON
====================================================== */

.discount-badge .material-symbols-outlined,
.offer-badge .material-symbols-outlined {
    font-size: 14px;
    line-height: 1;
}


/* =====================================================
   BOTTOM RIGHT — WISHLIST
====================================================== */

.wishlist-button {
    position: absolute;

    right: 13px;
    bottom: 13px;

    z-index: 10;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.96);
    color: #7b8190;

    cursor: pointer;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.12);

    opacity: 0;

    transform: translateY(5px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        color 0.2s ease,
        background 0.2s ease;
}


/* Desktop — show on card hover */

.product-card:hover .wishlist-button,
.wishlist-button:focus-visible {
    opacity: 1;
    transform: translateY(0);
}


/* Wishlist hover */

.wishlist-button:hover {
    color: #e91e63;
    background: #fff3f7;

    transform: scale(1.08) !important;
}

/* =========================================================
   WISHLIST BUTTON — ALWAYS VISIBLE
========================================================= */

.wishlist-button {
    position: absolute;
    right: 13px;
    bottom: 13px;
    z-index: 10;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.96);
    color: #7b8190;

    cursor: pointer;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.12);

    /* Always visible */
    opacity: 1;
    transform: translateY(0);

    transition:
        transform 0.2s ease,
        color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}


/* =========================================================
   WISHLIST HOVER
========================================================= */

.wishlist-button:hover {
    color: #e91e63;
    background: #fff3f7;

    transform: scale(1.08);

    box-shadow:
        0 7px 20px rgba(0, 0, 0, 0.16);
}


/* =========================================================
   WISHLIST ACTIVE
========================================================= */

.wishlist-button:active {
    transform: scale(0.94);
}


/* =========================================================
   WISHLIST FOCUS
========================================================= */

.wishlist-button:focus-visible {
    outline: 2px solid #2D427B;
    outline-offset: 2px;
}


/* =========================================================
   WISHLIST ICON
========================================================= */

.wishlist-button .material-symbols-outlined {
    font-size: 21px;
    line-height: 1;
}
/* =====================================================
   MOBILE / TABLET
====================================================== */

@media (max-width: 1023px) {

    .wishlist-button {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =====================================================
   PRODUCT BODY
====================================================== */

.product-body {
    padding: 15px;

    display: flex;
    flex-direction: column;

    flex: 1;
    gap: 10px;
}


/* =====================================================
   PRODUCT NAME
====================================================== */

.product-name {
    color: #2D427B;

    font-size: 14px;
    line-height: 1.45;
    font-weight: 700;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;

    transition: color 0.2s ease;
}

.product-name:hover {
    color: #1A2A52;
}


/* =====================================================
   PRODUCT DESCRIPTION
====================================================== */

.product-description {
    color: #8a909e;

    font-size: 11px;
    line-height: 1.5;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
}


/* =====================================================
   PRICE
====================================================== */

.price-section {
    display: flex;
    align-items: baseline;

    flex-wrap: wrap;
    gap: 7px;
}

.current-price {
    color: #2D427B;

    font-size: 17px;
    line-height: 1;
    font-weight: 800;

    letter-spacing: -0.4px;
}

.original-price {
    color: #a2a6af;

    font-family: Arial, sans-serif;

    font-size: 11px;

    text-decoration: line-through;
}


/* =====================================================
   PRODUCT FOOTER
====================================================== */

.product-footer {
    margin-top: auto;
    padding-top: 11px;

    border-top: 1px solid #f0f2f7;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 8px;
}


/* =====================================================
   CART BUTTON
====================================================== */

.cart-button {
    min-height: 36px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 5px;

    padding: 8px 13px;

    border: none;
    border-radius: 999px;

    background: #2D427B;
    color: #ffffff;

    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 5px 15px rgba(45, 66, 123, 0.22);

    transition:
        transform 0.18s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.cart-button:hover {
    background: #1A2A52;

    box-shadow:
        0 8px 20px rgba(45, 66, 123, 0.3);
}

.cart-button:active {
    transform: scale(0.94);
}

.cart-button .material-symbols-outlined {
    font-size: 16px;
}

/* =====================================================
           SKELETON
        ====================================================== */

.skeleton {

    position:
        relative;

    overflow:
        hidden;

    background:
        #e9ecf3;

}


.skeleton::after {

    content:
        "";

    position:
        absolute;

    inset:
        0;

    transform:
        translateX(-100%);

    background:
        linear-gradient(90deg,
            transparent,
            rgba(255,
                255,
                255,
                0.7),
            transparent);

    animation:
        skeleton-shimmer 1.35s infinite;

}


@keyframes skeleton-shimmer {

    100% {

        transform:
            translateX(100%);

    }

}


.skeleton-card {

    background:
        #ffffff;

    border:
        1px solid #edf0f6;

    border-radius:
        20px;

    overflow:
        hidden;

}


/* =====================================================
           PAGINATION
        ====================================================== */

.pagination-btn {

    min-width:
        40px;

    height:
        40px;

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    padding:
        0 10px;

    border:
        1px solid #e3e7ef;

    border-radius:
        10px;

    background:
        #ffffff;

    color:
        #606776;

    font-family:
        Arial,
        sans-serif;

    font-size:
        13px;

    font-weight:
        700;

    cursor:
        pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease;

}


.pagination-btn:hover:not(:disabled) {

    color:
        #ffffff;

    background:
        #2D427B;

    border-color:
        #2D427B;

    transform:
        translateY(-1px);

}


.pagination-btn.active {

    color:
        #ffffff;

    background:
        #2D427B;

    border-color:
        #2D427B;

    box-shadow:
        0 5px 15px rgba(45,
            66,
            123,
            0.2);

}


.pagination-btn:disabled {

    opacity:
        0.4;

    cursor:
        not-allowed;

}


.pagination-dots {

    min-width:
        25px;

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    color:
        #9ca3af;

}


/* =====================================================
           EMPTY STATE
        ====================================================== */

.empty-icon {

    width:
        76px;

    height:
        76px;

    margin:
        0 auto;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        50%;

    background:
        #f0f2f8;

    color:
        #9aa1b0;

}


/* =====================================================
           MOBILE
        ====================================================== */

@media (max-width: 639px) {

    .product-body {

        padding:
            12px;

    }


    .product-name {

        font-size:
            12.5px;

    }


    .current-price {

        font-size:
            15px;

    }


    .cart-button {

        width:
            36px;

        padding:
            8px;

        border-radius:
            50%;

    }


    .cart-label {

        display:
            none;

    }


    .pagination-btn {

        min-width:
            36px;

        height:
            36px;

        font-size:
            12px;

    }

}
