
/* =========================================================
   BORN REGAL - BEST SELLERS
   PREMIUM RESPONSIVE PRODUCT GRID
   ========================================================= */

.best-sellers-page {
    width: 100%;
    min-height: 100vh;

    margin: 0;
    padding: 0;

    overflow-x: hidden;

    background: #ffffff;
    color: #111111;

    font-family:
        'Poppins',
        'Helvetica Neue',
        Arial,
        sans-serif;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


/* =========================================================
   HERO
========================================================= */

.best-sellers-hero {
    position: relative;

    width: 100%;

    padding:
        76px
        20px
        66px;

    overflow: hidden;

    text-align: center;

    background:
        radial-gradient(
            circle at 88% 20%,
            rgba(200, 167, 78, .09),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #f8f8f6 0%,
            #f6f6f4 58%,
            #f3f0e7 100%
        );

    border-bottom: 1px solid #e3e3df;
}


/* Decorative ring */

.best-sellers-hero::before {
    content: "";

    position: absolute;

    width: 300px;
    height: 300px;

    right: -135px;
    top: -160px;

    border:
        1px solid
        rgba(200, 167, 78, .14);

    border-radius: 50%;

    pointer-events: none;
}

.best-sellers-hero::after {
    content: "";

    position: absolute;

    width: 190px;
    height: 190px;

    right: -70px;
    top: -95px;

    border:
        1px solid
        rgba(200, 167, 78, .16);

    border-radius: 50%;

    pointer-events: none;
}


/* =========================================================
   HERO CONTENT
========================================================= */

.best-sellers-hero-content {
    position: relative;
    z-index: 2;

    width: min(
        720px,
        100%
    );

    margin: 0 auto;
}


/* =========================================================
   SECTION LABEL
========================================================= */

.section-label {
    display: block;

    margin-bottom: 13px;

    color: #b18d43;

    font-size: 10px;
    line-height: 1.4;

    font-weight: 700;

    letter-spacing: 3px;

    text-transform: uppercase;
}


/* =========================================================
   HERO TITLE
========================================================= */

.best-sellers-hero h1 {
    margin: 0 0 14px;

    color: #111111;

    font-size: clamp(
        38px,
        4vw,
        54px
    );

    line-height: 1.05;

    font-weight: 600;

    letter-spacing: -1.7px;
}


/* =========================================================
   HERO DESCRIPTION
========================================================= */

.best-sellers-hero p {
    max-width: 650px;

    margin: 0 auto;

    color: #707070;

    font-size: 14px;
    line-height: 1.75;
}


/* =========================================================
   PRODUCTS SECTION
========================================================= */

.best-sellers-products {
    width: 100%;

    padding:
        70px
        0
        90px;

    background: #ffffff;
}


/* =========================================================
   PRODUCTS TOP
========================================================= */

.products-top {
    width: min(
        1200px,
        calc(100% - 48px)
    );

    margin:
        0 auto
        34px;

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 20px;
}


/* =========================================================
   PRODUCTS LABEL
========================================================= */

.products-label {
    display: block;

    margin-bottom: 8px;

    color: #b18d43;

    font-size: 9px;
    line-height: 1.4;

    font-weight: 700;

    letter-spacing: 2.5px;

    text-transform: uppercase;
}


/* =========================================================
   PRODUCTS TITLE
========================================================= */

.products-top h2 {
    margin: 0;

    color: #111111;

    font-size: 30px;
    line-height: 1.15;

    font-weight: 600;

    letter-spacing: -.8px;
}


/* =========================================================
   PRODUCT COUNT
========================================================= */

.products-count {
    color: #777777;

    font-size: 12px;
    line-height: 1.5;

    white-space: nowrap;
}


/* =========================================================
   PRODUCT GRID
========================================================= */

.product-grid {
    width: min(
        1200px,
        calc(100% - 48px)
    );

    margin: 0 auto;

    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    gap:
        34px
        18px;
}


/* =========================================================
   PRODUCT CARD
========================================================= */

.product-card {
    min-width: 0;

    position: relative;
}


/* =========================================================
   PRODUCT IMAGE WRAPPER
   IMPORTANT:
   Always fits available grid width.
========================================================= */

.product-image {
    position: relative;

    width: 100%;
    max-width: 100%;

    overflow: hidden;

    aspect-ratio: 3 / 4;

    background: #f3f3f1;

    isolation: isolate;
}


/* =========================================================
   PRODUCT IMAGE
========================================================= */

.product-image img {
    width: 100%;
    height: 100%;

    max-width: 100%;

    display: block;

    object-fit: cover;
    object-position: center center;

    vertical-align: middle;

    transition:
        transform .55s cubic-bezier(
            .2,
            .65,
            .3,
            1
        );
}


/* Desktop hover */

.product-card:hover
.product-image img {
    transform: scale(1.035);
}


/* =========================================================
   BEST SELLER BADGE
========================================================= */

.best-seller-badge {
    position: absolute;

    top: 12px;
    left: 12px;

    z-index: 3;

    min-height: 28px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding:
        0
        10px;

    background: #111111;

    color: #ffffff;

    font-size: 8px;
    line-height: 1;

    font-weight: 700;

    letter-spacing: 1px;

    text-transform: uppercase;

    box-shadow:
        0 4px 12px
        rgba(0, 0, 0, .10);
}


/* =========================================================
   PRODUCT ACTIONS
========================================================= */

.product-actions {
    position: absolute;

    left: 12px;
    right: 12px;
    bottom: 12px;

    z-index: 4;

    display: flex;

    gap: 8px;

    opacity: 0;

    transform:
        translateY(10px);

    transition:
        opacity .3s ease,
        transform .3s ease;
}

.product-card:hover
.product-actions {
    opacity: 1;

    transform:
        translateY(0);
}


/* =========================================================
   ACTION BUTTONS
========================================================= */

.product-actions button {
    height: 42px;

    min-width: 0;

    padding:
        0
        12px;

    border: 1px solid transparent;

    border-radius: 2px;

    cursor: pointer;

    font-family: inherit;

    font-size: 10px;

    line-height: 1;

    font-weight: 600;

    letter-spacing: .25px;

    transition:
        background .25s ease,
        color .25s ease,
        border-color .25s ease,
        transform .2s ease;
}


/* =========================================================
   ADD CART
========================================================= */

.add-cart-btn {
    flex: 1;

    background: #ffffff;

    border-color: #ffffff !important;

    color: #111111;
}

.add-cart-btn:hover {
    background: #f7f2e5;

    border-color: #f7f2e5 !important;

    color: #111111;

    transform: translateY(-1px);
}


/* =========================================================
   QUICK BUY
========================================================= */

.quick-buy-btn {
    flex: 1;

    background: #111111;

    border-color: #111111 !important;

    color: #ffffff;
}

.quick-buy-btn:hover {
    background: #c8a74e;

    border-color: #c8a74e !important;

    color: #111111;

    transform: translateY(-1px);
}


/* =========================================================
   PRODUCT INFO
========================================================= */

.product-info {
    width: 100%;

    min-width: 0;

    padding-top: 14px;
}


/* =========================================================
   PURCHASE COUNT
========================================================= */

.purchase-count {
    display: block;

    margin-bottom: 7px;

    color: #b18d43;

    font-size: 9px;
    line-height: 1.4;

    font-weight: 700;

    letter-spacing: .15px;
}


/* =========================================================
   PRODUCT NAME
========================================================= */

.product-info h3 {
    overflow: hidden;

    margin: 0 0 5px;

    color: #111111;

    font-size: 15px;
    line-height: 1.35;

    font-weight: 600;

    white-space: nowrap;

    text-overflow: ellipsis;
}


/* =========================================================
   CATEGORY
========================================================= */

.product-category {
    overflow: hidden;

    margin: 0 0 8px;

    color: #777777;

    font-size: 11px;
    line-height: 1.5;

    white-space: nowrap;

    text-overflow: ellipsis;
}


/* =========================================================
   PRICE
========================================================= */

.product-price {
    color: #111111;

    font-size: 14px;
    line-height: 1.4;

    font-weight: 600;
}


/* =========================================================
   LARGE LAPTOP
   1440 × 900
========================================================= */

@media (min-width: 1400px) and (max-width: 1679px) {

    .best-sellers-hero {
        padding:
            78px
            24px
            68px;
    }

    .best-sellers-products {
        padding:
            72px
            0
            92px;
    }

    .products-top,
    .product-grid {
        width: min(
            1200px,
            calc(100% - 60px)
        );
    }

    .product-grid {
        gap:
            35px
            19px;
    }

}


/* =========================================================
   DESKTOP
   1920 × 1080
========================================================= */

@media (min-width: 1680px) {

    .best-sellers-hero {
        padding:
            88px
            30px
            76px;
    }

    .best-sellers-hero h1 {
        font-size: 57px;
    }

    .best-sellers-hero p {
        font-size: 15px;
    }

    .best-sellers-products {
        padding:
            82px
            0
            105px;
    }

    .products-top,
    .product-grid {
        width: min(
            1240px,
            calc(100% - 80px)
        );
    }

    .products-top {
        margin-bottom: 38px;
    }

    .products-top h2 {
        font-size: 32px;
    }

    .product-grid {
        gap:
            38px
            20px;
    }

    .product-info {
        padding-top: 15px;
    }

    .product-info h3 {
        font-size: 15px;
    }

}


/* =========================================================
   LAPTOP
   1366 × 768
========================================================= */

@media (min-width: 901px) and (max-width: 1399px) {

    .best-sellers-hero {
        padding:
            68px
            20px
            58px;
    }

    .best-sellers-hero h1 {
        font-size: 50px;
    }

    .best-sellers-products {
        padding:
            62px
            0
            78px;
    }

    .products-top,
    .product-grid {
        width: min(
            1140px,
            calc(100% - 40px)
        );
    }

    .product-grid {
        gap:
            30px
            16px;
    }

}


/* =========================================================
   TABLET
   768 × 1024
========================================================= */

@media (min-width: 601px) and (max-width: 900px) {

    .best-sellers-hero {
        padding:
            60px
            20px
            52px;
    }

    .best-sellers-hero h1 {
        font-size: 43px;
    }

    .best-sellers-hero p {
        max-width: 580px;

        font-size: 13px;
    }

    .best-sellers-products {
        padding:
            54px
            0
            70px;
    }

    .products-top {
        width:
            calc(100% - 36px);

        margin-bottom: 28px;
    }

    .products-top h2 {
        font-size: 27px;
    }

    .products-count {
        font-size: 11px;
    }

    .product-grid {
        width:
            calc(100% - 36px);

        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );

        gap:
            28px
            14px;
    }

    .product-image {
        width: 100%;
        max-width: 100%;
    }

    .product-actions {
        left: 9px;
        right: 9px;
        bottom: 9px;

        gap: 6px;
    }

    .product-actions button {
        height: 40px;

        font-size: 9px;
    }

    .best-seller-badge {
        top: 9px;
        left: 9px;

        min-height: 26px;

        padding: 0 8px;

        font-size: 7px;
    }

}


