:root {
    color-scheme: light;
    --bg: #FFF8F0;
    --surface: #ffffff;
    --surface-soft: #FFF3E6;
    --text: #3B1A08;
    --strong: #1C0D02;
    --muted: #8A6550;
    --line: #F0DCC8;
    --brand: #F97316;
    --brand-dark: #C2410C;
    --green: #16A34A;
    --green-dark: #14532D;
    --gold: #FCD34D;
    --blue-soft: #FFF7ED;
    --blue-text: #C2410C;
    --shadow: 0 10px 28px rgba(60, 26, 8, .08);
    --footer-bg: #2C1A0E;
    --footer-text: #D6BFA8;
}

* { box-sizing: border-box; }
html { background: var(--bg); }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { border: 0; }

.market-shell {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
}

/* ── HEADER ── */
.market-header {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 248, 240, .97);
    backdrop-filter: blur(14px);
}

/* Faixa superior: logo · endereço (protagonista) · ações */
.header-top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    min-height: 64px;
}

/* Faixa inferior: busca larga · navegação */
.header-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    min-height: 56px;
    border-top: 1px solid var(--line);
}

.header-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 9px;
    overflow: hidden;
}
.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 9px;
    display: block;
}

.brand strong, .brand span { display: block; }
.brand strong {
    color: var(--brand-dark);
    font-size: 19px;
    line-height: 1;
    letter-spacing: -.3px;
}
.brand span span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}
.main-nav a { transition: color .16s ease; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--brand); }

.search-box {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    height: 46px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0 16px;
    background: #F0DCC8;
    transition: border-color .16s ease, background .16s ease;
}
.search-clear {
    display: grid;
    place-items: center;
    width: 24px; height: 24px;
    border: 0;
    border-radius: 50%;
    background: rgba(60,26,8,.12);
    color: var(--strong);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    transition: background .14s, color .14s;
}
.search-clear[hidden] { display: none; }
.search-clear:hover { background: var(--brand); color: #fff; }
/* remove o × nativo do input[type=search] */
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-box:focus-within {
    border-color: var(--brand);
    background: #fff;
}
.search-box span { position: relative; width: 18px; height: 18px; }
.search-box span::before {
    content: "";
    position: absolute;
    inset: 1px 4px 4px 1px;
    border: 2px solid var(--brand);
    border-radius: 50%;
}
.search-box span::after {
    content: "";
    position: absolute;
    right: 1px; bottom: 1px;
    width: 8px; height: 2px;
    border-radius: 4px;
    background: var(--brand);
    transform: rotate(45deg);
}
.search-box input {
    min-width: 0; border: 0; outline: 0;
    background: transparent;
    color: var(--strong);
}
.search-box input::placeholder { color: var(--muted); }

.address-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-self: center;
    width: min(420px, 100%);
    min-width: 0;
    border-radius: 12px;
    padding: 10px 18px;
    background: var(--surface-soft);
    border: 1.5px solid var(--line);
    color: var(--strong);
    cursor: pointer; text-align: left;
    transition: border-color .16s, background .16s;
}
.address-button:hover { border-color: var(--brand); background: #FFEAD6; }
.address-button span {
    flex: 0 0 auto;
    color: var(--muted); font-size: 11px;
    font-weight: 900; text-transform: uppercase; letter-spacing: .5px;
}
.address-button strong {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--brand-dark); font-size: 14px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.icon-link, .cart-link {
    display: grid;
    place-items: center;
    min-width: 42px; height: 42px;
    border-radius: 999px;
    color: var(--brand-dark);
    background: var(--surface);
    border: 1px solid var(--line);
    transition: background .16s, border-color .16s;
}
.icon-link:hover, .cart-link:hover { background: #FFF3E6; border-color: var(--brand); }

.icon-link span, .cart-link span {
    display: grid;
    place-items: center;
    width: 22px; height: 22px;
    font-size: 17px;
    line-height: 1;
}

.cart-link {
    grid-template-columns: 24px auto;
    grid-template-rows: auto auto;
    column-gap: 7px; justify-items: start;
    padding: 0 10px; min-width: 82px;
}
.cart-link span { grid-row: 1 / 3; }
.cart-link strong { color: var(--strong); font-size: 12px; line-height: 1.1; }
.cart-link small { color: var(--muted); font-size: 11px; line-height: 1.1; }

/* ── HERO BANNER ── */
.hero-wrap {
    padding: 24px 0 8px;
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    overflow: hidden;
    border-radius: 24px;
    padding: 32px 40px;
    background:
        radial-gradient(circle at 85% 20%, rgba(124,58,237,.55), transparent 45%),
        linear-gradient(135deg, #2E1065 0%, #4C1D95 55%, #5B21B6 100%);
    color: #fff;
    box-shadow: 0 24px 60px rgba(46,16,101,.35);
}

/* textura de pontilhado dourado */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(252,211,77,.18) 1.5px, transparent 1.6px);
    background-size: 22px 22px;
    opacity: .6;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.hero-eyebrow {
    display: inline-block;
    margin: 0 0 14px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(252,211,77,.16);
    border: 1px solid rgba(252,211,77,.35);
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .4px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(30px, 4.4vw, 50px);
    font-weight: 900;
    line-height: 1.04;
    letter-spacing: -1px;
    text-transform: uppercase;
}
.hero-accent {
    display: inline-block;
    color: var(--gold);
    text-shadow: 0 2px 0 rgba(0,0,0,.15);
}

.hero-sub {
    margin: 16px 0 0;
    max-width: 460px;
    color: rgba(255,255,255,.82);
    font-size: 15px;
    line-height: 1.55;
    text-transform: none;
    font-weight: 500;
}

.hero-actions {
    margin-top: 24px;
}
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 26px;
    border: 0;
    border-radius: 999px;
    background: var(--gold);
    color: #2E1065;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: .2px;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(252,211,77,.35);
    transition: transform .14s, box-shadow .14s;
}
.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(252,211,77,.45);
}
.hero-cta-icon { font-size: 17px; }

