:root {
  color-scheme: light;
  --ink: #1f1b2b;
  --ink-2: #4b4658;
  --muted: #8e879b;
  --line: #f2e6ef;
  --field: #fcf7fa;
  --app: #fdf5fa;
  --purple: #8a6cf0;
  --purple-soft: #f1ebff;
  --danger: #e2474c;
  --heart: #f2557f;
  --ok: #1f8a4c;
  --shadow-sm: 0 6px 18px rgba(176, 98, 150, 0.1);
  --shadow: 0 14px 34px rgba(176, 98, 150, 0.18);
  --grad: linear-gradient(90deg, #ab96f8 0%, #8a6cf0 100%);
  --status: 44px;
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 600px at 12% 8%, #fdebf5 0%, transparent 60%),
    radial-gradient(800px 700px at 90% 95%, #f1bddb 0%, transparent 60%),
    linear-gradient(135deg, #f9dcec 0%, #f5cbe3 100%);
  background-color: #f8d6e8;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; user-select: none; -webkit-user-drag: none; }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
[hidden] { display: none !important; }
.sel { user-select: text; -webkit-user-select: text; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mt { margin-top: 6px !important; }

/* ---------- Escenario y marco del teléfono ---------- */
.stage {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}

.demo-aside { display: none; }

.device {
  position: relative;
  width: 390px;
  height: min(844px, calc(100% - 8px));
  border-radius: 52px;
  background: linear-gradient(180deg, #fdf2f8 0%, #fffafd 38%, #fcf0f7 100%);
  box-shadow:
    0 0 0 9px rgba(255, 255, 255, 0.5),
    0 0 0 10px rgba(255, 255, 255, 0.95),
    0 40px 90px -24px rgba(214, 96, 160, 0.5);
  overflow: hidden;
  isolation: isolate;
}

.statusbar {
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--status);
  padding: 0 30px 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  z-index: 30;
}
.status-icons { display: flex; gap: 6px; align-items: center; }

.app { position: absolute; inset: 0; }

.screen {
  position: absolute;
  top: var(--status);
  left: 0; right: 0; bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  animation: screenIn 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.screen.still { animation: none; }
.screen::-webkit-scrollbar { display: none; }

@media (min-width: 980px) {
  .stage { grid-template-columns: minmax(0, 340px) 390px; gap: 80px; justify-content: center; }
  .demo-aside { display: block; }
}

@media (max-width: 520px) {
  :root { --status: env(safe-area-inset-top, 0px); }
  body { background: #fdf2f8; }
  .stage { padding: 0; }
  .device { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
  .statusbar { display: none; }
}

/* Texto de apoyo al lado del teléfono (solo escritorio) */
.demo-aside .brand { display: flex; align-items: center; gap: 12px; }
.demo-aside .brand img { width: 56px; height: 56px; padding: 6px; border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.demo-aside .eyebrow { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #b0568b; }
.demo-aside h1 { margin: 2px 0 0; font-size: 30px; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
.demo-aside > p { margin: 18px 0 20px; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.demo-aside ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.demo-aside li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  font-size: 14px; line-height: 1.45; color: var(--ink-2);
}
.demo-aside li b { color: var(--ink); font-weight: 500; }
.demo-aside li span.n {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--purple); color: #fff; font-size: 12px; font-weight: 600;
}
.demo-aside .foot { margin-top: 18px; font-size: 12px; color: var(--muted); }

/* ---------- Piezas comunes ---------- */
.i { width: 22px; height: 22px; flex: none; }
.i.sm { width: 18px; height: 18px; }
.i.filled { fill: currentColor; }

.icon-btn {
  position: relative;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}
.icon-btn:active { transform: scale(0.92); }
.icon-btn.ghost { visibility: hidden; }
.icon-btn.accent { background: var(--grad); color: #fff; }
.ping { position: absolute; top: 10px; right: 11px; width: 9px; height: 9px; border-radius: 50%; background: var(--heart); border: 2px solid #fff; }

.link { padding: 0; border: 0; background: none; font-size: 13px; color: var(--ink-2); }
.link:hover { color: var(--purple); }

.topbar {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 12px 20px 8px;
}
.topbar h1 { margin: 0; text-align: center; font-size: 18px; font-weight: 500; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 20px 12px;
}
.section-head h2 { margin: 0; font-size: 19px; font-weight: 500; }
.section-head .count { font-size: 13px; color: var(--ink-2); }

.btn-primary {
  width: 100%;
  height: 58px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--grad);
  box-shadow: 0 14px 28px -10px rgba(122, 90, 236, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.2s, filter 0.2s;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: default; }
.btn-primary.inline { display: inline-flex; width: auto; height: 48px; padding: 0 28px; font-size: 15px; }
.btn-primary.sm { width: auto; height: 42px; padding: 0 16px; font-size: 14px; box-shadow: 0 8px 18px -8px rgba(122, 90, 236, 0.7); }
.btn-primary.wa .i { width: 20px; height: 20px; }

.btn-soft {
  width: 100%; height: 52px;
  border: 0; border-radius: 999px;
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 15px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-soft.sm { width: auto; height: 42px; padding: 0 16px; font-size: 14px; }
.btn-danger { height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--danger); color: #fff; font-size: 14px; font-weight: 500; }
.btn-ghost-danger {
  width: 100%; height: 50px;
  border: 1.5px dashed #f1b9bc; border-radius: 999px;
  background: transparent; color: var(--danger);
  font-size: 14px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.confirm-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  background: #fff0f1;
}
.confirm-row span { flex: 1 1 100%; font-size: 13px; color: var(--danger); }
.mini-btn { flex: none; padding: 6px 12px; border: 0; border-radius: 999px; background: var(--purple-soft); color: var(--purple); font-size: 12px; font-weight: 500; }

.tab-spacer { height: 110px; }
.fine { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center; }

/* ---------- Inicio ---------- */
.home-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 20px 0;
}
.user { display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: none; text-align: left; min-width: 0; }
.user > span:last-child { min-width: 0; }
.user small { display: block; font-size: 12px; color: var(--muted); }
.user strong { display: block; font-size: 17px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar {
  position: relative;
  flex: none;
  width: 48px; height: 48px;
  border-radius: 50%;
  padding: 7px;
  background: linear-gradient(140deg, #ffd9ea, #e6dbff);
}
.avatar img { width: 100%; height: 100%; object-fit: contain; }
.avatar.lg { width: 60px; height: 60px; }
.dot { position: absolute; right: 0; bottom: 1px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: #b9b2c2; }
.dot.on { background: #34c26a; }
.head-actions { display: flex; gap: 8px; flex: none; }
.cur-btn {
  height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--purple);
  box-shadow: var(--shadow-sm);
}

.search {
  margin: 18px 20px 0;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 7px 0 18px;
  background: #fff;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  cursor: text;
}
.search.slim { height: 50px; margin-top: 6px; padding-right: 18px; }
.search .i { color: var(--ink-2); width: 20px; height: 20px; }
.search input {
  flex: 1; min-width: 0;
  border: 0; outline: 0;
  background: transparent;
  font: inherit; font-size: 15px;
  color: var(--ink);
}
.search input::placeholder { color: #6f6979; }
.search input::-webkit-search-cancel-button { display: none; }
.filter-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 0;
  background: #16121d;
  display: grid;
  place-items: center;
}
.filter-btn .i { color: #fff; width: 19px; height: 19px; }

.chips {
  position: relative;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 18px 20px 16px;
  margin-bottom: -12px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}
.chip:active { transform: scale(0.95); }
.chip.active {
  color: #fff;
  text-shadow: 0 1px 3px rgba(60, 15, 40, 0.45);
  background:
    linear-gradient(rgba(90, 30, 64, 0.34), rgba(90, 30, 64, 0.34)),
    var(--chip-img) 50% 42% / 170% auto no-repeat,
    #e39cc1;
  box-shadow: 0 8px 18px -6px rgba(170, 70, 120, 0.6);
}
.chips.plain { padding-top: 12px; margin-bottom: 0; padding-bottom: 14px; }
.chips.plain .chip { height: 36px; padding: 0 14px; font-size: 13px; }
.chips.plain .chip b { margin-left: 3px; font-weight: 600; opacity: 0.55; }
.chips.plain .chip.on { background: var(--ink); color: #fff; }

/* Carrusel "Top productos" */
.carousel {
  position: relative;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 2px 28px 10px;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }

.hero-card {
  position: relative;
  flex: 0 0 100%;
  height: 252px;
  padding: 20px 18px 16px;
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  scroll-snap-align: center;
  overflow: hidden;
  cursor: pointer;
}
.hero-card::before {
  content: '';
  position: absolute;
  width: 220px; height: 220px;
  right: -50px; top: -40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0) 68%);
}
.pink { background: linear-gradient(160deg, #fbd8ea 0%, #f6c0dc 55%, #f2b2d3 100%); }
.lilac { background: linear-gradient(160deg, #eadffd 0%, #d8c6f9 60%, #cbb6f6 100%); }

.hero-card .tag { position: relative; font-size: 13px; color: var(--ink-2); }
.off { padding: 2px 7px; border-radius: 999px; background: #fff; color: var(--heart); font-size: 12px; font-weight: 600; }
.hero-card h3 {
  position: relative;
  z-index: 1;
  width: 56%;
  margin: 6px 0 0;
  font-size: 27px;
  line-height: 1.12;
  font-weight: 500;
  text-wrap: balance;
}
.hero-card img {
  position: absolute;
  top: 6px; right: -6px;
  width: 57%;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 16px 18px rgba(120, 40, 80, 0.28));
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hero-card:hover img { transform: scale(1.05) rotate(-3deg); }
.hero-card .price { position: relative; margin: auto 0 10px; font-size: 18px; font-weight: 500; }
.hero-card .price small { font-size: 12px; font-weight: 400; color: var(--ink-2); margin-left: 3px; }
.hero-card .price s { margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--ink-2); }
.hero-actions { position: relative; display: flex; gap: 10px; }
.btn-white {
  flex: 1;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 6px 14px rgba(160, 80, 130, 0.12);
  transition: transform 0.2s;
}
.btn-white:active, .circle-white:active { transform: scale(0.95); }
.circle-white {
  width: 46px; height: 46px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 14px rgba(160, 80, 130, 0.12);
  transition: transform 0.2s, color 0.2s;
}
.circle-white.on { color: var(--heart); }

/* Tarjetas pequeñas */
.row-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 20px 8px;
  scroll-snap-type: x proximity;
  scroll-padding: 0 20px;
  scrollbar-width: none;
}
.row-scroll::-webkit-scrollbar { display: none; }

.mini-card {
  position: relative;
  flex: 0 0 168px;
  height: 204px;
  padding: 12px;
  border-radius: 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: start;
}
.mini-card img {
  position: absolute;
  top: 10px; right: 8px;
  width: 108px;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 12px 12px rgba(120, 40, 80, 0.25));
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mini-card:hover img { transform: scale(1.06) rotate(4deg); }
.mini-card.soldout img { filter: grayscale(0.8) opacity(0.55); }
.badge-off { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 3px 8px; border-radius: 999px; background: #fff; color: var(--heart); font-size: 12px; font-weight: 600; }
.mini-card h4 { position: relative; margin: 0 0 8px 4px; font-size: 16px; font-weight: 500; line-height: 1.15; }
.mini-foot {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  padding: 4px 4px 4px 12px;
  background: #fff;
  border-radius: 999px;
}
.mini-foot .price { font-size: 15px; font-weight: 600; }
.mini-foot .unit { font-size: 11px; color: var(--muted); margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-foot .sold { padding-right: 8px; font-size: 11px; font-weight: 600; color: var(--danger); }
.plus {
  width: 32px; height: 32px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--purple-soft);
  color: var(--purple);
  display: grid;
  place-items: center;
  transition: transform 0.2s, background 0.2s;
}
.plus:hover { background: #e7defe; }
.plus:active { transform: scale(0.9); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 20px; }
.grid .mini-card { flex: none; }

/* ---------- Barra inferior ---------- */
.tabbar {
  position: absolute;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  padding: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 12px 30px rgba(150, 80, 130, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  z-index: 20;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s;
}
.tabbar button {
  position: relative;
  width: 48px; height: 48px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  transition: background 0.25s, color 0.25s, transform 0.2s;
}
.tabbar button:active { transform: scale(0.92); }
.tabbar button.active {
  color: #fff;
  background: linear-gradient(145deg, #a790f8, #7d5eee);
  box-shadow: 0 8px 18px -4px rgba(125, 94, 238, 0.6);
}
.badge {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  border: 2px solid #fff;
  background: var(--heart);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
}
.badge:empty { display: none; }
.bump { animation: bump 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
.device.no-tabs .tabbar { transform: translate(-50%, 170%); opacity: 0; pointer-events: none; }

/* ---------- Detalle ---------- */
.detail { display: flex; flex-direction: column; }
.detail-hero {
  position: relative;
  height: 300px;
  flex: none;
  display: grid;
  place-items: center;
}
.detail-hero::before {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(248, 184, 218, 0.7) 0%, rgba(248, 184, 218, 0) 68%);
}
.detail-hero > img {
  position: relative;
  width: 264px; height: 264px;
  margin-right: 30px;
  object-fit: contain;
  filter: drop-shadow(0 26px 26px rgba(140, 50, 90, 0.28));
  animation: pop 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.price-bubble {
  position: absolute;
  top: 34px; right: 20px;
  padding: 8px 16px 10px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  animation: pop 0.6s 0.1s both;
}
.price-bubble small { display: block; font-size: 12px; color: var(--ink-2); }
.price-bubble strong { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.price-bubble .was { display: block; font-size: 12px; color: var(--muted); }
.price-bubble .was b { color: var(--heart); }
.fav-float { position: absolute; left: 20px; bottom: 10px; }
.stock-flag {
  position: absolute;
  right: 20px; bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  color: #a86400;
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.stock-flag.out { color: var(--danger); }

.detail-body { padding: 6px 20px 0; flex: 1; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.title-row h2 { margin: 0; font-size: 23px; font-weight: 500; line-height: 1.15; }
.sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

.stepper {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  flex: none;
  background: #fff;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.stepper button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; }
.stepper button:disabled { opacity: 0.3; cursor: default; }
.stepper .qty {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(145deg, #aa94f8, #8165ee);
}

.info-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.info { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border-radius: 18px; box-shadow: var(--shadow-sm); }
.info img { width: 42px; height: 42px; }
.info strong { display: block; font-size: 20px; font-weight: 600; line-height: 1.05; white-space: nowrap; }
.info strong small { margin-left: 4px; font-size: 12px; font-weight: 400; color: var(--muted); }
.info span { font-size: 12px; color: var(--muted); }

.desc { margin: 18px 0 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.more { padding: 0; border: 0; background: none; color: var(--purple); font-weight: 600; }
.detail-body h3 { margin: 18px 0 10px; font-size: 19px; font-weight: 500; }
.ingredients { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.ingredients::-webkit-scrollbar { display: none; }
.ingredients figure { flex: none; width: 58px; margin: 0; text-align: center; }
.ingredients img { width: 46px; height: 46px; margin: 0 auto; filter: drop-shadow(0 6px 6px rgba(120, 60, 90, 0.18)); }
.ingredients figcaption { margin-top: 4px; font-size: 11px; color: var(--muted); }

.cta {
  position: sticky;
  bottom: 0;
  margin-top: 8px;
  padding: 22px 20px calc(18px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, #fcf0f7 62%, rgba(252, 240, 247, 0));
  z-index: 5;
}

/* ---------- Carrito ---------- */
.cart { display: flex; flex-direction: column; overflow: hidden; }
.cart-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: none;
}
.cart-list::-webkit-scrollbar { display: none; }
.cart-item { position: relative; flex: none; transition: height 0.28s, opacity 0.28s, margin 0.28s; }
.cart-item.removing { opacity: 0; height: 0 !important; margin-top: -12px; }
.cart-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  touch-action: pan-y;
  user-select: none;
  cursor: pointer;
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.thumb {
  position: relative;
  width: 60px; height: 60px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}
.thumb img { width: 44px; height: 44px; object-fit: contain; }
.thumb .q {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 22px; height: 22px;
  padding: 0 5px;
  border-radius: 11px;
  border: 2px solid #fff;
  background: var(--purple);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
}
.ci-text { flex: 1; min-width: 0; }
.ci-text strong, .ci-text small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-text strong { font-size: 16px; font-weight: 500; }
.ci-text small { margin-top: 3px; font-size: 12px; color: var(--muted); }
.ci-price {
  flex: none;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 4px 10px rgba(176, 98, 150, 0.08);
}
.del {
  position: absolute;
  top: 0; bottom: 0; left: -20px;
  width: 110px;
  padding-left: 38px;
  border: 0;
  border-radius: 0 20px 20px 0;
  background: linear-gradient(90deg, #ffb8bb 0%, #ffdcdd 100%);
  color: var(--danger);
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.cart-item.revealing .del, .cart-item.open .del { opacity: 1; }
.hint { margin: 2px 0 0; text-align: center; font-size: 12px; color: var(--muted); }

.checkout { padding: 8px 20px calc(18px + env(safe-area-inset-bottom, 0px)); flex: none; }
.summary {
  position: relative;
  min-height: 156px;
  margin-bottom: 14px;
  padding: 18px 20px 20px;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, #ece3fd 0%, #d9c9f9 55%, #ccb8f6 100%);
}
.summary::before {
  content: '';
  position: absolute;
  width: 220px; height: 220px;
  right: -60px; bottom: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 236, 0.9), rgba(255, 214, 236, 0) 68%);
}
.sum-line { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.sum-line + .sum-line { margin-top: 6px; }
.sum-line strong { font-size: 18px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.sum-label { position: relative; display: block; margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.sum-total { position: relative; display: block; font-size: 32px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.sum-alt { position: relative; display: block; font-size: 12px; color: var(--ink-2); }
.sum-art { position: absolute; right: 0; bottom: -12px; display: flex; align-items: flex-end; pointer-events: none; }
.sum-art img { filter: drop-shadow(0 10px 12px rgba(100, 40, 90, 0.25)); object-fit: contain; }
.sum-art img:nth-child(1) { width: 92px; position: relative; z-index: 1; margin-right: -36px; margin-bottom: 18px; }
.sum-art img:nth-child(2) { width: 80px; position: relative; z-index: 2; }
.sum-art img:only-child { width: 100px; margin: 0 10px 14px 0; }

/* ---------- Formularios ---------- */
.co-body, .a-body { padding: 4px 20px 0; display: flex; flex-direction: column; gap: 14px; }
.co-body .summary { margin: 0; }

.block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}
.block h3 { margin: 0; font-size: 16px; font-weight: 500; }
.block.mx { margin: 0 20px; }
.block.invalid { box-shadow: 0 0 0 2px #f6b3b6, var(--shadow-sm); }
.note { margin: 0; font-size: 13px; color: var(--muted); }
.hint-text { font-size: 11.5px; line-height: 1.4; color: var(--muted); }

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 5px;
  background: #fff;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.seg button {
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s, color 0.2s;
}
.seg button.on { background: var(--grad); color: #fff; box-shadow: 0 8px 16px -8px rgba(122, 90, 236, 0.8); }
.seg.small { background: var(--field); box-shadow: none; }
.seg.small button { height: 40px; font-size: 13px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.field input, .field select, .field textarea, .zone input, .phone {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--field);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.field textarea { padding: 12px 14px; resize: vertical; min-height: 84px; line-height: 1.45; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a6cf0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}
.field input:focus, .field select:focus, .field textarea:focus, .zone input:focus, .phone:focus-within { border-color: var(--purple); background: #fff; }
.phone { display: flex; align-items: center; gap: 6px; padding: 0 14px; }
.phone span { flex: none; font-weight: 500; color: var(--ink-2); }
.field .phone input { min-height: 44px; padding: 0; border: 0; background: transparent; }
.field.invalid input, .field.invalid select, .field.invalid textarea, .field.invalid .phone { border-color: var(--danger); background: #fff6f6; }
.err-msg { font-size: 12px; color: var(--danger); }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two.end { align-items: end; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.switch-row strong { display: block; font-size: 14px; font-weight: 500; }
.switch-row small { display: block; font-size: 12px; color: var(--muted); }
.with-img { display: flex; align-items: center; gap: 10px; }
.with-img img { width: 32px; height: 32px; }
.switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 48px; height: 28px;
  margin: 0;
  border-radius: 999px;
  background: #e8dce5;
  cursor: pointer;
  transition: background 0.2s;
}
.switch::before {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(60, 20, 50, 0.2);
  transition: transform 0.25s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.switch:checked { background: var(--purple); }
.switch:checked::before { transform: translateX(20px); }

.pill-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.pill-row::-webkit-scrollbar { display: none; }
.pill-row.wrap { flex-wrap: wrap; }
.pill {
  flex: none;
  height: 38px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.pill.on { border-color: var(--purple); background: #f6f2ff; color: var(--purple); }

.pickup { display: flex; flex-direction: column; gap: 8px; }
.pickup p { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.pickup .i { color: var(--purple); margin-top: 1px; }

.opt {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: #fff;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}
.opt img { width: 36px; height: 36px; }
.opt small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.opt .tick {
  width: 22px; height: 22px;
  margin-left: auto;
  flex: none;
  border-radius: 50%;
  border: 2px solid #e2d6e0;
  display: grid;
  place-items: center;
  color: #fff;
}
.opt.selected { border-color: var(--purple); background: #f8f5ff; }
.opt.selected .tick { border-color: var(--purple); background: var(--purple); }
.opt.danger { color: var(--danger); }

/* ---------- Perfil ---------- */
.profile-card {
  margin: 8px 20px 0;
  padding: 22px 20px 18px;
  border-radius: 30px;
  text-align: center;
  background: linear-gradient(150deg, #fbdcec 0%, #e6d9fc 100%);
}
.initial {
  width: 80px; height: 80px;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--purple);
  font-size: 32px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.profile-card h2 { margin: 0; font-size: 21px; font-weight: 500; }
.profile-card p { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 16px;
  padding: 12px 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.65);
}
.stats strong { display: block; font-size: 20px; font-weight: 600; }
.stats span { font-size: 12px; color: var(--muted); }

.menu { margin: 0 20px; overflow: hidden; background: #fff; border-radius: 22px; box-shadow: var(--shadow-sm); }
.menu-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
}
.menu-row:last-child { border-bottom: 0; }
.menu-row span { flex: 1; }
.menu-row .i { color: var(--ink-2); }

/* ---------- Listas del panel ---------- */
.a-list { display: flex; flex-direction: column; gap: 10px; padding: 0 20px; }
.a-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.a-row.dim { opacity: 0.55; }
.a-info { flex: 1; min-width: 0; }
.a-info strong, .a-info small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-info strong { font-size: 14.5px; font-weight: 500; }
.a-info small { margin-top: 2px; font-size: 12px; color: var(--muted); }
.a-info s { color: var(--muted); }
.a-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.a-side strong { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.a-thumb { width: 44px; height: 44px; flex: none; object-fit: contain; border-radius: 12px; }
.order-thumbs { display: flex; flex: none; }
.order-thumbs img { width: 36px; height: 36px; margin-left: -14px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(120, 60, 90, 0.2)); }
.order-thumbs img:first-child { margin-left: 0; }
.rank { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--purple-soft); color: var(--purple); font-size: 12px; font-weight: 600; }

.st { display: inline-block; margin-top: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.a-side .st { margin-top: 0; }
.st-nuevo { background: #ffe1ee; color: #c2185b; }
.st-confirmado { background: #ece5ff; color: #6a4fd8; }
.st-en-camino { background: #fff1d6; color: #a86400; }
.st-entregado { background: #dff5e6; color: var(--ok); }
.st-cancelado { background: #efedf1; color: #7b7584; }

.stock { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: #e3f6ea; color: var(--ok); font-size: 11px; font-weight: 600; }
.stock.low { background: #fff1d6; color: #a86400; }
.stock.out { background: #ffe3e4; color: var(--danger); }
.tog { width: 38px; height: 38px; flex: none; border: 0; border-radius: 50%; background: #f6f0f4; color: var(--muted); display: grid; place-items: center; }
.tog.on { background: var(--purple-soft); color: var(--purple); }
.tog.star.on { background: #fff3d6; color: #e0a100; }

.admin-hello {
  position: relative;
  margin: 8px 20px 0;
  padding: 20px;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(150deg, #e9dffd 0%, #d7c5f8 55%, #f5c3de 100%);
}
.admin-hello small { font-size: 13px; color: var(--ink-2); }
.admin-hello h2 { margin: 2px 0 10px; font-size: 24px; font-weight: 500; max-width: 64%; }
.admin-hello img { position: absolute; right: -4px; bottom: -12px; width: 116px; filter: drop-shadow(0 12px 14px rgba(90, 50, 140, 0.25)); }
.open-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: #9b3b44;
  font-size: 12px;
  font-weight: 500;
}
.open-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }
.open-pill.on { color: #1f7a45; }
.open-pill.on::before { background: #34c26a; }
.demo-note {
  margin: 12px 20px 0;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px dashed #e0c9dc;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  color: var(--ink-2);
}
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px 20px 0; }
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border: 0;
  border-radius: 20px;
  background: #fff;
  text-align: left;
  box-shadow: var(--shadow-sm);
}
.stat span { font-size: 12px; color: var(--muted); }
.stat strong { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 20px 0; }
.quick .btn-soft { height: 48px; font-size: 13px; }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row-between .st { margin: 0; }
.line-item { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.line-item img { width: 34px; height: 34px; object-fit: contain; }
.line-item span { flex: 1; }
.line-item strong { font-weight: 500; font-variant-numeric: tabular-nums; }
.totals { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--ink-2); }
.totals > div { display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; }
.totals .grand { font-size: 16px; font-weight: 600; color: var(--ink); }
.kv { margin: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.4; }
.kv strong { font-weight: 500; }
.kv .muted { font-size: 12px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

.img-pick { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 6px; }
.img-pick img { width: 150px; height: 150px; object-fit: contain; border-radius: 24px; filter: drop-shadow(0 16px 18px rgba(120, 40, 80, 0.22)); }

.zone-list { display: flex; flex-direction: column; gap: 8px; }
.zone { display: grid; grid-template-columns: 1fr 92px 38px; gap: 8px; align-items: center; }
.zone input { min-height: 42px; font-size: 14px; padding: 0 12px; }
.zone.cat { grid-template-columns: 34px 1fr 22px 38px; }
.zone.cat img { width: 32px; height: 32px; }

.upload {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1.5px dashed #d9c9f8;
  border-radius: 18px;
  background: #faf7ff;
  color: var(--purple);
  cursor: pointer;
  margin-bottom: 12px;
}
.upload strong { display: block; font-size: 15px; font-weight: 500; }
.upload small { display: block; font-size: 12px; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
.gallery button { aspect-ratio: 1; padding: 6px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--field); }
.gallery button.on { border-color: var(--purple); background: #f6f2ff; }
.gallery img { width: 100%; height: 100%; object-fit: contain; }

.login-box { display: flex; flex-direction: column; gap: 14px; padding: 10px 24px; text-align: center; }
.login-box > img { width: 110px; margin: 0 auto; filter: drop-shadow(0 16px 18px rgba(120, 40, 80, 0.22)); }
.login-box h2 { margin: 0; font-size: 22px; font-weight: 500; }
.login-box > p { margin: -6px 0 6px; font-size: 14px; color: var(--muted); }
.login-box .field { text-align: left; }
.login-box input { text-align: center; letter-spacing: 0.4em; font-size: 20px; }

/* ---------- Vacíos ---------- */
.empty { padding: 36px 32px 16px; text-align: center; }
.empty img { width: 124px; height: 124px; margin: 0 auto 10px; object-fit: contain; filter: drop-shadow(0 18px 18px rgba(140, 60, 110, 0.22)); animation: pop 0.6s; }
.empty h3 { margin: 0 0 6px; font-size: 20px; font-weight: 500; }
.empty p { margin: 0 0 20px; font-size: 14px; line-height: 1.5; color: var(--muted); }

/* ---------- Toast ---------- */
.toast {
  position: absolute;
  top: calc(var(--status) + 10px);
  left: 50%;
  z-index: 60;
  max-width: calc(100% - 32px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 14px;
  border-radius: 999px;
  background: #1d1826;
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 14px 30px rgba(40, 20, 50, 0.3);
  opacity: 0;
  transform: translate(-50%, -24px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast .msg { display: flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; padding: 6px 6px 6px 0; }
.toast .msg .i { color: #b8a6ff; }
.toast button { flex: none; padding: 7px 14px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 13px; font-weight: 500; }

/* ---------- Hoja inferior ---------- */
.sheet-wrap { position: absolute; inset: 0; z-index: 50; }
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(50, 20, 45, 0.3);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.3s;
}
.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 88%;
  overflow-y: auto;
  padding: 10px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-radius: 30px 30px 0 0;
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-grab { width: 44px; height: 5px; margin: 0 auto 16px; border-radius: 3px; background: #ecdfe8; }
.sheet h3 { margin: 0 0 14px; font-size: 20px; font-weight: 500; }
.sheet .opt { margin-bottom: 10px; }

.store-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.store-head h3 { margin: 0 0 4px; }
.announce {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  padding: 12px 14px;
  border: 1px solid #f7d5e7;
  border-radius: 16px;
  background: #fff4fa;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
.announce p { margin: 0; }
.announce .i { color: var(--heart); margin-top: 1px; }
.info-list > div { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.info-list > div:last-child { border-bottom: 0; }
.info-list > div > span { flex: 1; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.info-list strong { display: block; font-weight: 500; color: var(--ink); }
.info-list .i { color: var(--purple); }

.success { text-align: center; padding: 4px 6px 0; display: flex; flex-direction: column; gap: 10px; }
.success img { width: 116px; height: 116px; margin: 0 auto; animation: pop 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
.success h3 { margin: 0; }
.success > p:not(.fine) { margin: 0 0 6px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.success .link { margin: 4px auto 0; font-size: 14px; }

/* ---------- Animaciones ---------- */
@keyframes screenIn { from { opacity: 0; transform: translateY(12px); } }
@keyframes pop { from { opacity: 0; transform: scale(0.8) rotate(-6deg); } }
@keyframes bump { 35% { transform: scale(1.3); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
