/* Fusion shop — mobile-first. Brand colours come from the Fusion logo (blue → violet → pink → orange). */
:root {
  --blue: #2f7bf5; --violet: #5b4cf0; --violet-d: #4a3bdb; --pink: #e9407a; --orange: #f59e0b;
  --ok: #16a34a; --warn: #d97706; --bad: #dc2626; --wa: #25d366; --wa-d: #128c4b;
  --grad: linear-gradient(120deg, #2f7bf5 0%, #6d3de8 38%, #e9407a 72%, #f59e0b 100%);
  --bg: #f5f6fb; --surface: #fff; --surface-2: #f8f9fd; --line: #e4e7f0; --text: #141829; --muted: #6b7186;
  --soft: #eeebff; --shadow: 0 1px 2px rgba(20,24,41,.05), 0 8px 24px -8px rgba(20,24,41,.12);
  --shadow-lg: 0 24px 60px -20px rgba(40,30,120,.35);
  --r: 16px; --r-sm: 10px; --ease: cubic-bezier(.2,.8,.2,1); --gutter: 16px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0c0e1b; --surface: #151a2e; --surface-2: #1b2139; --line: #262d4b; --text: #eceef8; --muted: #959bb7; --soft: #26215a;
          --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -10px rgba(0,0,0,.6); color-scheme: dark; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5;
       padding-bottom: calc(70px + env(safe-area-inset-bottom)); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }

/* ---------- header ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 82%, transparent);
          backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); }
.topbar__in { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; min-width: 0; }
.brand img { width: 34px; height: 34px; transition: transform .6s var(--ease); }
.brand:hover img { transform: rotate(-12deg) scale(1.08); }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search { flex: 1; display: none; position: relative; }
.search input { width: 100%; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); padding: 0 16px 0 40px; outline: none; transition: border-color .2s, box-shadow .2s; }
.search input:focus { border-color: var(--violet); box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 18%, transparent); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; color: var(--muted); }
.top-actions { margin-left: auto; display: flex; gap: 6px; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 12px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; transition: background .2s, transform .15s; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 22px; height: 22px; }
.badge-count { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--grad); color: #fff;
               font-size: 11px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.badge-count:empty, .badge-count[data-count="0"] { display: none; }
.bump { animation: bump .5s var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 30% { transform: scale(1.45); } 60% { transform: scale(.9); } 100% { transform: scale(1); } }

/* mobile bottom navigation */
.tabbar { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
          background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
          border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
.tabbar a, .tabbar button { display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); background: none; border: 0; padding: 4px; position: relative; cursor: pointer; }
.tabbar svg { width: 22px; height: 22px; }
.tabbar .active { color: var(--violet); }
.tabbar .badge-count { top: 0; right: calc(50% - 22px); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; margin: 16px 0 8px; border-radius: 24px; padding: 28px 22px; color: #fff; background: #0f1226; isolation: isolate; }
.hero h1 { font-size: clamp(26px, 7vw, 44px); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 10px; max-width: 14ch; }
.hero p { margin: 0 0 18px; color: #c9cce6; max-width: 46ch; }
.hero .blob { position: absolute; z-index: -1; width: 340px; height: 340px; border-radius: 50%; filter: blur(60px); opacity: .7; animation: float 14s ease-in-out infinite alternate; }
.hero .b1 { background: #2f7bf5; top: -120px; right: -80px; }
.hero .b2 { background: #e9407a; bottom: -160px; right: 20%; animation-delay: -5s; }
.hero .b3 { background: #f59e0b; top: 30%; right: -140px; width: 240px; height: 240px; animation-delay: -9s; }
@keyframes float { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(-40px, 30px) scale(1.12); } 100% { transform: translate(30px,-20px) scale(.95); } }
.hero-search { display: flex; gap: 8px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 16px; padding: 6px; max-width: 520px; }
.hero-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff; padding: 0 10px; }
.hero-search input::placeholder { color: #c9cce6; }
.hero-logo { display: none; }

/* ---------- chips / toolbar ---------- */
.toolbar { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 14px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; margin: 0 calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { scroll-snap-align: start; flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13.5px; transition: all .2s var(--ease); white-space: nowrap; }
.chip:hover { border-color: var(--violet); color: var(--violet); }
.chip.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.select { height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 0 12px; }

/* ---------- product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
        box-shadow: var(--shadow); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--violet) 35%, var(--line)); }
.card__img { position: relative; aspect-ratio: 1; background: var(--surface-2); overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__img img { transform: scale(1.06); }
.card__ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 34px; font-weight: 800; color: var(--violet); background: var(--soft); }
.card__body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card__name { font-weight: 700; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.card__meta { font-size: 12px; color: var(--muted); }
.card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-top: 6px; }
.price { font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.price small { font-size: 11px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.add-btn { width: 40px; height: 40px; flex: none; border-radius: 12px; border: 0; background: var(--grad); background-size: 200% 200%; color: #fff; display: grid; place-items: center; cursor: pointer;
           box-shadow: 0 6px 16px -6px rgba(91,76,240,.7); transition: transform .2s var(--ease), background-position .6s; }
.add-btn:hover { background-position: 100% 0; transform: translateY(-1px); }
.add-btn:active { transform: scale(.9); }
.add-btn svg { width: 20px; height: 20px; transition: transform .3s var(--ease); }
.add-btn.done svg { transform: rotate(360deg); }
.add-btn:disabled { background: var(--line); box-shadow: none; cursor: not-allowed; color: var(--muted); }

/* availability badge with pulsing dot */
.stock { position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
         background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.stock i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; position: relative; }
.stock i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; animation: ping 1.8s cubic-bezier(0,0,.2,1) infinite; }
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }
.stock.in_stock { color: var(--ok); } .stock.low { color: var(--warn); } .stock.out { color: var(--bad); } .stock.out i::after { animation: none; }
.stock.on_order { color: var(--violet); } .stock.unavailable { color: var(--muted); } .stock.unavailable i::after { animation: none; }
.left-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.stock-inline { position: static; background: var(--surface-2); }

/* ---------- reveal on scroll ---------- */
.reveal { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise { from { opacity: .35; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
       font-weight: 700; cursor: pointer; transition: transform .15s, box-shadow .25s, background .25s; position: relative; overflow: hidden; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--grad); background-size: 200% 200%; color: #fff; border: 0; box-shadow: 0 10px 24px -10px rgba(91,76,240,.8); }
.btn-primary:hover { background-position: 100% 0; }
.btn-dark { background: var(--text); color: var(--surface); border: 0; }
.btn-block { width: 100%; }
.btn.loading { pointer-events: none; color: transparent; }
.btn.loading::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 700; color: var(--muted); }
.input { width: 100%; height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 0 14px; outline: none; transition: border-color .2s, box-shadow .2s; font-size: 16px; }
textarea.input { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; }
.input:focus { border-color: var(--violet); box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 16%, transparent); }
.error { color: var(--bad); font-size: 13px; font-weight: 600; }
.row2 { display: grid; gap: 0 12px; grid-template-columns: 1fr; }

/* qty stepper */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.stepper button { width: 40px; height: 40px; border: 0; background: transparent; font-size: 20px; cursor: pointer; transition: background .2s; }
.stepper button:hover { background: var(--surface-2); }
.stepper input { width: 52px; height: 40px; text-align: center; border: 0; background: transparent; font-weight: 700; outline: none; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ---------- panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 14px; }
.panel h2 { font-size: 17px; margin: 0 0 14px; letter-spacing: -.01em; }
.page-title { font-size: clamp(24px, 6vw, 34px); letter-spacing: -.03em; margin: 22px 0 6px; }
.totals { display: grid; gap: 6px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-size: 20px; font-weight: 800; padding-top: 8px; border-top: 1px dashed var(--line); margin-top: 4px; }

/* delivery choice cards */
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.choice label { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; cursor: pointer; display: grid; gap: 4px; transition: all .25s var(--ease); background: var(--surface); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label:has(input:checked) { border-color: var(--violet); background: var(--soft); box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 12%, transparent); }
.choice strong { font-size: 14px; } .choice span { font-size: 12.5px; color: var(--muted); }
.collapsible { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .35s var(--ease), opacity .35s; }
.collapsible > div { overflow: hidden; }
.collapsible.closed { grid-template-rows: 0fr; opacity: 0; }

/* ---------- cart lines ---------- */
.line { display: grid; grid-template-columns: 60px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); animation: slideIn .35s var(--ease) both; }
.line:last-child { border-bottom: 0; }
.line img, .line .thumb { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; background: var(--soft); display: grid; place-items: center; color: var(--violet); font-weight: 800; }
.line__name { font-weight: 700; font-size: 14px; line-height: 1.3; }
.line__sub { font-size: 12.5px; color: var(--muted); }
.line__right { text-align: right; display: grid; gap: 6px; justify-items: end; }
.short { color: var(--bad); font-size: 12px; font-weight: 700; }
@keyframes slideIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

/* ---------- drawer (bottom sheet on mobile, side panel on desktop) ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(10,12,28,.45); opacity: 0; pointer-events: none; transition: opacity .3s; backdrop-filter: blur(2px); }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; max-height: 88vh; background: var(--surface); border-radius: 24px 24px 0 0; box-shadow: 0 -20px 60px rgba(0,0,0,.25);
          transform: translateY(105%); transition: transform .45s var(--ease); display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }
.drawer.open { transform: none; }
.drawer__grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 10px auto 0; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; }
.drawer__head h3 { margin: 0; font-size: 18px; }
.drawer__body { overflow-y: auto; padding: 0 18px; flex: 1; overscroll-behavior: contain; }
.drawer__foot { padding: 14px 18px 18px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); }
.empty svg { width: 56px; height: 56px; margin: 0 auto 10px; color: var(--violet); opacity: .6; }

/* fly-to-cart ghost */
.fly { position: fixed; z-index: 80; width: 56px; height: 56px; border-radius: 14px; object-fit: cover; pointer-events: none; box-shadow: 0 10px 30px rgba(0,0,0,.25);
       transition: transform .75s cubic-bezier(.5,-0.3,.6,1), opacity .75s ease-in; }

/* toast */
.toasts { position: fixed; z-index: 90; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 380px); }
.toast { background: var(--text); color: var(--surface); padding: 12px 16px; border-radius: 14px; font-weight: 600; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center;
         animation: toastIn .4s var(--ease) both; }
.toast.out { animation: toastOut .3s ease-in both; }
.toast svg { width: 20px; height: 20px; color: #4ade80; flex: none; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

/* ---------- product page ---------- */
.pdp { display: grid; gap: 18px; margin-top: 14px; }
.gallery { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 20px; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
.gallery::-webkit-scrollbar { display: none; }
.gallery img, .gallery .card__ph { flex: none; width: 100%; aspect-ratio: 1; object-fit: cover; scroll-snap-align: center; border-radius: 20px; background: var(--surface-2); }
.pdp h1 { font-size: clamp(22px, 6vw, 34px); line-height: 1.15; letter-spacing: -.02em; margin: 6px 0; }
.pdp .price { font-size: 28px; }
.desc { color: var(--muted); white-space: pre-line; }
.buybar { position: sticky; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 30; display: flex; gap: 10px; align-items: center; padding: 12px; margin: 0 calc(-1 * var(--gutter));
          background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.buybar .btn { flex: 1; }

/* ---------- order tracking ---------- */
.success { text-align: center; padding: 26px 10px 10px; }
.check { width: 84px; height: 84px; margin: 0 auto 14px; }
.check circle { stroke: var(--ok); stroke-width: 3; fill: none; stroke-dasharray: 166; stroke-dashoffset: 166; animation: draw .7s var(--ease) forwards; }
.check path { stroke: var(--ok); stroke-width: 4; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; animation: draw .45s .55s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { position: relative; padding: 0 0 18px 34px; color: var(--muted); font-weight: 600; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); transition: all .4s; }
.timeline li::after { content: ""; position: absolute; left: 9px; top: 22px; bottom: -1px; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.done { color: var(--text); }
.timeline li.done::before { background: var(--grad); border-color: transparent; box-shadow: 0 0 0 4px var(--soft); }
.timeline li.done::after { background: linear-gradient(var(--violet), var(--pink)); }
.timeline li.current::before { animation: pulseRing 1.6s infinite; }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--violet) 50%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--violet); }
.pill.cancelled, .pill.rejected { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.pill.delivered, .pill.shipped { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }

/* ---------- portal ---------- */
.auth-wrap { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 24px 0; }
.auth { width: 100%; max-width: 420px; position: relative; }
.auth::before { content: ""; position: absolute; inset: -40px -20px; z-index: -1; background: var(--grad); filter: blur(70px); opacity: .25; border-radius: 50%; animation: float 12s ease-in-out infinite alternate; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.kpi b { display: block; font-size: 22px; letter-spacing: -.02em; }
.kpi span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi.hl { background: var(--grad); color: #fff; border: 0; grid-column: 1 / -1; }
.kpi.hl span { color: rgba(255,255,255,.85); }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); transition: background .2s; }
.list-row:last-child { border-bottom: 0; }
.amount-neg { color: var(--ok); } .amount-pos { color: var(--text); }
.tabs { display: flex; gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 12px; margin-bottom: 14px; }
.tabs button { flex: 1; height: 38px; border: 0; border-radius: 9px; background: transparent; font-weight: 700; color: var(--muted); cursor: pointer; transition: all .25s var(--ease); }
.tabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
[data-tab-panel][hidden] { display: none; }

/* ---------- footer, pagination, flash ---------- */
.foot { margin-top: 40px; padding: 26px 0 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.foot strong { color: var(--text); }
.pager { display: flex; justify-content: center; gap: 8px; margin: 26px 0 8px; }
.pager a, .pager span { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; padding: 0 10px; }
.pager .on { background: var(--text); color: var(--surface); }
.alert { border-radius: 14px; padding: 12px 14px; background: color-mix(in srgb, var(--bad) 10%, var(--surface)); color: var(--bad); font-weight: 600; margin: 12px 0; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 0%, var(--line) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- larger screens ---------- */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .row2 { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .kpi.hl { grid-column: auto; }
  .toolbar { flex-direction: row; align-items: center; justify-content: space-between; }
  .chips { margin: 0; padding-inline: 0; }
  .card__name { font-size: 15px; }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .search { display: block; max-width: 460px; margin: 0 auto; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .hero { padding: 52px 48px; margin-top: 24px; }
  .hero-logo { display: block; position: absolute; right: 56px; top: 50%; width: 180px; transform: translateY(-50%); filter: drop-shadow(0 20px 40px rgba(0,0,0,.4)); animation: bob 6s ease-in-out infinite; }
  @keyframes bob { 50% { transform: translateY(calc(-50% - 12px)) rotate(-4deg); } }
  .pdp { grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
  .gallery { margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; }
  .buybar { position: static; margin: 18px 0 0; padding: 0; background: none; border: 0; backdrop-filter: none; }
  .two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
  .sticky { position: sticky; top: 84px; }
  .drawer { left: auto; top: 0; bottom: 0; width: 420px; max-height: none; border-radius: 24px 0 0 24px; transform: translateX(105%); }
  .drawer__grip { display: none; }
  .toasts { bottom: 24px; left: auto; right: 24px; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- payment ---------- */
.choice--stack { grid-template-columns: 1fr !important; }
.pay-box { margin: 16px 0 0; padding: 14px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); }
.pay-box.pay-paid { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.pay-box.pay-failed { border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.iban { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0 0; font-size: 14px; }
.iban dt { color: var(--muted); } .iban dd { margin: 0; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }

/* ---------- loyalty card (portal) ---------- */
.loyalty-card { position: relative; max-width: 360px; aspect-ratio: 85.6 / 54; margin: 0 auto 14px; padding: 16px; border-radius: 16px; color: #fff; background: var(--grad); box-shadow: var(--shadow-lg); display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr auto; gap: 6px 12px; overflow: hidden; }
.loyalty-card__brand { display: flex; align-items: center; gap: 8px; grid-column: 1 / -1; }
.loyalty-card__brand img { border-radius: 8px; background: #fff; padding: 3px; }
.loyalty-card__name { font-weight: 700; font-size: 17px; align-self: end; }
.loyalty-card__points span { font-size: 26px; font-weight: 800; }
.loyalty-card__qr { grid-column: 2; grid-row: 2 / 4; align-self: end; width: 96px; height: 96px; background: #fff; border-radius: 10px; padding: 6px; }

/* ---------- phase 7: WhatsApp, info page ---------- */
.tabbar a { min-width: 0; white-space: nowrap; }
/* floating WhatsApp button: above the tab bar (and the product buy bar), clear of the iPhone home indicator */
.wa-fab { position: fixed; z-index: 44; right: max(14px, env(safe-area-inset-right)); bottom: calc(80px + env(safe-area-inset-bottom));
          width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--wa);
          box-shadow: 0 10px 24px -8px rgba(18,140,75,.65), 0 0 0 3px color-mix(in srgb, var(--surface) 70%, transparent);
          transition: transform .2s var(--ease), box-shadow .25s; animation: rise .5s .4s var(--ease) both; }
.wa-fab:hover { transform: translateY(-2px) scale(1.04); }
.wa-fab:active { transform: scale(.94); }
body:has(.buybar) .wa-fab { bottom: calc(150px + env(safe-area-inset-bottom)); }
.btn-wa { background: var(--wa); color: #fff; border: 0; }
.btn-wa:hover { background: var(--wa-d); }
.wa-hint { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; margin-top: 14px; padding: 12px 14px; border-radius: var(--r-sm);
           border: 1px solid color-mix(in srgb, var(--wa) 40%, var(--line)); background: color-mix(in srgb, var(--wa) 8%, var(--surface)); transition: border-color .2s; }
.wa-hint:hover { border-color: var(--wa); }
.wa-hint strong { display: block; font-size: 14px; }
.wa-hint .muted { font-size: 12.5px; }
.wa-hint__icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--wa); color: #fff; }
.info-grid { display: grid; gap: 14px; margin-top: 14px; }
.info-grid .panel + .panel { margin-top: 0; }
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.info-list li:last-child { border-bottom: 0; }
.contact-actions { display: grid; gap: 10px; }
.contact-actions .btn { justify-content: flex-start; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.foot-links a { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 640px) {
  .info-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (min-width: 900px) {
  .wa-fab, body:has(.buybar) .wa-fab { bottom: 24px; right: 24px; }
  body:has(.wa-fab) .toasts { bottom: 90px; }
}
