/* Blucrate app preview — Flutter-app feel, Blucrate brand:
   black background, glowing electric-blue wordmark.
   "Smart Finds. Premium Feel." */

:root {
  --bg: #05070d;
  --bg-2: #0a0f1c;
  --surface: #101827;
  --surface-2: #16213665;
  --line: #22314d;
  --text: #eef3fb;
  --muted: #93a5c0;
  --blue: #1f6bff;
  --blue-bright: #54a0ff;
  --blue-glow: rgba(31, 107, 255, 0.55);
  --wa: #22b358;
  --wa-dark: #128c4b;
  --gold: #ffd166;
  --danger: #ff6b81;
  --spring: cubic-bezier(0.22, 1.24, 0.36, 1);
  --spring-soft: cubic-bezier(0.22, 1.1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --tabbar-h: 64px;
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(60rem 40rem at 15% -10%, rgba(31, 107, 255, 0.16), transparent 60%),
    radial-gradient(50rem 34rem at 95% 110%, rgba(31, 107, 255, 0.1), transparent 60%),
    #02040a;
  color: var(--text);
  min-height: 100dvh;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: var(--text); }
img { display: block; }
.hidden { display: none !important; }

/* ---------- app shell ---------- */
.app {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  background: linear-gradient(180deg, var(--bg-2), var(--bg) 240px);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.65), 0 0 0 1px #101a2e;
  overflow-x: clip;
}

