/* Rualé Café · página del cliente */
body { padding-bottom: calc(96px + var(--safe-b)); }
main, .hero, .foot, .topbar { max-width: 560px; margin-left: auto; margin-right: auto; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.lead { margin: -8px 0 16px; }
.h2 { font-family: var(--display); font-weight: 700; font-size: 36px; line-height: 1; margin: 0 0 16px; letter-spacing: -0.3px; }
.h3 { font-family: var(--display); font-weight: 700; font-size: 29px; line-height: 1.05; margin: 0 0 14px; }
.block { padding: 40px 20px 4px; }
[data-icon] svg { width: 21px; height: 21px; flex: none; }

/* Barra superior */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px 6px; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand-word { font-weight: 700; font-size: 19px; letter-spacing: 1.5px; line-height: 0.95; color: #2b2b2b; }
.brand-word small { display: block; font-weight: 400; font-size: 13px; letter-spacing: 0.5px; }
.top-card { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; }
.top-card svg { width: 18px; height: 18px; color: var(--navy); }

/* Portada: la puerta en arco del local */
.hero { padding: 12px 20px 0; text-align: center; }
.arch {
  position: relative; margin: 0 auto; width: min(100%, 360px); aspect-ratio: 0.72;
  border-radius: var(--arch); overflow: hidden; background: var(--navy);
  box-shadow: 0 0 0 6px var(--surface), 0 0 0 7px var(--line), 0 24px 40px -18px rgba(15, 20, 38, 0.45);
}
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.open-chip {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.94); color: var(--ink); font-size: 14px; font-weight: 500; white-space: nowrap;
}
.open-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.open-chip.open .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(47, 143, 91, 0.18); }
.hero-sub { margin: 26px 0 6px; color: var(--brass); font-size: 15px; font-weight: 500; }
.hero h1 { margin: 0 auto; max-width: 15ch; font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 0.98; letter-spacing: -0.5px; }
.hero-text { margin: 12px 0 0; color: var(--ink-2); font-size: 17px; }
.actions { display: grid; gap: 10px; margin-top: 22px; text-align: left; }
.action-main { min-height: 56px; font-size: 17px; }
.action-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.action {
  display: grid; justify-items: center; gap: 6px; padding: 14px 6px 12px; border-radius: var(--r-md); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 14.5px;
}
.action svg { color: var(--navy); }
.action:active { transform: scale(0.97); }

/* Avance de la tarjeta */
.teaser { padding-top: 30px; }
.teaser-card { display: grid; gap: 12px; padding: 20px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.teaser-card h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 27px; line-height: 1.05; }
.teaser-card p { margin: -4px 0 0; color: var(--ink-2); font-size: 14.5px; }
.teaser-stamps { display: grid; grid-template-columns: repeat(var(--cols, 8), 1fr); gap: 6px; }
.teaser-stamps .stamp { max-width: 34px; border-color: rgba(154, 107, 42, 0.45); color: var(--brass); }
.teaser-stamps .stamp.prize { border-color: var(--brass); }
.teaser-card .btn { justify-self: start; }