/* =========================================================
   MOBILE
   360 × 800
========================================================= */

@media (max-width: 600px) {

    .best-sellers-hero {
        padding:
            46px
            15px
            42px;
    }

    .best-sellers-hero::before {
        width: 210px;
        height: 210px;

        right: -105px;
        top: -110px;
    }

    .best-sellers-hero::after {
        width: 135px;
        height: 135px;

        right: -58px;
        top: -70px;
    }

    .section-label {
        margin-bottom: 10px;

        font-size: 8px;

        letter-spacing: 2.4px;
    }

    .best-sellers-hero h1 {
        margin-bottom: 11px;

        font-size: 36px;

        letter-spacing: -1.1px;
    }

    .best-sellers-hero p {
        max-width: 330px;

        font-size: 11px;

        line-height: 1.65;
    }


    /* Products */

    .best-sellers-products {
        padding:
            43px
            0
            58px;
    }

    .products-top {
        width:
            calc(100% - 24px);

        margin-bottom: 21px;

        align-items: flex-start;

        flex-direction: column;

        gap: 6px;
    }

    .products-label {
        margin-bottom: 5px;

        font-size: 7.5px;

        letter-spacing: 2px;
    }

    .products-top h2 {
        font-size: 23px;

        letter-spacing: -.5px;
    }

    .products-count {
        display: none;
    }


    /* IMPORTANT:
       Grid itself always fits viewport */

    .product-grid {
        width:
            calc(100% - 24px);

        max-width: none;

        margin:
            0
            auto;

        padding: 0;

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        gap:
            26px
            10px;
    }


    /* IMPORTANT:
       Image never exceeds grid column */

    .product-card {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .product-image {
        width: 100%;
        max-width: 100%;

        aspect-ratio: 3 / 4;
    }

    .product-image img {
        width: 100%;
        height: 100%;

        max-width: 100%;
    }


    /* Mobile actions always visible */

    .product-actions {
        position: static;

        width: 100%;

        margin-top: 7px;

        display: flex;

        gap: 5px;

        opacity: 1;

        transform: none;
    }

    .product-actions button {
        width: 100%;

        height: 36px;

        padding:
            0
            6px;

        font-size: 8.5px;
    }


    /* Badge */

    .best-seller-badge {
        top: 8px;
        left: 8px;

        min-height: 23px;

        padding:
            0
            7px;

        font-size: 6.5px;

        letter-spacing: .8px;
    }


    /* Info */

    .product-info {
        padding-top: 10px;
    }

    .purchase-count {
        margin-bottom: 5px;

        font-size: 7.5px;
    }

    .product-info h3 {
        margin-bottom: 3px;

        font-size: 12px;

        line-height: 1.35;
    }

    .product-category {
        margin-bottom: 6px;

        font-size: 9.5px;
    }

    .product-price {
        font-size: 11.5px;
    }

}


/* =========================================================
   SMALL MOBILE
   320 × 568
========================================================= */

@media (max-width: 340px) {

    .best-sellers-hero {
        padding:
            36px
            10px
            34px;
    }

    .section-label {
        margin-bottom: 8px;

        font-size: 7px;

        letter-spacing: 2px;
    }

    .best-sellers-hero h1 {
        margin-bottom: 9px;

        font-size: 30px;

        letter-spacing: -.9px;
    }

    .best-sellers-hero p {
        max-width: 290px;

        font-size: 9.5px;

        line-height: 1.6;
    }


    /* Products */

    .best-sellers-products {
        padding:
            34px
            0
            45px;
    }

    .products-top {
        width:
            calc(100% - 20px);

        margin-bottom: 17px;
    }

    .products-label {
        margin-bottom: 4px;

        font-size: 6.5px;

        letter-spacing: 1.7px;
    }

    .products-top h2 {
        font-size: 20px;
    }


    /* =====================================================
       320px IMPORTANT IMAGE RULE
       10px outer spacing + 2-column grid + 7px gap
       ensures image always fits viewport.
       ===================================================== */

    .product-grid {
        width:
            calc(100% - 20px);

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        gap:
            22px
            7px;
    }

    .product-card {
        min-width: 0;
        width: 100%;
    }

    .product-image {
        width: 100%;
        max-width: 100%;

        aspect-ratio: 3 / 4;
    }

    .product-image img {
        width: 100%;
        height: 100%;

        max-width: 100%;

        object-fit: cover;
    }


    /* Badge */

    .best-seller-badge {
        top: 6px;
        left: 6px;

        min-height: 20px;

        padding:
            0
            6px;

        font-size: 5.5px;

        letter-spacing: .6px;
    }


    /* Actions */

    .product-actions {
        margin-top: 5px;

        gap: 4px;
    }

    .product-actions button {
        height: 32px;

        padding:
            0
            4px;

        font-size: 7px;
    }


    /* Info */

    .product-info {
        padding-top: 8px;
    }

    .purchase-count {
        margin-bottom: 4px;

        font-size: 6.5px;
    }

    .product-info h3 {
        font-size: 10px;
    }

    .product-category {
        margin-bottom: 5px;

        font-size: 8px;
    }

    .product-price {
        font-size: 10px;
    }

}


/* =========================================================
   VERY SMALL / NARROW DEVICES
========================================================= */

@media (max-width: 300px) {

    .product-grid {
        grid-template-columns: 1fr;

        gap: 24px;
    }

    .product-card {
        width: 100%;
    }

    .product-image {
        width: 100%;

        aspect-ratio: 3 / 4;
    }

    .product-actions {
        flex-direction: row;
    }

}


/* =========================================================
   TOUCH DEVICES
========================================================= */

@media (hover: none) and (pointer: coarse) {

    .product-card:hover
    .product-image img {
        transform: none;
    }

    .product-card:hover
    .product-actions {
        opacity: 1;

        transform: none;
    }

    .add-cart-btn:hover,
    .quick-buy-btn:hover {
        transform: none;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: .01ms !important;

        scroll-behavior: auto !important;
    }

}
