/* =========================================================
   GLOBAL RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    overflow-x: hidden;

    font-family: 'Poppins', sans-serif;

    background: #f8f9fb;

    color: #333;
}


/* =========================================================
   PAGE WRAPPER
========================================================= */

.page-wrapper {
    flex: 1;

    width: 100%;
    max-width: 1400px;

    margin: 0 auto;

    padding: 30px;

    display: flex;

    gap: 25px;

    box-sizing: border-box;
}


/* =========================================================
   SEARCH BAR
========================================================= */

.product-toolbar {
    width: 100%;
    max-width: 1400px;

    margin: 0 auto;

    padding: 25px 30px 0;

    box-sizing: border-box;
}

.search-box {
    width: 100%;

    display: flex;

    align-items: center;

    background: #fff;

    border: 1px solid #e5e5e5;

    border-radius: 30px;

    overflow: hidden;

    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.04);

    transition: 0.3s ease;
}

.search-box:focus-within {
    border-color: #b88e2f;

    box-shadow:
        0 4px 18px rgba(184, 142, 47, 0.10);
}

.search-icon {
    width: 48px;

    display: flex;

    align-items: center;
    justify-content: center;

    color: #999;

    font-size: 18px;
}

.search-box input {
    flex: 1;

    min-width: 0;

    border: none;

    outline: none;

    padding: 13px 5px;

    font-family: 'Poppins', sans-serif;

    font-size: 13px;

    background: transparent;
}

.search-box input::placeholder {
    color: #aaa;
}

.search-box button {
    border: none;

    background: #b88e2f;

    color: #fff;

    padding: 12px 22px;

    margin: 3px;

    border-radius: 25px;

    cursor: pointer;

    font-family: 'Poppins', sans-serif;

    font-size: 12px;

    transition: 0.3s ease;
}

.search-box button:hover {
    background: #000;
}


/* =========================================================
   MOBILE FILTER BAR
========================================================= */

.mobile-filter-bar {
    display: none;
}

.filter-mobile-btn {
    border: 1px solid #ddd;

    background: #fff;

    color: #333;

    border-radius: 8px;

    padding: 10px 16px;

    font-family: 'Poppins', sans-serif;

    font-size: 12px;

    cursor: pointer;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    transition: 0.25s ease;
}

.filter-mobile-btn:hover {
    border-color: #b88e2f;

    color: #b88e2f;
}


/* =========================================================
   FILTER ICON + RESULT COUNT
========================================================= */

.filter-icon-wrap {
    position: relative;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    font-size: 16px;
}

.result-count {
    position: absolute;

    top: -10px;
    right: -11px;

    min-width: 17px;
    height: 17px;

    padding: 0 4px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #b88e2f;

    color: #fff;

    border-radius: 50%;

    font-family: 'Poppins', sans-serif;

    font-size: 9px;

    font-weight: 600;

    line-height: 1;

    white-space: nowrap;
}


/* =========================================================
   FILTER OVERLAY
========================================================= */

.filter-overlay {
    display: none;

    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.35);

    backdrop-filter: blur(2px);

    -webkit-backdrop-filter: blur(2px);

    z-index: 1999;
}

.filter-overlay.active {
    display: block;
}


/* =========================================================
   FILTER SIDEBAR
========================================================= */

.sidebar {
    width: 250px;

    flex-shrink: 0;

    height: fit-content;

    background: #fff;

    padding: 22px;

    border: 1px solid #e9e9e9;

    border-radius: 14px;

    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.05);

    box-sizing: border-box;

    position: relative;
}


/* =========================================================
   SMALL GOLD ACCENT
========================================================= */

.sidebar::before {
    content: "";

    position: absolute;

    top: 0;

    left: 25px;
    right: 25px;

    height: 3px;

    background: #b88e2f;

    border-radius:
        0 0 10px 10px;
}


/* =========================================================
   FILTER TITLE
========================================================= */

.filter-title {
    margin: 0 0 20px !important;

    padding-bottom: 15px;

    color: #222 !important;

    font-size: 17px !important;

    font-weight: 600;

    border-bottom: 1px solid #eeeeee;

    display: flex;

    align-items: center;

    justify-content: space-between;
}

.filter-title::after {
    content: "FILTER";

    color: #b88e2f;

    font-size: 8px;

    font-weight: 600;

    letter-spacing: 1px;
}


/* =========================================================
   FILTER HEADINGS
========================================================= */

.sidebar h3 {
    margin: 20px 0 9px;

    color: #333;

    font-size: 12px;

    font-weight: 500;
}

.sidebar h3:first-of-type {
    margin-top: 0;
}


/* =========================================================
   SELECT DROPDOWNS
========================================================= */

.sidebar select {
    width: 100%;

    height: 42px;

    padding: 0 12px;

    border-radius: 8px;

    border: 1px solid #e1e1e1;

    background: #fafafa;

    color: #444;

    font-family: 'Poppins', sans-serif;

    font-size: 11px;

    outline: none;

    cursor: pointer;

    transition: 0.25s ease;
}

.sidebar select:hover {
    background: #fff;

    border-color: #d0ae5d;
}

