/* ==========================================================================
   Lali Sensorial
   Colors come from the sticker logo. Type: Fredoka (matches the wordmark)
   for headings and buttons, Nunito for reading text.
   ========================================================================== */

:root {
  /* From the logo */
  --paper: #FEFDF8;        /* wool */
  --turquoise: #A9DED6;    /* sticker */
  --ink: #235A55;          /* outline and wordmark */
  --butter: #F9E7A7;       /* halo behind the lamb */
  --blush: #F3B6B1;        /* cheeks */

  /* Derived tints and shades */
  --turquoise-light: #DDF2EE;
  --turquoise-mid: #C6E9E3;
  --ink-deep: #1A4743;
  --ink-soft: #4C6F6B;
  --butter-light: #FDF5DA;
  --blush-light: #FBE7E4;
  --sky-light: #E3EFF8;
  --lilac-light: #EEE8F8;

  /* Pop-it bubbles */
  --bubble-turquoise: #A9DED6;
  --bubble-butter: #F9E7A7;
  --bubble-blush: #F6C3BE;
  --bubble-sky: #BFDBF0;
  --bubble-lilac: #D6C9EE;

  --line: rgb(35 90 85 / .14);
  --line-strong: rgb(35 90 85 / .26);

  --font: "Nunito", ui-rounded, system-ui, sans-serif;
  --font-display: "Fredoka", "Nunito", ui-rounded, system-ui, sans-serif;
  --max-width: 1120px;
  --gutter: 16px;
  --header-height: 64px;
  --radius: 28px;
  --spring: cubic-bezier(.3, 1.4, .5, 1);
  --ease: cubic-bezier(.2, .9, .3, 1);

  interpolate-size: allow-keywords;
}

@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 40px; } }

/* ---------- Base ---------- */

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

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

html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 1024px) { body { font-size: 1.125rem; } }

img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }

/* Fredoka for headings, buttons and prices: the wordmark's typeface. */
h1, h2, h3, h4, summary, .button, .link, .skip-link, .add-button, .filter, .lang__option,
.cart-button, .counter, .order-bar__button, .stepper output, .steps__number, .about__chips li,
.product__price, .detail__price strong, .order__total strong, .line__subtotal,
.toast button, .line--removed button {
  font-family: var(--font-display);
}
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--max-width));
  margin-inline: auto;
}
.container--narrow { max-width: 760px; }

.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: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: 999px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.icon {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.icon--filled { fill: currentColor; stroke: none; }

mark.pending {
  background: var(--butter);
  color: var(--ink);
  border-radius: 6px;
  padding: 0 4px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px;
  border: 0; border-radius: 999px;
  font-weight: 600; font-size: 1.0625rem; text-decoration: none;
  cursor: pointer;
  transition: transform .15s var(--spring), background-color .2s;
}
.button:active { transform: scale(.96); }
.button--primary { background: var(--ink); color: var(--paper); }
.button--primary:hover { background: var(--ink-deep); }
.button--soft { background: var(--turquoise-light); color: var(--ink); }
.button--butter { background: var(--butter); color: var(--ink); }
.button--block { width: 100%; }

.button__price {
  padding-left: 12px;
  border-left: 1.5px solid rgb(253 251 247 / .35);
  font-variant-numeric: tabular-nums;
}
.button__price[hidden] { display: none; }

.link {
  font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 2px;
  text-underline-offset: 5px; text-decoration-color: var(--turquoise);
  padding: 10px 4px;
}
.link:hover { text-decoration-color: currentColor; }

.icon-button {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--turquoise-light); color: var(--ink);
  cursor: pointer;
  transition: transform .15s var(--spring);
}
.icon-button:active { transform: scale(.92); }

/* ---------- Draft notice ---------- */

.draft-banner {
  background: var(--butter);
  color: var(--ink);
  font-size: .875rem; font-weight: 600; text-align: center;
  padding: 8px var(--gutter);
}

/* ---------- Header ---------- */

