/* TrendingDeal storefront layout */

.bm-hotproducts-wrapper {
    box-sizing: border-box;
    max-width: 1328px;
    margin: 0 auto 64px;
    padding: 38px 24px 48px;
    color: #142033;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Header search */
.bm-deals-header-search {
    flex: 0 1 310px;
    max-width: 310px;
    min-width: 180px;
    margin: 0 16px;
}

.bm-hotproducts-search-bar {
    margin: 0 0 20px;
}

.bm-search-inner {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 16px;
    gap: 10px;
    border: 1px solid #dfe4eb;
    border-radius: 999px;
    background: #f8fafc;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.bm-search-inner:focus-within {
    border-color: #ff6940;
    box-shadow: 0 0 0 3px rgba(255, 105, 64, .12);
    background: #fff;
}

.bm-search-icon {
    flex: 0 0 auto;
    color: #8b98aa;
    font-size: 17px;
    line-height: 1;
}

.bm-search-input {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 0;
    border: 0 !important;
    outline: 0;
    color: #172235;
    background: transparent;
    font-size: 16px;
}

.bm-search-input::placeholder { color: #8b98aa; }
.bm-search-btn,
.bm-search-clear,
.bm-search-info { display: none !important; }

.bm-deals-header-search .bm-hotproducts-search-bar { margin: 0; }
.bm-deals-header-search .bm-search-inner { min-height: 42px; }
.bm-deals-header-search .bm-search-input { height: 40px; font-size: 15px; }

/* WordPress Extendable header: remove the floating pill appearance. */
.ext-header-sticky,
.ext-header-sticky.ext-header-sticky--floating-pill {
    width: 100% !important;
    max-width: none !important;
    min-height: 72px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: 0 1px 0 rgba(20, 32, 51, .10) !important;
    align-items: center !important;
}

.ext-header-sticky .wp-block-shortcode {
    display: block !important;
    flex: 0 1 310px;
    min-width: 180px;
    margin: 0 !important;
    align-self: center !important;
}

.ext-header-sticky .wp-block-image {
    flex: 0 0 auto;
    margin: 0 !important;
    align-self: center !important;
}

.ext-header-sticky .wp-block-image img {
    display: block;
    width: 158px !important;
    max-width: 158px !important;
    height: auto !important;
}

.ext-header-sticky .wp-block-columns {
    align-self: center !important;
    display: block !important;
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
}

.ext-header-sticky .wp-block-column {
    flex-basis: auto !important;
}

.ext-header-sticky .wp-block-group.alignwide {
    margin: 0 !important;
    padding: 0 !important;
}

.ext-header-sticky .ext-nav-extras-btn { display: none !important; }

@media (min-width: 769px) {
    header.wp-block-template-part > .wp-block-group.ext-header-sticky {
        display: grid !important;
        grid-template-columns: minmax(158px, 1fr) 310px minmax(280px, 1fr) !important;
        align-items: center !important;
        column-gap: 18px !important;
        width: min(1328px, calc(100vw - 48px)) !important;
        max-width: calc(100vw - 48px) !important;
        margin-right: auto !important;
        margin-left: auto !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    header.wp-block-template-part > .wp-block-group.ext-header-sticky > .wp-block-image {
        grid-column: 1;
        justify-self: start;
    }

    header.wp-block-template-part > .wp-block-group.ext-header-sticky > .wp-block-shortcode {
        grid-column: 2;
        width: 310px;
    }

    header.wp-block-template-part > .wp-block-group.ext-header-sticky > .wp-block-columns {
        grid-column: 3;
        justify-self: end;
    }

    .bm-deals-header-search {
        transform: translateY(5px);
    }

    .ext-header-sticky .wp-block-navigation__container {
        flex-wrap: nowrap !important;
        white-space: nowrap;
    }
}

/* Headings and category rail */
.bm-hotproducts-cat-head {
    margin: 0 0 18px;
}

.bm-hotproducts-heading-cats,
.bm-hotproducts-heading-products {
    margin: 0;
    color: #142033;
    font-size: 30px;
    line-height: 1.16;
    font-weight: 800;
    letter-spacing: 0;
}

.bm-hotproducts-cat-subtitle {
    margin: 8px 0 0;
    color: #607089;
    font-size: 17px;
    line-height: 1.35;
}

.bm-hotproducts-cat-subtitle strong {
    color: #08b25d;
    font-weight: 900;
}

.bm-hotproducts-heading-products {
    margin-top: 42px;
    margin-bottom: 18px;
}

.bm-hotproducts-cat-rail {
    position: relative;
}

.bm-hotproducts-categories {
    display: flex;
    gap: 18px;
    margin: 0;
    padding: 0 0 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.bm-hotproducts-categories::-webkit-scrollbar { display: none; }

.bm-cat-nav {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid #e5eaf1;
    border-radius: 999px;
    color: #ff5128;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 10px 24px rgba(20, 32, 51, .16);
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: opacity .18s ease, transform .18s ease, box-shadow .18s ease;
}

.bm-cat-nav:hover {
    transform: translateY(-50%) scale(1.04);
    box-shadow: 0 14px 30px rgba(20, 32, 51, .20);
}

.bm-cat-nav.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.bm-cat-nav-prev { left: -21px; }
.bm-cat-nav-next { right: -21px; }

.bm-hot-cat-card {
    position: relative;
    display: block;
    flex: 0 0 178px;
    height: 310px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    color: #fff;
    background: #1a2534;
    cursor: pointer;
    scroll-snap-align: start;
    box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .10), 0 2px 8px rgba(20, 32, 51, .10);
    transition: transform .18s ease, box-shadow .18s ease;
}

.bm-hot-cat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(20, 32, 51, .18);
}

.bm-hot-cat-card.is-active {
    box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 6px #ff6940, 0 14px 26px rgba(20, 32, 51, .16);
}

.bm-hot-cat-image,
.bm-hot-cat-overlay {
    position: absolute;
    inset: 0;
}

.bm-hot-cat-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bm-hot-cat-overlay { background: linear-gradient(180deg, rgba(18, 30, 47, .02), rgba(18, 30, 47, .18)); }
.bm-hot-cat-card--beauty .bm-hot-cat-overlay { background: linear-gradient(180deg, rgba(245, 134, 255, .18), rgba(178, 91, 206, .72)); }
.bm-hot-cat-card--electronics .bm-hot-cat-overlay { background: linear-gradient(180deg, rgba(108, 188, 246, .14), rgba(55, 143, 207, .72)); }
.bm-hot-cat-card--toys .bm-hot-cat-overlay { background: linear-gradient(180deg, rgba(96, 186, 247, .12), rgba(67, 157, 216, .72)); }
.bm-hot-cat-card--health .bm-hot-cat-overlay { background: linear-gradient(180deg, rgba(115, 218, 136, .12), rgba(84, 177, 96, .72)); }
.bm-hot-cat-card--arts .bm-hot-cat-overlay { background: linear-gradient(180deg, rgba(218, 132, 236, .12), rgba(177, 91, 204, .70)); }
.bm-hot-cat-card--automotive .bm-hot-cat-overlay { background: linear-gradient(180deg, rgba(238, 98, 94, .10), rgba(207, 73, 73, .72)); }
.bm-hot-cat-card--baby .bm-hot-cat-overlay { background: linear-gradient(180deg, rgba(206, 189, 226, .16), rgba(166, 140, 194, .72)); }
.bm-hot-cat-card--fashion .bm-hot-cat-overlay { background: linear-gradient(180deg, rgba(226, 207, 39, .12), rgba(193, 177, 18, .72)); }
.bm-hot-cat-card--grocery .bm-hot-cat-overlay { background: linear-gradient(180deg, rgba(86, 220, 197, .14), rgba(57, 180, 157, .72)); }
.bm-hot-cat-card--home .bm-hot-cat-overlay { background: linear-gradient(180deg, rgba(238, 238, 151, .14), rgba(196, 193, 110, .74)); }
.bm-hot-cat-card--music .bm-hot-cat-overlay { background: linear-gradient(180deg, rgba(233, 135, 105, .12), rgba(196, 92, 66, .72)); }
.bm-hot-cat-card--office .bm-hot-cat-overlay { background: linear-gradient(180deg, rgba(99, 92, 196, .12), rgba(74, 65, 165, .74)); }
.bm-hot-cat-card--garden .bm-hot-cat-overlay { background: linear-gradient(180deg, rgba(125, 196, 91, .12), rgba(89, 152, 65, .74)); }
.bm-hot-cat-card--pets .bm-hot-cat-overlay { background: linear-gradient(180deg, rgba(88, 176, 233, .12), rgba(54, 146, 207, .72)); }
.bm-hot-cat-card--sport .bm-hot-cat-overlay { background: linear-gradient(180deg, rgba(86, 181, 92, .12), rgba(71, 141, 80, .74)); }
.bm-hot-cat-card--tools .bm-hot-cat-overlay { background: linear-gradient(180deg, rgba(255, 136, 38, .10), rgba(220, 114, 28, .74)); }

.bm-hot-cat-name {
    position: absolute;
    z-index: 1;
    right: 12px;
    bottom: 22px;
    left: 12px;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    line-height: .98;
    text-align: left;
    text-shadow: 0 2px 4px rgba(0, 0, 0, .28);
}

/* Deal cards */
.bm-hotproducts-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.bm-hotproduct-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e7ee;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(20, 32, 51, .04);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.bm-hotproduct-card:hover {
    transform: translateY(-2px);
    border-color: #cfd8e4;
    box-shadow: 0 12px 25px rgba(20, 32, 51, .10);
}

.bm-hotproduct-card a {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}

.bm-hotproduct-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fff;
}

.bm-hotproduct-image-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 12px;
    object-fit: contain;
    transition: transform .18s ease;
}

