body:not(.is-market), #app, .prod-dialog, #toasts, .lp { --brand: #c2410c; --brand-2: #9a3412; --accent: #f97316; --ink: #14213d; --muted: #5b6782; --line: #e3e7ef; --bg: #f6f7fb; --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'); }

/* ---------------------------------------------------------------- V9 marketplace home */
#app:has(.dm-hero) { max-width: 1240px; }
.dm-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; align-items: center; padding: 32px; margin: 8px 0 28px; border-radius: 28px; background: radial-gradient(120% 140% at 100% 0%, #fff1e6 0%, #fff 45%, #eef6ff 100%); border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(20, 33, 61, .06); }
#app .dm-hero h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.12; margin: 0 0 12px; letter-spacing: -.5px; color: var(--ink); }
.dm-hero__hl { color: #f97316; }
.dm-hero__lead { font-size: 17px; color: var(--muted); margin: 0 0 18px; max-width: 520px; }
#app .dm-hero__search { background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 6px; max-width: 560px; box-shadow: 0 4px 14px rgba(20, 33, 61, .06); }
#app .dm-hero__search input { border: 0; border-radius: 99px; padding-inline: 16px; }
#app .dm-hero__search input:focus { outline: none; }
#app .dm-hero__search:focus-within { outline: 3px solid #fed7aa; }
#app .dm-hero__search .btn { border-radius: 99px; padding-inline: 22px; }
.dm-hero__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
#app .dm-hero__actions .btn { border-radius: 99px; padding: 12px 20px; }
.dm-hero__art { position: relative; min-height: 300px; display: grid; place-items: end center; padding-bottom: 8px; }
.dm-hero__shop { position: relative; width: 210px; height: 190px; border-radius: 18px 18px 10px 10px; background: #fff; box-shadow: 0 20px 40px rgba(20, 33, 61, .14); }
.dm-hero__awning { position: absolute; inset: -18px -14px auto; height: 58px; border-radius: 14px 14px 26px 26px; background: repeating-linear-gradient(90deg, #f97316 0 30px, #fff 30px 60px); box-shadow: 0 6px 12px rgba(249, 115, 22, .25); }
.dm-hero__door { position: absolute; bottom: 0; left: 28px; width: 56px; height: 96px; border-radius: 8px 8px 0 0; background: #14213d; }
.dm-hero__window { position: absolute; bottom: 30px; right: 26px; width: 84px; height: 64px; border-radius: 10px; background: linear-gradient(135deg, #cfe9ff, #eef6ff); border: 4px solid #e3e7ef; }
.dm-hero__facts { position: absolute; inset-inline-end: 0; top: 0; list-style: none; margin: 0; padding: 12px 16px; background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 20px rgba(20, 33, 61, .08); font-size: 13px; font-weight: 600; display: grid; gap: 6px; }
.dm-hero__facts li { color: var(--ink); }
.dm-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 8px 0 14px; }
#app .dm-section-head h2 { font-size: 22px; margin: 0; }
.dm-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; margin-bottom: 32px; }
.dm-cat-tile { display: grid; justify-items: center; gap: 6px; padding: 18px 10px 14px; border-radius: 20px; border: 2px solid transparent; background: #fff; box-shadow: 0 2px 10px rgba(20, 33, 61, .05); font: inherit; color: var(--ink); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.dm-cat-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(20, 33, 61, .1); }
.dm-cat-tile[aria-pressed="true"] { border-color: #f97316; background: #fff7f0; }
.dm-cat-tile__ico { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: var(--tile, #fff4ec); }
.dm-cat-tile .ico { width: 30px; height: 30px; fill: none; stroke: var(--tile-ink, #c2410c); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dm-cat-tile__label { font-weight: 700; font-size: 14px; text-align: center; }
.dm-cat-tile__n { color: var(--muted); }
.cat--grocery, .cover--grocery { --tile: #ecfdf5; --tile-ink: #047857; }
.cat--restaurant, .cover--restaurant { --tile: #fff1e6; --tile-ink: #c2410c; }
.cat--perfume, .cover--perfume { --tile: #f3efff; --tile-ink: #6d28d9; }
.cat--beauty, .cover--beauty { --tile: #fff0f4; --tile-ink: #be185d; }
.cat--electronics, .cover--electronics { --tile: #eef4ff; --tile-ink: #1d4ed8; }
.cat--clothing, .cover--clothing { --tile: #eefaff; --tile-ink: #0e7490; }
.cat--other, .cover--other, .cat--all { --tile: #f1f3f8; --tile-ink: #14213d; }
.dm-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.dm-filter-pill { padding: 9px 14px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font: 600 13px inherit; color: var(--ink); cursor: pointer; }
.dm-filter-pill[aria-pressed="true"] { background: #14213d; border-color: #14213d; color: #fff; }
#app .dm-filter-select { width: auto; border-radius: 99px; padding: 8px 14px; font-size: 13px; font-weight: 600; }
.dm-store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.dm-store-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 2px 12px rgba(20, 33, 61, .05); transition: transform .15s, box-shadow .15s; }
.dm-store-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(20, 33, 61, .1); }
.dm-store-card__link { color: inherit; text-decoration: none; display: block; }
.dm-store-card__cover { position: relative; height: 110px; background: linear-gradient(135deg, var(--tile), #fff); display: grid; place-items: center; }
.dm-store-card__art { width: 64px; height: 64px; fill: none; stroke: var(--tile-ink); stroke-width: 1.3; opacity: .55; }
.dm-store-card__state { position: absolute; top: 10px; inset-inline-end: 10px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #fff; }
.dm-store-card__state.is-open { color: #047857; } .dm-store-card__state.is-closed { color: #b91c1c; }
.dm-store-card__body { position: relative; padding: 34px 16px 12px; display: grid; gap: 6px; }
.dm-store-card__body .mono { position: absolute; top: -28px; inset-inline-start: 16px; width: 56px; height: 56px; font-size: 22px; border: 4px solid #fff; background: #14213d; color: #fff; }
.dm-store-card__name { font-size: 17px; }
.dm-store-card__id { display: grid; gap: 2px; }
.dm-store-card__addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-store-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 16px 14px; margin-top: auto; border-top: 1px solid var(--line); }
.dm-empty { text-align: center; display: grid; gap: 10px; justify-items: center; }
/* product images: same frame everywhere, never stretched */
.prod img, .prod .ph { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; border-radius: 12px; }
@media (max-width: 760px) {
  .dm-hero { grid-template-columns: 1fr; padding: 22px 18px; border-radius: 22px; }
  .dm-hero__art { display: none; }
  .dm-cat-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .dm-cat-tile { padding: 12px 6px 10px; border-radius: 16px; }
  .dm-cat-tile__ico { width: 46px; height: 46px; border-radius: 14px; }
  .dm-cat-tile .ico { width: 24px; height: 24px; }
  .dm-cat-tile__label { font-size: 12.5px; }
}
/* V9 storefront + product cards */
#app:has(.store-head) { max-width: 1240px; }
.dm-store-cover { height: 140px; border-radius: 22px 22px 0 0; background: linear-gradient(135deg, var(--tile), #fff 70%); display: grid; place-items: center; border: 1px solid var(--line); border-bottom: 0; margin-top: 8px; }
.dm-store-cover .dm-store-card__art { width: 84px; height: 84px; }
.dm-store-cover + .store-head { border-radius: 0 0 22px 22px; margin-top: 0; box-shadow: 0 6px 18px rgba(20, 33, 61, .06); }
.store-head .mono--lg { background: #14213d; margin-top: -52px; border: 5px solid #fff; border-radius: 20px; }
.products { gap: 16px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.prod { border-radius: 18px; padding: 12px; transition: box-shadow .15s, transform .15s; }
.prod:hover { box-shadow: 0 10px 24px rgba(20, 33, 61, .1); transform: translateY(-2px); }
.prod__name { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.prod .price { color: #14213d; font-weight: 800; font-size: 16px; }
.prod-dialog img { object-fit: contain; background: #fff; }
.dm-store-cover + .store-head { align-items: flex-start; }
.dm-store-cover + .store-head .mono--lg { margin-top: -56px; }
@media (min-width: 761px) { .sticky-cta { display: flex; justify-content: center; } .sticky-cta .btn { max-width: 420px; border-radius: 99px; } }
/* V9 cart organised by shop */
.dm-basket-note { background: #fff4ec; border: 1px solid #fed7aa; color: #7c2d12; padding: 10px 14px; border-radius: 14px; font-size: 14px; }
.dm-basket { border-radius: 20px; padding: 0; overflow: hidden; }
.dm-basket__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #f6f7fb; border-bottom: 1px solid var(--line); }
.dm-basket__head > div { flex: 1; min-width: 0; }
#app .dm-basket__head h2 { margin: 0; font-size: 17px; }
.dm-basket__head .mono { background: #14213d; }
.dm-basket .lines { padding: 4px 16px; }
.dm-basket__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
:is(#app, .prod-dialog) .qty button { color: #14213d; font: 700 18px/1 system-ui, sans-serif; display: inline-grid; place-items: center; padding: 0; }
/* V9 product choices (size / colour / volume, extras, pre-order date, rental dates) */
.dm-choice { border: 0; padding: 0; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dm-choice legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; padding: 0; }
.dm-pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 99px; cursor: pointer; font-size: 14px; background: #fff; }
.dm-pill:has(input:checked) { border-color: #f97316; background: #fff7f0; }
.dm-pill.is-off { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
#app .dm-pill input, .prod-dialog .dm-pill input { width: auto; margin: 0; accent-color: #c2410c; }
.dm-pill small { color: var(--muted); }
.dm-field { display: grid; gap: 4px; margin: 10px 0; font-size: 14px; font-weight: 600; }
.dm-rental { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.dm-rental p { grid-column: 1 / -1; }
.dm-facts { list-style: none; padding: 10px 12px; margin: 8px 0; background: #f6f7fb; border-radius: 12px; display: grid; gap: 4px; }
.dm-note { color: #9a3412; }
.prod-dialog { overflow-y: auto; }
:is(#app, .prod-dialog) .dm-pill input { width: auto; padding: 0; margin: 0; border: 0; accent-color: #c2410c; }
:is(#app, .prod-dialog) .dm-pill input:focus { outline: none; }
.dm-pill:has(input:focus-visible) { outline: 3px solid #fed7aa; }
.cat--bakery, .cover--bakery { --tile: #fff6e5; --tile-ink: #b45309; }
.cat--car_rental, .cover--car_rental { --tile: #eef1f7; --tile-ink: #14213d; }
/* V9 payment choice + result */
.dm-pay { display: grid; gap: 8px; }
.dm-pay .dm-pill { border-radius: 14px; }
.dm-paystatus { text-align: center; }
/* V9 classified ads */
.dm-ads { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.dm-ad { display: grid; gap: 6px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 18px; color: inherit; text-decoration: none; }
.dm-ad:hover { box-shadow: 0 10px 24px rgba(20, 33, 61, .1); }
.dm-ad img, .dm-ad .ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: #f1f3f8; }
.dm-ad .ph { display: grid; place-items: center; font-size: 32px; font-weight: 800; color: var(--muted); }
.dm-ad__title { line-height: 1.3; }
.dm-adpage__photos { display: flex; gap: 8px; overflow-x: auto; }
.dm-adpage__photos img { height: 260px; border-radius: 14px; object-fit: contain; background: #f6f7fb; }
.dm-adpage__desc { white-space: pre-wrap; }
/* V9 product labels + filters */
.dm-badges { display: flex; flex-wrap: wrap; gap: 4px; min-height: 20px; }
.dm-badge { padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: #f1f3f8; color: #14213d; }
.dm-badge--promo { background: #fee2e2; color: #b91c1c; }
.dm-badge--new { background: #e0f2fe; color: #075985; }
.dm-badge--low { background: #fff4ec; color: #9a3412; }
.dm-badge--tag { background: #ecfdf5; color: #065f46; }
.dm-pfilters { display: grid; gap: 8px; margin-bottom: 14px; }
.dm-range { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
#app .dm-price { width: 100px; border-radius: 99px; padding: 8px 12px; font-size: 13px; }
.dm-tag-suggest { margin: -4px 0 10px; }

/* ---- checkout: delivery point (draft → confirmed), GPS accuracy, location states */
#app .loc-gps { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; font-weight: 700; }
#app .loc-gps::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 3px solid currentColor; box-sizing: border-box; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 6px currentColor; }
#app .loc-gps[disabled]::before { animation: loc-spin 1s linear infinite; border-top-color: transparent; box-shadow: none; }
@keyframes loc-spin { to { transform: rotate(360deg); } }
#app .geo-note--loading { color: var(--muted); } #app .geo-note--ok { color: #047857; }
#app .loc-box { display: grid; gap: 6px; margin: 10px 0 14px; padding: 12px 14px; border-radius: 12px; border: 1px dashed #cbd5e1; background: #f8fafc; }
#app .loc-box--todo { border: 2px solid #f59e0b; background: #fffbeb; }
#app .loc-box--ok { border: 2px solid #10b981; background: #ecfdf5; }
#app .loc-box b { font-size: 15px; }
#app .loc-box .loc-confirm { justify-self: start; min-height: 46px; }
#app .loc-acc { justify-self: start; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: #e2e8f0; color: #334155; }
#app .loc-acc--good { background: #d1fae5; color: #065f46; } #app .loc-acc--ok { background: #fef3c7; color: #92400e; } #app .loc-acc--bad { background: #fee2e2; color: #991b1b; }
@media (max-width: 560px) { #app .loc-box .loc-confirm, #app .loc-gps { width: 100%; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { #app .loc-gps[disabled]::before { animation: none; } }

/* ---- checkout map: modern, same look as the driver map (big map, floating glass tools, round buttons) */
#app .ck-map { --ck-glass: rgba(255,255,255,.94); --ck-shadow: 0 10px 28px rgba(20,33,61,.20), 0 2px 6px rgba(20,33,61,.10);
  position: relative; margin: 6px 0 12px; border-radius: 22px; box-shadow: 0 6px 22px rgba(20,33,61,.12); }
#app .ck-map > .map { height: clamp(340px, 56vh, 520px); border: 0; border-radius: 22px; }
#app .ck-map .map__pin { width: 36px; height: 50px; filter: drop-shadow(0 4px 4px rgba(0,0,0,.35)); clip-path: path('M18 50 C18 50 0 29 0 18 A18 18 0 1 1 36 18 C36 29 18 50 18 50 Z');
  background: radial-gradient(circle at 50% 36%, #fff 0 6px, transparent 7px), #c2410c; }
#app .ck-map .map::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 6px; margin: -3px 0 0 -7px; border-radius: 50%; background: rgba(0,0,0,.28); pointer-events: none; }
/* round zoom buttons on the right */
#app .ck-map .map__z { top: auto; right: 12px; bottom: 132px; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--ck-glass); color: #14213d; box-shadow: var(--ck-shadow); font: 600 22px/1 system-ui, sans-serif; }
#app .ck-map .map__z--out { bottom: 78px; }
#app .ck-map .map__attr { right: 12px; bottom: 4px; z-index: 5; border-radius: 6px; }
/* search on top */
#app .ck-map__top { position: absolute; z-index: 5; top: 12px; left: 12px; right: 12px; }
#app .ck-map__top .addr-search { margin: 0; }
#app .ck-map__top input[type=search] { min-height: 48px; padding-inline: 16px; border: 0; border-radius: 99px; background: var(--ck-glass); box-shadow: var(--ck-shadow); font-size: 15px; }
#app .ck-map__top .addr-note:empty { display: none; }
#app .ck-map__top .addr-note { display: inline-block; margin: 6px 0 0; padding: 4px 10px; border-radius: 99px; background: var(--ck-glass); box-shadow: var(--ck-shadow); }
/* full-screen button (top right, under the search) */
#app .ck-map__tools { position: absolute; z-index: 4; right: 12px; top: 72px; }
#app .ck-map .lp-open-btn { width: 46px; height: 46px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 50%; background: var(--ck-glass); color: #14213d; box-shadow: var(--ck-shadow); }
#app .ck-map .lp-open-btn::before { width: 20px; height: 20px; clip-path: path('M1 7V1h6v2.4H3.4V7Zm12 0V3.4h-3.6V1H15v6ZM1 19v-6h2.4v3.6H7V19Zm12 0v-2.4h3.6V13H19v6Z'); }
#app .lp-open-btn__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* « Utiliser ma position » pill + hint at the bottom */
#app .ck-map__bottom { position: absolute; z-index: 4; left: 12px; bottom: 14px; right: 70px; }
#app .ck-map .loc-gps { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px 0 14px; border: 0; border-radius: 99px; background: #14213d; color: #fff; box-shadow: var(--ck-shadow); font: 700 15px/1 inherit; cursor: pointer; width: auto; }
#app .ck-map .loc-gps::before { border-color: #93c5fd; box-shadow: inset 0 0 0 2px #14213d, inset 0 0 0 6px #93c5fd; }
#app .ck-map .loc-gps[disabled] { opacity: .85; }
#app .ck-map__hint { position: absolute; z-index: 3; left: 50%; top: calc(50% + 16px); transform: translateX(-50%); padding: 4px 10px; border-radius: 99px; background: rgba(20,33,61,.82); color: #fff; font-size: 12px; white-space: nowrap; pointer-events: none; opacity: .9; }
@media (max-width: 400px) { #app .ck-map__hint { font-size: 11px; } }
[dir="rtl"] #app .ck-map .map__z, [dir="rtl"] #app .ck-map__tools { right: auto; left: 12px; }
[dir="rtl"] #app .ck-map__bottom { left: 70px; right: 12px; }
[dir="rtl"] #app .ck-map .map__attr { right: auto; left: 12px; }

/* ---- « Messages » page: my conversations with shops / drivers */
#app .msg-list { display: grid; gap: 8px; }
#app .msg-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line, #e3e7ef); color: inherit; text-decoration: none; }
#app .msg-row:hover { background: #f8fafc; }
#app .msg-row--new { border-color: #fdba74; background: #fffaf5; }
#app .msg-avatar { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #f97316; color: #fff; font-weight: 800; font-size: 19px; }
#app .msg-avatar--delivery { background: #2563eb; }
#app .msg-main { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
#app .msg-main small { color: var(--muted, #64748b); font-size: 12px; }
#app .msg-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #334155; font-size: 14px; }
#app .msg-row--new .msg-preview { font-weight: 700; color: #0f172a; }
#app .msg-side { display: grid; justify-items: end; gap: 4px; }
#app .msg-side small { color: var(--muted, #64748b); font-size: 12px; }
#app .msg-badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: #16a34a; color: #fff; font: 800 12px/22px system-ui, sans-serif; text-align: center; }

/* ---- product gallery (sheet) + full-screen viewer with zoom ---------------------------------------------- */
.prod-dialog .pg { position: relative; margin: 0 0 12px; border-radius: 14px; overflow: hidden; background: #fff; }
.prod-dialog .pg-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.prod-dialog .pg-track::-webkit-scrollbar { display: none; }
.prod-dialog .pg-slide { flex: 0 0 100%; scroll-snap-align: center; padding: 0; border: 0; background: #fff; cursor: zoom-in; }
.prod-dialog .pg-slide img { display: block; margin: 0 auto; width: 100%; aspect-ratio: 4 / 5; max-height: min(62vh, 520px); object-fit: contain; border-radius: 0; background: #fff; }
.prod-dialog .pg-count { position: absolute; top: 10px; inset-inline-start: 10px; padding: 3px 10px; border-radius: 99px; background: rgba(20,33,61,.78); color: #fff; font: 700 12px/1.4 system-ui, sans-serif; }
.prod-dialog .pg-zoom { position: absolute; bottom: 10px; inset-inline-end: 10px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.92); color: #14213d; box-shadow: 0 2px 8px rgba(0,0,0,.18); pointer-events: none; font-size: 17px; }
.prod-dialog .pg-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.prod-dialog .pg-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: rgba(20,33,61,.3); pointer-events: auto; transition: width .2s ease; }
.prod-dialog .pg-dots button[aria-selected="true"] { width: 20px; background: #c2410c; }
.prod-dialog .pg-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: #14213d; font: 600 26px/1 system-ui, sans-serif; box-shadow: 0 2px 8px rgba(0,0,0,.2); cursor: pointer; display: none; }
.prod-dialog .pg-arrow[disabled] { opacity: .35; cursor: default; }
.prod-dialog .pg-arrow--prev { inset-inline-start: 8px; } .prod-dialog .pg-arrow--next { inset-inline-end: 8px; }
[dir="rtl"] .prod-dialog .pg-arrow { transform: translateY(-50%) scaleX(-1); }
@media (hover: hover) and (pointer: fine) { .prod-dialog .pg-arrow { display: grid; place-items: center; } }
/* sticky add-to-cart inside the sheet */
.prod-dialog .pd-actions { position: sticky; bottom: -18px; margin: 12px -18px -18px; padding: 10px 18px calc(14px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); box-shadow: 0 -6px 16px rgba(20,33,61,.06); }
.prod-dialog .pd-actions .err:empty { display: none; }
@media (max-width: 560px) {
  .prod-dialog { width: 100vw; max-width: 100vw; max-height: 94dvh; margin: auto 0 0; border-radius: 22px 22px 0 0; padding-bottom: 0; }
  .prod-dialog .pd-actions { bottom: 0; margin-bottom: 0; }
}
/* full-screen viewer */
html.gv-open { overflow: hidden; }
.gv { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #0b1220; color: #fff; overflow: hidden; }
.gv::backdrop { background: #0b1220; }
.gv-stage { position: absolute; inset: 0; display: grid; place-items: center; touch-action: none; cursor: zoom-in; user-select: none; }
.gv.is-zoomed .gv-stage { cursor: grab; }
.gv-img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center; will-change: transform; -webkit-user-drag: none; }
.gv-img.is-anim { transition: transform .22s ease; }
.gv-top { position: absolute; top: calc(env(safe-area-inset-top) + 10px); left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.gv-top > * { pointer-events: auto; }
.gv-count { padding: 5px 12px; border-radius: 99px; background: rgba(255,255,255,.14); font: 700 13px/1.3 system-ui, sans-serif; }
.gv-btn { display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font: 600 24px/1 system-ui, sans-serif; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.gv-btn:hover { background: rgba(255,255,255,.26); } .gv-btn[disabled] { opacity: .35; cursor: default; } .gv-btn[hidden] { display: none; }
.gv-close { font-size: 30px; }
.gv-prev, .gv-next { position: absolute; top: 50%; transform: translateY(-50%); }
.gv-prev { inset-inline-start: 10px; } .gv-next { inset-inline-end: 10px; }
[dir="rtl"] .gv-prev, [dir="rtl"] .gv-next { transform: translateY(-50%) scaleX(-1); }
.gv.is-zoomed .gv-prev, .gv.is-zoomed .gv-next { opacity: .3; }
.gv-zoom { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 18px); transform: translateX(-50%); display: flex; gap: 10px; padding: 6px; border-radius: 99px; background: rgba(255,255,255,.1); }
.gv-reset { width: auto; padding: 0 16px; border-radius: 99px; font-size: 14px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .gv-img.is-anim, .prod-dialog .pg-track, .prod-dialog .pg-dots button { transition: none; scroll-behavior: auto; } }
