/* ============================================================
   Kenzy Plus — mobile storefront
   Brand: warm cream surfaces, copper accent, espresso text
   ============================================================ */

:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;

  --radius-sm: 0.375rem; --radius-md: 0.625rem; --radius-lg: 0.875rem; --radius-xl: 1.25rem; --radius-full: 9999px;
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: 'Zodiak', 'Iowan Old Style', Georgia, serif;
  --font-body: 'General Sans', 'Helvetica Neue', Arial, sans-serif;

  --content-default: 960px;
  --content-wide: 1200px;
  --tabbar-h: 4rem;
}

:root, [data-theme='light'] {
  --color-bg: #f6f1ea;
  --color-surface: #fffdfa;
  --color-surface-2: #fbf8f3;
  --color-surface-offset: #efe7dc;
  --color-surface-offset-2: #e6dccf;
  --color-divider: #e4dbcf;
  --color-border: #d7cbbb;

  --color-text: #2a2119;
  --color-text-muted: #7a6a5b;
  --color-text-faint: #b2a394;
  --color-text-inverse: #fff6ec;

  --color-primary: #9a5528;
  --color-primary-hover: #7c4420;
  --color-primary-active: #5f3418;
  --color-primary-highlight: #f1dfd0;
  --color-accent-soft: #f0b98a;

  --color-success: #437a22;
  --color-success-highlight: #dfe8d6;
  --color-error: #a12c3f;
  --color-error-highlight: #eed6d9;
  --color-deal: #b3261e;

  --shadow-sm: 0 1px 2px oklch(0.25 0.03 60 / 0.06);
  --shadow-md: 0 4px 14px oklch(0.25 0.03 60 / 0.10);
  --shadow-lg: 0 14px 36px oklch(0.25 0.03 60 / 0.16);
}

[data-theme='dark'] {
  --color-bg: #1b1410;
  --color-surface: #241c17;
  --color-surface-2: #2a211b;
  --color-surface-offset: #2f2620;
  --color-surface-offset-2: #3a2f27;
  --color-divider: #33291f;
  --color-border: #4a3d32;

  --color-text: #efe6dc;
  --color-text-muted: #b3a394;
  --color-text-faint: #7a6a5b;
  --color-text-inverse: #1b1410;

  --color-primary: #d08a54;
  --color-primary-hover: #e39d67;
  --color-primary-active: #b9733f;
  --color-primary-highlight: #3f2c1f;
  --color-accent-soft: #6b3f1f;

  --color-success: #7cb35a;
  --color-success-highlight: #2c3a25;
  --color-error: #e07a8b;
  --color-error-highlight: #4a2a30;
  --color-deal: #ff8a7a;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 14px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 14px 36px oklch(0 0 0 / 0.5);
}

html { background: var(--color-bg); }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 900px) { body { padding-bottom: 0; } }

.skip-link { position: absolute; left: -999px; top: var(--space-2); background: var(--color-primary); color: var(--color-text-inverse); padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); z-index: 100; }
.skip-link:focus { left: var(--space-2); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-divider);
  padding-top: env(safe-area-inset-top);
}
.topbar__inner {
  max-width: var(--content-wide); margin: 0 auto;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: var(--space-3); padding: var(--space-3) var(--space-4);
}
.brand { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--color-primary); text-decoration: none; }
.brand__mark { width: 32px; height: 32px; flex: none; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); letter-spacing: -0.01em; color: var(--color-text); line-height: 1; }
.brand__plus { color: var(--color-primary); }
@media (max-width: 480px) { .brand__name { display: none; } }

.searchbar {
  display: flex; align-items: center; gap: var(--space-2);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-full); padding: 0 var(--space-3); height: 2.5rem;
  max-width: 520px; width: 100%; justify-self: center;
}
.searchbar:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-highlight); }
.searchbar svg { width: 18px; height: 18px; color: var(--color-text-muted); flex: none; }
.searchbar input { border: 0; outline: 0; background: transparent; width: 100%; font: inherit; font-size: var(--text-sm); color: var(--color-text); }
.searchbar input::placeholder { color: var(--color-text-faint); }
.searchbar input::-webkit-search-cancel-button { -webkit-appearance: none; }