.bm-hotproduct-card:hover .bm-hotproduct-image-wrap img { transform: scale(1.025); }

.bm-hotproduct-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #ea1b4e;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.bm-hotproduct-rank {
    position: absolute;
    z-index: 3;
    top: 10px;
    left: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #ffe58a;
    color: #a75500;
    font-size: 13px;
    font-weight: 800;
}

.bm-hotproduct-rank + .bm-hotproduct-image-wrap .bm-hotproduct-badge {
    top: 48px;
}

.bm-hotproduct-favorite {
    display: none;
}

.bm-hotproduct-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
}

.bm-hotproduct-category {
    display: none;
}

.bm-hotproduct-title {
    min-height: 43px;
    margin: 0;
    overflow: hidden;
    color: #111c2d;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.32;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.bm-hotproduct-shop {
    display: none;
}

.bm-hotproduct-price-row {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin-top: auto;
}

.bm-price-main { color: #101827; font-size: 23px; font-weight: 850; line-height: 1; }
.bm-price-original { color: #97a3b6; font-size: 14px; text-decoration: line-through; }
.bm-hotproduct-cta { display: none; }

.bm-hotproduct-coupon {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.bm-coupon-code,
.bm-coupon-off {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.bm-coupon-code {
    color: #0f766e;
    background: #ccfbf1;
}

.bm-coupon-off {
    color: #7c2d12;
    background: #ffedd5;
}

.bm-coupon-hero {
    display: flex;
    min-height: 220px;
    margin: 10px 0 42px;
    padding: 34px 38px;
    align-items: center;
    border-radius: 22px;
    color: #fff;
    background:
        radial-gradient(circle at 86% 20%, rgba(255,255,255,.38), transparent 18%),
        linear-gradient(120deg, #ff4f1f 0%, #ff2d0d 38%, #8b5cf6 100%);
    overflow: hidden;
}

.bm-coupon-hero-kicker {
    display: block;
    margin-bottom: 8px;
    color: #d9ff53;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: .02em;
}

.bm-coupon-hero h1 {
    max-width: 620px;
    margin: 0;
    font-size: clamp(42px, 5vw, 76px);
    line-height: .98;
    color: #fff;
}

.bm-coupon-hero p {
    max-width: 560px;
    margin: 18px 0 0;
    color: rgba(255,255,255,.9);
    font-size: 18px;
    line-height: 1.45;
}

.bm-coupon-section-title {
    margin: 0 0 20px;
    color: #142033;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.1;
}

.bm-coupon-code-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.bm-coupon-card {
    display: flex;
    min-height: 245px;
    padding: 22px;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.bm-coupon-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.bm-coupon-source {
    color: #ff4f1f;
    font-size: 13px;
    font-weight: 900;
}

.bm-coupon-country {
    padding: 5px 9px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 12px;
    font-weight: 850;
}

.bm-coupon-card h3 {
    margin: 18px 0 6px;
    color: #142033;
    font-size: 28px;
    font-weight: 950;
    line-height: 1;
}

.bm-coupon-min,
.bm-coupon-valid,
.bm-coupon-product {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

.bm-coupon-code-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin: 18px 0 12px;
    align-items: center;
}

.bm-coupon-code-row code {
    display: flex;
    min-width: 0;
    height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    color: #142033;
    background: #f8fafc;
    font-size: 14px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bm-copy-coupon {
    height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: #ff4f1f;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.bm-copy-coupon.is-copied {
    background: #16a34a;
}

.bm-coupon-link {
    display: inline-flex;
    min-height: 38px;
    margin: 16px 0 10px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #fff;
    background: #142033;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.bm-coupon-product {
    margin-top: auto;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.bm-promo-empty {
    margin: 0;
    color: #64748b;
    font-size: 16px;
}

.bm-hotproducts-status {
    margin-top: 24px;
    color: #64748b;
    font-size: 14px;
    text-align: center;
}

.bm-hotproducts-loading,
.bm-hotproducts-end,
.bm-hotproducts-error { display: none; }

@media (max-width: 1024px) {
    .bm-hotproducts-wrapper { padding-right: 18px; padding-left: 18px; }
    .bm-hotproducts-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .bm-hot-cat-card { flex-basis: 174px; height: 300px; }
    .bm-coupon-code-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    main:has(.bm-hotproducts-wrapper),
    .wp-block-post-content:has(.bm-hotproducts-wrapper),
    .entry-content:has(.bm-hotproducts-wrapper) {
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .bm-hotproducts-wrapper {
        margin-bottom: 40px;
        padding: 30px 0 36px;
    }

    .ext-header-sticky .wp-block-image,
    body:has(.bm-hotproducts-wrapper) header .wp-block-image {
        flex-basis: 120px !important;
        width: 120px !important;
    }

    .ext-header-sticky .wp-block-image img,
    body:has(.bm-hotproducts-wrapper) header .wp-block-image img {
        width: 116px !important;
        max-width: 116px !important;
    }

    .ext-header-sticky .wp-block-shortcode {
        display: block !important;
        flex: 1 1 auto;
        min-width: 0;
    }

    .bm-deals-header-search {
        display: block !important;
        width: 100%;
        min-width: 0;
        margin: 0 8px;
    }

    .bm-deals-header-search .bm-search-inner { min-height: 40px; padding: 0 12px; }
    .bm-deals-header-search .bm-search-input { height: 38px; font-size: 14px; }
    .bm-deals-header-search .bm-search-icon { margin-right: 6px; font-size: 15px; }

    .ext-header-sticky .wp-block-columns {
        flex: 0 0 auto !important;
        width: auto !important;
        margin: 0 !important;
    }

    .ext-header-sticky .wp-block-column { flex-basis: auto !important; }
    .ext-header-sticky .wp-block-group.alignwide { padding-right: 0 !important; }

    .bm-hotproducts-cat-head,
    .bm-hotproducts-heading-cats,
    .bm-hotproducts-heading-products {
        margin-right: 20px;
        margin-left: 20px;
    }

    .bm-hotproducts-heading-cats,
    .bm-hotproducts-heading-products {
        font-size: 26px;
    }

    .bm-hotproducts-cat-subtitle {
        font-size: 15px;
    }

    .bm-hotproducts-heading-products { margin-top: 38px; }

    .bm-cat-nav { display: none; }

    .bm-hotproducts-categories {
        gap: 14px;
        padding: 0 20px 8px;
    }

    .bm-hot-cat-card {
        flex-basis: 210px;
        height: 288px;
    }

    .bm-hot-cat-name {
        bottom: 22px;
        font-size: 22px;
    }

    .bm-hotproducts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 0 10px;
    }

    .bm-hotproduct-body { gap: 7px; padding: 10px; }
    .bm-hotproduct-title { min-height: 40px; font-size: 15px; }
    .bm-hotproduct-shop { display: none; }
    .bm-price-main { font-size: 20px; }
    .bm-price-original { font-size: 12px; }
    .bm-hotproduct-coupon { gap: 5px; }
    .bm-coupon-code,
    .bm-coupon-off { min-height: 22px; padding: 3px 7px; font-size: 11px; }
    .bm-coupon-hero {
        min-height: 178px;
        margin: 4px 0 30px;
        padding: 24px;
        border-radius: 18px;
    }
    .bm-coupon-hero h1 { font-size: 40px; }
    .bm-coupon-hero p { font-size: 15px; }
    .bm-coupon-section-title { font-size: 26px; }
    .bm-coupon-code-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .bm-coupon-card { min-height: 220px; padding: 14px; border-radius: 14px; }
    .bm-coupon-card h3 { font-size: 22px; }
    .bm-coupon-code-row { grid-template-columns: 1fr; gap: 8px; }
    .bm-copy-coupon,
    .bm-coupon-code-row code,
    .bm-coupon-link { width: 100%; }
    .bm-hotproduct-rank { top: 8px; left: 8px; padding: 5px 9px; font-size: 12px; }
    .bm-hotproduct-rank + .bm-hotproduct-image-wrap .bm-hotproduct-badge { top: 43px; }
}

@media (max-width: 420px) {
    .ext-header-sticky .wp-block-image img { width: 102px !important; max-width: 102px !important; }
    .bm-deals-header-search { margin: 0 5px; }
    .bm-search-icon { display: none; }
    .bm-hotproducts-grid { gap: 10px; padding: 0 8px; }
    .bm-hotproducts-cat-head,
    .bm-hotproducts-heading-cats,
    .bm-hotproducts-heading-products { margin-right: 14px; margin-left: 14px; }
    .bm-hotproducts-heading-cats,
    .bm-hotproducts-heading-products { font-size: 24px; }
    .bm-hotproducts-categories { padding-left: 14px; padding-right: 14px; }
    .bm-hot-cat-card { flex-basis: 190px; height: 264px; }
    .bm-hot-cat-name { font-size: 20px; }
}