.sidebar select:focus {
    background: #fff;

    border-color: #b88e2f;

    box-shadow:
        0 0 0 3px rgba(184, 142, 47, 0.08);
}


/* =========================================================
   PRICE INPUTS
========================================================= */

.price-inputs {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 8px;
}

.price-inputs input {
    width: 100%;

    height: 42px;

    padding: 0 10px;

    border-radius: 8px;

    border: 1px solid #e1e1e1;

    background: #fafafa;

    color: #333;

    font-family: 'Poppins', sans-serif;

    font-size: 11px;

    outline: none;

    transition: 0.25s ease;

    box-sizing: border-box;
}

.price-inputs input::placeholder {
    color: #aaa;
}

.price-inputs input:hover {
    background: #fff;

    border-color: #d0ae5d;
}

.price-inputs input:focus {
    background: #fff;

    border-color: #b88e2f;

    box-shadow:
        0 0 0 3px rgba(184, 142, 47, 0.08);
}


/* =========================================================
   CLEAR FILTER BUTTON
========================================================= */

.clear-filter-btn {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;

    height: 40px;

    margin-top: 20px;

    padding: 0;

    background: #fff;

    color: #666;

    text-align: center;

    text-decoration: none;

    border-radius: 8px;

    border: 1px solid #e1e1e1;

    cursor: pointer;

    font-family: 'Poppins', sans-serif;

    font-size: 11px;

    transition: 0.25s ease;

    box-sizing: border-box;
}

.clear-filter-btn:hover {
    color: #b88e2f;

    background: #fffaf0;

    border-color: #b88e2f;
}


/* =========================================================
   APPLY FILTER BUTTON
========================================================= */

.apply-filter-btn {
    display: none;

    width: 100%;

    height: 43px;

    padding: 0;

    margin-top: 18px;

    border: none;

    border-radius: 8px;

    background: #b88e2f;

    color: #fff;

    font-family: 'Poppins', sans-serif;

    font-size: 12px;

    cursor: pointer;

    transition: 0.25s ease;
}

.apply-filter-btn:hover {
    background: #000;
}


/* =========================================================
   MOBILE FILTER HEADER
========================================================= */

.filter-header {
    display: none;
}


/* =========================================================
   PRODUCTS GRID
========================================================= */

.page-wrapper > .grid {
    flex: 1;

    min-width: 0;

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 20px;

    align-items: stretch;
}


/* =========================================================
   PRODUCT CARD
========================================================= */

.card {
    background: #fff;

    border-radius: 15px;

    overflow: hidden;

    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.06);

    transition: 0.3s ease;

    display: flex;

    flex-direction: column;

    min-width: 0;

    height: 100%;
}

.card:hover {
    transform: translateY(-5px);

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.10);
}


/* =========================================================
   PRODUCT IMAGE
========================================================= */

.product-image {
    width: 100%;

    height: 230px;

    background: #f4f4f4;

    overflow: hidden;

    flex-shrink: 0;
}

.product-image img {
    width: 100%;

    height: 100%;

    display: block;

    object-fit: cover;

    object-position: center;
}


/* =========================================================
   NO IMAGE
========================================================= */

.no-image {
    width: 100%;

    height: 100%;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    background: #f4f4f4;

    color: #aaa;

    font-size: 12px;
}

.no-image-icon {
    font-size: 35px;

    margin-bottom: 8px;
}


/* =========================================================
   CARD CONTENT
========================================================= */

.card-content {
    padding: 15px;

    text-align: center;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    flex-grow: 1;
}

.card-content h4 {
    margin: 0 0 8px;

    font-size: 15px;

    font-weight: 500;

    color: #333;

    display: -webkit-box;

    -webkit-line-clamp: 2;

    -webkit-box-orient: vertical;

    overflow: hidden;

    min-height: 40px;
}

