:root {
    --mandi-ink: #17352f;
    --mandi-ink-strong: #0d2d27;
    --mandi-green: #168766;
    --mandi-green-dark: #0d6850;
    --mandi-green-soft: #eaf7f1;
    --mandi-warm: #fff8e8;
    --mandi-border: #dfe9e4;
    --mandi-border-strong: #c9ddd4;
    --mandi-muted: #65766f;
    --mandi-bg: #f7faf8;
    --mandi-white: #ffffff;
    --mandi-danger: #8a3030;
    --mandi-shadow-sm: 0 5px 18px rgba(18, 69, 55, .055);
    --mandi-shadow: 0 16px 42px rgba(18, 69, 55, .10);
}

.mandi-page,
.mandi-page * { box-sizing: border-box; }

.mandi-page {
    background: var(--mandi-bg);
    min-height: 100%;
    color: #17251f;
    padding-bottom: 54px;
}

.mandi-wrap {
    width: min(1180px, calc(100% - 30px));
    margin: 0 auto;
}

.mandi-hero {
    position: relative;
    overflow: hidden;
    color: var(--mandi-ink);
    background:
        radial-gradient(circle at 87% 14%, rgba(255, 214, 126, .44), transparent 29%),
        radial-gradient(circle at 10% 90%, rgba(80, 177, 135, .20), transparent 35%),
        linear-gradient(135deg, #f5fbf7 0%, #edf8f3 56%, #fff9e9 100%);
    border-bottom: 1px solid #e5eee9;
    padding: 34px 0 38px;
}

.mandi-hero::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(31, 127, 92, .08);
    border-radius: 50%;
    right: -110px;
    bottom: -155px;
    pointer-events: none;
}

.mandi-hero__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
    gap: 42px;
    align-items: center;
}

.mandi-hero__copy { min-width: 0; }

.mandi-eyebrow,
.mandi-kicker,
.mandi-section__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--mandi-green-dark);
    font-size: 12px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.mandi-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #18a676;
    box-shadow: 0 0 0 4px rgba(24, 166, 118, .12);
}

.mandi-hero h1 {
    max-width: 780px;
    margin: 8px 0 10px;
    color: var(--mandi-ink-strong);
    font-size: clamp(32px, 5.2vw, 54px);
    line-height: 1.02;
    letter-spacing: -.045em;
    font-weight: 950;
}

.mandi-hero p {
    max-width: 760px;
    margin: 0;
    color: #566b63;
    font-size: 15px;
    line-height: 1.65;
    font-weight: 600;
}