.topbar__actions { display: flex; align-items: center; gap: var(--space-1); }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem;
  border-radius: var(--radius-full); border: 0; background: transparent; color: var(--color-text); cursor: pointer;
}
.icon-btn:hover { background: var(--color-surface-offset); }
.icon-btn svg { width: 22px; height: 22px; }
.cart-badge {
  position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--radius-full); background: var(--color-primary); color: var(--color-text-inverse);
  font-size: var(--text-xs); font-weight: 700; line-height: 18px; text-align: center;
}
@media (min-width: 900px) { .cart-btn { display: inline-grid; } }
@media (max-width: 899px) { .topbar .cart-btn { display: none; } }

/* ---------- Bottom tab bar (mobile) ---------- */
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 40;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in oklab, var(--color-surface) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--color-divider);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--color-text-muted); text-decoration: none; font-size: var(--text-xs); font-weight: 500;
}
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.is-active { color: var(--color-primary); }
.tabbar a.is-active::before { content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--color-primary); }
.tabbar .cart-badge { top: 6px; right: calc(50% - 22px); }
@media (min-width: 900px) { .tabbar { display: none; } }

/* ---------- Layout helpers ---------- */
.view { max-width: var(--content-wide); margin: 0 auto; padding: var(--space-4); min-height: 60vh; }
.section { margin-block: var(--space-8); }
.section:first-child { margin-top: var(--space-2); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-4); }
.section__title { font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); letter-spacing: -0.01em; line-height: 1.2; }
.section__link { font-size: var(--text-sm); font-weight: 600; color: var(--color-primary); text-decoration: none; white-space: nowrap; }
.section__link:hover { text-decoration: underline; }
.eyebrow { font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); }
.page-title { font-family: var(--font-display); font-weight: 700; font-size: var(--text-xl); letter-spacing: -0.015em; line-height: 1.15; }
.muted { color: var(--color-text-muted); }
.text-sm { font-size: var(--text-sm); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #7c4420 0%, #9a5528 55%, #c3773f 100%);
  color: #fff6ec; padding: var(--space-8) var(--space-6); min-height: 220px;
  display: grid; align-content: end; gap: var(--space-3);
}
[data-theme='dark'] .hero { background: linear-gradient(135deg, #3a2314 0%, #6b3a1c 60%, #9a5528 100%); }
.hero::after {
  content: ''; position: absolute; right: -60px; top: -80px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 246, 236, 0.35), rgba(255, 246, 236, 0) 65%);
  pointer-events: none;
}
.hero__eyebrow { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.85; }
.hero__title { font-family: var(--font-display); font-weight: 700; font-size: var(--text-xl); line-height: 1.1; letter-spacing: -0.015em; max-width: 18ch; }
.hero__sub { font-size: var(--text-sm); opacity: 0.9; max-width: 40ch; }
.hero__cta { display: inline-flex; align-items: center; gap: var(--space-2); justify-self: start; margin-top: var(--space-2); background: #fff6ec; color: #7c4420; font-weight: 600; font-size: var(--text-sm); padding: var(--space-3) var(--space-5); border-radius: var(--radius-full); text-decoration: none; }
.hero__cta:hover { background: #ffffff; }
@media (min-width: 900px) { .hero { min-height: 300px; padding: var(--space-12) var(--space-10); } }

/* ---------- Category chips ---------- */
.chips { display: flex; gap: var(--space-2); overflow-x: auto; padding-bottom: var(--space-2); scrollbar-width: none; -webkit-overflow-scrolling: touch; margin-inline: calc(-1 * var(--space-4)); padding-inline: var(--space-4); }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: var(--space-2); white-space: nowrap;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-full);
  border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text);
  font-size: var(--text-sm); font-weight: 500; text-decoration: none; cursor: pointer; font-family: inherit;
}
.chip:hover { border-color: var(--color-primary); color: var(--color-primary); }
.chip.is-active { background: var(--color-text); color: var(--color-bg); border-color: var(--color-text); }
[data-theme='dark'] .chip.is-active { background: var(--color-primary); color: var(--color-text-inverse); border-color: var(--color-primary); }