.header {
  position: sticky; top: 0; z-index: 20;
  background: rgb(253 251 247 / .88);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.header[data-scrolled] { border-bottom-color: var(--line); }

.header__row { height: var(--header-height); display: flex; align-items: center; gap: 10px; }
.header__mark { border-radius: 50%; flex: none; margin-right: auto; }
.header__mark img { width: 44px; height: 44px; }

.header__nav { display: none; }
@media (min-width: 880px) {
  .header__mark { margin-right: 0; }
  .header__nav { display: flex; gap: 4px; margin-left: auto; margin-right: 8px; }
  .header__nav a {
    padding: 10px 16px; border-radius: 999px;
    font-weight: 600; color: var(--ink-soft); text-decoration: none;
    transition: background-color .2s, color .2s;
  }
  .header__nav a:hover { background: var(--turquoise-light); color: var(--ink); }
}

.lang {
  display: flex; padding: 3px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
}
.lang__option {
  min-width: 40px; height: 36px; padding: 0 8px;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-soft);
  font-weight: 600; font-size: .875rem;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.lang__option[aria-pressed="true"] { background: var(--turquoise-light); color: var(--ink); }

.cart-button {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 12px;
  border: 0; border-radius: 999px;
  background: var(--turquoise-light); color: var(--ink);
  font-weight: 600; cursor: pointer;
  transition: transform .15s var(--spring);
}
.cart-button:active { transform: scale(.95); }
.cart-button__label { display: none; }
@media (min-width: 480px) { .cart-button { padding: 0 16px 0 14px; } .cart-button__label { display: inline; } }

.counter {
  min-width: 22px; height: 22px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: 999px;
  background: var(--butter); color: var(--ink);
  font-size: .8125rem; font-weight: 600; line-height: 1;
}
.counter[hidden] { display: none; }

/* ---------- Hero ---------- */

.hero { padding-block: 20px 56px; }

.hero__grid {
  display: grid; gap: 36px;
  justify-items: center; text-align: center;
}

.hero__logo {
  width: clamp(150px, 42vw, 196px); height: auto; margin-inline: auto;
  filter: drop-shadow(0 12px 20px rgb(35 90 85 / .18));
}
@media (min-width: 880px) { .hero__logo { width: 220px; } }

/* The lamb's ears: separate layers that swing from where they meet the wool. */
.lamb { position: relative; aspect-ratio: 1; -webkit-tap-highlight-color: transparent; }
.lamb img { display: block; width: 100%; height: 100%; }
.lamb__layer { position: absolute; inset: 0; opacity: 0; }
.lamb.is-ready .lamb__layer { opacity: 1; }
.lamb.is-ready .lamb__still { visibility: hidden; }
.lamb__ear--left { transform-origin: 31.05% 38.14%; }
.lamb__ear--right { transform-origin: 68.81% 38.09%; }
.lamb.is-wiggling .lamb__ear--left { animation: ear-left 1.4s ease-in-out; }
.lamb.is-wiggling .lamb__ear--right { animation: ear-right 1.4s ease-in-out .09s; }

/* The stitched ring turns a little further each time (angle set in app.js),
   so it never snaps back. */
.lamb__ring {
  transform-origin: 49.94% 50%;
  transition: transform 1.8s cubic-bezier(.45, 0, .25, 1);
}

@keyframes ear-left {
  12% { transform: rotate(14deg); }
  26% { transform: rotate(-8deg); }
  40% { transform: rotate(10deg); }
  54% { transform: rotate(-5deg); }
  68% { transform: rotate(5deg); }
  82% { transform: rotate(-2deg); }
}
@keyframes ear-right {
  12% { transform: rotate(-14deg); }
  26% { transform: rotate(8deg); }
  40% { transform: rotate(-10deg); }
  54% { transform: rotate(5deg); }
  68% { transform: rotate(-5deg); }
  82% { transform: rotate(2deg); }
}

.hero h1 {
  margin: 20px auto 0;
  font-size: clamp(2rem, 1.3rem + 3.2vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -.025em;
  max-width: 14ch;
}

.hero__subtitle {
  margin: 14px auto 0;
  max-width: 32ch;
  color: var(--ink-soft);
  font-size: 1.125rem;
}

.hero__actions {
  margin-top: 24px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.hero__actions .button { width: min(100%, 320px); }

@media (min-width: 880px) {
  .hero { padding-block: 40px 104px; }
  .hero__grid {
    grid-template-columns: 1.05fr 1fr;
    align-items: center; justify-items: start; text-align: left;
    gap: 48px;
  }
  .hero__logo, .hero h1, .hero__subtitle { margin-inline: 0; }
  .hero__actions { flex-direction: row; gap: 20px; }
  .hero__actions .button { width: auto; }
  .hero__play { justify-self: center; }
}

/* ---------- Pop-it ---------- */

.hero__play {
  display: grid; justify-items: center; gap: 14px;
  perspective: 900px;
}

.popit {
  --cell: clamp(54px, 16vw, 64px);
  display: grid;
  grid-template-columns: repeat(5, var(--cell));
  border-radius: 30px;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  box-shadow:
    0 1px 0 rgb(255 255 255 / .8) inset,
    0 2px 0 rgb(35 90 85 / .05),
    0 22px 44px -18px rgb(35 90 85 / .35);
}
@media (min-width: 880px) { .popit { --cell: 76px; border-radius: 36px; } }

.bubble {
  width: var(--cell); height: var(--cell);
  padding: 0; border: 0;
  background: var(--bubble);
  display: grid; place-items: center;
  cursor: pointer;
  touch-action: pan-y;
}
.bubble::before {
  content: "";
  width: 74%; aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgb(255 255 255 / .9), rgb(255 255 255 / 0) 40%),
    radial-gradient(circle at 50% 50%, rgb(0 0 0 / 0) 58%, rgb(35 90 85 / .12) 100%),
    var(--bubble);
  box-shadow: 0 3px 0 rgb(35 90 85 / .07), 0 6px 10px rgb(35 90 85 / .14);
  transition: transform .22s var(--spring), box-shadow .2s, background .2s;
}
.bubble[aria-pressed="true"]::before {
  background:
    radial-gradient(circle at 66% 74%, rgb(255 255 255 / .75), rgb(255 255 255 / 0) 38%),
    radial-gradient(circle at 40% 30%, rgb(35 90 85 / .14), rgb(35 90 85 / 0) 62%),
    var(--bubble);
  box-shadow: inset 0 3px 7px rgb(35 90 85 / .2), inset 0 -1px 0 rgb(255 255 255 / .7);
  transform: scale(.9);
}
.bubble.is-popping[aria-pressed="true"]::before { animation: pop .34s var(--spring); }
.bubble.is-popping[aria-pressed="false"]::before { animation: unpop .34s var(--spring); }
.bubble:focus-visible { outline: none; }
.bubble:focus-visible::before { outline: 3px solid var(--ink); outline-offset: 3px; }

/* Phones show two rows */
@media (max-width: 879px) { .bubble:nth-child(n + 11) { display: none; } }

.popit.is-inflating .bubble::before {
  animation: inflate .55s var(--spring) backwards;
  animation-delay: calc(var(--i) * 28ms + 150ms);
}

@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(.8, .76); }
  100% { transform: scale(.9); }
}
@keyframes unpop {
  0% { transform: scale(.9); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
@keyframes inflate {
  from { transform: scale(.35); opacity: 0; }
}

/* Soap bubbles that float up when a bubble is pressed */
.hero__play { position: relative; }
.fizz { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.fizz__bubble {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--ink);
  border-color: color-mix(in srgb, var(--tint) 45%, var(--ink) 55%);
  background:
    radial-gradient(circle at 32% 30%, rgb(255 255 255 / .95) 0 16%, rgb(255 255 255 / 0) 32%),
    radial-gradient(circle at 50% 50%, rgb(255 255 255 / .2) 50%, rgb(255 255 255 / .6) 100%);
  background-color: color-mix(in srgb, var(--tint) 45%, rgb(255 255 255 / .35));
  will-change: transform, opacity;
}

.popit__hint {
  font-size: .9375rem; font-weight: 600; color: var(--ink-soft);
  min-height: 1.5em;
}

/* ---------- Sections ---------- */

.section { padding-block: 64px; }
@media (min-width: 880px) { .section { padding-block: 104px; } }

.section-title,
.section__head h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.9vw, 2.625rem);
  letter-spacing: -.02em;
}

