:root {
    --bm-ink: #17231f;
    --bm-muted: #6f7874;
    --bm-line: #e8ece9;
    --bm-soft: #f6f8f6;
    --bm-sage: #edf3ef;
    --bm-accent: #214c3f;
    --bm-white: #fff;
    --bm-radius: 22px
}

.bm-page * {
    box-sizing: border-box
}

.bm-page {
    color: var(--bm-ink);
    background: #fff;
    font-family: inherit
}

.bm-container {
    width: min(1340px,calc(100% - 32px));
    margin: 0 auto
}

.bm-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px 0 14px;
    font-size: 14px;
    color: var(--bm-muted)
}

    .bm-breadcrumb a {
        color: inherit;
        text-decoration: none
    }

    .bm-breadcrumb strong {
        color: var(--bm-ink)
    }

.bm-eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--bm-accent)
}

.bm-hero {
    padding: 26px 0 34px
}

.bm-hero__inner {
    display: grid;
    grid-template-columns: minmax(0,1.2fr) minmax(340px,.8fr);
    gap: 36px;
    align-items: end;
    padding: 38px;
    border-radius: 28px;
    background: linear-gradient(135deg,#f3f7f4,#fbf7f1);
    border: 1px solid #edf0ed
}

.bm-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(34px,5vw,58px);
    line-height: 1.02;
    letter-spacing: -.04em
}

.bm-hero p {
    max-width: 700px;
    margin: 0;
    color: var(--bm-muted);
    font-size: 16px;
    line-height: 1.7
}

.bm-searchbox {
    display: flex;
    gap: 10px;
    padding: 8px;
    border: 1px solid #dfe6e1;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(29,55,46,.06)
}

    .bm-searchbox input {
        min-width: 0;
        flex: 1;
        border: 0;
        outline: 0;
        padding: 11px 12px;
        background: transparent;
        font: inherit
    }

    .bm-searchbox button {
        border: 0;
        border-radius: 12px;
        padding: 0 18px;
        background: var(--bm-accent);
        color: #fff;
        font: inherit;
        font-weight: 700;
        cursor: pointer
    }

.bm-section {
    padding: 34px 0
}

.bm-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px
}

    .bm-section-head h2 {
        margin: 0;
        font-size: 30px;
        letter-spacing: -.025em
    }

    .bm-section-head .bm-count {
        font-size: 14px;
        color: var(--bm-muted)
    }

.bm-featured {
    display: grid;
    grid-template-columns: minmax(0,1.55fr) minmax(300px,.75fr);
    gap: 18px
}

.bm-lead, .bm-spotlight, .bm-card, .bm-category-card, .bm-product-card, .bm-sidebar-box {
    border: 1px solid var(--bm-line);
    background: #fff;
    border-radius: var(--bm-radius);
    overflow: hidden
}

.bm-lead {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    min-height: 410px
}

.bm-cover {
    display: block;
    position: relative;
    overflow: hidden;
    background: var(--bm-soft)
}

    .bm-cover img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        transition: transform .35s ease
    }

.bm-card:hover .bm-cover img, .bm-lead:hover .bm-cover img, .bm-spotlight:hover img, .bm-category-card:hover img, .bm-product-card:hover img {
    transform: scale(1.025)
}

.bm-lead__body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center
}

.bm-article-category {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--bm-sage);
    color: var(--bm-accent);
    font-size: 12px;
    font-weight: 800
}

.bm-lead h2, .bm-card h3, .bm-spotlight h3, .bm-category-card h3, .bm-product-card h3 {
    margin: 12px 0 10px;
    letter-spacing: -.02em
}

.bm-lead h2 {
    font-size: 30px;
    line-height: 1.18
}

    .bm-lead h2 a, .bm-card h3 a, .bm-spotlight h3 a, .bm-category-card h3 a, .bm-product-card h3 a {
        color: inherit;
        text-decoration: none
    }

.bm-summary {
    color: var(--bm-muted);
    line-height: 1.65
}

.bm-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    color: #8a928e;
    font-size: 13px
}

.bm-read {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    margin-top: 18px;
    color: var(--bm-accent);
    font-weight: 800;
    text-decoration: none
}

.bm-spotlight-list {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 18px
}

.bm-spotlight {
    display: grid;
    grid-template-columns: 140px 1fr;
    min-height: 0
}

    .bm-spotlight > a {
        overflow: hidden;
        background: var(--bm-soft)
    }

    .bm-spotlight img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform .35s ease
    }

.bm-spotlight__body {
    padding: 20px
}

.bm-spotlight h3 {
    font-size: 18px;
    line-height: 1.35
}

.bm-topic-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    border-block: 1px solid var(--bm-line);
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(10px)
}

.bm-topic-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 13px 0;
    overflow: auto
}

    .bm-topic-inner > strong {
        white-space: nowrap
    }

