/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
  transition: transform 0.15s var(--ease), box-shadow 0.25s, background 0.25s, opacity 0.2s;
  cursor: pointer;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn--lg { min-height: 52px; font-size: 15.5px; border-radius: 14px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--grad-aqua); color: var(--on-accent); box-shadow: var(--glow); }
.btn--primary:hover { box-shadow: 0 0 0 1px rgba(0, 242, 254, 0.5), 0 12px 34px -6px rgba(0, 242, 254, 0.6); }
.btn--wa { background: var(--wa); color: #fff; box-shadow: var(--glow-wa); }
.btn--cta { background: var(--cta); color: #fff; box-shadow: 0 8px 20px -8px rgba(242, 107, 29, 0.55); }
.btn--cta:hover { background: var(--cta-hover); }
.btn--wa:hover { background: var(--wa-hover); }
.btn--glass { background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn--ghost { background: transparent; border: 1px solid var(--line-soft); color: var(--muted); }
.btn--ghost:hover { color: var(--text); border-color: var(--muted-2); }
.btn--danger { background: var(--red-soft); color: var(--red); border: 1px solid rgba(255, 92, 122, 0.3); }
.btn--add { background: var(--aqua-soft); color: var(--aqua); border: 1px solid var(--line); }
.btn--add:hover { background: rgba(0, 242, 254, 0.2); }
.btn--add.btn--lg { background: var(--grad-aqua); color: var(--on-accent); box-shadow: var(--glow); border: 0; }
.btn--shine { position: relative; overflow: hidden; }
.btn--shine::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: shine 3.2s ease-in-out infinite 1s;
}

.icon-btn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line-soft);
  font-size: 18px;
  transition: background 0.2s, transform 0.15s;
}
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn--aqua { background: var(--aqua-soft); color: var(--aqua); border-color: var(--line); }
.icon-btn--wa { background: rgba(37, 211, 102, 0.14); color: var(--wa); border-color: rgba(37, 211, 102, 0.3); }
.link { color: var(--aqua); text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }

/* ── Badges & pills ─────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.3;
}
.badge--deal { background: var(--amber); color: #1A1200; }
.badge--tag { background: rgba(10, 15, 29, 0.78); color: #00F2FE; border: 1px solid var(--line); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.badge--new { background: var(--grad-aqua); color: var(--on-accent); }
.stock {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  font-size: 10.5px; font-weight: 600;
  background: rgba(10, 15, 29, 0.78);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.stock::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.stock--in { color: var(--green); }
.stock--out { color: var(--red); }
/* On top of a photo the chip stays dark, so use the bright status colours in both themes */
.pcard__media .stock--in { color: #34D399; }
.pcard__media .stock--out { color: #FF5C7A; }
.chip {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--aqua-soft); color: var(--aqua);
  font-size: 12px; font-weight: 600;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--aqua);
  text-transform: uppercase;
}
.pulse-dot {
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--aqua);
  vertical-align: middle;
  animation: ping-aqua 1.8s infinite;
}

/* ── Price ──────────────────────────────────────────────── */
.price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; }
.price strong { font-family: var(--font-head); font-size: 18px; font-weight: 700; color: var(--text); }
.price small { font-size: 11.5px; color: var(--muted); margin-left: -3px; }
.price s { font-size: 12px; color: var(--muted-2); }

/* ── Stepper ────────────────────────────────────────────── */
.stepper {
  display: inline-flex; align-items: center;
  height: 36px;
  border-radius: 10px;
  background: var(--grad-aqua);
  color: var(--on-accent);
  box-shadow: var(--glow);
  animation: pop 0.3s var(--ease);
}
.stepper button { display: grid; place-items: center; width: 34px; height: 100%; color: inherit; }
.stepper button svg { width: 16px; height: 16px; }
.stepper output { min-width: 22px; text-align: center; font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.stepper--lg { height: 52px; width: 100%; border-radius: 14px; justify-content: space-between; }
.stepper--lg button { width: 56px; }
.stepper--lg button svg { width: 20px; height: 20px; }
.stepper--lg output { font-size: 18px; }
.stepper--sm { height: 32px; margin-top: 8px; background: var(--surface-2); color: var(--text); box-shadow: none; border: 1px solid var(--line); animation: none; }
.stepper--sm button { color: var(--aqua); width: 32px; }

/* ── Tabs & chips ───────────────────────────────────────── */
.tabs {
  display: flex; gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 13.5px; font-weight: 600;
  white-space: nowrap;
  transition: all 0.25s var(--ease);
}
.tab small { font-size: 11px; opacity: 0.7; font-weight: 600; }
.tab.is-active {
  color: var(--text);
  background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--grad-aqua) border-box;
  border: 1px solid transparent;
  box-shadow: 0 0 18px -4px rgba(0, 242, 254, 0.55);
}
.tab.is-active::after {
  content: '';
  position: absolute; left: 22%; right: 22%; bottom: -1px;
  height: 2px; border-radius: 2px;
  background: var(--aqua);
  box-shadow: 0 0 10px var(--aqua);
}
.tab__alert { background: var(--red); color: #fff; border-radius: 9px; padding: 0 6px; opacity: 1 !important; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  padding: 8px 12px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  transition: all 0.2s;
}
.chip-btn small { margin-left: 6px; opacity: 0.7; }
.chip-btn.is-active { background: var(--aqua-soft); border-color: var(--aqua); color: var(--aqua); font-weight: 600; }