/* arte lateral — órbita giratória */
.hero-art {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    min-height: 230px;
    --orbit-r: 86px;      /* raio da órbita */
    --orbit-rx: 74.48px;  /* raio * 0.866 (cos30) */
    --orbit-ry: 43px;     /* raio * 0.5  (sin30) */
    --orbit-time: 30s;    /* duração de uma volta (lento e suave) */
}

.hero-art-orbit {
    position: relative;
    width: calc(var(--orbit-r) * 2 + 56px);
    height: calc(var(--orbit-r) * 2 + 56px);
    border-radius: 50%;
    /* halo circular sutil de fundo */
    background:
        radial-gradient(circle, rgba(252,211,77,.10), transparent 62%);
    box-shadow: inset 0 0 0 1px rgba(252,211,77,.22);
    animation: orbitSpin var(--orbit-time) linear infinite;
    will-change: transform;
}

/* slots posicionados por coordenadas (sem rotação estática) */
.hero-art-slot {
    position: absolute;
    transform: translate(-50%, -50%);
}
.s1 { top: calc(50% - var(--orbit-r));  left: 50%; }
.s2 { top: calc(50% - var(--orbit-ry)); left: calc(50% + var(--orbit-rx)); }
.s3 { top: calc(50% + var(--orbit-ry)); left: calc(50% + var(--orbit-rx)); }
.s4 { top: calc(50% + var(--orbit-r));  left: 50%; }
.s5 { top: calc(50% + var(--orbit-ry)); left: calc(50% - var(--orbit-rx)); }
.s6 { top: calc(50% - var(--orbit-ry)); left: calc(50% - var(--orbit-rx)); }

.hero-art-emoji {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    font-size: 40px;
    line-height: 1;
    filter: drop-shadow(0 5px 9px rgba(0,0,0,.4));
    /* contra-rotação dinâmica: mantém o item sempre "em pé" */
    animation: orbitSpinRev var(--orbit-time) linear infinite;
    will-change: transform;
}

/* selo central */
.hero-art-seal {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    margin: -46px 0 0 -46px;
    border-radius: 50%;
    background: var(--gold);
    color: #2E1065;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
    letter-spacing: .3px;
    box-shadow: 0 8px 22px rgba(0,0,0,.32);
    /* contra-rotação para o texto não girar */
    animation: orbitSpinRev var(--orbit-time) linear infinite;
}

@keyframes orbitSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes orbitSpinRev {
    from { transform: rotate(0deg); }
    to   { transform: rotate(-360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-art-orbit,
    .hero-art-emoji,
    .hero-art-seal { animation: none; }
}

/* ── SECTIONS ── */
.market-section { padding: 20px 0 28px; }

.section-head {
    display: flex; align-items: center;
    justify-content: space-between; gap: 16px;
    margin-bottom: 18px;
}
.section-head h2 {
    margin: 0; color: var(--strong);
    font-size: 22px; line-height: 1.1;
    letter-spacing: -.2px;
}
.section-head span, .section-head a {
    color: var(--brand); font-size: 14px; font-weight: 800;
}

/* categorias removidas — seção substituída pelo modal de endereço */

/* ── LATEST STORES ── */
.latest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.latest-card {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px; align-items: center;
    min-height: 90px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand);
    border-radius: 10px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(60,26,8,.05);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s;
}
.latest-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-left-color: var(--brand-dark);
}