.section__head { display: grid; gap: 6px; margin-bottom: 20px; }
.section__head p { color: var(--ink-soft); }

/* Wool edge: the scalloped outline of the lamb's fleece */
.wool { position: relative; --r: 14px; margin-block: var(--r); }
.wool::before,
.wool::after {
  content: "";
  position: absolute; left: 0; right: 0;
  height: var(--r);
  background: inherit;
  -webkit-mask: radial-gradient(circle var(--r) at 50% 100%, #000 calc(100% - .6px), #0000) 0 0 / calc(var(--r) * 2) var(--r) repeat-x;
  mask: radial-gradient(circle var(--r) at 50% 100%, #000 calc(100% - .6px), #0000) 0 0 / calc(var(--r) * 2) var(--r) repeat-x;
  pointer-events: none;
}
.wool::before { bottom: calc(100% - 1px); }
.wool::after { top: calc(100% - 1px); transform: scaleY(-1); }
.wool--top { margin-bottom: 0; }
.wool--top::after { display: none; }
@media (min-width: 880px) { .wool { --r: 20px; } }

/* ---------- Catalog ---------- */

.catalog { padding-top: 24px; }
@media (min-width: 880px) { .catalog { padding-top: 32px; } }

.filters {
  display: flex; gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-inline: calc(-1 * var(--gutter));
  padding: 4px var(--gutter) 12px;
  scroll-padding-inline: var(--gutter);
}
.filters::-webkit-scrollbar { display: none; }

.filter {
  flex: none;
  height: 44px; padding: 0 18px;
  border: 1.5px solid var(--line-strong); border-radius: 999px;
  background: transparent; color: var(--ink-soft);
  font-weight: 600; font-size: .9375rem;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .15s var(--spring);
}
.filter:active { transform: scale(.95); }
.filter[aria-pressed="true"] {
  background: var(--ink); border-color: var(--ink); color: var(--paper);
}

.catalog__groups { margin-top: 20px; }

.group + .group { margin-top: 52px; }
.group[hidden] { display: none; }
.group__title { font-size: 1.3125rem; margin-bottom: 16px; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 12px;
}
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 20px; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; } }

.catalog__error {
  padding: 24px; border-radius: var(--radius);
  background: var(--butter-light);
}

/* Product card */

.product { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.product__link {
  display: grid; gap: 12px;
  text-decoration: none;
  border-radius: var(--radius);
}
.product__link:focus-visible { outline-offset: 4px; }

.media {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: var(--tint, var(--turquoise-light));
  display: grid; place-items: center;
  overflow: hidden;
}
.media > svg { width: 84%; height: 84%; }
.media > img { width: 100%; height: 100%; object-fit: cover; }
.media > .media__mark { width: 56%; height: auto; object-fit: contain; }
.media svg * { transition: fill .35s ease; }

/* The lamb's dark contour: each drawing gets a silhouette layer painted behind it. */
.outline * {
  fill: var(--ink) !important;
  stroke: var(--ink) !important;
  stroke-width: 6;
  stroke-linejoin: round;
  stroke-linecap: round;
  opacity: 1 !important;
  transition: none !important;
}
.outline [fill="none"] { fill: none !important; }
.outline .shadow { display: none; }

.product__link .media { transition: transform .25s var(--spring); }
.product__link:active .media { transform: scale(.95); }

.media__colors {
  position: absolute; left: 10px; top: 10px;
  display: flex; gap: 3px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgb(253 251 247 / .85);
}
.media__colors span { width: 10px; height: 10px; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px rgb(35 90 85 / .12); }

.product__name { font-size: 1.0625rem; font-weight: 600; line-height: 1.25; }
.product__price { font-weight: 600; color: var(--ink); margin-top: -4px; }
.product__price--pending { font-weight: 600; font-size: .9375rem; color: var(--ink-soft); }

.product__actions { margin-top: auto; }

.add-button {
  width: 100%; height: 44px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 999px;
  background: var(--turquoise-light); color: var(--ink);
  font-weight: 600; font-size: 1rem; text-decoration: none;
  cursor: pointer;
  transition: transform .15s var(--spring), background-color .2s;
}
.add-button:hover { background: var(--turquoise-mid); }
.add-button:active { transform: scale(.95); }
.add-button .icon { width: 20px; height: 20px; stroke-width: 2.4; }

.stepper {
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
  height: 44px;
  border-radius: 999px;
  background: var(--ink); color: var(--paper);
  animation: appear .25s var(--spring);
}
.stepper button {
  height: 44px; border: 0; border-radius: 999px;
  background: transparent; color: inherit;
  display: grid; place-items: center;
  cursor: pointer;
}
.stepper button:active { background: rgb(255 255 255 / .14); }
.stepper button:disabled { opacity: .35; cursor: default; background: transparent; }
.stepper .icon { width: 20px; height: 20px; stroke-width: 2.4; }
.stepper output { text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.stepper :focus-visible { outline-color: var(--butter); outline-offset: -3px; }

.stepper--soft { background: var(--turquoise-light); color: var(--ink); animation: none; }
.stepper--soft button:active { background: var(--turquoise-mid); }
.stepper--soft :focus-visible { outline-color: var(--ink); }

@keyframes appear { from { transform: scale(.9); opacity: 0; } }

/* Wide card: categories with a single item */

.product--wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
  gap: 16px 20px;
  align-items: center;
  padding: 12px;
  border-radius: calc(var(--radius) + 12px);
  background: var(--tint, var(--turquoise-light));
}
.product--wide .media { background: rgb(255 255 255 / .55); }
.product--wide .product__body { display: grid; gap: 10px; justify-items: start; padding-right: 8px; }
.product--wide .product__name { font-size: clamp(1.1875rem, 1rem + 1vw, 1.625rem); }
.product--wide .product__description { color: var(--ink-soft); max-width: 46ch; font-size: .9375rem; }
.product--wide .product__actions { width: 100%; }
.product--wide .add-button { width: auto; padding: 0 20px; background: var(--paper); }
.product--wide .add-button:hover { background: #fff; }

@media (max-width: 479px) {
  .product--wide { grid-template-columns: 1fr; }
  .product--wide .media { aspect-ratio: 16 / 10; }
  .product--wide .product__body { padding: 4px 8px 8px; }
  .product--wide .add-button { width: 100%; }
}
@media (min-width: 880px) {
  .product--wide { grid-template-columns: 280px minmax(0, 1fr); padding: 16px; gap: 40px; }
}

/* ---------- How to order ---------- */

.steps { background: var(--butter-light); }

.steps__list { margin-top: 32px; display: grid; gap: 28px; }
.steps__list li {
  display: grid; grid-template-columns: 56px 1fr; column-gap: 16px; row-gap: 4px;
  align-content: start;
}
.steps__list h3 { font-size: 1.1875rem; align-self: end; }
.steps__list p { grid-column: 2; color: var(--ink-soft); max-width: 34ch; }

.steps__number {
  grid-row: span 2;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.375rem; font-weight: 600;
  background:
    radial-gradient(circle at 34% 28%, rgb(255 255 255 / .9), rgb(255 255 255 / 0) 42%),
    var(--bubble);
  box-shadow: 0 3px 0 rgb(35 90 85 / .07), 0 6px 10px rgb(35 90 85 / .12);
}

@media (min-width: 880px) {
  .steps__list { grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 44px; }
  .steps__list li { grid-template-columns: 1fr; row-gap: 10px; }
  .steps__number { grid-row: auto; width: 64px; height: 64px; margin-bottom: 8px; }
  .steps__list p { grid-column: 1; }
}

/* ---------- About ---------- */

.about__grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 880px) { .about__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 80px; } }