.bm-topic-buttons {
    display: flex;
    gap: 8px
}

    .bm-topic-buttons button {
        white-space: nowrap;
        border: 1px solid #dce4df;
        background: #fff;
        color: var(--bm-ink);
        border-radius: 999px;
        padding: 9px 14px;
        font: inherit;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer
    }

        .bm-topic-buttons button.active {
            background: var(--bm-accent);
            border-color: var(--bm-accent);
            color: #fff
        }

.bm-content-layout {
    display: grid;
    grid-template-columns: minmax(0,1fr) 300px;
    gap: 28px;
    padding-top: 34px;
    padding-bottom: 56px
}

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

.bm-card .bm-cover {
    aspect-ratio: 16/10
}

.bm-card__body {
    padding: 20px
}

.bm-card h3 {
    font-size: 20px;
    line-height: 1.35
}

.bm-card .bm-summary {
    margin: 0;
    font-size: 14px
}

.bm-sidebar {
    display: grid;
    align-content: start;
    gap: 18px
}

.bm-sidebar-box {
    padding: 20px
}

.bm-sidebar-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bm-line);
    font-weight: 800
}

    .bm-sidebar-head small {
        font-weight: 500;
        color: var(--bm-muted)
    }

.bm-popular {
    list-style: none;
    padding: 0;
    margin: 0
}

    .bm-popular li {
        display: grid;
        grid-template-columns: 38px 1fr;
        gap: 10px;
        padding: 15px 0;
        border-bottom: 1px solid var(--bm-line)
    }

        .bm-popular li:last-child {
            border-bottom: 0
        }

    .bm-popular b {
        font-size: 19px;
        color: #a7b3ad
    }

    .bm-popular a {
        color: inherit;
        text-decoration: none;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.45
    }

.bm-empty {
    padding: 48px 24px;
    text-align: center;
    border: 1px dashed #cfd8d2;
    border-radius: 22px;
    background: var(--bm-soft)
}

    .bm-empty h3 {
        margin: 8px 0
    }

    .bm-empty p {
        margin: 0;
        color: var(--bm-muted)
    }

.bm-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding-top: 28px
}

    .bm-pagination button {
        min-width: 40px;
        height: 40px;
        border-radius: 12px;
        border: 1px solid var(--bm-line);
        background: #fff;
        cursor: pointer
    }

        .bm-pagination button.active {
            background: var(--bm-accent);
            color: #fff;
            border-color: var(--bm-accent)
        }

.bm-category-hero {
    padding: 36px;
    border-radius: 28px;
    background: #f7f7f3;
    border: 1px solid var(--bm-line);
    margin-bottom: 28px
}

    .bm-category-hero h1 {
        margin: 0 0 10px;
        font-size: clamp(34px,5vw,54px);
        letter-spacing: -.04em
    }

    .bm-category-hero p {
        margin: 0;
        max-width: 760px;
        color: var(--bm-muted);
        line-height: 1.7
    }

.bm-category-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 18px;
    padding-bottom: 58px
}

.bm-category-card {
    display: flex;
    flex-direction: column
}

.bm-category-card__media {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f2f4f2
}

    .bm-category-card__media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .35s ease
    }

.bm-category-card__body {
    padding: 21px
}

.bm-category-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px
}

    .bm-category-card__top span {
        font-size: 12px;
        color: var(--bm-muted)
    }

.bm-category-card h3 {
    font-size: 23px
}

.bm-category-card p {
    min-height: 46px;
    margin: 0 0 15px;
    color: var(--bm-muted);
    font-size: 14px;
    line-height: 1.6
}

.bm-child-links {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 14px 0
}

    .bm-child-links a {
        padding: 7px 9px;
        border-radius: 999px;
        background: var(--bm-soft);
        color: var(--bm-ink);
        text-decoration: none;
        font-size: 12px;
        font-weight: 700
    }

.bm-search-head {
    padding: 34px 0 20px
}

    .bm-search-head h1 {
        margin: 0 0 8px;
        font-size: clamp(32px,4vw,48px);
        letter-spacing: -.035em
    }

    .bm-search-head p {
        margin: 0;
        color: var(--bm-muted)
    }

.bm-search-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 22px
}

    .bm-search-toolbar .bm-searchbox {
        max-width: 680px
    }

.bm-sort {
    border: 1px solid var(--bm-line);
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
    font: inherit
}

.bm-product-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 18px;
    padding-bottom: 58px
}

.bm-product-card {
    display: flex;
    flex-direction: column
}

    .bm-product-card .bm-cover {
        /*aspect-ratio: 4/5*/
    }

.bm-product-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 17px
}

.bm-product-card h3 {
    font-size: 16px;
    line-height: 1.45;
    margin-top: 7px
}