.latest-logo, .store-logo {
    display: grid; place-items: center;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--brand); font-weight: 900;
    overflow: hidden;
}
.latest-logo { width: 68px; height: 68px; }
.latest-logo img, .store-logo img {
    width: 100%; height: 100%; object-fit: cover;
}
.latest-card strong {
    display: block; color: var(--strong); line-height: 1.25; overflow-wrap: anywhere;
}
.latest-card small {
    display: block; margin-top: 3px; color: var(--muted); line-height: 1.35;
}

/* ── STORES GRID ── */
.stores-section { padding-bottom: 44px; scroll-margin-top: 80px; }
.empty-clear { margin-top: 16px; }
.empty-clear[hidden] { display: none; }
.stores-head { align-items: flex-end; }
.stores-head > div { min-width: 0; }
.stores-head span {
    display: block; margin-top: 6px;
    color: var(--muted); font-weight: 500; line-height: 1.45;
}

.outline-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    border: 0;
    border-radius: 6px;
    padding: 0 16px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--line);
    transition: color .16s, text-decoration-color .16s;
}
.outline-button::before {
    content: "×";
    font-size: 16px;
    font-weight: 400;
    color: var(--brand-dark);
}
.outline-button:hover {
    color: var(--brand-dark);
    text-decoration-color: var(--brand);
}

.load-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    border: 2px dashed var(--brand);
    border-radius: 12px;
    padding: 0 24px;
    background: transparent;
    color: var(--brand-dark);
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    letter-spacing: .2px;
    transition: background .18s, color .18s;
}
.load-more::after {
    content: "↓";
    font-size: 16px;
    transition: transform .2s;
}
.load-more:hover {
    background: #FFF3E6;
    color: var(--brand);
}
.load-more:hover::after {
    transform: translateY(3px);
}

.store-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

/* ── STORE CARD (horizontal) ── */
.store-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    padding: 14px;
    box-shadow: 0 4px 16px rgba(60,26,8,.06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    color: var(--text);
    text-decoration: none;
}
.store-card:hover {
    transform: translateY(-3px);
    border-color: var(--brand);
    box-shadow: 0 14px 36px rgba(60,26,8,.12);
}

.store-card-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 12px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    overflow: hidden;
    flex: 0 0 auto;
    align-self: flex-start;
}
.store-card-logo img {
    width: 100%; height: 100%; object-fit: cover;
}
.store-card-initial {
    display: grid;
    place-items: center;
    width: 64px; height: 64px;
    border-radius: 12px;
    background: var(--footer-bg);
    color: var(--gold);
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -2px;
}