/* ── Search ─────────────────────────────────────────────── */
.search {
  display: flex; align-items: center; gap: 10px;
  height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  color: var(--muted);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search:focus-within { border-color: var(--aqua); box-shadow: 0 0 0 4px rgba(0, 242, 254, 0.12); }
.search svg { width: 18px; height: 18px; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; color: var(--text); font-size: 15px; }
.search input::placeholder { color: var(--muted-2); }
.search input::-webkit-search-cancel-button { display: none; }
.search__clear { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); }
.search__clear svg { width: 14px; height: 14px; }
.search--sm { height: 40px; flex: 1; }

/* ── Sheet (bottom sheet / dialog) ──────────────────────── */
.sheet-root { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.sheet-root:empty { display: none; }
.sheet-backdrop {
  position: absolute; inset: 0;
  background: var(--scrim);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.28s;
}
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 92dvh;
  display: flex; flex-direction: column;
  background: var(--bg-2);
  border-radius: 26px 26px 0 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  box-shadow: 0 -16px 50px -16px rgba(0, 0, 0, 0.55);
  transform: translateY(100%);
  transition: transform 0.38s var(--ease);
}
.sheet-root.is-open { pointer-events: auto; }
.sheet-root.is-open .sheet-backdrop { opacity: 1; }
.sheet-root.is-open .sheet { transform: none; }
.sheet__grip { width: 44px; height: 5px; border-radius: 3px; background: var(--muted-2); opacity: 0.5; margin: 10px auto 0; flex-shrink: 0; }
.sheet__close { position: absolute; top: 12px; right: 12px; z-index: 3; background: var(--chrome-bg); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.sheet__body {
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 14px var(--gutter) calc(24px + var(--safe-b));
}
@media (min-width: 768px) {
  .sheet {
    left: 50%; right: auto; bottom: auto; top: 50%;
    width: min(520px, calc(100% - 48px));
    max-height: 88dvh;
    border-radius: 24px;
    border-bottom: 1px solid var(--line);
    transform: translate(-50%, -46%) scale(0.96);
    opacity: 0;
    transition: transform 0.32s var(--ease), opacity 0.25s;
  }
  .sheet--wide { width: min(880px, calc(100% - 48px)); }
  .sheet-root.is-open .sheet { transform: translate(-50%, -50%); opacity: 1; }
  .sheet__grip { display: none; }
  .sheet__body { padding: 24px; }
}
.sheet-head { display: flex; align-items: center; gap: 12px; margin: 4px 48px 16px 0; }
.sheet-head h2 { font-size: 22px; }

/* ── Toast ──────────────────────────────────────────────── */
.toast-root {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottombar-h) + var(--safe-b) + 22px);
  transform: translateX(-50%);
  z-index: 80;
  width: min(calc(100% - 24px), 480px);
  pointer-events: none;
}
body[data-view="admin"] .toast-root { bottom: calc(20px + var(--safe-b)); }
html.has-sheet .toast-root { bottom: auto; top: calc(12px + env(safe-area-inset-top, 0px)); }
.toast {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px 12px 16px;
  border-radius: 14px;
  background: var(--toast-bg);
  color: var(--toast-text);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 14px; font-weight: 500;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.3s, transform 0.35s var(--ease);
}
.toast.is-in { opacity: 1; transform: none; }
.toast--success { border-color: rgba(52, 211, 153, 0.35); }
.toast--error { border-color: rgba(255, 92, 122, 0.45); }
.toast__action { flex-shrink: 0; color: #7DD3FC; font-weight: 700; font-size: 13.5px; padding: 6px 4px; }

/* ── Forms ──────────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0; }
.field i { font-style: normal; font-weight: 400; opacity: 0.7; }
.field input, .field select, .field textarea, .tool textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  color: var(--text);
  font-size: 16px; /* ≥16px stops iOS zooming on focus */
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea, .tool textarea { resize: vertical; min-height: 80px; line-height: 1.4; }
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.field input:focus, .field select:focus, .field textarea:focus, .tool textarea:focus { border-color: var(--aqua); box-shadow: 0 0 0 4px rgba(0, 242, 254, 0.12); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field .chips + input { margin-top: 10px; }
.field__err { font-style: normal; font-size: 12.5px; color: var(--red); min-height: 0; }
.field__err:empty { display: none; }
.field.has-error input, .field.has-error .field__phone { border-color: var(--red); }
.field.has-error .field__phone input { border-color: transparent; }
.field__phone { display: flex; align-items: stretch; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); overflow: hidden; }
.field__phone:focus-within { border-color: var(--aqua); box-shadow: 0 0 0 4px rgba(0, 242, 254, 0.12); }
.field__phone b { display: grid; place-items: center; padding: 0 12px; color: var(--muted); background: var(--surface-2); font-weight: 600; }
.field__phone input { border: 0; border-radius: 0; box-shadow: none !important; background: none; letter-spacing: 0.04em; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field--toggles { justify-content: flex-end; gap: 10px; }
.form__hint { font-size: 12.5px; color: var(--muted); text-align: center; line-height: 1.45; }
.photo-pick { display: flex; align-items: center; gap: 16px; }
.photo-pick .form__hint { text-align: left; margin-top: 8px; }
.photo-pick__preview { width: 96px; height: 96px; flex-shrink: 0; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px dashed var(--line); }
.photo-pick__preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-pick__preview.is-loading { animation: breathe 1s infinite; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--aqua); }

/* Segmented control */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-soft); }
.seg button { padding: 11px 8px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); transition: all 0.25s var(--ease); }
.seg button.is-active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--aqua), 0 0 16px -6px var(--aqua); }