/* ---------- Category tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile {
  position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--color-surface-offset); text-decoration: none; color: #fff6ec;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1); }
.tile:hover img { transform: scale(1.04); }
.tile__label { position: absolute; inset: auto 0 0 0; padding: var(--space-3); background: linear-gradient(to top, rgba(26, 18, 12, 0.92) 0%, rgba(26, 18, 12, 0.55) 55%, rgba(26, 18, 12, 0) 100%); padding-top: var(--space-8); }
.tile__title { font-weight: 600; font-size: var(--text-sm); line-height: 1.25; display: block; }
.tile__count { font-size: var(--text-xs); opacity: 0.8; }
.tile--text { display: grid; place-items: center; background: var(--color-primary); }
.tile--text .tile__title { font-family: var(--font-display); font-size: var(--text-lg); }

/* ---------- Product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4) var(--space-3); }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); gap: var(--space-6) var(--space-4); } }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 44%; gap: var(--space-3); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--space-4); padding-bottom: var(--space-2); margin-inline: calc(-1 * var(--space-4)); padding-inline: var(--space-4); scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
@media (min-width: 640px) { .rail { grid-auto-columns: 30%; } }
@media (min-width: 1000px) { .rail { grid-auto-columns: 22%; } }

.card { display: flex; flex-direction: column; gap: var(--space-2); text-decoration: none; color: inherit; min-width: 0; }
.card__media { position: relative; aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; background: var(--color-surface-offset); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1); }
.card:hover .card__media img { transform: scale(1.04); }
.card__badge { position: absolute; top: var(--space-2); left: var(--space-2); background: var(--color-deal); color: var(--color-text-inverse); font-size: var(--text-xs); font-weight: 700; padding: 2px 8px; border-radius: var(--radius-full); }
.card__badge--soft { background: var(--color-surface); color: var(--color-text); }
.card__title { font-size: var(--text-sm); font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__price { display: flex; align-items: baseline; gap: var(--space-2); font-size: var(--text-sm); }
.card__price strong { font-weight: 700; }
.card__price s { color: var(--color-text-faint); font-size: var(--text-xs); }
.card__meta { font-size: var(--text-xs); color: var(--color-text-muted); }
.card__add {
  position: absolute; right: var(--space-2); bottom: var(--space-2); width: 2.25rem; height: 2.25rem; border-radius: var(--radius-full);
  border: 0; background: var(--color-surface); color: var(--color-text); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-md);
}
.card__add:hover { background: var(--color-primary); color: var(--color-text-inverse); }
.card__add svg { width: 18px; height: 18px; }
.placeholder-img { display: grid; place-items: center; width: 100%; height: 100%; color: var(--color-text-faint); }
.placeholder-img svg { width: 36px; height: 36px; }

/* ---------- Toolbar (collection page) ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-block: var(--space-4); }
.toolbar__controls { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; width: 100%; justify-content: space-between; }
@media (min-width: 640px) { .toolbar__controls { width: auto; } }
.toolbar__count { font-size: var(--text-sm); color: var(--color-text-muted); }
.select {
  appearance: none; -webkit-appearance: none; font: inherit; font-size: var(--text-sm); font-weight: 500; color: var(--color-text);
  background: var(--color-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a6a5b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
  border: 1px solid var(--color-border); border-radius: var(--radius-full); padding: var(--space-2) var(--space-8) var(--space-2) var(--space-4); cursor: pointer;
}
.select:focus { outline: 0; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-highlight); }
.range { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted); }
.range input[type='range'] { accent-color: var(--color-primary); width: 140px; }

/* ---------- Product page ---------- */
.back { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--color-text-muted); text-decoration: none; font-size: var(--text-sm); font-weight: 500; margin-bottom: var(--space-3); border: 0; background: none; cursor: pointer; font-family: inherit; padding: 0; }
.back:hover { color: var(--color-primary); }
.back svg { width: 18px; height: 18px; }
.pdp { display: grid; gap: var(--space-6); }
@media (min-width: 900px) { .pdp { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--space-10); align-items: start; } }
.gallery { position: relative; }
.gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: var(--space-2); border-radius: var(--radius-xl); scrollbar-width: none; background: var(--color-surface-offset); }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track img { flex: none; width: 100%; aspect-ratio: 1; object-fit: cover; scroll-snap-align: center; border-radius: var(--radius-xl); }
.gallery__dots { display: flex; justify-content: center; gap: 6px; margin-top: var(--space-3); }
.gallery__dots button { width: 7px; height: 7px; border-radius: 50%; border: 0; background: var(--color-border); padding: 0; cursor: pointer; }
.gallery__dots button.is-active { background: var(--color-primary); width: 18px; border-radius: 4px; }
.thumbs { display: none; gap: var(--space-2); margin-top: var(--space-3); flex-wrap: wrap; }
.thumbs button { width: 64px; height: 64px; border-radius: var(--radius-md); overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--color-surface-offset); cursor: pointer; }
.thumbs button.is-active { border-color: var(--color-primary); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .thumbs { display: flex; } .gallery__dots { display: none; } .gallery__track { scroll-snap-type: none; } }

