/* ==========================================================================
   Reo Sweaters - stylesheet
   Layout concept: full-bleed knit-stitch hero slider, then calm, spacious
   sections. Mobile-first; breakpoints at 640px, 960px and 1200px.
   Colors are tokens; the page follows the visitor's light/dark setting.
   ========================================================================== */

:root {
  /* Color */
  --bg: #F3F1F6;
  --surface: #FFFFFF;
  --surface-2: #E8E4EE;
  --ink: #191B2E;
  --ink-soft: #565A72;
  --line: #D8D3E0;
  --accent: #2D4BD6;
  --accent-ink: #FFFFFF;
  --accent-soft: #E1E6FB;

  /* Slide colors (fixed, they define the brand moment) */
  --s1-bg: #2D4BD6;
  --s2-bg: #F2D58A;
  --s3-bg: #1F4D3A;

  /* Type */
  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Instrument Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* Shape and rhythm */
  --radius: 14px;
  --radius-sm: 8px;
  --header-h: 72px;
  --shadow: 0 10px 30px rgba(25, 27, 46, 0.10);

  /* Knit-stitch tiles used as background texture */
  --stitch-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='32'%3E%3Cpath d='M3 4 L14 26 L25 4' fill='none' stroke='%23ffffff' stroke-opacity='.09' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --stitch-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='32'%3E%3Cpath d='M3 4 L14 26 L25 4' fill='none' stroke='%23191B2E' stroke-opacity='.08' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12131D;
    --surface: #1A1C2B;
    --surface-2: #23253A;
    --ink: #ECEBF6;
    --ink-soft: #A9ACC4;
    --line: #2F3250;
    --accent: #8EA2FF;
    --accent-ink: #0F1226;
    --accent-soft: #252B52;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #12131D;
  --surface: #1A1C2B;
  --surface-2: #23253A;
  --ink: #ECEBF6;
  --ink-soft: #A9ACC4;
  --line: #2F3250;
  --accent: #8EA2FF;
  --accent-ink: #0F1226;
  --accent-soft: #252B52;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: var(--bg);
  z-index: 60;
}

[hidden] { display: none !important; }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

@media (min-width: 640px) {
  .container { padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
}

.section { padding-block: clamp(56px, 8vw, 104px); }

.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 16px 32px; margin-bottom: clamp(24px, 4vw, 44px);
}
.section-head h2 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); }
.section-head p { color: var(--ink-soft); margin-top: 8px; max-width: 52ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 600; font-size: 0.98rem; line-height: 1; white-space: nowrap;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--ink); color: var(--bg); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--bg); }
.btn-block { width: 100%; }

.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line);
  background: transparent; color: var(--ink); transition: background-color .2s ease, border-color .2s ease;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--ink-soft); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--ink); color: var(--bg); font-size: 0.85rem; }
.topbar .container { display: flex; justify-content: center; text-align: center; padding-block: 10px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { position: relative; display: flex; align-items: center; gap: 8px; min-height: var(--header-h); }

.brand { display: inline-flex; flex-direction: column; line-height: 1; margin-right: auto; min-height: 44px; justify-content: center; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; letter-spacing: -0.04em; }
.brand-sub { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.34em; margin-top: 3px; color: var(--ink-soft); }

.header-actions { display: flex; align-items: center; gap: 8px; }

.phone-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 44px; height: 44px; padding: 0; border: 1.5px solid var(--ink); border-radius: 999px;
  font-weight: 600; font-size: 0.92rem; white-space: nowrap; transition: background-color .2s ease, color .2s ease;
}
.phone-link:hover { background: var(--ink); color: var(--bg); }
.phone-link svg { width: 19px; height: 19px; flex: none; }
.phone-text { display: none; }

.cart-count {
  position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-size: 0.72rem; font-weight: 700; display: grid; place-items: center; line-height: 1;
  font-variant-numeric: tabular-nums;
}

.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Mobile navigation panel */
.nav {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg); border-bottom: 1px solid var(--line);
  max-height: calc(100vh - var(--header-h) - 60px); overflow-y: auto;
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) 20px max(16px, env(safe-area-inset-left, 0px));
  box-shadow: var(--shadow);
}
.nav.is-open { display: block; }
.nav-list { display: flex; flex-direction: column; }
.nav-link, .nav-btn {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  min-height: 52px; padding: 0 4px; background: none; border: 0; border-bottom: 1px solid var(--line);
  font-weight: 600; font-size: 1.05rem; text-align: left;
}
.nav-link:hover, .nav-btn:hover { color: var(--accent); }
.nav-btn svg { width: 18px; height: 18px; transition: transform .2s ease; }
.has-sub.is-open .nav-btn svg { transform: rotate(180deg); }