/* Toggle switch */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { position: relative; width: 44px; height: 26px; border-radius: 13px; background: var(--red-soft); border: 1px solid rgba(255, 92, 122, 0.35); transition: all 0.25s; flex-shrink: 0; }
.switch__thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--red); transition: transform 0.3s var(--ease), background 0.25s; }
.switch input:checked + .switch__track { background: var(--green-soft); border-color: rgba(52, 211, 153, 0.45); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(18px); background: var(--green); box-shadow: 0 0 10px var(--green); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--aqua); outline-offset: 2px; }
.switch em { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--muted); min-width: 52px; }

/* ── Summary & states ───────────────────────────────────── */
.summary { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-soft); font-size: 14px; color: var(--muted); }
.summary > div { display: flex; justify-content: space-between; gap: 12px; }
.summary strong { color: var(--text); }
.summary__total { padding-top: 8px; border-top: 1px dashed var(--line-soft); color: var(--text); font-weight: 600; }
.summary__total strong { font-family: var(--font-head); font-size: 20px; color: var(--aqua); }
.summary__note { font-size: 12.5px; }
.free { color: var(--green); }

.empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 16px; text-align: center; color: var(--muted); }
.empty h2, .empty h3 { color: var(--text); font-size: 19px; }
.empty .btn { margin-top: 8px; }
.empty__fish { font-size: 52px; animation: float 3s ease-in-out infinite; }
.empty--sheet { padding: 40px 8px 24px; }

.success { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 4px 8px; text-align: center; color: var(--muted); }
.success h2 { font-size: 26px; color: var(--text); }
.success__id { font-family: var(--font-head); font-weight: 700; color: var(--aqua); font-size: 16px; }
.success .btn { margin-top: 4px; }
.success__ring { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; background: rgba(37, 211, 102, 0.14); color: var(--wa); box-shadow: 0 0 0 10px rgba(37, 211, 102, 0.06), 0 0 50px rgba(37, 211, 102, 0.4); animation: pop 0.6s var(--ease); }
.success__ring svg { width: 48px; height: 48px; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 0.6s 0.25s var(--ease) forwards; }

.credits { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.credits li { display: flex; flex-direction: column; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.credits span { color: var(--muted); }
.credits a, .sheet .muted a { color: var(--aqua); }

/* Cart drawer: slides in from the right on desktop (bottom sheet on mobile) */
@media (min-width: 768px) {
  .sheet--drawer {
    top: 0; bottom: 0; left: auto; right: 0;
    width: min(440px, 100%);
    max-height: none;
    border-radius: 0;
    border: 0; border-left: 1px solid var(--line-soft);
    transform: translateX(100%);
    opacity: 1;
  }
  .sheet-root.is-open .sheet--drawer { transform: none; }
}

/* Disabled buttons look disabled (e.g. nothing ticked in "Frequently bought together"). */
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; }
