/* ==========================================================================
   Proteins To Go — estilos de la página pública
   ========================================================================== */

:root {
  --ink: #101010;
  --ink-2: #2b2b29;
  --muted: #62625c;
  --paper: #f4f2ec;
  --surface: #ffffff;
  --line: #e2dfd5;
  --lime: #d4ff3f;
  --wa: #25d366;
  --wa-hover: #1fbf5b;
  --danger: #b42318;
  --focus: #2563eb;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 12px 32px -14px rgb(0 0 0 / 0.22);
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- 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;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body:has(.cart[open]) {
  overflow: hidden;
}

a {
  color: inherit;
}

svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.05;
  overflow-wrap: break-word;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

[hidden] {
  display: none !important;
}

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

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

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

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 0.6em 1em;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

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

/* ---------- Tipografía ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.eyebrow--lime {
  color: var(--lime);
}

.section {
  padding-block: clamp(64px, 9vw, 120px);
}

.section-title {
  margin-top: 14px;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-wrap: balance;
}

.section-head {
  max-width: 680px;
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head__lead {
  margin-top: 16px;
  font-size: 1.1rem;
  color: var(--muted);
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.85em 1.35em;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.btn:active {
  transform: scale(0.97);
}

.btn--lg {
  padding: 1.05em 1.65em;
  font-size: 1.05rem;
}

.btn--lime {
  background: var(--lime);
  color: var(--ink);
}

.btn--lime:hover {
  background: #fff;
}

.btn--ghost {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.35);
}

.btn--ghost:hover {
  box-shadow: inset 0 0 0 1.5px #fff;
}

.btn--dark {
  background: var(--ink);
  color: #fff;
}

.btn--dark:hover {
  background: var(--ink-2);
}

.btn--whatsapp {
  width: 100%;
  background: var(--wa);
  color: var(--ink);
}

.btn--whatsapp:hover {
  background: var(--wa-hover);
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-button:hover {
  color: var(--ink);
}

.link-button--light {
  color: inherit;
  font-size: inherit;
  text-decoration: none;
  text-align: left;
}

.link-button--light:hover {
  color: #fff;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
}

.icon-button:hover {
  background: var(--line);
}

/* ---------- Encabezado ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: rgb(16 16 16 / 0.9);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.01em;
  text-decoration: none;
  text-transform: uppercase;
  color: inherit;
  white-space: nowrap;
}

.logo em {
  font-style: normal;
  color: var(--lime);
}

.logo__mark {
  width: 32px;
  height: 32px;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav a {
  padding: 0.5em 0.95em;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  color: rgb(255 255 255 / 0.78);
  transition: background-color 0.2s, color 0.2s;
}

.nav a:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.08);
}

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

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.55em 0.65em 0.55em 1em;
  border: 0;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
}

.cart-button:hover {
  background: #fff;
}

.cart-badge {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.cart-badge.is-bump {
  animation: bump 0.45s ease;
}

@keyframes bump {
  40% {
    transform: scale(1.35);
  }
}

.menu-toggle {
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.08);
  color: #fff;
}

@media (max-width: 760px) {
  .menu-toggle {
    display: grid;
  }

  .header__actions {
    margin-left: auto;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 8px var(--gutter) 18px;
    background: var(--ink);
    border-bottom: 1px solid rgb(255 255 255 / 0.1);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.8em 1em;
    font-size: 1.05rem;
  }
}

@media (max-width: 420px) {
  .header__inner {
    gap: 12px;
  }

  .logo {
    gap: 8px;
    font-size: 0.92rem;
  }

  .cart-button {
    padding-left: 0.8em;
  }

  .cart-button__label {
    display: none;
  }
}

@media (max-width: 360px) {
  .logo {
    font-size: 0.8rem;
    font-stretch: 112%;
  }

  .logo__mark {
    width: 28px;
    height: 28px;
  }
}

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

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(55% 60% at 82% 45%, rgb(212 255 63 / 0.16), transparent 70%),
    var(--ink);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 48px;
  padding-block: clamp(56px, 8vw, 112px);
}

.hero__title {
  margin-top: 20px;
  font-size: clamp(2.3rem, 5.4vw, 4.6rem);
  font-weight: 850;
  font-stretch: 125%;
  line-height: 0.92;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.hero__title span {
  display: block;
  color: var(--lime);
}

.hero__lead {
  max-width: 34em;
  margin-top: 24px;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: rgb(255 255 255 / 0.74);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 36px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid rgb(255 255 255 / 0.12);
  font-size: 0.92rem;
  color: rgb(255 255 255 / 0.62);
}

.hero__facts strong {
  display: block;
  font-size: 1.55rem;
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1.2;
  text-transform: uppercase;
  color: #fff;
}

.hero__art {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1;
}

.hero__disk {
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  background: var(--lime);
}

.hero__pouch {
  position: absolute;
  bottom: 11%;
  width: 40%;
  animation: float 6s ease-in-out infinite;
}

.hero__pouch--1 {
  left: 3%;
  rotate: -13deg;
  animation-delay: -2s;
}

.hero__pouch--2 {
  left: 27%;
  bottom: 15%;
  z-index: 2;
  width: 46%;
}

.hero__pouch--3 {
  right: 2%;
  rotate: 12deg;
  animation-delay: -4s;
}

@keyframes float {
  50% {
    translate: 0 -10px;
  }
}

.hero__sticker {
  position: absolute;
  top: 1%;
  right: 3%;
  z-index: 3;
  width: 27%;
}

.hero__sticker-bg {
  fill: var(--ink);
  stroke: var(--lime);
  stroke-width: 2;
}

.hero__sticker-ring {
  transform-origin: 60px 60px;
  animation: spin 22s linear infinite;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  fill: #fff;
}

.hero__sticker-big {
  font-size: 21px;
  font-weight: 900;
  font-stretch: 125%;
  text-anchor: middle;
  fill: var(--lime);
}

@keyframes spin {
  to {
    rotate: 360deg;
  }
}

@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }

  .hero__art {
    max-width: 400px;
  }
}

/* ---------- Ilustración de empaque ---------- */

.pouch {
  width: 100%;
  height: auto;
  overflow: visible;
}

.pouch__shadow {
  fill: rgb(0 0 0 / 0.14);
}

.pouch__body {
  fill: var(--c, #888);
}

.pouch__seal {
  fill: color-mix(in srgb, var(--c, #888) 72%, #000);
}

.pouch__ridges {
  fill: none;
  stroke: rgb(255 255 255 / 0.22);
  stroke-width: 1.5;
}

.pouch__label {
  fill: var(--ink);
}

.pouch__brand {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-anchor: middle;
  fill: rgb(255 255 255 / 0.7);
}

.pouch__name {
  font-weight: 900;
  font-stretch: 125%;
  text-anchor: middle;
  fill: #fff;
}

.pouch__pill {
  fill: var(--c, #888);
}

.pouch__scoops {
  font-size: 10.5px;
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: 0.04em;
  text-anchor: middle;
  fill: var(--ink);
}

.pouch__gloss {
  fill: rgb(255 255 255 / 0.2);
}

/* ---------- Marquesina ---------- */

.marquee {
  overflow: hidden;
  background: var(--lime);
  color: var(--ink);
  border-block: 2px solid var(--ink);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}

.marquee__group {
  display: flex;
  gap: 2.25rem;
  padding: 14px 2.25rem 14px 0;
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 800;
  font-stretch: 125%;
  text-transform: uppercase;
  white-space: nowrap;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Nosotros ---------- */

.about__inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: start;
  gap: clamp(32px, 6vw, 80px);
}

.about__lead {
  margin-block: 22px 30px;
  font-size: 1.15rem;
  color: var(--ink-2);
}

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.feature {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.feature__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--lime);
}

.feature__icon .icon {
  width: 22px;
  height: 22px;
}

.feature h3 {
  font-size: 1.08rem;
  font-weight: 800;
  font-stretch: 115%;
  text-transform: uppercase;
}

.feature p {
  margin-top: 8px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .about__inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .features {
    grid-template-columns: 1fr;
  }
}

/* ---------- Catálogo ---------- */

.catalog {
  padding-top: 0;
}

.catalog__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 40px;
  margin-bottom: 36px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter {
  padding: 0.6em 1.1em;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}

.filter:hover {
  background: rgb(0 0 0 / 0.06);
}

.filter[aria-pressed='true'] {
  background: var(--ink);
  color: #fff;
}

@media (max-width: 640px) {
  .filters {
    flex-wrap: nowrap;
    width: calc(100% + 2 * var(--gutter));
    margin-inline: calc(-1 * var(--gutter));
    padding: 2px var(--gutter);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .filters::-webkit-scrollbar {
    display: none;
  }
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 20px;
}

.catalog__message {
  grid-column: 1 / -1;
  padding: 48px 0;
  text-align: center;
  color: var(--muted);
}

.product {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: box-shadow 0.25s, transform 0.25s;
}

.product:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.product__art {
  position: relative;
  display: grid;
  place-items: center;
  height: 250px;
  overflow: hidden;
  background:
    radial-gradient(circle closest-side at 50% 54%, color-mix(in srgb, var(--c) 26%, #fff) 0 78%, transparent 79%),
    color-mix(in srgb, var(--c) 12%, #fff);
}

.product__art .pouch {
  width: auto;
  height: 210px;
  transition: transform 0.35s ease;
}

.product:hover .product__art .pouch {
  transform: rotate(-4deg) translateY(-4px);
}

.product__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 0.4em 0.8em;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
}

.product__name {
  font-size: 1.4rem;
  font-weight: 800;
  font-stretch: 118%;
  text-transform: uppercase;
}

.product__tagline {
  margin-top: 4px;
  font-size: 0.92rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--c) 70%, #000);
}

.product__desc {
  color: var(--muted);
}

.product__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.product__stats li {
  padding: 0.35em 0.75em;
  border-radius: 999px;
  background: var(--paper);
}

.product__stats strong {
  font-weight: 800;
}

.product__stats .product__stats-note {
  padding-inline: 0.2em;
  background: none;
  color: var(--muted);
}

.field legend {
  margin-bottom: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip,
.segmented label {
  position: relative;
}

.chip input,
.segmented input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.chip span {
  display: block;
  padding: 0.42em 0.85em;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.chip:hover span {
  border-color: var(--ink);
}

.chip input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.chip input:focus-visible + span,
.segmented input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(var(--n, 4), 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--paper);
}

.segmented span {
  display: block;
  padding: 0.5em 0.2em;
  border-radius: 10px;
  font-size: 0.74rem;
  line-height: 1.15;
  text-align: center;
  color: var(--muted);
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.segmented strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
}

.segmented label:hover span {
  background: rgb(255 255 255 / 0.6);
}

.segmented input:checked + span {
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 0 0 2px var(--c);
  color: var(--ink);
}

.product__buy {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 4px;
}

.product__price {
  display: grid;
  gap: 2px;
  font-size: 0.82rem;
  color: var(--muted);
}

.product__price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.product__price strong {
  font-size: 1.75rem;
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.1;
  color: var(--ink);
}

.product__saving {
  padding: 0.2em 0.6em;
  border-radius: 999px;
  background: var(--lime);
  font-weight: 700;
  color: var(--ink);
}

.btn--add.is-added {
  background: var(--lime);
  color: var(--ink);
}

.btn--add .icon--check,
.btn--add.is-added .icon--plus {
  display: none;
}

.btn--add.is-added .icon--check {
  display: block;
}

/* ---------- Cómo pedir ---------- */

.steps {
  color: #fff;
  background: var(--ink);
}

.steps__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.step {
  padding: 30px;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.03);
}

.step__num {
  font-size: 3rem;
  font-weight: 850;
  font-stretch: 125%;
  line-height: 1;
  color: var(--lime);
}

.step h3 {
  margin-top: 22px;
  font-size: 1.3rem;
  font-weight: 800;
  font-stretch: 118%;
  text-transform: uppercase;
}

.step p {
  margin-top: 10px;
  color: rgb(255 255 255 / 0.7);
}

@media (max-width: 820px) {
  .steps__list {
    grid-template-columns: 1fr;
  }
}

/* ---------- Llamado a la acción ---------- */

.cta-band {
  padding-block: clamp(48px, 7vw, 88px);
  background: var(--lime);
}

.cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cta-band h2 {
  max-width: 17ch;
  font-size: clamp(1.45rem, 6.5vw, 3rem);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 0.98;
  text-transform: uppercase;
}

/* ---------- Pie de página ---------- */

.site-footer {
  padding-block: 56px 28px;
  background: var(--ink);
  color: rgb(255 255 255 / 0.68);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer__brand .logo {
  color: #fff;
}

.footer__brand p {
  margin-top: 14px;
}

.footer__nav {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 10px;
}

.footer__nav a {
  text-decoration: none;
}

.footer__nav a:hover {
  color: #fff;
}

.footer__title {
  margin-bottom: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}

.footer__legal {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgb(255 255 255 / 0.1);
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

/* ---------- Carrito (panel lateral) ---------- */

.cart {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(440px, 100%);
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: -24px 0 64px rgb(0 0 0 / 0.25);
  transform: translateX(100%);
  transition:
    transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
    overlay 0.32s allow-discrete,
    display 0.32s allow-discrete;
}

.cart[open] {
  display: flex;
  flex-direction: column;
  transform: none;
}

@starting-style {
  .cart[open] {
    transform: translateX(100%);
  }
}

.cart::backdrop {
  background: rgb(0 0 0 / 0);
  transition:
    background-color 0.32s,
    overlay 0.32s allow-discrete,
    display 0.32s allow-discrete;
}

.cart[open]::backdrop {
  background: rgb(0 0 0 / 0.5);
}

@starting-style {
  .cart[open]::backdrop {
    background: rgb(0 0 0 / 0);
  }
}

.cart__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.cart__title {
  font-size: 1.45rem;
  font-weight: 800;
  font-stretch: 125%;
  text-transform: uppercase;
}

.cart__units {
  font-size: 0.88rem;
  color: var(--muted);
}

.cart__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 24px;
}

.cart-line {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line:last-child {
  border-bottom: 0;
}

.cart-line__art {
  display: grid;
  place-items: center;
  width: 60px;
  height: 72px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--c) 14%, #fff);
}

.cart-line__art .pouch {
  width: auto;
  height: 60px;
}

.cart-line__name {
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.2;
  text-transform: uppercase;
}

.cart-line__meta {
  margin-top: 2px;
  font-size: 0.9rem;
}

.cart-line__unit {
  font-size: 0.82rem;
  color: var(--muted);
}

.cart-line__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 10px;
}

.cart-line__total {
  font-weight: 800;
  white-space: nowrap;
}

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 999px;
}

.stepper button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.stepper button:hover:not(:disabled) {
  background: var(--paper);
}

.stepper button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.stepper .icon {
  width: 16px;
  height: 16px;
}

.stepper input {
  width: 2.4em;
  padding: 0;
  border: 0;
  background: transparent;
  font-weight: 700;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.stepper input::-webkit-inner-spin-button,
.stepper input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.cart-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 64px 12px;
  text-align: center;
  color: var(--muted);
}

.cart-empty__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 6px;
  stroke-width: 1.5;
  color: var(--ink);
}

.cart-empty__title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
}

.cart-empty .btn {
  margin-top: 10px;
}

.cart__foot {
  padding: 18px 24px calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.cart__details summary {
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.cart__details summary span {
  font-weight: 400;
  color: var(--muted);
}

.cart__fields {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.field-label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
}

.input {
  width: 100%;
  padding: 0.7em 0.9em;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-weight: 400;
  resize: vertical;
}

.input:focus {
  border-color: var(--ink);
  background: var(--surface);
}

.cart__summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-block: 16px 14px;
  font-weight: 700;
}

.cart__summary strong {
  font-size: 1.75rem;
  font-weight: 800;
  font-stretch: 112%;
}

.cart__hint {
  margin-top: 10px;
  font-size: 0.8rem;
  text-align: center;
  color: var(--muted);
}

.cart__clear {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

/* ---------- Aviso flotante ---------- */

.toast {
  position: fixed;
  inset: auto auto 24px 50%;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  max-width: calc(100% - 32px);
  margin: 0;
  padding: 12px 12px 12px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

.toast[popover]:not(:popover-open) {
  display: none;
}

.toast:not(:has(.toast__action)) {
  padding-right: 20px;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.toast--error {
  background: var(--danger);
}

.toast__action {
  flex: none;
  padding: 0.55em 1em;
  border: 0;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 520px) {
  .toast {
    border-radius: 18px;
  }
}

/* ---------- Movimiento reducido ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