.bm-product-cat {
    font-size: 12px;
    color: var(--bm-muted)
}

.bm-price {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    align-items: baseline;
    gap: 7px;
    flex-wrap: wrap
}

    .bm-price strong {
        font-size: 19px;
        color: var(--bm-accent)
    }

.bm-product-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px
}

    .bm-product-actions a {
        flex: 1;
        text-align: center;
        text-decoration: none;
        padding: 10px 12px;
        border-radius: 12px;
        border: 1px solid var(--bm-accent);
        font-size: 13px;
        font-weight: 800
    }

        .bm-product-actions a:first-child {
            background: var(--bm-accent);
            color: #fff
        }

        .bm-product-actions a:last-child {
            color: var(--bm-accent);
            background: #fff
        }

@media(max-width:980px) {
    .bm-hero__inner, .bm-featured, .bm-content-layout {
        grid-template-columns: 1fr
    }

    .bm-lead {
        grid-template-columns: 1fr
    }

        .bm-lead .bm-cover {
            aspect-ratio: 16/9
        }

    .bm-sidebar {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }

    .bm-category-grid {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }

    .bm-product-grid {
        grid-template-columns: repeat(3,minmax(0,1fr))
    }
}

@media(max-width:700px) {
    .bm-container {
        width: min(100% - 22px,1180px)
    }

    .bm-breadcrumb {
        padding-top: 16px
    }

    .bm-hero {
        padding-top: 8px
    }

    .bm-hero__inner, .bm-category-hero {
        padding: 24px;
        border-radius: 20px
    }

    .bm-hero__inner {
        grid-template-columns: 1fr;
        gap: 22px
    }

    .bm-searchbox {
        flex-wrap: wrap
    }

        .bm-searchbox button {
            min-height: 42px
        }

    .bm-featured, .bm-grid, .bm-category-grid {
        grid-template-columns: 1fr
    }

    .bm-spotlight {
        grid-template-columns: 110px 1fr
    }

    .bm-content-layout {
        gap: 20px
    }

    .bm-sidebar {
        grid-template-columns: 1fr
    }

    .bm-section-head {
        align-items: flex-start
    }

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

    .bm-product-card__body {
        padding: 13px
    }

    .bm-search-toolbar {
        grid-template-columns: 1fr
    }

    .bm-sort {
        width: 100%
    }
}

@media(max-width:420px) {
    .bm-product-grid {
        grid-template-columns: 1fr
    }

    .bm-spotlight {
        grid-template-columns: 95px 1fr
    }

    .bm-spotlight__body {
        padding: 15px
    }

    .bm-lead__body {
        padding: 22px
    }

    .bm-lead h2 {
        font-size: 25px
    }
}

/* =========================================================
   SEARCH PAGE V2 - 25/08/2026
   Rộng theo khung header + giao diện tìm kiếm mới
   ========================================================= */
.bm-search-page {
    background: #fff;
}

    /* Chỉ mở rộng trang tìm kiếm, không ảnh hưởng Tin tức / Danh mục */
    .bm-search-page .bm-container {
        width: min(1360px,calc(100% - 48px));
    }

    .bm-search-page .bm-breadcrumb {
        padding-top: 22px;
        padding-bottom: 18px;
    }

.bm-search-hero {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(500px, .95fr);
    align-items: center;
    gap: 44px;
    margin-top: 4px;
    margin-bottom: 34px;
    padding: 38px 42px;
    border: 1px solid #e7ece8;
    border-radius: 28px;
    background: radial-gradient(circle at 92% 12%, rgba(217,232,224,.85), transparent 30%), linear-gradient(135deg,#f8faf8 0%,#f4f7f4 52%,#fbfaf6 100%);
    box-shadow: 0 18px 50px rgba(30,61,50,.055);
}

.bm-search-hero__copy {
    min-width: 0;
}

.bm-search-hero h1 {
    margin: 0;
    max-width: 720px;
    font-size: clamp(36px,4.2vw,58px);
    line-height: 1.04;
    letter-spacing: -.045em;
    color: #17231f;
}

.bm-search-hero p {
    margin: 14px 0 0;
    max-width: 700px;
    color: #6f7874;
    font-size: 15px;
    line-height: 1.7;
}

.bm-searchbox--large {
    width: 100%;
    min-height: 64px;
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto;
    align-items: center;
    gap: 0;
    padding: 7px 7px 7px 17px;
    border: 1px solid #d9e3dd;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(31,74,60,.09);
}

    .bm-searchbox--large:focus-within {
        border-color: #8eaea2;
        box-shadow: 0 0 0 4px rgba(33,76,63,.07),0 14px 36px rgba(31,74,60,.10);
    }

.bm-searchbox__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #527066;
}

.bm-searchbox--large input {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #17231f;
    font: inherit;
    font-size: 15px;
}

    .bm-searchbox--large input::placeholder {
        color: #98a39e;
    }

