/* Daily Deals */
.products-section {
    --products-slider-gap: 15px;
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--products-slider-gap);
}

/* Cancel Flatsome .row negative margins applied via the 'row' class
   to avoid extra scrollable space at the ends when used as a slider */
.home .products-section.row,
.products-section.is-slider.row,
.products-section-wrapper.is-slider .products-section.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.home-deals {
    margin: 0 !important;
}

.home-deals .row.large-columns-4 {
    margin: 0 !important;
}

/* Avoid clearfix pseudo-element adding extra width at the end */
.home .products-section:after,
.home .products-section.row:after,
.products-section.is-slider:after,
.products-section.is-slider.row:after,
.products-section-wrapper.is-slider .products-section:after,
.products-section-wrapper.is-slider .products-section.row:after {
    content: none !important;
    display: none !important;
    clear: none !important;
}

.products-background {
    padding: 10px !important;
    background: #fff;
}

.view-more {
    padding-bottom: 10px !important;
    background: #fff;
}

/* Slider wrapper for smaller screens */
.products-section-wrapper { position: relative; }
.products-section-wrapper .prod-slider-btn { display: none; }

/* Subtle bounce hint for swipeable sliders */
.products-section.is-slider.bounce-hint {
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.products-section.is-slider.bounce-hint.bounce-hint--right {
    animation: products-slider-bounce-right 1.8s cubic-bezier(0.25, 0.75, 0.45, 1) 0.6s 1 forwards;
}

.products-section.is-slider.bounce-hint.bounce-hint--left {
    animation: products-slider-bounce-left 1.8s cubic-bezier(0.25, 0.75, 0.45, 1) 0.6s 1 forwards;
}

.products-section.is-slider.bounce-hint:hover {
    animation-play-state: paused;
}

@keyframes products-slider-bounce-right {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    35% {
        transform: translate3d(-6px, 0, 0);
    }
    60% {
        transform: translate3d(-3px, 0, 0);
    }
    75% {
        transform: translate3d(-1px, 0, 0);
    }
}

@keyframes products-slider-bounce-left {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    35% {
        transform: translate3d(6px, 0, 0);
    }
    60% {
        transform: translate3d(3px, 0, 0);
    }
    75% {
        transform: translate3d(1px, 0, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .products-section.is-slider.bounce-hint {
        animation: none !important;
    }
}

/* Desktop 4x2 slider layout */
@media (min-width: 1121px) {
    .products-section-wrapper.is-slider.layout-two-by-two .products-section {
        display: grid !important;
        grid-auto-flow: column;
        grid-template-rows: repeat(2, auto);
        grid-auto-columns: minmax(220px, calc((100% - (3 * var(--products-slider-gap, 15px))) / 4));
        overflow-x: auto;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 10px;
        scroll-padding-right: 10px;
        padding-left: 10px !important;
        padding-right: 10px !important;
        -ms-overflow-style: none;
        scrollbar-width: none;
        overscroll-behavior-x: contain;
    }

    .products-section-wrapper.is-slider.layout-two-by-two .products-section::-webkit-scrollbar {
        display: none;
    }

    .products-section-wrapper.is-slider.layout-two-by-two .products-section li.custom-product-card {
        max-width: none !important;
        flex: 1 1 auto !important;
        width: 100%;
        scroll-snap-align: none;
    }

    .products-section-wrapper.is-slider.layout-two-by-two .products-section li.custom-product-card:nth-child(4n+1) {
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
}

@media (min-width: 1025px) and (max-width: 1120px) {
    .products-section-wrapper.is-slider.layout-two-by-two {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    .products-section-wrapper.is-slider.layout-two-by-two .products-section {
        display: grid !important;
        grid-auto-flow: row;
        grid-template-columns: repeat(4, minmax(220px, 1fr));
        grid-template-rows: repeat(2, auto);
        grid-auto-columns: unset;
        gap: 12px;
        overflow: visible;
        scroll-behavior: auto;
        scroll-snap-type: none;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .products-section-wrapper.is-slider.layout-two-by-two .products-section li.custom-product-card {
        min-width: 220px;
        scroll-snap-align: unset;
        scroll-snap-stop: unset;
    }
}

@media (max-width: 1024px) {
    /* Tablet down to 426px: slider shows 4 columns x 2 rows per "page" */
    .home .products-section.is-slider,
    .products-section.is-slider,
    .products-section-wrapper.is-slider .products-section {
        display: grid !important;
        grid-auto-flow: column;
        grid-template-rows: repeat(2, auto);
        grid-auto-columns: calc((100% - (3 * var(--products-slider-gap, 15px))) / 4);
        grid-template-columns: unset !important;
        overflow-x: auto;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 0;
        scroll-padding-right: 0;
        -ms-overflow-style: none;
        scrollbar-width: none;
        overscroll-behavior-x: contain;
    }
    /* Remove horizontal padding so the last item can align flush */
    .home .products-section.is-slider.products-background,
    .products-section.is-slider.products-background,
    .products-section-wrapper.is-slider .products-section.products-background {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .home .products-section.is-slider::-webkit-scrollbar,
    .products-section.is-slider::-webkit-scrollbar,
    .products-section-wrapper.is-slider .products-section::-webkit-scrollbar { display: none; }

    .home .products-section-wrapper.is-slider .prod-slider-btn,
    .products-section-wrapper.is-slider .prod-slider-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
        display: inline-block;
        background: rgba(0,0,0,.55);
        color: #fff;
        border: 0;
        width: 36px;
        height: 36px;
        border-radius: 18px;
        cursor: pointer;
    }
    .home .products-section-wrapper.is-slider .prod-slider-btn.prev,
    .products-section-wrapper.is-slider .prod-slider-btn.prev { left: 6px; }
    .home .products-section-wrapper.is-slider .prod-slider-btn.next,
    .products-section-wrapper.is-slider .prod-slider-btn.next { right: 6px; }

    /* Scope item sizing to slider cards */
    .home .products-section.is-slider li.custom-product-card,
    .products-section.is-slider li.custom-product-card,
    .products-section-wrapper.is-slider .products-section li.custom-product-card {
        max-width: none !important;
        flex: 1 1 auto !important;
        width: 100%;
        scroll-snap-align: none;
    }

    .home .products-section.is-slider li.custom-product-card:nth-child(4n+1),
    .products-section.is-slider li.custom-product-card:nth-child(4n+1),
    .products-section-wrapper.is-slider .products-section li.custom-product-card:nth-child(4n+1) {
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
}

/* On small mobile sizes, keep horizontal slider with two items visible */
@media (max-width: 640px) {
    .products-section-wrapper.is-slider .prod-slider-btn { display: none; }
}

@media (max-width: 425px) {
    /* Ultra-small screens: slider reverts to 2 columns x 2 rows */
    .home .products-section.is-slider,
    .products-section.is-slider,
    .products-section-wrapper.is-slider .products-section {
        grid-auto-columns: calc((100% - var(--products-slider-gap, 15px)) / 2);
        scroll-padding-left: 0;
        scroll-padding-right: 0;
    }

    .home .products-section.is-slider li.custom-product-card,
    .products-section.is-slider li.custom-product-card,
    .products-section-wrapper.is-slider .products-section li.custom-product-card {
        scroll-snap-align: none;
    }
}

/* Top Category Deals */
.top-category-deals {
    margin: 20px 0;
}
.top-category-deals .deal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.top-category-deals.columns-6 .deal-grid {
    grid-template-columns: repeat(6, 1fr);
}
.top-category-deals .deal-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    aspect-ratio: 1 / 1;
    min-height: 0;
}
.top-category-deals .deal-card.bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.top-category-deals .deal-card img.bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.top-category-deals .deal-card .overlay {
    position: relative;
    width: 100%;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.top-category-deals .deal-card .ribbon {
    display: inline-block;
    width: 90%;
    background: rgba(184, 28, 28, .5);
    color: #fff;
    padding: 8px 14px;
    font-weight: 600;
    letter-spacing: .5px;
    text-align: center;
    position: absolute;
    left: 16px;
    top: 60%;
    transform: translateY(-50%);
    z-index: 2;
}
.top-category-deals .deal-card .meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: baseline;
    width: 100%;
    padding: 12px 16px 10px;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.6) 60%, rgba(0,0,0,.9) 100%);
}
.deals {
    padding-right: 5px;
}

.top-category-deals .deal-card .meta .deals {
    font-size: 15px;
    color: #ffffff;
}
.top-category-deals .deal-card .meta .percent {
    font-size: 26px;
    font-weight: 800;
    color: #e53935;
}

@supports not (aspect-ratio: 1 / 1) {
    .top-category-deals .deal-card {
        aspect-ratio: auto;
        min-height: 240px;
    }

    @media (max-width: 700px) {
        .top-category-deals .deal-card {
            min-height: 190px;
        }
    }
}

@media (max-width: 850px) {
    .top-category-deals .deal-card .ribbon { padding: 6px 10px; font-size: 13px; font-weight: 600;}
    .top-category-deals .deal-card .meta .deals { font-size: 11px; }
    .top-category-deals .deal-card .meta .percent { font-size: 19px; }
}


@media (max-width: 700px) {
    .top-category-deals .deal-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .top-category-deals.columns-6 .deal-grid { grid-template-columns: repeat(2, 1fr) !important; }

    /* Keep cards perfectly square while shrinking footprint */
    .top-category-deals .deal-card {
        aspect-ratio: 1 / 1;
        min-height: 0;
    }
    .top-category-deals .deal-card .overlay { padding: 12px 10px; }
    .top-category-deals .deal-card .ribbon { left: 10px; }
    /* Match padding when absolute at bottom on mobile */
    .top-category-deals .deal-card .meta { padding: 10px 10px 8px; }
    .top-category-deals .deal-card .ribbon { padding: 6px 10px; font-size: 13px; font-weight: 600;}
    .top-category-deals .deal-card .meta .deals { font-size: 11px; }
    .top-category-deals .deal-card .meta .percent { font-size: 19px; }
}

/* Top Brands Deals */
.top-brands-deals {
    margin: 10px 0;
    padding: 10px !important;
    background: #fff;
}

.top-brands-deals .deal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.top-brands-deals.columns-8 .deal-grid {
    grid-template-columns: repeat(4, 1fr);
}

.top-brands-deals .brand-card {
    position: relative;
    min-height: 240px;
    display: flex;
    align-items: flex-end;
    color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.top-brands-deals .brand-card img.bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.top-brands-deals .brand-card .overlay {
    position: relative;
    width: 100%;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.top-brands-deals .brand-card .ribbon {
    display: block;
    align-self: stretch;
    background: rgb(213 73 73 / 50%);
    color: #fff;
    padding: 10px 14px;
    font-weight: 800;
    letter-spacing: .5px;
    text-align: center;
}

.top-brands-deals .brand-card .meta {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 8px;
}

.top-brands-deals .brand-card .meta .deals {
    font-size: 15px;
    color: #ffffff;
}

/* Logo container */
.logo-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 210px;
    max-width: calc(100% - 24px);
    height: 80px;
    background: #fff;
    padding: 8px 24px 8px 10px;
    border: 2px solid #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    clip-path: polygon(0 0, 100% 0, 100% 0%, 78% 100%, 0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-box .logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-box--square .logo {
    max-width: 100%;
    max-height: 100%;
}

.logo-box--tall .logo {
    max-height: 100%;
    max-width: 78%;
}

.logo-box--wide .logo {
    max-width: 88%;
    max-height: 80%;
    object-fit: contain;
}

.overlay {
    background-color: transparent !important;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .top-brands-deals .deal-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .top-brands-deals.columns-8 .deal-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .logo-box {
        width: 70%;
        height: 70px;
        padding: 6px 35px 6px 0px;
    }
}

@media (max-width: 640px) {
    .top-brands-deals .deal-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .top-brands-deals.columns-8 .deal-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .top-brands-deals .brand-card {
        min-height: 200px;
    }

    .logo-box {
        width: 85%;
        height: 60px;
        padding: 4px 14px 4px 6px;
    }

    .top-brands-deals .brand-card .overlay {
        padding: 12px 10px;
    }
    .top-brands-deals .brand-card .ribbon {
        padding: 6px 10px;
        font-size: 11px;
    }
}


/* Google Fonts - Oswald */
.font-oswald {
    font-family: 'Oswald', sans-serif !important;
}

.font-oswald-light {
    font-family: 'Oswald', sans-serif !important;
    font-weight: 300 !important;
}
.font-oswald-regular {
    font-family: 'Oswald', sans-serif !important;
    font-weight: 400 !important;
}
.font-oswald-medium {
    font-family: 'Oswald', sans-serif !important;
    font-weight: 500 !important;
}
.font-oswald-semibold {
    font-family: 'Oswald', sans-serif !important;
    font-weight: 600 !important;
}

/* Google Fonts - Popins */
.poppins-thin {
    font-family: "Poppins", sans-serif !important;
    font-weight: 100;
    font-style: normal;
}

.poppins-extralight {
    font-family: "Poppins", sans-serif !important;
    font-weight: 200;
    font-style: normal;
}

.poppins-light {
    font-family: "Poppins", sans-serif !important;
    font-weight: 300;
    font-style: normal;
}

.poppins-regular {
    font-family: "Poppins", sans-serif !important;
    font-weight: 400;
    font-style: normal;
}

.poppins-medium {
    font-family: "Poppins", sans-serif !important;
    font-weight: 500;
    font-style: normal;
}

.poppins-semibold {
    font-family: "Poppins", sans-serif !important;
    font-weight: 600;
    font-style: normal;
}