.about__art {
  margin: 0;
  width: min(100%, 440px);
  aspect-ratio: 1;
  border-radius: 48px;
  background: var(--turquoise-light);
  display: grid; place-items: center;
}
.about__art svg { width: 70%; height: 70%; }

.about__text { max-width: 60ch; }
.about__text h2 { margin-bottom: 18px; }
.about__text p { color: var(--ink-soft); }
.about__text p + p { margin-top: 14px; }
.about__text .about__lead { color: var(--ink); font-size: 1.1875rem; font-weight: 600; }
.about__text .about__thanks { color: var(--ink); font-weight: 700; }

.about__chips { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.about__chips li {
  padding: 8px 16px; border-radius: 999px;
  background: var(--turquoise-light); color: var(--ink);
  font-weight: 600; font-size: .9375rem;
}

/* ---------- FAQ ---------- */

.faq { padding-top: 24px; }
@media (min-width: 880px) { .faq { padding-top: 40px; } }
.faq__list { margin-top: 24px; border-top: 1.5px solid var(--line); }

.faq-item { border-bottom: 1.5px solid var(--line); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0;
  font-weight: 600; font-size: 1.0625rem;
  cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:focus-visible { outline-offset: 2px; border-radius: 12px; }
.faq-item__icon {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--turquoise-light); color: var(--ink);
  transition: transform .3s var(--spring), background-color .2s;
}
.faq-item__icon .icon { width: 18px; height: 18px; stroke-width: 2.6; }
.faq-item[open] .faq-item__icon { transform: rotate(45deg); background: var(--butter); }
.faq-item__answer { padding: 0 52px 22px 0; color: var(--ink-soft); max-width: 62ch; }

.faq-item::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size .3s var(--ease), content-visibility .3s allow-discrete;
}
.faq-item[open]::details-content { block-size: auto; }

/* ---------- Footer ---------- */

/* Turquoise like the sticker, with its white stitched line. */
.footer {
  background: var(--turquoise);
  color: var(--ink);
  padding: 56px 0 calc(112px + env(safe-area-inset-bottom));
}

.footer__grid { display: grid; gap: 36px; }
@media (min-width: 880px) { .footer__grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 48px; } }

.footer__brand { display: flex; gap: 18px; align-items: center; }
.footer__brand img {
  width: 88px; height: 88px; border-radius: 50%;
  box-shadow: 0 0 0 5px var(--paper), 0 10px 18px rgb(35 90 85 / .22);
}
.footer__brand p { max-width: 30ch; }
.footer__brand .footer__name { font-family: var(--font-display); font-weight: 600; font-size: 1.375rem; }

.footer__heading { font-size: 1.0625rem; margin-bottom: 14px; }

.social { display: flex; flex-wrap: wrap; gap: 8px; }
.social a, .social span {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 16px 0 12px;
  border-radius: 999px;
  background: rgb(254 253 248 / .55);
  font-family: var(--font-display); font-weight: 500; text-decoration: none;
  transition: background-color .2s;
}
.social a:hover { background: var(--paper); }
.social span { opacity: .65; }
.social .icon { width: 22px; height: 22px; }

.footer__legal {
  margin-top: 44px; padding-top: 22px;
  border-top: 3px dashed rgb(255 255 255 / .9);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  font-size: .9375rem;
}
.footer__age { font-weight: 700; }

/* ---------- Floating WhatsApp and order bar ---------- */

.whatsapp-float {
  position: fixed; z-index: 30;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom) + var(--bar-offset, 0px));
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--butter); color: var(--ink-deep);
  box-shadow: 0 2px 0 rgb(35 90 85 / .08), 0 10px 24px -6px rgb(35 90 85 / .35);
  transition: bottom .4s var(--spring), transform .15s var(--spring);
}
.whatsapp-float:active { transform: scale(.92); }
.whatsapp-float .icon { width: 30px; height: 30px; }
@media (min-width: 880px) { .whatsapp-float { right: 28px; bottom: calc(28px + env(safe-area-inset-bottom)); width: 60px; height: 60px; } }