.store-card-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.store-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.store-card-name {
    margin: 0;
    color: var(--strong);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* ── PRODUTOS (resultados de busca) ── */
.products-section[hidden] { display: none; }
.product-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.product-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 10px;
    box-shadow: 0 4px 14px rgba(60,26,8,.05);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
    color: var(--text);
    text-decoration: none;
}
.product-card:hover {
    transform: translateY(-3px);
    border-color: var(--brand);
    box-shadow: 0 12px 28px rgba(60,26,8,.1);
}
.product-thumb {
    display: grid;
    place-items: center;
    width: 64px; height: 64px;
    border-radius: 10px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    overflow: hidden;
    flex: 0 0 auto;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb-initial {
    display: grid; place-items: center;
    width: 44px; height: 44px;
    border-radius: 9px;
    background: var(--footer-bg);
    color: var(--gold);
    font-size: 20px; font-weight: 900;
}
.product-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.product-name {
    color: var(--strong);
    font-size: 14px; font-weight: 800;
    line-height: 1.2;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-store {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.product-price {
    margin-top: 2px;
    color: var(--brand-dark);
    font-size: 14px; font-weight: 900;
}

/* legado: mantém .store-logo para outros usos internos */
.store-logo {
    display: grid; place-items: center;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--brand); font-weight: 900;
    overflow: hidden;
    width: 80px; height: 80px;
    border: 1px solid var(--line);
    box-shadow: 0 4px 14px rgba(60,26,8,.06);
}

.store-info { min-width: 0; }
.store-title-line {
    display: flex; align-items: flex-start;
    justify-content: space-between; gap: 8px; min-width: 0;
}
.store-title-line a { min-width: 0; }
.store-title-line h3 {
    display: -webkit-box; margin: 0;
    color: var(--strong); font-size: 15px; line-height: 1.25;
    letter-spacing: -.1px;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.store-info p {
    margin: 4px 0 0; color: var(--muted); font-size: 13px;
    line-height: 1.3; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}

.badge {
    display: inline-flex; flex: 0 0 auto;
    align-items: center; min-height: 22px;
    border-radius: 999px; padding: 0 9px;
    font-size: 11px; font-weight: 800; white-space: nowrap;
}
.badge-open { background: #DCFCE7; color: #14532D; }
.badge-later { background: #FEF9C3; color: #854D0E; }
.badge-closed { background: #FFE4E6; color: #9F1239; }

.store-tags { margin-top: 4px; }
.store-tags span {
    display: block; color: var(--muted);
    font-size: 12px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}

.store-facts {
    display: flex; flex-wrap: wrap;
    gap: 4px 8px; margin-top: 5px;
    color: var(--muted); font-size: 12px;
}
.store-facts span + span::before {
    content: "•"; margin-right: 8px; color: #D6BFA8;
}

.coupon-line {
    display: inline-flex; max-width: 100%;
    margin-top: 6px; border-radius: 6px;
    padding: 3px 8px;
    background: #FFF7ED;
    color: var(--brand-dark);
    font-size: 11px; font-weight: 800;
    border: 1px solid #FED7AA;
}
.coupon-line span {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── EMPTY / SKELETON ── */
.empty-state {
    display: none; min-height: 170px;
    border: 1.5px dashed var(--line);
    border-radius: 10px; padding: 28px;
    background: #fff; text-align: center;
}
.empty-state.is-visible { display: grid; place-items: center; }
.empty-state strong { display: block; color: var(--strong); font-size: 18px; }
.empty-state p { margin: 7px 0 0; color: var(--muted); }

.load-more {
    display: block; width: 100%;
    margin-top: 36px; color: var(--brand-dark);
}
.load-more[hidden] { display: none; }

.skeleton-grid {
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 28px; margin-bottom: 22px;
}
.skeleton-grid.is-visible { display: grid; }
.skeleton {
    height: 92px; border-radius: 10px;
    background: linear-gradient(90deg, #F0DCC8, #FFF8F0, #F0DCC8);
    background-size: 220% 100%;
    animation: shimmer 1.2s infinite linear;
}
@keyframes shimmer {
    from { background-position: 0 0; }
    to { background-position: -220% 0; }
}

.empty-inline {
    grid-column: 1 / -1;
    border: 1.5px dashed var(--line);
    border-radius: 10px; padding: 20px;
    background: #fff; color: var(--muted); text-align: center;
}

/* ── FOOTER (dark coffee) ── */
.market-footer {
    background: var(--footer-bg);
    border-top: 3px solid var(--brand);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 42px; padding: 36px 0 48px;
    color: var(--footer-text);
}
.footer-grid div { display: grid; gap: 12px; align-content: start; }
.footer-grid strong { color: var(--gold); font-size: 14px; letter-spacing: .3px; }
.footer-grid a { color: var(--footer-text); transition: color .16s; }
.footer-grid a:hover { color: var(--brand); }
.footer-grid span { color: #8A6A55; font-size: 13px; }

/* ── MODAL DE ENDEREÇO ── */
.addr-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
.addr-modal[hidden] { display: none !important; }

.addr-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28, 13, 2, .55);
    backdrop-filter: blur(3px);
}

.addr-drawer {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 16px;
    background: var(--bg);
    box-shadow: 0 24px 60px rgba(28,13,2,.22);
    overflow: hidden;
    animation: addrFadeScale .2s ease;
}
@keyframes addrFadeScale {
    from { transform: scale(.96); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.addr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--line);
    flex: 0 0 auto;
}
.addr-header strong {
    font-size: 16px;
    color: var(--strong);
    letter-spacing: -.2px;
}
.addr-close {
    display: grid;
    place-items: center;
    width: 32px; height: 32px;
    border: 0;
    border-radius: 50%;
    background: var(--line);
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background .14s, color .14s;
}
.addr-close:hover { background: var(--brand); color: #fff; }

.addr-gps-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 20px 0;
    padding: 14px 18px;
    border: 0;
    border-radius: 12px;
    background: var(--footer-bg);
    color: var(--gold);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    text-align: left;
    letter-spacing: .1px;
    transition: opacity .16s;
    flex: 0 0 auto;
}
.addr-gps-btn:hover { opacity: .88; }

.addr-gps-icon {
    position: relative;
    display: block;
    width: 22px; height: 22px;
    flex: 0 0 auto;
}
.addr-gps-icon::before {
    content: "";
    position: absolute;
    inset: 3px;
    border: 2.5px solid var(--gold);
    border-radius: 50%;
}
.addr-gps-icon::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--gold);
    transform: translate(-50%, -50%);
}

.addr-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 20px 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    flex: 0 0 auto;
}
.addr-divider::before,
.addr-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.addr-search-wrap {
    position: relative;
    margin: 12px 20px 0;
    flex: 0 0 auto;
}
.addr-search-input {
    display: block;
    width: 100%;
    height: 48px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    padding: 0 40px 0 16px;
    background: #fff;
    color: var(--strong);
    font-size: 14px;
    outline: none;
    transition: border-color .16s;
}
.addr-search-input:focus { border-color: var(--brand); }
.addr-search-input::placeholder { color: var(--muted); }

.addr-search-clear {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    transition: color .14s;
}
.addr-search-clear:hover { color: var(--brand-dark); }

.addr-results {
    list-style: none;
    margin: 8px 20px 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    overflow-y: auto;
    max-height: 240px;
    flex: 0 1 auto;
}
.addr-results:empty { display: none; }

.addr-result-item {
    padding: 13px 16px;
    font-size: 13px;
    color: var(--text);
    line-height: 1.4;
    cursor: pointer;
    border-bottom: 1px solid var(--line);
    transition: background .12s;
}
.addr-result-item:last-child { border-bottom: 0; }
.addr-result-item:hover { background: var(--surface-soft); color: var(--brand-dark); }

.addr-hint {
    margin: 10px 20px 20px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
    flex: 0 0 auto;
}
.addr-hint--error { color: var(--brand-dark); }

/* ── RESPONSIVE ── */
@media (max-width: 1060px) {
    .main-nav { display: none; }
    .header-bottom {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 12px 0;
    }
    .address-button { width: min(360px, 100%); }
    .latest-grid, .skeleton-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .store-list,
    .product-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .market-shell { width: min(100% - 24px, 560px); }
    .header-top {
        grid-template-columns: auto 1fr;
        gap: 10px; min-height: 0; padding: 10px 0;
    }
    .brand-mark { width: 38px; height: 38px; font-size: 17px; }
    .brand strong { font-size: 17px; }
    .brand span span { display: none; }
    .address-button {
        grid-column: 1 / -1; grid-row: 2;
        width: 100%; justify-self: stretch;
        background: var(--surface-soft);
    }
    .header-actions { justify-self: end; }
    .header-bottom { padding: 10px 0; }
    .search-box { height: 44px; }
    .icon-link { display: none; }
    .cart-link { min-width: 42px; padding: 0; place-items: center; }
    .cart-link strong, .cart-link small { display: none; }
    .hero {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 28px 24px;
        border-radius: 20px;
    }
    .hero-art {
        order: -1; min-height: 0;
        --orbit-r: 66px; --orbit-rx: 57.16px; --orbit-ry: 33px;
    }
    .hero-art-emoji { width: 44px; height: 44px; font-size: 32px; }
    .hero-art-seal { width: 72px; height: 72px; margin: -36px 0 0 -36px; font-size: 10px; }
    .hero-sub { font-size: 14px; }
    .market-section { padding: 16px 0 20px; }
    .section-head { margin-bottom: 12px; }
    .section-head h2 { font-size: 19px; }

    .latest-grid, .store-list, .skeleton-grid, .product-list { grid-template-columns: 1fr; gap: 14px; }
    .latest-card { min-height: 84px; grid-template-columns: 60px minmax(0, 1fr); }
    .latest-logo { width: 60px; height: 60px; }
    .stores-head { align-items: flex-start; flex-direction: column; gap: 10px; }
    .outline-button { width: auto; }
    /* card horizontal compacto no mobile */
    .store-card { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 12px; }
    .store-card-logo { width: 72px; height: 72px; }
    .store-card-initial { width: 52px; height: 52px; font-size: 22px; border-radius: 10px; }
    .store-card-name { font-size: 14px; }
    .store-logo { width: 60px; height: 60px; }
    .store-title-line h3 { font-size: 14px; }
    .store-info p, .store-facts { font-size: 11px; }
    .store-tags { display: none; }
    .store-facts { gap: 3px 6px; margin-top: 3px; }
    .load-more { margin-top: 18px; }
    .footer-grid { grid-template-columns: 1fr; gap: 22px; padding: 28px 0 36px; }
}

@media (max-width: 390px) {
    .market-shell { width: calc(100% - 20px); }
    .hero h1 { font-size: 28px; }
    .hero-cta { width: 100%; justify-content: center; }
    .store-card { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; }
    .store-card-logo { width: 64px; height: 64px; }
    .store-logo { width: 54px; height: 54px; }
}