/* ---------- app bar ---------- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: rgba(6, 10, 20, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(34, 49, 77, 0.6);
}
.brand { display: flex; align-items: center; gap: 10px; text-align: left; min-width: 0; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 0 18px var(--blue-glow); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand-name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #cfe4ff;
  text-shadow: 0 0 14px var(--blue-glow), 0 0 34px rgba(31, 107, 255, 0.35);
  white-space: nowrap;
}
.brand-tag { font-size: 10.5px; color: var(--muted); letter-spacing: 0.3px; white-space: nowrap; }
.appbar-actions { display: flex; gap: 8px; }
.icon-btn {
  position: relative;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.25s var(--spring), background 0.2s ease, box-shadow 0.25s ease;
}
.icon-btn:active { transform: scale(0.88); }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn.active { background: #14315f; box-shadow: 0 0 14px var(--blue-glow); }
.cart-count {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--blue-bright));
  color: #fff;
  font-size: 11.5px; font-weight: 700;
  display: grid; place-items: center;
  box-shadow: 0 0 12px var(--blue-glow);
}
.cart-count.bump, .tab-badge.bump { animation: bump 0.45s var(--spring); }
@keyframes bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.45); }
  70% { transform: scale(0.92); }
  100% { transform: scale(1); }
}

/* ---------- expanding search ---------- */
.search-row {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.38s var(--spring-soft);
  position: sticky;
  top: calc(63px + env(safe-area-inset-top));
  z-index: 39;
}
.search-row.open { grid-template-rows: 1fr; }
.search-inner {
  overflow: hidden;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 14px;
  padding: 0 12px;
  height: 44px;
  transform: translateY(-6px);
  opacity: 0;
  transition: transform 0.38s var(--spring-soft), opacity 0.3s ease, margin 0.38s var(--spring-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.search-row.open .search-inner { transform: translateY(0); opacity: 1; margin-top: 10px; }
.search-inner svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search-inner input {
  flex: 1; min-width: 0;
  background: none; border: none; outline: none;
  font-size: 15px;
}
.search-inner input::placeholder { color: var(--muted); }
.search-clear { color: var(--muted); font-size: 14px; padding: 6px; }

/* ---------- views ---------- */
.app-main { padding: 6px 14px calc(var(--tabbar-h) + 30px + env(safe-area-inset-bottom)); }
.view { display: none; }
.view.active { display: block; animation: view-in 0.4s var(--ease-out); }
@keyframes view-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- hero carousel ---------- */
.hero-wrap { margin: 10px -14px 4px; }
.hero-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 14px 10px;
  scrollbar-width: none;
}
.hero-track::-webkit-scrollbar { display: none; }
.hero-card {
  position: relative;
  flex: 0 0 86%;
  scroll-snap-align: center;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  transition: transform 0.3s var(--spring);
}
.hero-card:active { transform: scale(0.98); }
.hero-card img { width: 100%; height: 218px; object-fit: cover; }
.hero-card .hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(3, 6, 12, 0) 34%, rgba(3, 6, 12, 0.88) 88%);
}
.hero-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(10, 18, 34, 0.78);
  border: 1px solid rgba(84, 160, 255, 0.5);
  color: #bcd7ff;
  font-size: 11px; font-weight: 700; letter-spacing: 0.6px;
  padding: 5px 10px; border-radius: 999px;
  backdrop-filter: blur(6px);
}
.hero-info { position: absolute; left: 16px; right: 16px; bottom: 14px; }
.hero-info h3 { font-size: 20px; font-weight: 800; text-shadow: 0 2px 12px rgba(0,0,0,0.6); }
.hero-info .hero-price { color: #9cc2ff; font-weight: 700; margin-top: 3px; text-shadow: 0 0 12px var(--blue-glow); }
.hero-info .hero-cta {
  display: inline-block; margin-top: 9px;
  background: linear-gradient(135deg, var(--blue), var(--blue-bright));
  color: #fff; font-weight: 700; font-size: 13.5px;
  padding: 8px 16px; border-radius: 999px;
  box-shadow: 0 6px 20px var(--blue-glow);
}
.hero-dots { display: flex; justify-content: center; gap: 6px; padding: 2px 0 8px; }
.hero-dots i {
  width: 6px; height: 6px; border-radius: 999px; background: #2c3d5c;
  transition: width 0.35s var(--spring), background 0.3s ease;
}
.hero-dots i.on { width: 20px; background: var(--blue-bright); box-shadow: 0 0 10px var(--blue-glow); }

/* ---------- sections & category cards ---------- */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 20px 0 12px;
}
.section-head h2 { font-size: 18px; font-weight: 800; letter-spacing: 0.2px; }
.see-all { color: var(--blue-bright); font-weight: 600; font-size: 14px; }
.cat-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cat-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 15px 14px;
  background: linear-gradient(150deg, #111c31, var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
  transition: transform 0.3s var(--spring), box-shadow 0.3s ease, border-color 0.3s ease;
}
.cat-card:active { transform: scale(0.96); border-color: var(--blue); box-shadow: 0 0 18px rgba(31, 107, 255, 0.3); }
.cat-card .cat-icon {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: rgba(31, 107, 255, 0.16); color: var(--blue-bright);
  margin-bottom: 4px;
}
.cat-card .cat-icon svg { width: 21px; height: 21px; }
.cat-card h3 { font-size: 15px; font-weight: 700; }
.cat-card p { font-size: 12px; color: var(--muted); line-height: 1.35; }
.cat-card .cat-count { font-size: 12px; color: var(--blue-bright); font-weight: 600; margin-top: 2px; }