.mandi-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.mandi-btn {
    min-height: 46px;
    border: 1px solid var(--mandi-border-strong);
    border-radius: 14px;
    padding: 10px 16px;
    background: #fff;
    color: var(--mandi-ink-strong);
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.mandi-btn:hover { transform: translateY(-1px); box-shadow: var(--mandi-shadow-sm); }
.mandi-btn:focus-visible,
.mandi-search:focus-visible,
.mandi-sort a:focus-visible,
.mandi-category-card:focus-visible,
.mandi-mode-card:focus-visible,
.mandi-popular-card:focus-visible { outline: 3px solid rgba(22, 135, 102, .2); outline-offset: 2px; }
.mandi-btn:disabled { opacity: .65; cursor: wait; transform: none; }

.mandi-btn--hero {
    background: var(--mandi-green-dark);
    color: #fff;
    border-color: var(--mandi-green-dark);
}

.mandi-btn--ghost {
    background: rgba(255, 255, 255, .78);
    border-color: #cfe0d8;
    color: var(--mandi-ink-strong);
}

.mandi-source {
    margin-top: 13px;
    max-width: 760px;
    color: #70817a;
    font-size: 11.5px;
    line-height: 1.55;
    font-weight: 650;
}

.mandi-hero__visual {
    position: relative;
    height: 292px;
    min-width: 0;
}

.mandi-hero__image-card {
    position: absolute;
    overflow: hidden;
    width: min(86%, 395px);
    aspect-ratio: 1.58 / 1;
    border-radius: 24px;
    border: 1px solid rgba(19, 93, 71, .12);
    background: #fff;
    box-shadow: 0 20px 48px rgba(30, 84, 65, .14);
}

.mandi-hero__image-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mandi-hero__image-card--back { right: 0; top: 0; transform: rotate(3deg); opacity: .92; }
.mandi-hero__image-card--front { left: 0; bottom: 0; transform: rotate(-2.5deg); }

.mandi-mode-grid {
    position: relative;
    z-index: 3;
    margin-top: -20px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.mandi-mode-card {
    min-width: 0;
    min-height: 96px;
    padding: 15px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--mandi-border);
    border-radius: 20px;
    background: #fff;
    color: inherit;
    box-shadow: var(--mandi-shadow-sm);
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.mandi-mode-card:hover { transform: translateY(-2px); border-color: #bcd8cd; box-shadow: var(--mandi-shadow); }
.mandi-mode-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--mandi-green-soft);
    color: var(--mandi-green-dark);
    font-size: 21px;
    font-weight: 950;
}
.mandi-mode-card strong { display: block; color: var(--mandi-ink-strong); font-size: 15px; line-height: 1.25; font-weight: 950; }
.mandi-mode-card small { display: block; margin-top: 4px; color: var(--mandi-muted); font-size: 11.5px; line-height: 1.4; font-weight: 650; }
.mandi-arrow { color: #86a097; font-size: 25px; line-height: 1; }

.mandi-toolbar { margin-top: 18px; position: relative; z-index: 2; }
.mandi-toolbar__card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 9px;
    padding: 10px;
    border: 1px solid var(--mandi-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--mandi-shadow-sm);
}

.mandi-search-shell {
    min-width: 0;
    height: 48px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    border: 1px solid var(--mandi-border);
    border-radius: 13px;
    background: #fafcfb;
    color: #7e918a;
}

.mandi-search {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    border: 1px solid var(--mandi-border);
    border-radius: 13px;
    background: #fafcfb;
    color: #18372f;
    outline: none;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
}

.mandi-search-shell .mandi-search { height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; }
.mandi-search::placeholder { color: #8a9b94; }
.mandi-btn--search { min-width: 92px; background: var(--mandi-green-dark); color: #fff; border-color: var(--mandi-green-dark); }
.mandi-clear { align-self: center; padding: 0 8px; color: #58716a; font-size: 12px; font-weight: 850; text-decoration: none; }

.mandi-stats {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--mandi-border);
    border-radius: 18px;
    background: #fff;
}

.mandi-stats > div { min-width: 0; padding: 14px 16px; border-right: 1px solid #edf2ef; }
.mandi-stats > div:last-child { border-right: 0; }
.mandi-stats strong { display: block; overflow-wrap: anywhere; color: var(--mandi-green-dark); font-size: 19px; line-height: 1.15; font-weight: 950; }
.mandi-stats span { display: block; margin-top: 4px; color: var(--mandi-muted); font-size: 11px; font-weight: 750; }

.mandi-section {
    padding-top: 31px;
    content-visibility: auto;
    contain-intrinsic-size: 520px;
}
.mandi-section--compact { padding-top: 18px; }

.mandi-section__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.mandi-section__head h2 {
    margin: 3px 0 0;
    color: var(--mandi-ink-strong);
    font-size: clamp(20px, 2.8vw, 26px);
    line-height: 1.12;
    letter-spacing: -.025em;
    font-weight: 950;
}

.mandi-section__head p { margin: 5px 0 0; color: var(--mandi-muted); font-size: 12.5px; line-height: 1.5; font-weight: 650; }
.mandi-text-link { color: var(--mandi-green-dark); font-size: 12px; font-weight: 900; text-decoration: none; white-space: nowrap; }
.mandi-text-button { border: 0; background: transparent; padding: 7px 0; color: var(--mandi-green-dark); font: inherit; font-size: 12px; font-weight: 900; cursor: pointer; }

.mandi-category-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 11px;
}

.mandi-category-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--mandi-border);
    border-radius: 18px;
    background: #fff;
    color: inherit;
    box-shadow: var(--mandi-shadow-sm);
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.mandi-category-card:hover,
.mandi-category-card.is-active { transform: translateY(-1px); border-color: #9fcebc; box-shadow: var(--mandi-shadow); }
.mandi-category-card.is-active::after { content: "✓"; position: absolute; right: 8px; top: 8px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--mandi-green-dark); color: #fff; font-size: 12px; font-weight: 950; }
.mandi-category-card img { width: 100%; aspect-ratio: 1.6 / 1; object-fit: cover; display: block; background: #eef5f1; }
.mandi-category-card > span { display: block; padding: 10px 11px 11px; }
.mandi-category-card strong { display: block; color: var(--mandi-ink-strong); font-size: 13px; line-height: 1.25; font-weight: 950; }
.mandi-category-card small { display: block; margin-top: 3px; color: var(--mandi-muted); font-size: 10.5px; font-weight: 700; }

.mandi-popular-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.mandi-popular-card {
    min-width: 0;
    padding: 12px 9px;
    border: 1px solid var(--mandi-border);
    border-radius: 18px;
    background: #fff;
    color: inherit;
    box-shadow: var(--mandi-shadow-sm);
    text-align: center;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.mandi-popular-card:hover { transform: translateY(-2px); border-color: #a9d4c4; box-shadow: var(--mandi-shadow); }
.mandi-popular-card__image { width: 72px; height: 72px; margin: 0 auto 8px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--mandi-green-soft); }
.mandi-popular-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mandi-popular-card strong { display: block; overflow: hidden; color: var(--mandi-ink-strong); font-size: 12.5px; line-height: 1.25; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
.mandi-popular-card small { display: block; margin-top: 3px; color: var(--mandi-green-dark); font-size: 10.5px; font-weight: 850; }

.mandi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mandi-grid--commodities { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mandi-grid--markets { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.mandi-card,
.mandi-market-card {
    min-width: 0;
    border: 1px solid var(--mandi-border);
    border-radius: 19px;
    background: #fff;
    box-shadow: var(--mandi-shadow-sm);
}

.mandi-card {
    display: block;
    padding: 14px;
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.mandi-card:hover { transform: translateY(-2px); border-color: #add3c5; box-shadow: var(--mandi-shadow); }
.mandi-card__top { min-width: 0; display: flex; align-items: center; gap: 11px; }
.mandi-thumb { width: 58px; height: 58px; flex: 0 0 auto; overflow: hidden; display: grid; place-items: center; border: 1px solid #dcece5; border-radius: 16px; background: var(--mandi-green-soft); font-size: 26px; }
.mandi-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mandi-card__heading { min-width: 0; }
.mandi-card__heading strong,
.mandi-card h3 { display: block; margin: 0; color: var(--mandi-ink-strong); font-size: 15px; line-height: 1.24; font-weight: 950; }
.mandi-card__heading small,
.mandi-card__meta { display: block; margin-top: 4px; color: var(--mandi-muted); font-size: 10.8px; line-height: 1.4; font-weight: 700; }

.mandi-price {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid #edf2ef;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 10px;
}

.mandi-price > span { min-width: 0; }
.mandi-price strong { display: block; margin-top: 2px; color: var(--mandi-green-dark); font-size: 19px; line-height: 1.15; font-weight: 950; }
.mandi-price small { color: var(--mandi-muted); font-size: 10px; line-height: 1.35; font-weight: 700; }
.mandi-card-link { display: inline-flex; margin-top: 11px; color: var(--mandi-green-dark); font-size: 11.5px; line-height: 1.3; font-weight: 900; text-decoration: none; }

.mandi-market-card { padding: 15px; }
.mandi-market-card__head { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mandi-market-card h3 { margin: 0; color: var(--mandi-ink-strong); font-size: 16px; line-height: 1.25; font-weight: 950; }
.mandi-distance { flex: 0 0 auto; white-space: nowrap; padding: 6px 9px; border-radius: 999px; background: var(--mandi-green-soft); color: var(--mandi-green-dark); font-size: 10px; font-weight: 900; }

.mandi-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.mandi-chip { display: inline-flex; min-height: 26px; align-items: center; padding: 4px 8px; border-radius: 999px; background: #f2f7f4; color: #46655c; font-size: 10px; line-height: 1.1; font-weight: 850; }

.mandi-mini-price { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.mandi-mini-price div { min-width: 0; padding: 9px 8px; border: 1px solid #e8efec; border-radius: 11px; background: #fafcfb; }
.mandi-mini-price span { display: block; color: var(--mandi-muted); font-size: 9px; line-height: 1.3; font-weight: 800; }
.mandi-mini-price strong { display: block; margin-top: 2px; color: #173e34; font-size: 13px; line-height: 1.2; font-weight: 950; overflow-wrap: anywhere; }

.mandi-variant-list { margin-top: 11px; border-top: 1px solid #edf2ef; }
.mandi-variant { padding: 10px 0; border-bottom: 1px solid #edf2ef; }
.mandi-variant:last-child { border-bottom: 0; }
.mandi-variant__line { display: flex; justify-content: space-between; gap: 10px; }
.mandi-variant__name { color: #28483f; font-size: 12px; font-weight: 900; }
.mandi-variant__grade { margin-top: 2px; color: var(--mandi-muted); font-size: 10px; line-height: 1.35; }

.mandi-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #d6ebe2;
    border-radius: 14px;
    background: #edf8f3;
    color: #41645a;
    font-size: 11.5px;
    line-height: 1.5;
}
.mandi-note + .mandi-note { margin-top: 8px; }
.mandi-note__icon { width: 22px; height: 22px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--mandi-green-dark); color: #fff; font-size: 11px; font-weight: 950; }
.mandi-note strong { color: #244b3f; font-weight: 950; }
.mandi-note p { margin: 2px 0 0; }

.mandi-error {
    margin-top: 18px;
    padding: 15px;
    border: 1px solid #efcccc;
    border-radius: 15px;
    background: #fff5f5;
    color: var(--mandi-danger);
    font-size: 13px;
    font-weight: 750;
}

.mandi-empty {
    padding: 30px 20px;
    border: 1px dashed #c8dbd3;
    border-radius: 18px;
    background: #fff;
    color: var(--mandi-muted);
    text-align: center;
}
.mandi-empty > span { display: block; margin-bottom: 7px; font-size: 28px; }
.mandi-empty strong { display: block; color: var(--mandi-ink-strong); font-size: 15px; font-weight: 950; }
.mandi-empty p { margin: 5px 0 0; font-size: 11.5px; line-height: 1.5; }

.mandi-sort { display: flex; flex-wrap: wrap; gap: 7px; }
.mandi-sort a { min-height: 34px; padding: 8px 11px; border: 1px solid var(--mandi-border); border-radius: 999px; background: #fff; color: #4b655d; font-size: 11px; font-weight: 900; text-decoration: none; }
.mandi-sort a.is-active { border-color: var(--mandi-green-dark); background: var(--mandi-green-dark); color: #fff; }

.mandi-breadcrumb { padding: 13px 0; color: var(--mandi-muted); font-size: 11px; font-weight: 650; }
.mandi-breadcrumb a { color: var(--mandi-green-dark); font-weight: 900; text-decoration: none; }
.mandi-title-row { display: flex; align-items: center; gap: 14px; }
.mandi-title-row .mandi-thumb { width: 70px; height: 70px; border-color: #cfe2d9; background: #fff; }

.mandi-history-list { display: grid; gap: 11px; }
.mandi-history-day { overflow: hidden; border: 1px solid var(--mandi-border); border-radius: 17px; background: #fff; box-shadow: var(--mandi-shadow-sm); }
.mandi-history-day__head { padding: 11px 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center; background: #eef7f3; }
.mandi-history-day__head strong { color: var(--mandi-ink-strong); font-size: 13px; font-weight: 950; }
.mandi-history-day__rows { padding: 0 14px; }
.mandi-history-row { padding: 11px 0; border-bottom: 1px solid #edf2ef; display: grid; grid-template-columns: minmax(130px, 1fr) 2fr; gap: 12px; align-items: center; }
.mandi-history-row:last-child { border-bottom: 0; }
.mandi-history-row__name strong { display: block; color: #28483f; font-size: 12px; font-weight: 950; }
.mandi-history-row__name small { display: block; margin-top: 2px; color: var(--mandi-muted); font-size: 10px; line-height: 1.35; }

.mandi-trust-card {
    margin-top: 32px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid #d8e8e0;
    border-radius: 18px;
    background: #fff;
}
.mandi-trust-card__icon { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--mandi-green-soft); color: var(--mandi-green-dark); font-weight: 950; }
.mandi-trust-card strong { display: block; color: var(--mandi-ink-strong); font-size: 12.5px; line-height: 1.35; font-weight: 950; }
.mandi-trust-card p { margin: 4px 0 0; color: var(--mandi-muted); font-size: 11px; line-height: 1.55; }

@media (max-width: 980px) {
    .mandi-hero__grid { grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; }
    .mandi-hero__visual { height: 240px; }
    .mandi-grid--commodities { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mandi-category-strip { grid-template-columns: repeat(5, minmax(150px, 1fr)); overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; scrollbar-width: thin; }
    .mandi-category-card { scroll-snap-align: start; }
    .mandi-popular-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .mandi-wrap { width: min(100% - 20px, 1180px); }
    .mandi-hero { padding: 25px 0 34px; }
    .mandi-hero__grid { display: block; }
    .mandi-hero h1 { font-size: 36px; }
    .mandi-hero p { font-size: 13.5px; }
    .mandi-hero__visual { display: none; }
    .mandi-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mandi-actions .mandi-btn { width: 100%; }
    .mandi-actions .mandi-btn[data-mandi-location] { grid-column: 1 / -1; }
    .mandi-mode-grid { grid-template-columns: 1fr; margin-top: -18px; gap: 8px; }
    .mandi-mode-card { min-height: 78px; padding: 11px 12px; grid-template-columns: 40px minmax(0, 1fr) auto; border-radius: 17px; }
    .mandi-mode-card__icon { width: 40px; height: 40px; border-radius: 12px; font-size: 19px; }
    .mandi-mode-card strong { font-size: 13.5px; }
    .mandi-mode-card small { font-size: 10.5px; }
    .mandi-toolbar { margin-top: 13px; }
    .mandi-toolbar__card { grid-template-columns: minmax(0, 1fr) auto; }
    .mandi-clear { grid-column: 1 / -1; padding: 3px 2px 1px; }
    .mandi-stats { grid-template-columns: 1fr; }
    .mandi-stats > div { display: grid; grid-template-columns: minmax(95px, auto) 1fr; align-items: center; gap: 12px; padding: 10px 13px; border-right: 0; border-bottom: 1px solid #edf2ef; }
    .mandi-stats > div:last-child { border-bottom: 0; }
    .mandi-stats strong { font-size: 16px; }
    .mandi-stats span { margin-top: 0; }
    .mandi-section { padding-top: 25px; }
    .mandi-section__head { align-items: flex-start; flex-direction: column; gap: 8px; }
    .mandi-popular-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .mandi-grid,
    .mandi-grid--markets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mandi-grid--commodities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mandi-card { padding: 12px; }
    .mandi-thumb { width: 52px; height: 52px; border-radius: 14px; }
    .mandi-card__heading strong,
    .mandi-card h3 { font-size: 13.5px; }
    .mandi-price strong { font-size: 17px; }
    .mandi-history-row { grid-template-columns: 1fr; gap: 7px; }
    .mandi-title-row { align-items: flex-start; }
    .mandi-title-row .mandi-thumb { width: 58px; height: 58px; }
}

@media (max-width: 520px) {
    .mandi-hero h1 { font-size: 32px; }
    .mandi-eyebrow,
    .mandi-kicker,
    .mandi-section__eyebrow { font-size: 10.5px; }
    .mandi-actions { grid-template-columns: 1fr; }
    .mandi-actions .mandi-btn[data-mandi-location] { grid-column: auto; }
    .mandi-toolbar__card { grid-template-columns: 1fr; padding: 8px; }
    .mandi-btn--search { width: 100%; }
    .mandi-popular-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mandi-popular-card { padding: 9px 5px; border-radius: 15px; }
    .mandi-popular-card__image { width: 58px; height: 58px; }
    .mandi-popular-card strong { font-size: 11px; }
    .mandi-popular-card small { font-size: 9.5px; }
    .mandi-grid,
    .mandi-grid--markets,
    .mandi-grid--commodities { grid-template-columns: 1fr; }
    .mandi-card--commodity { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; }
    .mandi-card--commodity .mandi-card__top { grid-column: 1 / -1; }
    .mandi-card--commodity .mandi-price { grid-column: 1 / -1; }
    .mandi-card--commodity .mandi-card-link { grid-column: 1 / -1; }
    .mandi-market-card__head { gap: 8px; }
    .mandi-mini-price div { padding: 8px 6px; }
    .mandi-mini-price strong { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .mandi-page * { scroll-behavior: auto !important; transition: none !important; }
}

/* Updated: 2026-08-19 14:31 IST | Shaher Setu | Fully responsive Mandi/APMC website UI aligned with Android. */

/* --- Full database browser pages --- */
.mandi-hero--compact { padding: 28px 0 31px; }
.mandi-hero--compact h1 { font-size: clamp(30px, 4.4vw, 46px); }
.mandi-breadcrumb--hero { padding: 0 0 13px; }
.mandi-toolbar--inside { margin-top: -15px; }
.mandi-section--tight { padding-top: 19px; }
.mandi-section__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; }

.mandi-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--mandi-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--mandi-shadow-sm);
}
.mandi-summary-grid > div { min-width: 0; padding: 15px 17px; border-right: 1px solid #edf2ef; }
.mandi-summary-grid > div:last-child { border-right: 0; }
.mandi-summary-grid strong { display: block; color: var(--mandi-green-dark); font-size: 21px; line-height: 1.1; font-weight: 950; }
.mandi-summary-grid span { display: block; margin-top: 4px; color: var(--mandi-muted); font-size: 10.5px; line-height: 1.35; font-weight: 750; }

.mandi-category-card__media { display: block; overflow: hidden; background: #edf6f2; }
.mandi-category-card__media img { width: 100%; height: 100%; aspect-ratio: 1.6 / 1; object-fit: cover; }
.mandi-category-card__body { display: block; padding: 10px 11px 11px; }

.mandi-commodity-card { height: 100%; }
.mandi-card__facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 12px;
}
.mandi-card__facts > span { min-width: 0; padding: 8px 9px; border: 1px solid #e9f0ed; border-radius: 11px; background: #fafcfb; }
.mandi-card__facts strong { display: block; color: #23483d; font-size: 11px; line-height: 1.25; font-weight: 950; overflow-wrap: anywhere; }
.mandi-card__facts small { display: block; margin-top: 2px; color: var(--mandi-muted); font-size: 9px; line-height: 1.3; font-weight: 750; }

.mandi-top-prices {
    display: grid;
    gap: 6px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #edf2ef;
}
.mandi-top-prices > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mandi-top-prices span { min-width: 0; overflow: hidden; color: #4f675f; font-size: 10.5px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.mandi-top-prices strong { flex: 0 0 auto; color: var(--mandi-green-dark); font-size: 11.5px; font-weight: 950; }

.mandi-market-card__footer {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid #edf2ef;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
}
.mandi-market-card__footer > span { min-width: 0; }
.mandi-market-card__footer small { display: block; color: var(--mandi-muted); font-size: 9px; font-weight: 750; }
.mandi-market-card__footer strong { display: block; margin-top: 2px; color: #294a40; font-size: 11px; font-weight: 900; }
.mandi-market-card__footer .mandi-card-link { margin-top: 0; flex: 0 0 auto; }

.mandi-error { display: grid; gap: 3px; }
.mandi-error strong { font-weight: 950; }
.mandi-error span { font-size: 11.5px; line-height: 1.45; }

@media (max-width: 760px) {
    .mandi-hero--compact { padding: 22px 0 29px; }
    .mandi-toolbar--inside { margin-top: -13px; }
    .mandi-summary-grid { grid-template-columns: 1fr; }
    .mandi-summary-grid > div { display: grid; grid-template-columns: minmax(70px, auto) 1fr; align-items: center; gap: 12px; padding: 10px 13px; border-right: 0; border-bottom: 1px solid #edf2ef; }
    .mandi-summary-grid > div:last-child { border-bottom: 0; }
    .mandi-summary-grid strong { font-size: 17px; }
    .mandi-summary-grid span { margin-top: 0; }
    .mandi-section__actions { width: 100%; justify-content: space-between; }
}

@media (max-width: 520px) {
    .mandi-card__facts { grid-template-columns: 1fr 1fr; }
    .mandi-market-card__footer { align-items: flex-start; flex-direction: column; }
}

/* Updated: 2026-08-19 15:16 IST | Shaher Setu | Added complete DB-driven Mandi browse pages and mobile layouts. */