body.has-order { --bar-offset: 76px; --toast-offset: 80px; }
@media (min-width: 640px) { body.has-order { --bar-offset: 0px; } }
@media (min-width: 880px) { body.has-order { --toast-offset: 92px; } }

.order-bar {
  position: fixed; z-index: 30;
  left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex; justify-content: center;
  pointer-events: none;
  transform: translateY(calc(100% + 40px));
  transition: transform .45s var(--spring);
}
.has-order .order-bar { transform: none; }
@media (min-width: 880px) { .order-bar { bottom: calc(28px + env(safe-area-inset-bottom)); } }

.order-bar__inner {
  pointer-events: auto;
  width: min(100%, 440px); height: 64px;
  display: flex; align-items: center;
  border-radius: 999px;
  background: var(--ink); color: var(--paper);
  box-shadow: 0 14px 30px -10px rgb(35 90 85 / .55);
}
.order-bar__button {
  flex: 1 1 auto; min-width: 0; height: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 0 12px 0 10px;
  border: 0; border-radius: 999px;
  background: transparent; color: inherit;
  font-weight: 600; font-size: 1rem; text-align: left;
  cursor: pointer;
  transition: transform .15s var(--spring);
}
.order-bar__button:active { transform: scale(.97); }
.order-bar__text { display: grid; min-width: 0; line-height: 1.2; }
.order-bar__label { font-size: .9375rem; white-space: nowrap; }
.order-bar__checkout {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  height: 46px; margin-right: 9px; padding: 0 16px 0 20px;
  border: 0; border-radius: 999px;
  background: var(--butter); color: var(--ink);
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  cursor: pointer;
  transition: transform .15s var(--spring), background-color .2s;
}
.order-bar__checkout:hover { background: #F5DD8C; }
.order-bar__checkout:active { transform: scale(.95); }
.order-bar__checkout .icon { width: 20px; height: 20px; stroke-width: 2.4; }
.order-bar__inner :focus-visible { outline-color: var(--butter); outline-offset: 2px; }
.order-bar__icon {
  position: relative;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgb(255 255 255 / .14);
}
.order-bar__icon .counter { position: absolute; top: -3px; right: -7px; }
.order-bar__total { font-family: var(--font-display); font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.order-bar__total:empty { display: none; }
.order-bar.is-bouncing .order-bar__icon { animation: bounce .5s var(--spring); }

@keyframes bounce {
  30% { transform: scale(1.22) rotate(-8deg); }
  60% { transform: scale(.94) rotate(4deg); }
}

/* ---------- Toast ---------- */

.toast {
  position: fixed; z-index: 40;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom) + var(--toast-offset, 0px));
  width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 18px; min-height: 52px;
  border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-weight: 600; font-size: .9375rem;
  box-shadow: 0 14px 30px -10px rgb(35 90 85 / .5);
  opacity: 0; pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity .2s, transform .3s var(--spring);
}
.toast.is-visible { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.toast button {
  flex: none; height: 38px; padding: 0 16px;
  border: 0; border-radius: 999px;
  background: var(--butter); color: var(--ink);
  font-weight: 600; cursor: pointer;
}
.toast :focus-visible { outline-color: var(--butter); }

/* ---------- Sheets (product detail and order) ---------- */

.sheet {
  width: 100%; height: 100%;
  max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: transparent;
  color: var(--ink);
  overflow: hidden;
}
.sheet[open] { display: flex; align-items: flex-end; justify-content: center; }
.sheet::backdrop { background: rgb(35 90 85 / 0); transition: background-color .3s; }
.sheet.is-visible::backdrop { background: rgb(35 90 85 / .45); }

.sheet__panel {
  position: relative;
  width: 100%; max-height: 94dvh;
  display: flex; flex-direction: column;
  background: var(--paper);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -12px 40px rgb(35 90 85 / .18);
  overflow: hidden;
  transform: translateY(100%);
  transition: transform .38s var(--ease);
}
.sheet.is-visible .sheet__panel { transform: none; }

.sheet__handle {
  flex: none; height: 26px;
  display: grid; place-items: center;
  touch-action: none; cursor: grab;
}
.sheet__handle::before { content: ""; width: 44px; height: 5px; border-radius: 3px; background: var(--line-strong); }

.sheet__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }

.sheet__close { position: absolute; top: 14px; right: 14px; z-index: 3; background: rgb(253 251 247 / .92); box-shadow: 0 2px 10px rgb(35 90 85 / .12); }

/* Product detail */

.detail__gallery { position: relative; margin: 0 16px; }
.detail__photos {
  display: flex;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: var(--radius);
}
.detail__photos::-webkit-scrollbar { display: none; }
.detail__photos .media { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1; border-radius: 0; }
.detail__photos .media > svg { width: 72%; height: 86%; }

.detail__dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; }
.detail__dots span { width: 8px; height: 8px; border-radius: 50%; background: rgb(35 90 85 / .25); transition: background-color .2s, width .2s; }
.detail__dots span[aria-current="true"] { background: var(--ink); width: 20px; border-radius: 4px; }

.detail__info { padding: 20px 20px 24px; }
.detail__info h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); letter-spacing: -.02em; }
.detail__price { margin-top: 6px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.detail__price strong { font-size: 1.375rem; color: var(--ink); }
.detail__price .product__price--pending { font-size: 1.0625rem; }
.detail__savings { font-size: .9375rem; font-weight: 600; color: var(--ink-soft); }
.detail__savings s { text-decoration-thickness: 1.5px; }
.detail__description { margin-top: 12px; color: var(--ink-soft); max-width: 46ch; }

/* One pop-it bubble per sentence, in the colors of the "How to order" steps. */
.detail__points { display: grid; gap: 10px; margin-top: 16px; padding: 0; list-style: none; }
.detail__points li { position: relative; padding-left: 30px; }
.detail__points li::before {
  content: "";
  position: absolute; left: 0; top: calc(.775em - 9px);
  width: 18px; height: 18px; border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgb(255 255 255 / .9), rgb(255 255 255 / 0) 42%),
    var(--bubble);
  box-shadow: 0 2px 0 rgb(35 90 85 / .07), 0 3px 6px rgb(35 90 85 / .14);
}
.detail__points li:nth-child(3n + 1) { --bubble: var(--bubble-turquoise); }
.detail__points li:nth-child(3n + 2) { --bubble: var(--bubble-blush); }
.detail__points li:nth-child(3n + 3) { --bubble: var(--bubble-lilac); }
@media (prefers-reduced-motion: no-preference) {
  .sheet.is-visible .detail__points li::before {
    animation: inflate .55s var(--spring) backwards;
    animation-delay: calc(var(--i) * 90ms + 220ms);
  }
}