/* ---------- chips with sliding pill ---------- */
.chips-sticky {
  position: sticky;
  top: calc(63px + env(safe-area-inset-top));
  z-index: 30;
  margin: 0 -14px;
  padding: 10px 14px 8px;
  background: linear-gradient(180deg, rgba(7, 11, 20, 0.95), rgba(7, 11, 20, 0.85));
  backdrop-filter: blur(10px);
}
.chips {
  position: relative;
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 3px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip-pill {
  position: absolute;
  top: 3px; left: 0;
  height: calc(100% - 6px);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--blue-bright));
  box-shadow: 0 4px 16px var(--blue-glow);
  transition: transform 0.42s var(--spring), width 0.42s var(--spring), opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
}
.chip {
  position: relative; z-index: 1;
  flex: none;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(16, 24, 39, 0.7);
  color: var(--muted);
  font-size: 13.5px; font-weight: 600;
  transition: color 0.3s ease, border-color 0.3s ease, transform 0.25s var(--spring);
}
.chip:active { transform: scale(0.94); }
.chip.active { color: #fff; border-color: transparent; }
.chip.static { cursor: default; }
.result-meta { color: var(--muted); font-size: 13px; margin: 10px 2px 12px; }

/* ---------- product grid & cards ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  width: 100%;
  transition: transform 0.3s var(--spring), box-shadow 0.3s ease;
  will-change: transform;
}
.product-card:active { transform: scale(0.97); }
.card-in { animation: card-in 0.55s var(--spring) backwards; }
@keyframes card-in {
  from { opacity: 0; transform: translateY(22px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.card-tile { position: relative; aspect-ratio: 1 / 0.92; background: #0b1322; overflow: hidden; }
.card-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.product-card:hover .card-tile img { transform: scale(1.05); }
.card-tile .tile-icon {
  position: absolute; inset: 0; display: grid; place-items: center; color: #33507e;
}
.card-tile .tile-icon svg { width: 52px; height: 52px; }
.cond-chip {
  position: absolute; top: 8px; left: 8px; z-index: 3;
  background: rgba(8, 14, 26, 0.82);
  border: 1px solid rgba(84, 160, 255, 0.45);
  color: #bcd7ff;
  font-size: 10.5px; font-weight: 700;
  padding: 4px 8px; border-radius: 999px;
  backdrop-filter: blur(5px);
}
.quick-add {
  position: absolute; right: 8px; bottom: 8px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-bright));
  color: #fff; font-size: 20px; font-weight: 600; line-height: 1;
  display: grid; place-items: center;
  box-shadow: 0 5px 16px var(--blue-glow);
  transition: transform 0.25s var(--spring);
}
.quick-add:active { transform: scale(0.8) rotate(90deg); }
.peek-bar {
  position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 2;
  display: flex; gap: 6px;
  transform: translateY(140%); opacity: 0;
  transition: transform 0.38s var(--spring), opacity 0.3s ease;
}
.product-card.peek-on .peek-bar { transform: translateY(0); opacity: 1; }
.product-card.peek-on .quick-add { opacity: 0; pointer-events: none; }
.peek-bar button {
  flex: 1;
  padding: 8px 4px;
  border-radius: 10px;
  font-size: 12.5px; font-weight: 700;
  backdrop-filter: blur(8px);
  transition: transform 0.2s var(--spring);
}
.peek-bar button:active { transform: scale(0.94); }
.peek-view { background: rgba(84, 160, 255, 0.92); color: #fff; }
.peek-wa { background: rgba(34, 179, 88, 0.92); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .product-card:hover .peek-bar { transform: translateY(0); opacity: 1; }
  .product-card:hover .quick-add { opacity: 0; }
}
.card-body { padding: 10px 11px 12px; }
.card-body h3 { font-size: 14px; font-weight: 700; line-height: 1.25; }
.card-note {
  font-size: 11.5px; color: var(--muted); line-height: 1.35; margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-price { margin-top: 7px; font-weight: 800; font-size: 14.5px; color: #9cc2ff; }
.card-price .from { font-weight: 500; font-size: 12px; color: var(--muted); }

/* skeletons */
.skeleton-card { border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.skel-tile { aspect-ratio: 1 / 0.92; }
.skel-body { padding: 12px; display: grid; gap: 8px; }
.skel-line { height: 13px; border-radius: 6px; }
.skel-line.short { width: 55%; }
.skel-tile, .skel-line {
  background: linear-gradient(100deg, #131f36 40%, #1d2c49 50%, #131f36 60%);
  background-size: 200% 100%;
  animation: shimmer 1.15s linear infinite;
}
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -80% 0; } }

/* ---------- trust row ---------- */
.trust-row { display: grid; gap: 10px; margin-top: 22px; }
.trust-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px;
}
.trust-card h3 { font-size: 14.5px; margin-bottom: 5px; }
.trust-card p { font-size: 13px; color: var(--muted); line-height: 1.45; }
.trust-card strong { color: var(--text); }