.pdp__info { display: grid; gap: var(--space-4); align-content: start; }
.pdp__title { font-family: var(--font-body); font-weight: 600; font-size: var(--text-lg); line-height: 1.3; letter-spacing: -0.005em; }
.pdp__price { display: flex; align-items: baseline; gap: var(--space-3); }
.pdp__price .now { font-family: var(--font-display); font-weight: 700; font-size: var(--text-xl); letter-spacing: -0.01em; }
.pdp__price s { color: var(--color-text-faint); }
.pdp__price .save { background: var(--color-deal); color: var(--color-text-inverse); font-size: var(--text-xs); font-weight: 700; padding: 2px 8px; border-radius: var(--radius-full); }
.opt { display: grid; gap: var(--space-2); }
.opt__label { font-size: var(--text-sm); font-weight: 600; }
.opt__label span { color: var(--color-text-muted); font-weight: 500; }
.opt__values { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.opt__values button {
  font: inherit; font-size: var(--text-sm); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md);
  border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); cursor: pointer;
}
.opt__values button.is-active { border-color: var(--color-text); background: var(--color-text); color: var(--color-bg); }
[data-theme='dark'] .opt__values button.is-active { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-text-inverse); }
.opt__values button.is-unavailable { opacity: 0.45; text-decoration: line-through; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface); height: 2.75rem; }
.qty button { width: 2.75rem; height: 100%; border: 0; background: transparent; color: var(--color-text); font-size: var(--text-lg); cursor: pointer; border-radius: var(--radius-full); }
.qty button:hover { background: var(--color-surface-offset); }
.qty output { min-width: 2rem; text-align: center; font-weight: 600; font-size: var(--text-sm); }
.buy-row { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: 2.75rem; padding: 0 var(--space-5);
  border-radius: var(--radius-full); border: 1px solid transparent; font: inherit; font-size: var(--text-sm); font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn--primary { background: var(--color-primary); color: var(--color-text-inverse); }
.btn--primary:hover { background: var(--color-primary-hover); }
.btn--ghost { background: transparent; border-color: var(--color-border); color: var(--color-text); }
.btn--ghost:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.trust div { display: grid; gap: var(--space-1); justify-items: center; text-align: center; padding: var(--space-3) var(--space-2); background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-lg); font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.3; }
.trust svg { width: 20px; height: 20px; color: var(--color-primary); }
.accordion { border-top: 1px solid var(--color-divider); }
.accordion details { border-bottom: 1px solid var(--color-divider); }
.accordion summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: var(--space-4) 0; font-weight: 600; font-size: var(--text-sm); cursor: pointer; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: '+'; font-size: var(--text-lg); color: var(--color-text-muted); font-weight: 400; line-height: 1; }
.accordion details[open] summary::after { content: '–'; }
.accordion .body { padding-bottom: var(--space-4); font-size: var(--text-sm); color: var(--color-text-muted); white-space: pre-line; line-height: 1.65; overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tags span { font-size: var(--text-xs); padding: 2px 10px; border-radius: var(--radius-full); background: var(--color-surface-offset); color: var(--color-text-muted); }

/* sticky mobile buy bar */
.stickybuy { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 35; padding: var(--space-3) var(--space-4); background: color-mix(in oklab, var(--color-surface) 94%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--color-divider); display: flex; gap: var(--space-3); align-items: center; }
.stickybuy .now { font-weight: 700; }
.stickybuy .btn { flex: 1; }
@media (min-width: 900px) { .stickybuy { display: none; } }
body.has-stickybuy { padding-bottom: calc(var(--tabbar-h) + 4.5rem + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { body.has-stickybuy { padding-bottom: 0; } }

/* ---------- Cart ---------- */
.cart { display: grid; gap: var(--space-6); }
@media (min-width: 900px) { .cart { grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr); align-items: start; } }
.line { display: grid; grid-template-columns: 84px 1fr; gap: var(--space-3); padding: var(--space-4) 0; border-bottom: 1px solid var(--color-divider); }
.line img, .line .placeholder-img { width: 84px; height: 84px; border-radius: var(--radius-md); object-fit: cover; background: var(--color-surface-offset); }
.line__title { font-size: var(--text-sm); font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-decoration: none; color: inherit; }
.line__variant { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: 2px; }
.line__row { display: flex; align-items: center; justify-content: space-between; margin-top: var(--space-2); gap: var(--space-2); }
.line .qty { height: 2.25rem; }
.line .qty button { width: 2.25rem; }
.line__price { font-weight: 700; font-size: var(--text-sm); }
.line__remove { border: 0; background: none; color: var(--color-text-muted); font-size: var(--text-xs); cursor: pointer; text-decoration: underline; font-family: inherit; padding: 0; }
.line__remove:hover { color: var(--color-error); }
.summary { background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-xl); padding: var(--space-5); display: grid; gap: var(--space-3); position: sticky; top: calc(4.5rem + env(safe-area-inset-top)); }
.summary__row { display: flex; justify-content: space-between; font-size: var(--text-sm); color: var(--color-text-muted); }
.summary__row.total { color: var(--color-text); font-weight: 700; font-size: var(--text-base); border-top: 1px solid var(--color-divider); padding-top: var(--space-3); }
.summary__note { font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.5; }

/* ---------- Empty / states ---------- */
.empty { display: grid; justify-items: center; text-align: center; gap: var(--space-3); padding: var(--space-16) var(--space-4); color: var(--color-text-muted); }
.empty svg { width: 48px; height: 48px; color: var(--color-text-faint); }
.empty h2 { font-family: var(--font-display); font-size: var(--text-lg); color: var(--color-text); }
.skeleton { background: linear-gradient(90deg, var(--color-surface-offset) 25%, var(--color-surface-offset-2) 50%, var(--color-surface-offset) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-lg); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--space-4) + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 60; background: var(--color-text); color: var(--color-bg); padding: var(--space-3) var(--space-5); border-radius: var(--radius-full); font-size: var(--text-sm); font-weight: 500; box-shadow: var(--shadow-lg); transition: opacity 220ms, transform 220ms cubic-bezier(0.16, 1, 0.3, 1); display: flex; gap: var(--space-3); align-items: center; justify-content: space-between; width: max-content; max-width: calc(100vw - 2rem); }
.toast > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.toast a { flex: none; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast a { color: var(--color-accent-soft); font-weight: 700; text-decoration: none; }
@media (min-width: 900px) { .toast { bottom: var(--space-6); } }

/* ---------- Footer ---------- */
.footer { margin-top: var(--space-16); padding-top: var(--space-8); border-top: 1px solid var(--color-divider); display: grid; gap: var(--space-2); font-size: var(--text-xs); color: var(--color-text-muted); }
.footer a { color: var(--color-primary); text-decoration: none; }

/* ---------- Motion ---------- */
.view > * { animation: rise 320ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .view > *, .card__media img, .tile img { animation: none; transition: none; } }

/* ---------- Install banner ---------- */
.install { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-lg); }
.install__icon { width: 40px; height: 40px; }
.install__text { display: grid; gap: 2px; min-width: 0; font-size: var(--text-sm); }
.install__text strong { font-weight: 600; }
.install__text span { color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.4; }
.install .btn { height: 2.25rem; padding: 0 var(--space-4); }
.install__close { border: 0; background: transparent; color: var(--color-text-muted); font-size: var(--text-lg); line-height: 1; cursor: pointer; padding: var(--space-1); border-radius: var(--radius-full); }
.install__close:hover { background: var(--color-surface-offset); color: var(--color-text); }