/* A practical detail ("The plate isn't included"), apart from what the toy is good for. */
.detail__note { margin-top: 14px; max-width: 46ch; font-size: .9375rem; font-weight: 700; color: var(--ink); }

.detail__includes { margin-top: 20px; }
.detail__includes h3, .color-picker legend { font-size: 1rem; font-weight: 600; margin-bottom: 10px; }
.detail__includes ul { display: grid; gap: 8px; }
.detail__includes li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.detail__includes .media { width: 52px; border-radius: 16px; flex: none; }
/* A piece sold on its own: the whole row opens it. */
.piece-link {
  display: flex; align-items: center; gap: 12px; width: 100%;
  margin: -4px; padding: 4px; border: 0; border-radius: 20px;
  background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
  transition: background-color .2s;
}
.piece-link > span { flex: 1; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.piece-link > .icon { width: 18px; height: 18px; flex: none; color: var(--ink-soft); }
.piece-link:hover { background: var(--turquoise-light); }
.piece-link:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
/* A piece that isn't sold on its own: its part of the kit's photo (a check if there is none). */
.media--crop { background-repeat: no-repeat; }
.media--piece { color: var(--ink); }
.media--piece > svg { width: 22px; height: 22px; }

/* Back to the kit a piece was opened from. */
.detail__back {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 0 10px -4px; padding: 6px 12px 6px 8px;
  border: 0; border-radius: 999px;
  background: var(--turquoise-light); color: var(--ink);
  font: inherit; font-size: .9375rem; font-weight: 700; cursor: pointer;
}
.detail__back .icon { width: 18px; height: 18px; }
.detail__back:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.color-picker { margin: 20px 0 0; padding: 0; border: 0; min-width: 0; }
.color-picker legend { padding: 0; }
.color-picker legend span { font-weight: 600; color: var(--ink-soft); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.swatch__circle {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgb(35 90 85 / .14);
  transition: box-shadow .2s, transform .2s var(--spring);
}
.swatch__circle .icon { width: 20px; height: 20px; stroke: var(--check, var(--ink-deep)); stroke-width: 2.8; opacity: 0; transition: opacity .15s; }
.swatch input:checked + .swatch__circle {
  box-shadow: inset 0 0 0 1px rgb(35 90 85 / .14), 0 0 0 3px var(--paper), 0 0 0 5px var(--ink);
}
.swatch input:checked + .swatch__circle .icon { opacity: 1; }
.swatch input:active + .swatch__circle { transform: scale(.9); }
.swatch input:focus-visible + .swatch__circle { outline: 3px solid var(--ink); outline-offset: 6px; }

/* A version with its own price (how many flowers): name and price on a pill. */
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.choice__box {
  display: grid; gap: 2px;
  padding: 12px 16px;
  border: 1.5px solid var(--line-strong); border-radius: 20px;
  font-weight: 600; font-size: .9375rem; color: var(--ink-soft);
  transition: background-color .2s, border-color .2s, box-shadow .2s, transform .15s var(--spring);
}
.choice__box strong { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; color: var(--ink); }
.choice input:checked + .choice__box { border-color: var(--ink); background: var(--turquoise-light); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice input:active + .choice__box { transform: scale(.97); }
.choice input:focus-visible + .choice__box { outline: 3px solid var(--ink); outline-offset: 3px; }

.age-notice {
  margin-top: 20px;
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--butter-light);
  font-size: .9375rem; font-weight: 600;
}
.age-notice .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--ink); }

