@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --bm-blue: #0f5cc0;
    --bm-blue-dark: #0b3f8f;
    --bm-orange: #ff8b1a;
    --bm-orange-dark: #ef7400;
    --bm-bg: #f4f7fb;
    --bm-card: #ffffff;
    --bm-line: #dbe5f0;
    --bm-text: #223a57;
    --bm-muted: #73839a;
    --bm-green: #22a167;
    --bm-red: #ef6b5d;
    --bm-shadow: 0 12px 30px rgba(19, 67, 128, 0.08);
}

* {
    box-sizing: border-box;
}

body.market-home {
    margin: 0;
    background: var(--bm-bg);
    color: var(--bm-text);
    font-family: 'Manrope', sans-serif;
}

.market-home h1,
.market-home h2,
.market-home h3,
.market-home strong {
    letter-spacing: -0.02em;
}

.home-shell {
    width: min(1240px, calc(100% - 24px));
    margin: 16px auto 42px;
}

.hero-banner,
.dual-section,
.feature-row {
    display: grid;
    gap: 18px;
}

.hero-banner {
    grid-template-columns: minmax(0, 1.6fr) 280px;
    align-items: stretch;
}

.hero-banner__main,
.hero-banner__promo,
.info-card,
.promo-credit,
.how-it-works,
.store-card,
.product-card,
.category-card,
.sale-item {
    background: var(--bm-card);
    border: 1px solid var(--bm-line);
    border-radius: 18px;
    box-shadow: var(--bm-shadow);
}

.hero-banner__main {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 320px;
    overflow: hidden;
    background:
        linear-gradient(130deg, var(--bm-blue-dark) 0%, var(--bm-blue) 46%, rgba(255, 139, 26, 0.95) 46%, rgba(255, 139, 26, 0.95) 53%, #ffffff 53%);
}

.hero-banner__copy {
    padding: 30px 28px;
    color: #fff;
}

.hero-banner__copy h1 {
    font-size: clamp(2rem, 3vw, 3.25rem);
    line-height: 1.05;
    margin: 0 0 12px;
}

.hero-banner__copy p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.88);
    max-width: 520px;
}

.hero-search {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    align-items: center;
}

.hero-search input {
    flex: 1 1 auto;
    min-height: 44px;
    border-radius: 12px;
    border: 0;
    padding: 0 14px;
}

.hero-search button {
    min-height: 44px;
    border-radius: 12px;
    border: 0;
    padding: 0 16px;
    background: var(--bm-orange);
    color: #fff;
    font-weight: 800;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.9rem;
}

.hero-tags span,
.hero-tags a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
}

.hero-banner__visual {
    display: grid;
    place-items: center;
    padding: 18px;
}

.hero-banner__visual img {
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain;
    border-radius: 14px;
}

.hero-banner__promo {
    padding: 24px 20px;
    display: grid;
    align-content: start;
    gap: 10px;
    background: linear-gradient(180deg, #2d3f59, #1d2e48);
    color: #fff;
}

.promo-label {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
    font-weight: 700;
}

.hero-banner__promo h2 {
    margin: 0;
    color: #ffb357;
    font-size: 1.8rem;
    line-height: 1.05;
}

.hero-banner__promo p {
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
}

.hero-promo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    background: var(--bm-orange);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
}

.quick-icons {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.quick-icon {
    text-decoration: none;
    color: var(--bm-text);
    display: grid;
    justify-items: center;
    gap: 8px;
}

.quick-icon__circle {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    background: #fff;
    border: 1px solid var(--bm-line);
    border-radius: 50%;
    box-shadow: var(--bm-shadow);
    color: var(--bm-orange);
    font-size: 1.45rem;
}

.quick-icon strong {
    font-size: 0.88rem;
}

.dual-section {
    grid-template-columns: 1fr 1fr;
    margin-top: 24px;
}

.dual-section--products {
    grid-template-columns: 1fr;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.section-heading h2 {
    margin: 0;
    font-size: 1.35rem;
}

.section-heading a {
    text-decoration: none;
    color: var(--bm-blue);
    font-weight: 800;
    font-size: 0.92rem;
}

.store-grid,
.product-grid,
.category-grid,
.steps-grid,
.sales-list,
.info-strip {
    display: grid;
    gap: 14px;
}

.store-grid--compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-grid--compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.store-card {
    padding: 16px;
}

.store-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.store-card__head img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid var(--bm-line);
}

.store-card__head h3 {
    margin: 0 0 2px;
    font-size: 1rem;
}

.store-card__head span,
.product-card__meta,
.sale-item__body small {
    color: var(--bm-muted);
    font-size: 0.84rem;
}

.store-badges,
.store-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.store-badges span,
.sale-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.store-badges .ok,
.sale-badge {
    color: var(--bm-green);
    background: #e9f8f0;
}

.store-badges .warn {
    color: var(--bm-red);
    background: #fff0ee;
}

.store-stats span {
    font-size: 0.84rem;
    color: var(--bm-text);
}

.store-card__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    background: var(--bm-blue);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
}