.bm-searchbox--large button {
    height: 50px;
    min-width: 120px;
    padding: 0 22px;
    border: 0;
    border-radius: 13px;
    background: #174b3e;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s ease,box-shadow .2s ease,background .2s ease;
}

    .bm-searchbox--large button:hover {
        transform: translateY(-1px);
        background: #103f34;
        box-shadow: 0 9px 20px rgba(23,75,62,.20);
    }

.bm-search-results {
    padding-bottom: 62px;
}

.bm-result-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 0 0 20px;
    margin-bottom: 6px;
    border-bottom: 1px solid #edf0ee;
}

.bm-result-title h2 {
    margin: 0;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -.03em;
}

.bm-result-sort {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .bm-result-sort label {
        color: #6f7874;
        font-size: 13px;
        font-weight: 700;
        white-space: nowrap;
    }

.bm-search-page .bm-sort {
    min-width: 210px;
    height: 46px;
    padding: 0 38px 0 14px;
    border: 1px solid #dfe6e1;
    border-radius: 12px;
    background-color: #fff;
    color: #17231f;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.bm-search-page .bm-product-grid {
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 22px;
    padding-top: 22px;
    padding-bottom: 0;
}

.bm-search-page .bm-product-card {
    border: 1px solid #e7ebe8;
    border-radius: 20px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 5px 18px rgba(25,48,40,.035);
    transition: transform .25s ease,box-shadow .25s ease,border-color .25s ease;
}

    .bm-search-page .bm-product-card:hover {
        transform: translateY(-4px);
        border-color: #d6dfda;
        box-shadow: 0 18px 38px rgba(25,48,40,.09);
    }

    .bm-search-page .bm-product-card .bm-cover {
        /*aspect-ratio: 1/1.08;*/
        background: #f3f5f3;
    }

        .bm-search-page .bm-product-card .bm-cover img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

.bm-search-page .bm-product-card__body {
    padding: 17px 17px 18px;
}

.bm-search-page .bm-product-cat {
    display: block;
    min-height: 18px;
    overflow: hidden;
    color: #738079;
    font-size: 12px;
    line-height: 1.45;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bm-search-page .bm-product-card h3 {
    min-height: 45px;
    margin: 7px 0 0;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bm-product-card__meta {
    margin-top: 9px;
    color: #98a19d;
    font-size: 12px;
}

.bm-search-page .bm-price {
    min-height: 35px;
    margin-top: 5px;
    padding-top: 8px;
}

    .bm-search-page .bm-price strong {
        font-size: 19px;
        line-height: 1.25;
        color: #174b3e;
    }

.bm-search-page .bm-product-actions {
    gap: 8px;
    margin-top: 14px;
}

    .bm-search-page .bm-product-actions a {
        min-height: 41px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 8px 10px;
        border-radius: 11px;
        font-size: 12px;
    }

.bm-search-empty {
    margin-top: 24px;
    margin-bottom: 0 !important;
}

.bm-empty__icon {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: #eaf1ed;
    color: #214c3f;
    font-size: 25px;
}

@media(max-width:1180px) {
    .bm-search-page .bm-container {
        width: min(100% - 34px,1180px);
    }

    .bm-search-hero {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .bm-searchbox--large {
        max-width: none;
    }

    .bm-search-page .bm-product-grid {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }
}

@media(max-width:760px) {
    .bm-search-page .bm-container {
        width: calc(100% - 22px);
    }

    .bm-search-page .bm-breadcrumb {
        padding-top: 15px;
        padding-bottom: 12px;
    }

    .bm-search-hero {
        margin-bottom: 24px;
        padding: 24px 18px;
        border-radius: 20px;
    }

        .bm-search-hero h1 {
            font-size: 34px;
        }

    .bm-searchbox--large {
        min-height: 58px;
        padding-left: 13px;
    }

        .bm-searchbox--large button {
            min-width: auto;
            height: 46px;
            padding: 0 15px;
        }

    .bm-result-bar {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .bm-result-sort {
        width: 100%;
    }

    .bm-search-page .bm-sort {
        flex: 1;
        min-width: 0;
    }

    .bm-search-page .bm-product-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 12px;
        padding-top: 16px;
    }

    .bm-search-page .bm-product-card__body {
        padding: 13px;
    }

    .bm-search-page .bm-product-actions {
        display: none;
    }
}

@media(max-width:440px) {
    .bm-searchbox__icon {
        display: none;
    }

    .bm-searchbox--large {
        grid-template-columns: minmax(0,1fr) auto;
        padding-left: 7px;
    }

        .bm-searchbox--large input {
            padding-left: 10px;
        }

        .bm-searchbox--large button {
            padding: 0 12px;
            font-size: 13px;
        }
}