.submenu { display: none; padding: 4px 0 8px 12px; }
.has-sub.is-open .submenu { display: block; }
.submenu a { display: flex; align-items: center; min-height: 48px; padding: 0 8px; border-radius: var(--radius-sm); color: var(--ink-soft); font-weight: 500; }
.submenu a:hover { color: var(--accent); background: var(--surface-2); }

@media (min-width: 640px) {
  .phone-link { padding: 0 16px; }
  .phone-text { display: inline; }
}

@media (min-width: 960px) {
  :root { --header-h: 80px; }
  .nav-toggle { display: none; }
  .brand { margin-right: 0; }
  .nav {
    display: block; position: static; flex: 1; border: 0; box-shadow: none; background: none;
    max-height: none; overflow: visible; padding: 0;
  }
  .nav-list { flex-direction: row; justify-content: center; gap: 4px; }
  .nav-item { position: relative; }
  .nav-link, .nav-btn {
    width: auto; gap: 8px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px;
    font-size: 0.97rem; font-weight: 500;
  }
  .nav-link:hover, .nav-btn:hover { background: var(--surface-2); color: var(--ink); }
  .submenu {
    position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px; padding: 8px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  }
  .submenu a { color: var(--ink); padding: 0 14px; }
}

@media (min-width: 960px) and (hover: hover) {
  .has-sub:hover .submenu { display: block; }
  .has-sub:hover .nav-btn svg { transform: rotate(180deg); }
}

/* ---------- Hero slider ---------- */
.hero { position: relative; overflow: hidden; }
.hero-track { display: grid; }

.slide {
  grid-area: 1 / 1; position: relative;
  opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility 0s linear .7s;
  display: flex; align-items: center;
  min-height: clamp(560px, 82vh, 720px);
  padding-block: 40px 104px;
}
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .7s ease, visibility 0s; z-index: 1; }