.product-category {
    font-size: 12px;

    color: #777;

    margin-bottom: 3px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =========================================================
   PRODUCT BUTTON
========================================================= */

.card-content a {
    text-decoration: none;

    display: block;

    margin-top: 12px;
}

.card-content .btn {
    width: 100%;

    padding: 9px 12px;

    border: none;

    border-radius: 25px;

    background:
        linear-gradient(
            135deg,
            #d4af37,
            #b8860b
        );

    color: #fff;

    cursor: pointer;

    font-family: 'Poppins', sans-serif;

    font-size: 12px;

    transition: 0.3s ease;
}

.card-content .btn:hover {
    background:
        linear-gradient(
            135deg,
            #e6c65c,
            #c49a20
        );

    transform: translateY(-2px);
}


/* =========================================================
   TABLET - 1200px
========================================================= */

@media (max-width: 1200px) {

    .page-wrapper > .grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


/* =========================================================
   TABLET - 992px
========================================================= */

@media (max-width: 992px) {

    .page-wrapper {
        padding: 25px;
    }

    .product-toolbar {
        padding-left: 25px;

        padding-right: 25px;
    }

    .sidebar {
        width: 220px;
    }

    .page-wrapper > .grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 18px;
    }

    .product-image {
        height: 220px;
    }

}


/* =========================================================
   MOBILE - 768px
========================================================= */

@media (max-width: 768px) {

    /* -----------------------------------------
       SEARCH
    ----------------------------------------- */

    .product-toolbar {
        padding: 15px 12px 0;
    }

    .search-box {
        border-radius: 10px;
    }

    .search-icon {
        width: 38px;

        font-size: 16px;
    }

    .search-box input {
        font-size: 12px;

        padding: 11px 3px;
    }

    .search-box button {
        padding: 9px 14px;

        font-size: 11px;
    }


    /* -----------------------------------------
       MOBILE FILTER BAR
    ----------------------------------------- */

    .mobile-filter-bar {
        display: flex;

        justify-content: space-between;

        align-items: center;

        padding: 12px 12px 0;
    }


    /* -----------------------------------------
       PAGE
    ----------------------------------------- */

    .page-wrapper {
        display: flex;

        flex-direction: column;

        width: 100%;

        padding: 12px;

        gap: 15px;
    }


    /* -----------------------------------------
       MOBILE FILTER DRAWER
    ----------------------------------------- */

    .sidebar {
        position: fixed;

        top: 0;

        left: -320px;

        width: 290px;

        max-width: 85vw;

        height: 100vh;

        z-index: 2000;

        padding: 22px;

        overflow-y: auto;

        background: #fff;

        border: none;

        border-radius: 0;

        box-shadow:
            8px 0 30px rgba(0, 0, 0, 0.12);

        transition:
            left 0.3s ease;
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar::before {
        left: 22px;

        right: 22px;
    }


    /* -----------------------------------------
       FILTER HEADER
    ----------------------------------------- */

    .filter-header {
        display: flex;

        align-items: center;

        justify-content: space-between;

        margin-bottom: 25px;

        padding-bottom: 15px;

        border-bottom: 1px solid #eee;
    }

    .filter-header h3 {
        margin: 0;

        color: #222;

        font-size: 17px;

        font-weight: 600;
    }

    .close-filter {
        width: 32px;

        height: 32px;

        display: flex;

        align-items: center;

        justify-content: center;

        border: 1px solid #e5e5e5;

        border-radius: 50%;

        background: #fff;

        color: #555;

        cursor: pointer;

        font-size: 17px;

        transition: 0.2s ease;
    }

    .close-filter:hover {
        color: #b88e2f;

        border-color: #b88e2f;

        background: #fffaf0;
    }


    /* Hide desktop title */

    .filter-title {
        display: none;
    }


    /* Show apply button */

    .apply-filter-btn {
        display: block;
    }


    /* -----------------------------------------
       MOBILE SELECTS
    ----------------------------------------- */

    .sidebar select {
        height: 44px;

        font-size: 11px;
    }


    /* -----------------------------------------
       MOBILE PRICE
    ----------------------------------------- */

    .price-inputs input {
        height: 44px;
    }


    /* -----------------------------------------
       PRODUCTS
    ----------------------------------------- */

    .page-wrapper > .grid {
        width: 100%;

        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 12px;
    }


    /* -----------------------------------------
       MOBILE CARD
    ----------------------------------------- */

    .card {
        width: 100%;

        min-width: 0;

        border-radius: 10px;

        box-shadow:
            0 3px 12px rgba(0, 0, 0, 0.07);
    }

    .card:hover {
        transform: none;
    }


    /* -----------------------------------------
       MOBILE IMAGE
    ----------------------------------------- */

    .product-image {
        width: 100%;

        height: 170px;
    }

    .no-image {
        width: 100%;

        height: 100%;

        font-size: 10px;
    }

    .no-image-icon {
        font-size: 28px;

        margin-bottom: 5px;
    }


    /* -----------------------------------------
       MOBILE CARD CONTENT
    ----------------------------------------- */

    .card-content {
        padding: 10px;
    }

    .card-content h4 {
        font-size: 12px;

        min-height: 34px;

        margin-bottom: 6px;

        line-height: 1.4;
    }

    .product-category {
        font-size: 9px;

        margin-bottom: 2px;
    }


    /* -----------------------------------------
       MOBILE BUTTON
    ----------------------------------------- */

    .card-content a {
        margin-top: 9px;
    }

    .card-content .btn {
        padding: 8px 5px;

        font-size: 10px;

        border-radius: 20px;
    }

}


/* =========================================================
   VERY SMALL PHONES - 380px
========================================================= */

@media (max-width: 380px) {

    .product-toolbar {
        padding-left: 8px;

        padding-right: 8px;
    }

    .mobile-filter-bar {
        padding-left: 8px;

        padding-right: 8px;
    }

    .page-wrapper {
        padding: 10px 8px;
    }

    .page-wrapper > .grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 9px;
    }

    .sidebar {
        width: 275px;
    }

    .product-image {
        height: 150px;
    }

    .card-content {
        padding: 8px;
    }

    .card-content h4 {
        font-size: 11px;

        min-height: 31px;
    }

    .product-category {
        font-size: 8px;
    }

    .card-content .btn {
        font-size: 9px;

        padding: 7px 4px;
    }

}
