/* Tienda pública */
html {
  scroll-padding-top: 190px;
}
@media (min-width: 720px) {
  html {
    scroll-padding-top: 140px;
  }
}
.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- barra superior ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.topbar__row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
}
.brand__logo {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
}
.brand__name {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--accent-text);
  line-height: 1;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}
.status--closed {
  background: var(--surface-2);
  color: var(--ink-2);
}
.mine {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.banner {
  padding: 12px 16px;
  background: var(--warn-soft);
  color: var(--warn);
  text-align: center;
  font-weight: 600;
  font-size: 15px;
}

/* ---------- portada ---------- */
.hero {
  margin-top: 16px;
}
.hero__panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: center;
  padding: 24px 20px 0;
  border-radius: 28px;
  background: var(--sun);
  color: var(--sun-ink);
  overflow: hidden;
}
.hero h1 {
  font-size: clamp(40px, 6.4vw, 62px);
  line-height: 1;
  max-width: 17ch;
  text-wrap: balance;
}
.hero__sub {
  margin-top: 12px;
  max-width: 40ch;
  font-size: 16px;
  font-weight: 500;
  opacity: 0.88;
}
.hero__cta {
  margin-top: 18px;
  min-height: 50px;
  padding: 0 28px;
  font-size: 17px;
}
@media (max-width: 819px) {
  .hero h1 {
    font-size: 36px;
  }
}
.hero__art {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  height: 118px;
  margin-top: 4px;
}
.hero__art .cup {
  width: 68px;
  height: 85px;
  animation: float-in 0.9s var(--ease) both;
}
.hero__art .cup:nth-child(2) {
  width: 88px;
  height: 110px;
  animation-delay: 0.08s;
}
.hero__art .cup:nth-child(3) {
  animation-delay: 0.16s;
}
.hero__art img {
  width: 190px;
  height: 190px;
  margin-bottom: 18px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 16px 40px rgb(60 30 0 / 0.25);
  animation: float-in 0.9s var(--ease) both;
}
@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}
@media (min-width: 820px) {
  .hero__panel {
    grid-template-columns: 1.15fr 1fr;
    padding: 56px 56px 0;
    min-height: 360px;
  }
  .hero__text {
    padding-bottom: 56px;
  }
  .hero__art {
    height: 100%;
    min-height: 300px;
    gap: 10px;
  }
  .hero__art .cup {
    width: 132px;
    height: 165px;
  }
  .hero__art .cup:nth-child(2) {
    width: 170px;
    height: 212px;
  }
  .hero__art img {
    width: 270px;
    height: 270px;
    margin-bottom: 40px;
  }
}