/* Producto destacado */
.feat { border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.feat-art { display: grid; place-items: center; padding: 22px 0 6px; background: linear-gradient(var(--surface-2), var(--surface)); border: 0; width: 100%; }
.feat-art .art { width: 230px; height: 230px; }
.feat-body { padding: 8px 20px 20px; }
.feat-body h3 { margin: 0 0 4px; font-weight: 700; font-size: 21px; }
.feat-body p { margin: 0 0 14px; color: var(--ink-2); }
.feat-note { display: inline-block; margin-bottom: 8px; font-size: 13px; color: var(--brass); font-weight: 500; }

/* Carta */
.tabs {
  position: sticky; top: 0; z-index: 20; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -20px; padding: 10px 20px; background: linear-gradient(var(--bg) 80%, rgba(244, 245, 247, 0));
}
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-weight: 500; font-size: 15px; }
.tab[aria-selected="true"] { background: var(--navy); color: #fff; box-shadow: none; }
.group-title { margin: 18px 0 4px; font-family: var(--display); font-weight: 700; font-size: 24px; }
.items { display: grid; }
.item { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.item:last-child { border-bottom: 0; }
.item-art {
  width: 92px; height: 108px; padding: 10px 6px 4px; border: 0; border-radius: var(--arch); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: end center; position: relative;
}
.item-art .art { width: 80px; height: 80px; }
.item-art .incart {
  position: absolute; right: -4px; top: -4px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px;
  background: var(--coral); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center;
}
.item-name { margin: 0; padding: 0; border: 0; background: none; text-align: left; font-weight: 700; font-size: 17px; line-height: 1.25; color: var(--ink); }
.item-desc { margin: 3px 0 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.4; }
.sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.item { grid-template-rows: auto 1fr; row-gap: 10px; }
.item .item-art { grid-row: 1 / span 2; }
.item .sizes { grid-column: 2; align-self: start; }
.item.multi .item-art { grid-row: 1; }
.item.multi .sizes { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
.item.multi .size { justify-content: space-between; }
.size {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 6px 0 12px; border-radius: 999px;
  border: 0; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); font-size: 14.5px;
}
.size small { color: var(--ink-2); font-size: 13.5px; }
.size b { font-weight: 700; }
.size::after {
  content: '+'; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff;
  font-weight: 500; font-size: 19px; line-height: 27px; text-align: center;
}
.size.added { box-shadow: inset 0 0 0 1.5px var(--ok); }
.size.added::after { content: '✓'; background: var(--ok); font-size: 14px; }
.notice { margin: 18px 0 0; color: var(--ink-3); font-size: 14px; }

/* Detalle 2D */
.detail-art { display: grid; place-items: center; margin: -4px -18px 12px; padding: 10px 0 18px; background: linear-gradient(var(--surface-2), var(--surface)); }
.detail-art .art { width: min(78vw, 300px); height: auto; }
.detail-desc { margin: 0 0 16px; color: var(--ink-2); font-size: 16px; }

/* Tarjeta del cliente */
.card-wrap { display: grid; gap: 16px; }
.card-hint { text-align: center; color: var(--ink-2); font-size: 14px; margin: -4px 0 0; }
.reg-box, .panel { padding: 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.reg-box h3 { margin: 0 0 4px; font-size: 18px; }
.reg-box > p { margin: 0 0 14px; color: var(--ink-2); font-size: 14.5px; }
.panel h3 { margin: 0 0 10px; font-size: 17px; }
.rewards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rewards li { display: flex; gap: 10px; align-items: center; }
.rewards li svg { width: 20px; height: 20px; color: var(--brass); flex: none; }
.orders { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.order-row { display: grid; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.order-row:last-child { border-bottom: 0; padding-bottom: 0; }
.order-row header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.order-row b { font-size: 15.5px; }
.order-row p { margin: 0; color: var(--ink-2); font-size: 14px; }
.track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 4px; }
.track span { height: 5px; border-radius: 9px; background: var(--surface-2); }
.track span.on { background: var(--navy); }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14.5px; }
.history li { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-2); }
.history li b { color: var(--ink); font-weight: 500; }
.history .plus { color: var(--ok); font-weight: 700; }
.history .minus { color: #b3261e; font-weight: 700; }
.linkish { background: none; border: 0; color: var(--ink-2); text-decoration: underline; font-size: 14px; padding: 8px 0; justify-self: center; }

/* Pasos */
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding-left: 48px; color: var(--ink-2); min-height: 34px; }
.steps li b { color: var(--ink); display: block; font-weight: 500; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -2px; width: 34px; height: 38px; border-radius: 999px 999px 8px 8px;
  display: grid; place-items: center; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--navy);
  font-family: var(--display); font-weight: 700; font-size: 20px;
}

/* Reseñas */
.review { text-align: center; padding: 30px 22px 26px; border-radius: 999px 999px var(--r-lg) var(--r-lg); background: var(--navy); color: #fff; }
.review-stars { display: flex; justify-content: center; gap: 4px; color: var(--tan); margin: 18px 0 10px; }
.review-stars svg { width: 22px; height: 22px; }
.review h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1.05; }
.review p { margin: 10px auto 18px; max-width: 34ch; color: #d3d8e8; }
.review .btn { background: #fff; color: var(--navy); }

/* Visítanos */
.info-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.info-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); }
.info-list li svg { color: var(--navy); margin-top: 1px; }
.visit-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.visit-btns.single { grid-template-columns: 1fr; }
.info-grid { margin: 22px 0 0; display: grid; gap: 14px; }
.info-grid dt { font-weight: 500; }
.info-grid dd { margin: 2px 0 0; color: var(--ink-2); }

.foot { padding: 40px 20px 30px; display: grid; justify-items: center; gap: 10px; text-align: center; border-top: 1px solid var(--line); margin-top: 44px; }
.foot p { margin: 0; }
.foot a { color: var(--ink-2); }
.demo-note { color: var(--warn); max-width: 320px; font-size: 14px; }

/* Barra del pedido */
.cartbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); z-index: 50; max-width: 536px; margin: 0 auto;
  min-height: 60px; padding: 0 18px 0 12px; border: 0; border-radius: 999px; display: flex; align-items: center; gap: 12px;
  background: var(--navy); color: #fff; box-shadow: 0 12px 30px rgba(15, 20, 38, 0.3); font-weight: 500; font-size: 17px;
  animation: rise 0.3s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes rise { from { transform: translateY(80px); } }
.cartbar-count { min-width: 36px; height: 36px; border-radius: 999px; background: #fff; color: var(--navy); display: grid; place-items: center; padding: 0 8px; font-weight: 700; }
.cartbar-label { flex: 1; text-align: left; }
.cartbar-total { font-weight: 700; }
.cartbar.bump { animation: bump 0.35s ease; }
@keyframes bump { 40% { transform: scale(1.04); } }

/* Hoja del pedido */
.cart-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.cart-line b { font-size: 15.5px; font-weight: 500; }
.cart-line small { display: block; color: var(--ink-2); font-size: 13.5px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink); display: grid; place-items: center; }
.stepper button svg { width: 16px; height: 16px; }
.stepper span { min-width: 22px; text-align: center; font-weight: 700; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0 18px; font-size: 18px; }
.cart-total b { font-family: var(--display); font-size: 34px; color: var(--navy); }
.sheet-actions { display: grid; gap: 10px; margin-top: 6px; }
.sent { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 6px 0 4px; }
.sent .code { font-family: var(--display); font-weight: 700; font-size: 46px; color: var(--navy); line-height: 1; }
.sent p { margin: 0; color: var(--ink-2); max-width: 340px; }

@media (max-width: 360px) {
  .hero h1 { font-size: 38px; }
  .item { grid-template-columns: 78px 1fr; }
  .item-art { width: 78px; height: 94px; }
  .item-art .art { width: 68px; height: 68px; }
}