.slide::before { content: ""; position: absolute; inset: 0; background-size: 28px 32px; pointer-events: none; }
.slide-1 { background: var(--s1-bg); color: #FFFFFF; }
.slide-1::before { background-image: var(--stitch-light); }
.slide-2 { background: var(--s2-bg); color: #191B2E; }
.slide-2::before { background-image: var(--stitch-dark); }
.slide-3 { background: var(--s3-bg); color: #F1F5EC; }
.slide-3::before { background-image: var(--stitch-light); }

.slide-inner {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center;
}
.slide-copy { max-width: 36rem; }
.slide-kicker { font-weight: 600; font-size: 1rem; opacity: .9; margin-bottom: 14px; display: inline-flex; align-items: center; gap: 10px; }
.slide-kicker::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.slide h1 { font-size: clamp(2.4rem, 1.2rem + 5.6vw, 4.8rem); margin-bottom: 18px; }
.slide-text { font-size: clamp(1.02rem, 0.95rem + 0.4vw, 1.2rem); max-width: 34rem; margin-bottom: 28px; }

.slide .btn-light { background: #FFFFFF; color: #191B2E; }
.slide .btn-light:hover { background: #191B2E; color: #FFFFFF; }
.slide .btn-dark { background: #191B2E; color: #FFFFFF; }
.slide .btn-dark:hover { background: #FFFFFF; color: #191B2E; }

.slide-art { display: grid; place-items: center; }
.slide-art .sw { width: min(100%, 460px); height: auto; filter: drop-shadow(0 26px 24px rgba(0, 0, 0, .28)); }

.hero-ui {
  position: absolute; left: 0; right: 0; bottom: 20px; z-index: 5;
}
.hero-ui .container { display: flex; align-items: center; gap: 8px; }
.hero-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid currentColor; background: rgba(255, 255, 255, .92); color: #191B2E;
  transition: background-color .2s ease, transform .2s ease;
}
.hero-btn:hover { background: #FFFFFF; transform: scale(1.06); }
.hero-btn svg { width: 18px; height: 18px; }
.hero-dots { display: flex; align-items: center; margin-left: 6px; }
.hero-dot { width: 44px; height: 44px; background: none; border: 0; display: grid; place-items: center; padding: 0; }
.hero-dot span {
  display: block; position: relative; overflow: hidden; width: 12px; height: 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .95); box-shadow: 0 0 0 1.5px rgba(25, 27, 46, .55);
  transition: width .3s ease;
}
.hero-dot span::after {
  content: ""; position: absolute; inset: 0; background: #191B2E; transform-origin: left; transform: scaleX(0);
}
.hero-dot[aria-current="true"] span { width: 40px; }
.hero.is-playing .hero-dot[aria-current="true"] span::after { animation: dotfill var(--slide-ms, 6000ms) linear forwards; }
.hero-dot[aria-current="true"] span::after { transform: scaleX(1); }
.hero.is-playing .hero-dot[aria-current="true"] span::after { transform: scaleX(0); }
@keyframes dotfill { to { transform: scaleX(1); } }

@media (min-width: 860px) {
  .slide-inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px; }
  .slide { padding-block: 56px 112px; }
}

/* ---------- Perks ---------- */
.perks { background: var(--surface); border-bottom: 1px solid var(--line); }
.perks-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; padding-block: 32px; }
.perk { display: flex; gap: 14px; align-items: flex-start; }
.perk-icon { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.perk-icon svg { width: 22px; height: 22px; }
.perk h3 { font-size: 1.02rem; letter-spacing: -0.01em; margin-bottom: 2px; }
.perk p { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.5; }

/* ---------- Collections ---------- */
.collections-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.collection {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 380px; padding: clamp(22px, 4vw, 40px); border-radius: 22px;
  transition: transform .3s ease;
}
.collection:hover { transform: translateY(-4px); }
.collection::before { content: ""; position: absolute; inset: 0; background-size: 28px 32px; pointer-events: none; }
.collection .sw { position: absolute; top: 18px; right: 4%; width: min(62%, 300px); height: auto; filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .25)); transition: transform .4s ease; }
.collection:hover .sw { transform: rotate(-4deg) scale(1.04); }
.collection-winter { background: #7A2E3A; color: #FFFFFF; }
.collection-winter::before { background-image: var(--stitch-light); }
.collection-summer { background: #E9C86E; color: #191B2E; }
.collection-summer::before { background-image: var(--stitch-dark); }
.collection h3, .collection p, .collection .link-line { position: relative; }
.collection h3 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.4rem); margin-bottom: 8px; }
.collection p { max-width: 24rem; margin-bottom: 16px; }
.link-line { font-weight: 600; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }

@media (min-width: 760px) {
  .collections-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection { min-height: 460px; }
}

/* ---------- Products ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  min-height: 44px; padding: 0 20px; border-radius: 999px; background: transparent;
  border: 1.5px solid var(--line); font-weight: 600; font-size: 0.93rem;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.filter:hover { border-color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.product { display: flex; flex-direction: column; min-width: 0; }
.product[hidden] { display: none; }
.product-media {
  position: relative; display: grid; place-items: center; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: var(--radius); background: var(--tint, #EAE6F0);
  transition: transform .3s ease;
}
.product:hover .product-media { transform: translateY(-3px); }
.product-media .sw { width: 78%; height: auto; filter: drop-shadow(0 14px 12px rgba(25, 27, 46, .22)); }
.badge {
  position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 999px;
  background: #FFFFFF; color: #191B2E; font-size: 0.74rem; font-weight: 700;
}
.product-body { display: flex; flex-direction: column; gap: 3px; padding: 14px 2px 0; flex: 1; }
.product-season { color: var(--ink-soft); font-size: 0.82rem; }
.product-name { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; letter-spacing: -0.01em; line-height: 1.2; }
.product-price { font-weight: 600; font-variant-numeric: tabular-nums; margin-bottom: 12px; }
.product .btn { margin-top: auto; min-height: 46px; padding: 0 16px; font-size: 0.92rem; }

@media (min-width: 760px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
@media (min-width: 1100px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- About ---------- */
.about { background: var(--surface); border-block: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: center; }
.about-art {
  position: relative; display: grid; place-items: center; min-height: 340px; border-radius: 22px;
  background: #2A3A66; overflow: hidden;
}
.about-art::before { content: ""; position: absolute; inset: 0; background-image: var(--stitch-light); background-size: 28px 32px; }
.about-art .sw { position: relative; width: min(70%, 340px); height: auto; filter: drop-shadow(0 22px 20px rgba(0, 0, 0, .3)); }
.about-note { position: absolute; left: 16px; bottom: 12px; font-size: 0.78rem; color: #D6DDF2; }
.about-copy h2 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); margin-bottom: 18px; }
.about-copy > p { color: var(--ink-soft); max-width: 56ch; }
.about-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; margin-top: 32px; }
.about-points h3 { font-size: 1.15rem; margin-bottom: 4px; }
.about-points p { color: var(--ink-soft); font-size: 0.93rem; line-height: 1.5; }

@media (min-width: 900px) { .about-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 64px; } .about-art { min-height: 460px; } }