.detail__action {
  flex: none;
  display: flex; gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.detail__action .stepper { width: 132px; flex: none; }
.detail__action .button { flex: 1; min-width: 0; padding: 0 16px; }

@media (min-width: 880px) {
  .sheet--detail[open] { align-items: center; padding: 32px; }
  .sheet--detail .sheet__panel {
    max-width: 960px; height: min(640px, 100%); max-height: none;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    border-radius: 36px;
    opacity: 0;
    transform: translateY(28px) scale(.98);
    transition: transform .34s var(--ease), opacity .22s;
  }
  .sheet--detail.is-visible .sheet__panel { opacity: 1; transform: none; }
  .sheet--detail .sheet__handle { display: none; }
  .sheet--detail .sheet__scroll { display: contents; }
  /* Square like the photos, so none is cropped: as wide as its column allows, and no taller than the sheet. */
  .detail__gallery {
    grid-row: 1 / 3; align-self: center; justify-self: center;
    width: min(100% - 32px, min(640px, 100vh - 64px) - 32px);
    margin: 16px;
  }
  .detail__info { overflow-y: auto; padding: 48px 40px 24px 16px; }
  .detail__action { padding: 16px 40px 28px 16px; border-top: 0; }
}

/* Order */

.order__head {
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 16px 12px 20px;
  touch-action: none;
}
.order__head h2 { font-size: 1.5rem; }

.order__body { padding: 0 16px 20px; }

.order__lines { display: grid; gap: 4px; }

.line {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  gap: 4px 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.line .media { width: 68px; border-radius: 18px; grid-row: span 2; }
.line__name { font-weight: 600; line-height: 1.25; }
.line__detail { font-size: .875rem; color: var(--ink-soft); }
.line__subtotal { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.line .stepper { grid-column: 2 / 4; justify-self: end; width: 128px; height: 40px; grid-template-columns: 40px 1fr 40px; }
.line .stepper button { height: 40px; }

.line--removed {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 16px; margin: 6px 0;
  border-radius: 16px;
  background: var(--turquoise-light);
  font-weight: 600; font-size: .9375rem;
  animation: appear .25s var(--spring);
}
.line--removed button {
  height: 36px; padding: 0 14px;
  border: 0; border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font-weight: 600; cursor: pointer;
}

.order__details { margin-top: 24px; display: grid; gap: 14px; }
.order__details h3 { font-size: 1.0625rem; }
.order__details h3 span { font-weight: 600; color: var(--ink-soft); }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .9375rem; }
.field input, .field textarea {
  width: 100%;
  min-height: 48px; padding: 12px 14px;
  border: 1.5px solid var(--line-strong); border-radius: 14px;
  background: #fff;
  font-size: 1rem;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 76px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--turquoise-mid); }
.field input::placeholder, .field textarea::placeholder { color: rgb(74 102 98 / .65); }
.field input[aria-invalid="true"] { border-color: #B4473D; }
.field input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgb(180 71 61 / .2); }
.field__optional { font-weight: 500; color: var(--ink-soft); }
.field__hint { font-size: .875rem; color: var(--ink-soft); }
.field__error { font-size: .875rem; font-weight: 700; color: #A3392F; }
.field__error[hidden], .field__hint[hidden] { display: none; }
.field[hidden] { display: none; }

/* Address rows: province + city, main street + number */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.field-row--street { grid-template-columns: minmax(0, 1fr) 140px; }

.order__billing-address { display: grid; gap: 14px; padding: 16px; border-radius: 18px; background: var(--turquoise-light); }
.order__billing-address[hidden] { display: none; }
.order__billing-address .field input, .order__billing-address .field select { background-color: #fff; }
.order__minihead { font-size: 1rem; }
.field-row .field { min-width: 0; }
.field-row--contact { grid-template-columns: 1fr; }
@media (min-width: 560px) { .field-row--contact { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }

.field select {
  width: 100%; min-height: 48px; padding: 12px 40px 12px 14px;
  border: 1.5px solid var(--line-strong); border-radius: 14px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23235A55' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center / 18px no-repeat;
  font-size: 1rem; color: var(--ink);
  -webkit-appearance: none; appearance: none;
  text-overflow: ellipsis;
}
.field select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--turquoise-mid); }

.order__details .order__subhead { margin-top: 10px; }
.order__extra { margin-top: 6px; padding-top: 18px; border-top: 2px dashed var(--line-strong); }

.checkbox {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 44px; font-weight: 600; cursor: pointer;
}
.checkbox input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.checkbox__box {
  flex: none; width: 24px; height: 24px; border-radius: 7px;
  display: grid; place-items: center;
  border: 2px solid var(--line-strong); background: #fff;
  transition: background-color .2s, border-color .2s;
}
.checkbox__box .icon { width: 16px; height: 16px; stroke-width: 3; color: var(--paper); opacity: 0; }
.checkbox input:checked + .checkbox__box { background: var(--ink); border-color: var(--ink); }
.checkbox input:checked + .checkbox__box .icon { opacity: 1; }
.checkbox input:focus-visible + .checkbox__box { outline: 3px solid var(--ink); outline-offset: 2px; }

.order__alert {
  padding: 10px 14px; border-radius: 14px;
  background: #FBE4E1; color: #8E2F27;
  font-size: .9375rem; font-weight: 700;
}
.order__alert[hidden] { display: none; }

/* Sending state and the confirmation once the order is placed */
.button:disabled { opacity: .7; cursor: progress; transform: none; }
.order__alert .text-button { margin-top: 4px; color: inherit; }

.sheet--checkout.is-placed .checkout__back { visibility: hidden; }
/* The sent screen shows only the confirmation. */
.sheet--checkout.is-placed .checkout__aside { display: none; }
.placed {
  display: grid; justify-items: center; gap: 12px;
  padding: 36px 20px; border-radius: 24px;
  background: var(--turquoise-light);
  text-align: center;
}
.placed:focus { outline: none; }
.placed__check {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  animation: appear .4s var(--spring);
}
.placed__check .icon { width: 36px; height: 36px; stroke-width: 2.6; }
.placed h3 { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); }
.placed p { max-width: 40ch; color: var(--ink-soft); }
.placed__preview { padding: 8px 12px; border-radius: 12px; background: var(--butter-light); font-size: .875rem; }
.placed .button { margin-top: 6px; }

/* Invoice */
.order__invoice {
  margin-top: 10px; padding-top: 18px;
  border-top: 2px dashed var(--line-strong);
  display: grid; gap: 12px;
}
.order__invoice-fields { display: grid; gap: 14px; margin-top: 4px; }
.order__invoice-fields[hidden] { display: none; }

.switch {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 44px;
  font-weight: 600; cursor: pointer;
}
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track {
  position: relative; flex: none;
  width: 48px; height: 28px; border-radius: 999px;
  background: var(--line-strong);
  transition: background-color .2s;
}
.switch__track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(35 90 85 / .3);
  transition: transform .25s var(--spring);
}
.switch input:checked + .switch__track { background: var(--ink); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 3px solid var(--ink); outline-offset: 3px; }

.segmented { margin: 0; padding: 0; border: 0; min-width: 0; }
.segmented legend { padding: 0; margin-bottom: 6px; font-weight: 600; font-size: .9375rem; }
.segmented__options {
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 4px; border-radius: 999px;
  background: var(--turquoise-light);
}
.segmented__option { position: relative; cursor: pointer; }
.segmented__option input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.segmented__option span {
  display: grid; place-items: center;
  height: 40px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 500; font-size: .9375rem;
  color: var(--ink-soft);
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.segmented__option input:checked + span { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgb(35 90 85 / .18); }
.segmented__option input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 1px; }

.order__privacy { margin-top: 6px; font-size: .875rem; color: var(--ink-soft); }
.order__privacy:focus { outline: none; }
.text-button {
  padding: 4px 0; border: 0; background: none;
  font: inherit; font-weight: 700; color: var(--ink);
  text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer;
}