/* ---------- carta ---------- */
.shop {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 28px;
  padding-bottom: 120px;
}
@media (min-width: 1000px) {
  .shop {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
    padding-bottom: 64px;
  }
}
.chips {
  position: sticky;
  top: 64px;
  z-index: 10;
  display: grid;
  gap: 10px;
  margin: 0 -16px;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.search input {
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 16px;
}
.search input:focus {
  border-color: var(--accent);
  outline: 2px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.chips__list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  touch-action: pan-x;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 0 16px;
}
.chips__list::-webkit-scrollbar {
  display: none;
}
.chip {
  flex: none;
  scroll-snap-align: start;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.chip[aria-current='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
@media (min-width: 720px) {
  .chips {
    grid-template-columns: 240px 1fr;
    align-items: center;
    margin: 0;
    padding: 12px 0;
  }
  .chips__list {
    margin: 0;
    padding: 0;
  }
}

.cat {
  margin-top: 26px;
}
.cat h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 30px;
  margin-bottom: 14px;
}
.cat h2 small {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 620px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tile {
  position: relative;
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 12px 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s;
}
.tile:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.tile:active {
  transform: scale(0.985);
}
.tile__img {
  width: 60px;
  height: 72px;
  display: grid;
  place-items: center;
}
.tile__img img {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  object-fit: cover;
}
.tile__open {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}
/* Toda la tarjeta abre el producto; el botón + queda por encima. */
.tile__open::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.tile__open:focus-visible {
  outline: none;
}
.tile:has(.tile__open:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.tile__add,
.tile__count {
  z-index: 1;
}
.tile__add {
  position: relative;
}
.tile__desc {
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile__price {
  margin-top: 4px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tile__add {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s var(--ease);
}
.tile__add:active {
  transform: scale(0.9);
}
.tile__count {
  position: absolute;
  top: 8px;
  left: 8px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}
.tile--out {
  cursor: default;
  box-shadow: none;
  background: var(--surface-2);
}
.tile--out .tile__img,
.tile--out .tile__open,
.tile--out .tile__price {
  opacity: 0.5;
}
.tile__out {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.bump {
  animation: bump 0.35s var(--ease);
}
@keyframes bump {
  40% {
    transform: scale(1.18);
  }
}
.empty {
  margin-top: 40px;
  padding: 32px 16px;
  border-radius: var(--r-card);
  background: var(--surface-2);
  color: var(--ink-2);
  text-align: center;
  font-weight: 500;
}

/* esqueleto de carga */
.skeleton__title {
  width: 220px;
  height: 30px;
  margin: 26px 0 14px;
  border-radius: 10px;
  background: var(--surface-2);
}
.skeleton__tile {
  height: 96px;
  border-radius: var(--r-card);
  background: var(--surface-2);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.55;
  }
}

/* ---------- carrito ---------- */
.cart-panel {
  display: none;
}
@media (min-width: 1000px) {
  .cart-panel {
    display: block;
    position: sticky;
    top: 88px;
  }
  .cart-panel__box {
    padding: 20px;
    border-radius: var(--r-card);
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .cart-panel h2 {
    font-size: 26px;
    margin-bottom: 14px;
  }
}
.cart {
  display: grid;
  gap: 14px;
}
.cart__empty {
  padding: 18px 0 6px;
  color: var(--ink-2);
  font-size: 15px;
}
.cart__lines {
  display: grid;
  gap: 14px;
  max-height: 46vh;
  overflow-y: auto;
}
.line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
}
.line__name {
  font-weight: 600;
  line-height: 1.3;
}
.line__meta {
  grid-column: 1;
  color: var(--ink-2);
  font-size: 13px;
}
.line__price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.line .stepper {
  grid-column: 2;
  grid-row: 2 / span 2;
  justify-self: end;
}
.line--bad .line__name {
  text-decoration: line-through;
}
.line__warn {
  grid-column: 1 / -1;
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}
.totals {
  display: grid;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.totals div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.totals .total {
  font-size: 20px;
  font-weight: 700;
}
.cart__closed {
  font-size: 14px;
}

.cart-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 20px 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 17px;
  box-shadow: 0 12px 32px rgb(150 20 70 / 0.35);
  cursor: pointer;
  animation: sheet-up 0.4s var(--ease);
}
.cart-bar__count {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.22);
}
.cart-bar__total {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 1000px) {
  .cart-bar {
    display: none;
  }
}
@media (max-width: 999px) {
  body:has(.cart-bar:not([hidden])) .toasts {
    bottom: calc(86px + env(safe-area-inset-bottom));
  }
}

/* ---------- hoja de producto ---------- */
.pd-hero {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 16px;
  align-items: center;
}
.pd-hero__img {
  width: 84px;
  height: 100px;
  display: grid;
  place-items: center;
}
.pd-hero__img img {
  width: 84px;
  height: 84px;
  border-radius: 18px;
  object-fit: cover;
}
.pd-hero p {
  color: var(--ink-2);
}
.pd-price {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 700;
}
.options {
  display: grid;
  gap: 8px;
  border: 0;
  margin: 0;
  padding: 0;
}
.options legend,
.group legend {
  margin-bottom: 8px;
  padding: 0;
  font-weight: 700;
}
.option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.option:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}
.option input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
}
.option span:first-of-type {
  flex: 1;
  font-weight: 600;
}
.option small {
  color: var(--ink-2);
}

/* ---------- datos del pedido ---------- */
.group {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.two {
  display: grid;
  gap: 14px;
}
@media (min-width: 560px) {
  .two {
    grid-template-columns: 1fr 1fr;
  }
}
.opt {
  font-style: normal;
  font-weight: 400;
  color: var(--ink-2);
}
.nequi {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-2);
  font-size: 15px;
}
.nequi__num {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.file {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}
.file input {
  font-size: 14px;
  font-weight: 400;
}
.file__preview {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
}
.summary {
  padding: 16px;
  border-radius: 16px;
  background: var(--surface-2);
}
.summary .totals {
  padding-top: 0;
  border-top: 0;
}
.summary ul {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
  font-size: 14px;
}
.summary li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

/* ---------- pie ---------- */
.footer {
  padding: 40px 0 120px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
@media (min-width: 1000px) {
  .footer {
    padding-bottom: 48px;
  }
}
.footer__grid {
  display: grid;
  gap: 24px;
}
@media (min-width: 720px) {
  .footer__grid {
    grid-template-columns: 1.2fr 1fr auto;
  }
}
.footer__brand {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--accent-text);
}
.footer__muted,
.footer p {
  color: var(--ink-2);
  font-size: 14px;
}
.footer__links {
  display: grid;
  gap: 8px;
  align-content: start;
  font-weight: 600;
}
.horario {
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 16px;
  justify-content: start;
  color: var(--ink-2);
  font-size: 14px;
}
.horario strong {
  color: var(--ink);
}

/* ---------- seguimiento del pedido ---------- */
.track {
  display: grid;
  gap: 18px;
  max-width: 640px;
  margin: 24px auto 0;
  padding-bottom: 48px;
}
.track__head {
  padding: 28px 22px;
  border-radius: 28px;
  background: var(--sun);
  color: var(--sun-ink);
}
.track__head h1 {
  font-size: clamp(34px, 8vw, 48px);
  line-height: 1.05;
}
.track__head p {
  margin-top: 10px;
  font-size: 17px;
  font-weight: 500;
}
.track__code {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.45);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
}
@media (prefers-color-scheme: dark) {
  .track__code {
    background: rgb(0 0 0 / 0.25);
  }
}
.card {
  padding: 20px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card h2 {
  font-size: 22px;
  margin-bottom: 12px;
}
.steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: start;
  padding-bottom: 18px;
  color: var(--ink-2);
}
.steps li::before {
  content: '';
  width: 16px;
  height: 16px;
  margin: 4px 0 0 6px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.steps li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 13px;
  top: 24px;
  bottom: 2px;
  width: 2px;
  background: var(--line);
}
.steps li.done {
  color: var(--ink);
}
.steps li.done::before {
  border-color: var(--accent);
  background: var(--accent);
}
.steps li.done:not(:last-child)::after {
  background: var(--accent);
}
.steps li.now {
  color: var(--ink);
  font-weight: 700;
}
.steps li.now::before {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent);
}
.steps time {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.items {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.items li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.items small {
  display: block;
  color: var(--ink-2);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.actions .btn {
  flex: 1 1 200px;
}

/* ---------- política ---------- */
.legal {
  max-width: 760px;
  margin: 32px auto 64px;
}
.legal h1 {
  font-size: 40px;
  margin-bottom: 16px;
}
.legal h2 {
  font-size: 24px;
  margin: 28px 0 8px;
}
.legal p,
.legal li {
  color: var(--ink-2);
  margin-bottom: 8px;
}