/* ---------- Newsletter ---------- */
.newsletter-box {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: center;
  padding: clamp(28px, 5vw, 56px); border-radius: 24px; background: var(--accent); color: var(--accent-ink);
}
.newsletter-box h2 { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem); margin-bottom: 8px; }
.newsletter-box p { opacity: .92; max-width: 40ch; }
.news-form { display: flex; flex-wrap: wrap; gap: 12px; }
.news-form input {
  flex: 1 1 220px; min-width: 0; min-height: 50px; padding: 0 22px; border-radius: 999px; border: 2px solid transparent;
  background: #FFFFFF; color: #191B2E;
}
.news-form input::placeholder { color: #5A5E78; }
.news-form .btn { background: #191B2E; color: #FFFFFF; }
.news-form .btn:hover { background: #FFFFFF; color: #191B2E; }
.form-note { flex-basis: 100%; min-height: 1.4em; font-size: 0.92rem; }

@media (min-width: 860px) { .newsletter-box { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; } }

/* ---------- Footer ---------- */
.site-footer { background: #14152A; color: #E4E3F0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; padding-block: 56px 36px; }
.footer-about { grid-column: 1 / -1; }
.site-footer .brand-name { color: #FFFFFF; }
.site-footer .brand-sub { color: #B7B6CE; }
.footer-about p { margin-top: 16px; max-width: 32ch; color: #B7B6CE; font-size: 0.95rem; }
.site-footer h3 { font-size: 1rem; letter-spacing: 0; margin-bottom: 10px; color: #FFFFFF; }
.footer-links { display: flex; flex-direction: column; font-size: 0.95rem; }
.footer-links a, .footer-links span { display: flex; align-items: center; min-height: 40px; color: #D3D2E4; }
.footer-links a:hover { color: #FFFFFF; text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { border-top: 1px solid #2B2D4A; padding-block: 20px; font-size: 0.85rem; color: #B7B6CE; }

@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
  .footer-about { grid-column: auto; }
}

/* ---------- Cart drawer ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 70; background: rgba(15, 16, 32, .55);
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s;
}
.scrim.is-open { opacity: 1; visibility: visible; transition: opacity .3s ease, visibility 0s; }

.cart {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 80; width: min(100%, 420px);
  display: flex; flex-direction: column; background: var(--surface); color: var(--ink);
  box-shadow: -12px 0 40px rgba(0, 0, 0, .25);
  transform: translateX(100%); visibility: hidden; transition: transform .35s ease, visibility 0s linear .35s;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.cart.is-open { transform: translateX(0); visibility: visible; transition: transform .35s ease, visibility 0s; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.cart-head h2 { font-size: 1.3rem; }
.cart-list { flex: 1; overflow-y: auto; padding: 8px 20px; }
.cart-empty { padding: 40px 8px; text-align: center; color: var(--ink-soft); }
.cart-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-thumb { width: 64px; height: 72px; border-radius: var(--radius-sm); background: var(--tint, #EAE6F0); display: grid; place-items: center; }
.cart-thumb .sw { width: 80%; height: auto; }
.cart-item h3 { font-size: 0.98rem; letter-spacing: -0.01em; margin-bottom: 2px; }
.cart-item-price { font-size: 0.9rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.qty { display: inline-flex; align-items: center; margin-top: 8px; border: 1.5px solid var(--line); border-radius: 999px; }
.qty button { width: 44px; height: 36px; background: none; border: 0; font-size: 1.1rem; font-weight: 600; border-radius: 999px; }
.qty button:hover { background: var(--surface-2); }
.qty output { min-width: 24px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.cart-remove { align-self: start; min-width: 44px; min-height: 44px; background: none; border: 0; color: var(--ink-soft); font-size: 0.85rem; text-decoration: underline; text-underline-offset: 3px; }
.cart-remove:hover { color: var(--ink); }
.cart-foot { padding: 18px 20px 22px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.cart-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.cart-note { font-size: 0.82rem; color: var(--ink-soft); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 90;
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 12px 22px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: 0.93rem;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
