body:not(.is-market), #app, .prod-dialog, #toasts, .lp { --brand: #0f766e; --brand-2: #115e59; --accent: #f59e0b; --ink: #0f172a; --muted: #64748b; --line: #e2e8f0; --bg: #f8fafc; --card: #fff; --ok: #047857; --bad: #b91c1c; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand); }
.top { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 17px; } .brand b { color: var(--brand); }
.brand__mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: #fff; font-weight: 800; }
.top__nav { display: flex; gap: 12px; align-items: center; font-weight: 600; font-size: 14px; } .top__nav a { text-decoration: none; color: var(--ink); }
.cart-link { background: var(--brand); color: #fff !important; padding: 6px 10px; border-radius: 99px; }
.cart-count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 99px; background: #fff; color: var(--brand); text-align: center; font-size: 12px; }
main { max-width: 1000px; margin: 0 auto; padding: 16px; min-height: 70vh; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 20px 16px 80px; }
:is(#app, .prod-dialog) h1 { font-size: 22px; margin: 4px 0 12px; } :is(#app, .prod-dialog) h2 { font-size: 17px; margin: 0 0 10px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
:is(#app, .prod-dialog) .search { display: flex; gap: 8px; margin-bottom: 14px; }
:is(#app, .prod-dialog) input, :is(#app, .prod-dialog) select, :is(#app, .prod-dialog) textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: var(--ink); }
:is(#app, .prod-dialog) input:focus, :is(#app, .prod-dialog) select:focus, :is(#app, .prod-dialog) textarea:focus, button:focus-visible, a:focus-visible, .map:focus-visible { outline: 3px solid #99f6e4; outline-offset: 1px; }
:is(#app, .prod-dialog) .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 8px; border: 1px solid transparent; font: 600 14px/1 inherit; cursor: pointer; background: var(--brand); color: #fff; text-decoration: none; }
:is(#app, .prod-dialog) .btn:hover { background: var(--brand-2); } :is(#app, .prod-dialog) .btn[disabled] { opacity: .5; cursor: default; }
:is(#app, .prod-dialog) .btn--ghost { background: #fff; color: var(--ink); border-color: #cbd5e1; } :is(#app, .prod-dialog) .btn--ghost:hover { background: #f1f5f9; }
:is(#app, .prod-dialog) .btn--danger { background: var(--bad); } :is(#app, .prod-dialog) .btn--block { width: 100%; padding: 14px; font-size: 16px; } :is(#app, .prod-dialog) .btn--sm { padding: 7px 10px; font-size: 13px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; }
.chips button { flex: none; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font: 600 13px inherit; cursor: pointer; color: var(--ink); }
.chips button[aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.shops { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.shop { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-decoration: none; color: var(--ink); }
.shop b { font-size: 16px; } .open { color: var(--ok); font-weight: 600; } .closed { color: var(--bad); font-weight: 600; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
@media (max-width: 420px) { .products { grid-template-columns: 1fr 1fr; } }
.prod { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.prod img, .prod .ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #f1f5f9; }
.prod .ph { display: grid; place-items: center; color: var(--muted); font-size: 28px; font-weight: 700; }
.prod__name { font-weight: 600; font-size: 14px; } :is(#app, .prod-dialog) .price { font-weight: 800; } :is(#app, .prod-dialog) .old { color: var(--muted); text-decoration: line-through; font-size: 12px; margin-left: 4px; }
.prod .btn { margin-top: auto; }
.lines { display: grid; gap: 8px; } .line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
:is(#app, .prod-dialog) .qty { display: inline-flex; align-items: center; gap: 8px; } :is(#app, .prod-dialog) .qty button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; font-size: 18px; cursor: pointer; }
.totals { display: grid; gap: 4px; margin: 10px 0; } .totals div { display: flex; justify-content: space-between; } .totals .total { font-size: 18px; font-weight: 800; }
label.f { display: grid; gap: 4px; margin-bottom: 12px; font-weight: 600; font-size: 14px; } label.f small { font-weight: 400; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } @media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.pay { display: grid; gap: 8px; } .pay label { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 600; cursor: pointer; }
.pay input { width: auto; margin-top: 3px; } .pay small { display: block; font-weight: 400; color: var(--muted); }
.pay label.disabled { opacity: .55; cursor: not-allowed; }
.map { position: relative; height: 260px; border-radius: 12px; overflow: hidden; background: #e5e7eb; touch-action: none; cursor: grab; border: 1px solid var(--line); }
.map__tiles img { position: absolute; width: 256px; height: 256px; user-select: none; pointer-events: none; }
.map__pin { position: absolute; left: 50%; top: 50%; width: 30px; height: 42px; transform: translate(-50%, -100%); pointer-events: none;
  background: radial-gradient(circle at 50% 35%, #fff 0 5px, transparent 6px), var(--bad); clip-path: path('M15 42 C15 42 0 24 0 15 A15 15 0 1 1 30 15 C30 24 15 42 15 42 Z'); filter: drop-shadow(0 2px 2px rgba(0,0,0,.4)); }
.map__z { position: absolute; right: 8px; top: 8px; width: 34px; height: 34px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; font-size: 20px; cursor: pointer; }
.map__z--out { top: 48px; } .map__attr { position: absolute; right: 4px; bottom: 2px; font-size: 10px; background: rgba(255,255,255,.8); padding: 0 4px; color: #333; }
.pin-box { text-align: center; padding: 18px; border: 2px dashed var(--brand); border-radius: 12px; background: #f0fdfa; }
.pin-box .pin { font: 800 40px/1.1 ui-monospace, monospace; letter-spacing: 8px; color: var(--brand-2); }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; } .timeline li { padding-left: 18px; position: relative; } .timeline li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.banner { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; border: 1px solid #fde68a; background: #fffbeb; }
.err { color: var(--bad); min-height: 1.2em; margin: 4px 0; }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px; background: var(--card); border-top: 1px solid var(--line); z-index: 9; }
.toasts { position: fixed; right: 12px; bottom: 70px; display: grid; gap: 8px; z-index: 20; pointer-events: none; }
#toasts .toast { background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; max-width: 340px; } #toasts .toast--ok { background: var(--ok); } #toasts .toast--error { background: var(--bad); }
.map--view { cursor: default; touch-action: auto; height: 220px; }
.map__mark { position: absolute; width: 18px; height: 18px; border-radius: 50%; transform: translate(-50%, -50%); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); }
.map__mark--driver { background: var(--brand); width: 22px; height: 22px; } .map__mark--home { background: var(--bad); }
.live { display: grid; gap: 8px; } .live__eta { font-size: 18px; font-weight: 800; color: var(--brand-2); }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }

.report-box { margin: 10px 0; } .report-box summary { list-style: none; display: inline-flex; } .report-box summary::-webkit-details-marker { display: none; }
.report-box[open] summary { margin-bottom: 8px; }

.terms { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 14px; margin: 8px 0 12px; } .terms input { width: auto; margin-top: 4px; }

/* ---- integrated marketplace: shop identity, reception modes, product details, shared header */
.mono { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 800; font-size: 20px; }
.mono--lg { width: 72px; height: 72px; font-size: 32px; border-radius: 16px; }
.shop { gap: 8px; transition: box-shadow .15s, border-color .15s; } .shop:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(15, 23, 42, .08); }
.shop__head { display: flex; gap: 10px; align-items: center; } .shop__id { display: grid; gap: 2px; min-width: 0; } .shop__addr { overflow-wrap: anywhere; }
.modes { display: flex; flex-wrap: wrap; gap: 6px; }
.mode-badge { padding: 3px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #ecfdf5; color: var(--ok); border: 1px solid #a7f3d0; }
.mode-badge--off { background: #f8fafc; color: var(--muted); border-color: var(--line); }
.store-head { display: flex; gap: 14px; align-items: center; } .store-head h1 { margin: 0 0 4px; } .store-head__info { display: grid; gap: 6px; min-width: 0; } .store-head p { margin: 0; }
.prod__open { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 8px; } .prod__open img, .prod__open .ph { display: block; }
.prod-dialog { width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border: 0; border-radius: 16px; padding: 18px; box-shadow: 0 10px 40px rgba(15, 23, 42, .3); }
.prod-dialog::backdrop { background: rgba(15, 23, 42, .5); }
.prod-dialog img, .prod-dialog .ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: #f1f5f9; }
.prod-dialog .ph { display: grid; place-items: center; font-size: 48px; font-weight: 800; color: var(--muted); }
.prod-dialog__x { float: inline-end; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 22px; cursor: pointer; }
.top__nav a { padding: 8px 4px; } .top__nav a[aria-current="page"]:not(.cart-link) { color: var(--brand); box-shadow: inset 0 -2px 0 var(--brand); }
.cart-link { padding: 8px 12px !important; }
@media (max-width: 560px) { .top { flex-wrap: wrap; } .top__nav { gap: 8px; font-size: 13px; } .store-head { align-items: flex-start; } }
.prod__open .ph { display: grid; } main:has(.sticky-cta) { padding-bottom: 96px; }
main:focus { outline: none; }
/* Marketplace inside the site shell (/marche/): keep the site typography and width. */
body.is-market { font-family: var(--font, system-ui); background: var(--page, #f1f1f2); }
body.is-market main.dm-market { max-width: 1184px; margin: 0 auto; padding: 16px; min-height: 60vh; }
#app:focus { outline: none; }
/* Reception modes: the radio keeps its own size (the scoped "#app input { width: 100% }" must not stretch it). */
#app .dm-mode label { align-items: flex-start; }
#app .dm-mode input[type=radio] { width: auto; flex: none; margin: 4px 0 0; padding: 0; }
#app .dm-mode label > span { flex: 1; min-width: 0; }
/* Live address search (checkout map) */
#app .addr-search { position: relative; margin-bottom: 10px; }
#app .addr-list { position: absolute; z-index: 30; inset-inline: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 23, 42, .15); max-height: 260px; overflow-y: auto; }
#app .addr-list[hidden] { display: none; }
#app .addr-list li { padding: 10px 12px; border-radius: 8px; cursor: pointer; min-height: 40px; }
#app .addr-list li:hover, #app .addr-list li[aria-selected="true"] { background: #f0fdfa; color: var(--brand-2); }
#app .addr-note { margin: 4px 0 0; min-height: 1em; }
#app .geo-note { margin: 6px 0; } #app .geo-note--warn { color: #92400e; } #app .geo-note--bad { color: var(--bad); }

/* Google Maps links */
#app .gmaps-link, .prod-dialog .gmaps-link { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; font-weight: 600; font-size: 13px; color: var(--brand); }
/* Shop card = card link + its Google Maps link (outside the card link) */
#app .shop-card { display: grid; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: box-shadow .15s, border-color .15s; }
#app .shop-card:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(15, 23, 42, .08); }
#app .shop-card .shop { border: 0; border-radius: 12px 12px 0 0; box-shadow: none; padding-bottom: 6px; }
#app .shop-card .gmaps-link { padding: 0 14px 12px; }

/* ---- Smart location picker: full screen on phones, large dialog on computers */
html.lp-open { overflow: hidden; }
.lp { padding: 0; border: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; background: #fff; color: var(--ink, #0f172a); display: grid; grid-template-rows: auto 1fr auto; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif; }
.lp::backdrop { background: rgba(15, 23, 42, .55); }
@media (min-width: 900px) { .lp { width: min(1000px, 94vw); height: min(760px, 92vh); margin: auto; border-radius: 18px; box-shadow: 0 20px 60px rgba(15, 23, 42, .35); overflow: hidden; } }
.lp-top { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; padding: calc(10px + env(safe-area-inset-top)) 12px 8px; background: #fff; box-shadow: 0 2px 10px rgba(15, 23, 42, .08); z-index: 3; }
.lp-back { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #e2e8f0; background: #fff; font-size: 20px; cursor: pointer; }
[dir=rtl] .lp-back { transform: scaleX(-1); }
.lp-search-box { position: relative; }
.lp-search { width: 100%; height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid #cbd5e1; background: #f8fafc; font: inherit; }
.lp-search:focus { outline: 3px solid #99f6e4; background: #fff; }
.lp-search-note { grid-column: 2; margin: 2px 6px 0; font-size: 13px; color: #64748b; min-height: 0; }
.lp-results { position: absolute; inset-inline: 0; top: 48px; margin: 0; padding: 6px; list-style: none; background: #fff; border-radius: 14px; box-shadow: 0 12px 30px rgba(15, 23, 42, .2); max-height: 50vh; overflow-y: auto; z-index: 5; }
.lp-results[hidden] { display: none; }
.lp-results li { display: grid; gap: 2px; padding: 12px; border-radius: 10px; cursor: pointer; }
.lp-results li:hover, .lp-results li[aria-selected="true"] { background: #f0fdfa; }
.lp-results li.is-out { opacity: .75; } .lp-results li small { color: #b45309; font-weight: 600; }
.lp-map-wrap { position: relative; min-height: 0; }
.lp-map { position: absolute; inset: 0; height: auto !important; border: 0 !important; border-radius: 0 !important; }
.lp-fab { position: absolute; inset-inline-end: 14px; bottom: 18px; width: 52px; height: 52px; border-radius: 50%; border: 0; background: #fff; color: #0f766e; font-size: 24px; box-shadow: 0 4px 14px rgba(15, 23, 42, .25); cursor: pointer; z-index: 2; }
.lp-fab[disabled] { opacity: .6; }
.lp-sheet { display: grid; gap: 6px; padding: 8px 16px calc(14px + env(safe-area-inset-bottom)); background: #fff; border-radius: 18px 18px 0 0; box-shadow: 0 -6px 20px rgba(15, 23, 42, .12); z-index: 3; max-height: 48vh; overflow-y: auto; }
.lp-grab { width: 44px; height: 5px; border-radius: 3px; background: #cbd5e1; margin: 2px auto 4px; }
.lp-sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lp-chip { padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.lp-chip--ok { background: #ecfdf5; color: #047857; } .lp-chip--bad { background: #fef2f2; color: #b91c1c; }
.lp-addr { margin: 0; font-weight: 600; font-size: 16px; } .lp-addr.is-loading { color: #64748b; font-weight: 400; }
.lp-coords { margin: 0; font-size: 12px; color: #64748b; direction: ltr; text-align: start; }
.lp-hint { margin: 0; font-size: 13px; color: #475569; }
.lp-recent-title { margin: 4px 0 2px; font-size: 13px; font-weight: 700; }
.lp-recent-list { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.lp-place { flex: none; max-width: 260px; padding: 8px 12px; border-radius: 99px; border: 1px solid #e2e8f0; background: #f8fafc; font: inherit; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.lp-consent { display: flex; gap: 6px; align-items: center; font-size: 13px; color: #475569; }
.lp-consent input { width: auto; }
.lp-confirm { min-height: 50px; border: 0; border-radius: 12px; background: #0f766e; color: #fff; font: 700 16px/1 inherit; cursor: pointer; }
.lp-confirm[disabled] { background: #94a3b8; cursor: not-allowed; }
#app .lp-open-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; margin: 6px 0 10px; border-radius: 12px; border: 2px solid var(--brand); background: #f0fdfa; color: var(--brand-2); font: 700 15px/1.2 inherit; cursor: pointer; }
#app .lp-open-btn::before { content: ''; width: 18px; height: 18px; background: currentColor; clip-path: path('M9 0a6.5 6.5 0 0 0-6.5 6.5C2.5 11.4 9 18 9 18s6.5-6.6 6.5-11.5A6.5 6.5 0 0 0 9 0Zm0 9a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5Z'); }