.order__footer {
  flex: none;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--paper);
  display: grid; gap: 12px;
}
.order__footer[hidden] { display: none; }
.order__total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.order__total span { font-weight: 600; }
.order__total strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.order__note { font-size: .875rem; color: var(--ink-soft); margin-top: -6px; }

.order__empty {
  display: grid; justify-items: center; text-align: center; gap: 10px;
  padding: 32px 8px 40px;
}
.order__empty img { width: 112px; height: 112px; margin-bottom: 8px; }
.order__empty h3 { font-size: 1.25rem; }
.order__empty p { color: var(--ink-soft); max-width: 28ch; margin-bottom: 10px; }


@media (min-width: 880px) {
  .sheet--order[open] { justify-content: flex-end; align-items: stretch; }
  .sheet--order .sheet__panel {
    max-width: 460px; height: 100%; max-height: none;
    border-radius: 32px 0 0 32px;
    transform: translateX(100%);
  }
  .sheet--order .sheet__handle { height: 20px; visibility: hidden; }
  .order__head { padding: 8px 20px 16px 28px; touch-action: auto; }
  .order__body { padding: 0 28px 24px; }
  .order__footer { padding: 18px 28px 28px; }
}

/* Details step (checkout): full screen on phones, a wide two-column panel on computers */

.sheet--checkout .sheet__panel { height: 100dvh; max-height: 100dvh; border-radius: 0; }

.checkout__head {
  flex: none;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  border-bottom: 1px solid var(--line);
}
.checkout__head h2 { font-size: 1.25rem; text-align: center; white-space: nowrap; }
.checkout__head h2:focus { outline: none; }
.checkout__head .icon-button { justify-self: end; }
/* On phones the back button is only the arrow, as wide as the close button, so the title
   stays centered. Computers add the "Tu pedido" label. */
.checkout__back {
  justify-self: start;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 44px; height: 44px; padding: 0;
  white-space: nowrap;
  border: 0; border-radius: 999px;
  background: var(--turquoise-light); color: var(--ink);
  font-family: var(--font-display); font-weight: 500; font-size: .9375rem;
  cursor: pointer;
  transition: transform .15s var(--spring);
}
.checkout__back:active { transform: scale(.95); }
.checkout__back .icon { width: 20px; height: 20px; }
.checkout__back span { display: none; }

/* On phones the whole step scrolls as one page: the total and the send button follow the form. */
.checkout__body {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
}
.checkout__main {
  display: grid; gap: 22px; align-content: start;
  padding: 20px 16px 24px;
}
.checkout__main .order__details { margin-top: 0; }
.checkout__aside { padding: 0 16px calc(28px + env(safe-area-inset-bottom)); }
.checkout__aside-title, .checkout__lines { display: none; }
.checkout__pay { display: grid; gap: 10px; padding-top: 18px; border-top: 2px dashed var(--line-strong); }
.order__totals { display: grid; gap: 4px; }

.summary-line { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.summary-line .media { width: 52px; border-radius: 14px; }
.summary-line__name { font-weight: 700; line-height: 1.25; }
.summary-line__detail { font-size: .8125rem; color: var(--ink-soft); }
.summary-line__price { font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums; }

@media (min-width: 880px) {
  .sheet--checkout[open] { align-items: center; padding: 32px; }
  .sheet--checkout .sheet__panel {
    max-width: 1040px; height: min(800px, 100%); max-height: none;
    border-radius: 32px;
    opacity: 0;
    transform: translateY(28px) scale(.98);
    transition: transform .34s var(--ease), opacity .22s;
  }
  .sheet--checkout.is-visible .sheet__panel { opacity: 1; transform: none; }
  .sheet--checkout.is-placed .sheet__panel { max-width: 640px; height: auto; max-height: 100%; }
  .checkout__head { padding: 16px 24px; }
  .checkout__back { width: auto; padding: 0 14px 0 10px; }
  .checkout__back span { display: inline; }
  .checkout__body { display: flex; overflow: hidden; }
  .checkout__main {
    flex: 1 1 auto; min-height: 0;
    overflow-y: auto; overscroll-behavior: contain;
    padding: 28px 40px 40px;
  }
  /* Only the product list scrolls; the total and the send buttons stay in view. */
  .checkout__aside {
    flex: none; width: 380px;
    display: flex; flex-direction: column; gap: 0;
    padding: 0; overflow: hidden;
    border-top: 0; border-left: 1px solid var(--line);
    background: var(--turquoise-light);
  }
  .checkout__aside-title { display: block; flex: none; padding: 26px 28px 14px; font-size: 1.125rem; }
  .checkout__lines {
    display: grid; align-content: start; gap: 12px;
    flex: 1 1 auto; min-height: 0;
    overflow-y: auto; overscroll-behavior: contain;
    padding: 2px 28px 20px;
  }
  .checkout__pay {
    flex: none; gap: 12px;
    padding: 18px 28px 26px;
    border-top: 2px dashed var(--line-strong);
    box-shadow: 0 -14px 18px -16px rgb(35 90 85 / .3);
  }
}

/* Saved details: what returning customers see instead of the form */
.saved { display: grid; gap: 18px; padding: 20px; border-radius: 22px; background: var(--turquoise-light); }
.saved__block h3 { margin-bottom: 4px; font-size: .875rem; font-weight: 600; color: var(--ink-soft); }
.saved__block p { line-height: 1.45; }
.saved__name { font-weight: 700; font-size: 1.0625rem; }
.saved__muted { font-size: .9375rem; color: var(--ink-soft); }
.saved__edit { justify-self: start; min-height: 44px; padding: 0 18px; font-size: .9375rem; background: var(--paper); }
.saved__edit .icon { width: 18px; height: 18px; }
.saved:not(:has(.saved__block + .saved__block)) { grid-template-columns: 1fr !important; }
@media (min-width: 640px) {
  .saved { grid-template-columns: 1fr 1fr; }
  .saved__edit { grid-column: 1 / -1; }
}

/* Add-to-order flight */
.flying { position: fixed; z-index: 60; pointer-events: none; margin: 0; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