.product-card {
    overflow: hidden;
}

.product-card__image img {
    width: 100%;
    height: 165px;
    object-fit: contain;
    background: #fff;
    display: block;
}

.product-card__body {
    padding: 14px;
    display: grid;
    gap: 6px;
}

.product-card__badges,
.sale-item__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.product-card__state {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.product-card__state--success {
    background: #e7f6ee;
    color: var(--bm-green);
}

.product-card__state--primary {
    background: #dceafe;
    color: var(--bm-blue-dark);
}

.product-card__state--warning {
    background: #fff0cb;
    color: #8c5a00;
}

.product-card__state--neutral {
    background: #eef2f7;
    color: #475569;
}

.product-card__state--info {
    background: #dbf4ff;
    color: #0b5f7a;
}

.product-card__state--dark {
    background: #23344d;
    color: #fff;
}

.product-card__body h3 {
    font-size: 0.95rem;
    margin: 0;
    min-height: 42px;
}

.product-card__price {
    display: block;
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--bm-blue-dark);
}

.product-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.product-card__actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.product-card__actions .btn,
.product-card__actions .bm-favorite-btn {
    flex: 1 1 0;
    justify-content: center;
}

.info-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 24px;
}

.info-card {
    display: flex;
    gap: 14px;
    padding: 18px;
}

.info-card i {
    color: var(--bm-green);
    font-size: 1.4rem;
}

.info-card strong {
    display: block;
    margin-bottom: 4px;
}

.info-card span {
    color: var(--bm-muted);
    font-size: 0.88rem;
}

.feature-row {
    grid-template-columns: 320px 1fr;
    margin-top: 24px;
}

.promo-credit {
    padding: 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: linear-gradient(180deg, #fff5e8, #fff);
}

.promo-credit i {
    color: var(--bm-orange);
    font-size: 1.6rem;
}

.promo-credit span {
    display: block;
    color: var(--bm-orange-dark);
    font-size: 0.88rem;
    font-weight: 800;
}

.promo-credit h2 {
    margin: 6px 0 8px;
    font-size: 1.45rem;
}

.promo-credit p {
    margin: 0 0 12px;
    color: var(--bm-muted);
}

.promo-credit a {
    color: var(--bm-blue);
    font-weight: 800;
    text-decoration: none;
}

.how-it-works {
    padding: 18px;
}

.steps-grid--inline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.step-card {
    padding: 16px;
    background: #f9fbff;
    border: 1px solid var(--bm-line);
    border-radius: 14px;
}

.step-card span {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: #e9f1ff;
    color: var(--bm-blue);
    font-weight: 800;
    margin-bottom: 10px;
}

.step-card h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.step-card p {
    margin: 0;
    color: var(--bm-muted);
    font-size: 0.88rem;
}

.dual-section--bottom {
    margin-top: 24px;
}

.category-grid--cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.category-card {
    padding: 18px 16px;
    display: grid;
    gap: 6px;
    text-decoration: none;
    color: var(--bm-text);
}

.category-card i {
    color: var(--bm-orange);
    font-size: 1.3rem;
}

.category-card span {
    color: var(--bm-muted);
    font-size: 0.84rem;
}

.sales-list {
    gap: 12px;
}

.sale-item {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
}

.sale-item img {
    width: 88px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
}

.sale-item__body {
    display: grid;
    gap: 4px;
}

.sale-item__state {
    margin-bottom: 2px;
}

.sale-item__body strong {
    font-size: 0.94rem;
}

.sale-item__body span {
    color: var(--bm-blue-dark);
    font-weight: 800;
}

.site-footer {
    margin-top: 38px;
}

@media (max-width: 1199px) {
    .quick-icons,
    .store-grid--compact,
    .product-grid--compact,
    .category-grid--cards {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .info-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .hero-banner,
    .hero-banner__main,
    .dual-section,
    .feature-row {
        grid-template-columns: 1fr;
    }

    .hero-banner__main {
        background: linear-gradient(180deg, var(--bm-blue-dark), var(--bm-blue));
    }

    .hero-banner__visual {
        padding-top: 0;
    }
}

@media (max-width: 767px) {
    .home-shell {
        width: min(100% - 16px, 1240px);
        margin-top: 10px;
    }

    .hero-banner__copy,
    .hero-banner__promo,
    .how-it-works,
    .promo-credit {
        padding: 16px;
    }

    .hero-search {
        flex-direction: column;
    }

    .hero-search button {
        width: 100%;
    }

    .quick-icons,
    .store-grid--compact,
    .product-grid--compact,
    .info-strip,
    .steps-grid--inline,
    .category-grid--cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sale-item {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .sale-badge {
        grid-column: 1 / -1;
        justify-self: start;
    }
}