/* ---------- bottom tab bar ---------- */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, 100%);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 45;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(6, 10, 20, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(34, 49, 77, 0.7);
}
.tab-glider {
  position: absolute;
  top: 7px; left: 0;
  height: 40px;
  border-radius: 14px;
  background: rgba(31, 107, 255, 0.18);
  border: 1px solid rgba(84, 160, 255, 0.35);
  transition: transform 0.45s var(--spring), width 0.45s var(--spring), opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
}
.tab {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  color: var(--muted);
  font-size: 11px; font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
.tab svg { width: 22px; height: 22px; transition: transform 0.35s var(--spring); }
.tab.active { color: #cfe4ff; }
.tab.active svg { transform: translateY(-1px) scale(1.12); }
.tab:active svg { transform: scale(0.85); }
.tab-badge {
  position: absolute;
  top: 6px; right: calc(50% - 24px);
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--blue-bright));
  color: #fff; font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center;
  box-shadow: 0 0 10px var(--blue-glow);
}

/* ---------- sheets ---------- */
.sheet-wrap {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
}
.scrim {
  position: absolute; inset: 0;
  background: rgba(2, 4, 10, 0.66);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.32s ease;
}
.sheet-wrap.open .scrim { opacity: 1; }
.sheet-wrap.closing .scrim { opacity: 0; }
.sheet {
  position: relative;
  width: min(480px, 100%);
  max-height: 92dvh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0d1526, #080d18);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 26px 26px 0 0;
  transform: translateY(102%);
  transition: transform 0.48s var(--spring);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.6);
  will-change: transform;
}
.sheet-wrap.open .sheet { transform: translateY(0); }
.sheet-wrap.closing .sheet { transform: translateY(102%); transition: transform 0.3s var(--ease-out); }
.sheet.dragging { transition: none; }
.sheet-tall { height: min(88dvh, 760px); }
.sheet-handle { padding: 10px 0 4px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.sheet-handle span { width: 42px; height: 5px; border-radius: 999px; background: #33456a; }
.sheet-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(10, 17, 31, 0.85); border: 1px solid var(--line);
  font-size: 14px;
  transition: transform 0.25s var(--spring);
}
.sheet-close:active { transform: scale(0.85) rotate(90deg); }
.sheet-close.static { position: static; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 18px 10px;
}
.sheet-head h2 { font-size: 19px; font-weight: 800; }
.sheet-scroll { overflow-y: auto; overscroll-behavior: contain; padding-bottom: 8px; }
.sheet-foot {
  border-top: 1px solid var(--line);
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
  background: rgba(8, 13, 24, 0.9);
}

/* product sheet body */
.pm-tile { position: relative; margin: 4px 14px 0; border-radius: 20px; overflow: hidden; background: #0b1322; }
.pm-tile img { width: 100%; height: 250px; object-fit: cover; }
.pm-tile .tile-icon { position: absolute; inset: 0; display: grid; place-items: center; color: #33507e; min-height: 180px; }
.pm-tile .tile-icon svg { width: 72px; height: 72px; }
.pm-body { padding: 16px 18px 22px; }
.pm-body h2 { font-size: 21px; font-weight: 800; line-height: 1.2; padding-right: 30px; }
.pm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.tag {
  font-size: 11.5px; font-weight: 600; color: #bcd7ff;
  background: rgba(31, 107, 255, 0.14);
  border: 1px solid rgba(84, 160, 255, 0.4);
  padding: 4px 9px; border-radius: 999px;
}
.pm-note { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin-top: 9px; }
.field-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: 0.4px; text-transform: uppercase; margin: 16px 0 8px; }
.variant-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-chip {
  padding: 9px 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13.5px; font-weight: 600;
  transition: all 0.28s var(--spring);
}
.variant-chip small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 1px; }
.variant-chip:active { transform: scale(0.93); }
.variant-chip.active {
  border-color: var(--blue-bright);
  background: rgba(31, 107, 255, 0.2);
  box-shadow: 0 0 14px rgba(31, 107, 255, 0.35);
  color: #fff;
}
.variant-chip.active small { color: #9cc2ff; }
.qty-row { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.qty-row .field-label { margin: 0; }
.stepper {
  display: flex; align-items: center; gap: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px;
}
.stepper button {
  width: 36px; height: 36px; border-radius: 50%;
  background: #1a2947; font-size: 19px; font-weight: 700;
  display: grid; place-items: center;
  transition: transform 0.22s var(--spring), background 0.2s ease;
}
.stepper button:active { transform: scale(0.8); background: var(--blue); }
.stepper span { min-width: 30px; text-align: center; font-weight: 800; font-size: 16px; }
.pm-price { font-size: 24px; font-weight: 800; color: #9cc2ff; margin-top: 16px; text-shadow: 0 0 16px rgba(31, 107, 255, 0.3); }
.pm-price .from { font-size: 13px; color: var(--muted); font-weight: 500; text-shadow: none; }
.pm-actions { display: grid; gap: 9px; margin-top: 16px; }

/* buttons */
.btn-primary, .btn-wa {
  position: relative;
  width: 100%;
  padding: 14px;
  border-radius: 15px;
  font-size: 15.5px; font-weight: 800;
  color: #fff;
  transition: transform 0.25s var(--spring), box-shadow 0.3s ease, filter 0.2s ease;
  overflow: hidden;
}
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--blue-bright)); box-shadow: 0 8px 24px var(--blue-glow); }
.btn-wa { background: linear-gradient(135deg, var(--wa), var(--wa-dark)); box-shadow: 0 8px 24px rgba(34, 179, 88, 0.35); }
.btn-primary:active, .btn-wa:active { transform: scale(0.97); }
.btn-wa.big { padding: 16px; font-size: 16.5px; }
.btn-ghost {
  padding: 11px 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface);
  font-weight: 700; font-size: 14px;
  transition: transform 0.25s var(--spring);
}
.btn-ghost:active { transform: scale(0.95); }
.btn-spin {
  display: none;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 0.7s linear infinite;
}
.is-loading .btn-label { display: none; }
.is-loading .btn-spin { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* cart sheet */
.cart-empty { text-align: center; padding: 38px 20px; color: var(--muted); }
.cart-empty p { margin-bottom: 14px; }
.empty-emoji { font-size: 38px; margin-bottom: 8px !important; }
.shop-empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.shop-empty p { margin-bottom: 12px; }
.cart-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 11px;
  align-items: center;
  margin: 0 14px 10px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
}
.cart-item img, .cart-item .ci-fallback {
  width: 56px; height: 56px; border-radius: 11px; object-fit: cover; background: #0b1322;
}
.cart-item .ci-fallback { display: grid; place-items: center; color: #33507e; }
.cart-item .ci-fallback svg { width: 26px; height: 26px; }
.cart-item h4 { font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.cart-item .variant { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cart-item .line-total { font-size: 13.5px; font-weight: 800; color: #9cc2ff; margin-top: 3px; }
.ci-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.mini-stepper {
  display: flex; align-items: center; gap: 2px;
  background: #0b1322; border: 1px solid var(--line); border-radius: 999px; padding: 2px;
}
.mini-stepper button {
  width: 26px; height: 26px; border-radius: 50%;
  background: #1a2947; font-size: 15px; font-weight: 700;
  display: grid; place-items: center;
  transition: transform 0.2s var(--spring), background 0.2s ease;
}
.mini-stepper button:active { transform: scale(0.78); background: var(--blue); }
.mini-stepper span { min-width: 22px; text-align: center; font-weight: 800; font-size: 13.5px; }
.remove-link { color: var(--danger); font-size: 12px; font-weight: 600; padding: 2px 4px; }
.cart-form { padding: 4px 18px 14px; }
.cart-form input, .cart-form textarea, .cart-form select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.cart-form input:focus, .cart-form textarea:focus, .cart-form select:focus {
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 3px rgba(31, 107, 255, 0.22);
}
.gift-note { color: var(--gold); font-size: 13.5px; font-weight: 600; margin-bottom: 9px; }
.total-row {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 11px; font-size: 15px; color: var(--muted);
}
.total-row strong { font-size: 21px; color: var(--text); }

/* toast + fly dot */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  z-index: 70;
  background: rgba(13, 24, 44, 0.95);
  border: 1px solid rgba(84, 160, 255, 0.5);
  color: #dbeafe;
  font-size: 13.5px; font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s var(--spring), opacity 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.fly-dot {
  position: fixed;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #9cc2ff, var(--blue));
  box-shadow: 0 0 16px var(--blue-glow);
  z-index: 90;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
