/* Tienda WGN · capa sobre el diseño B (usa los tokens del sitio: --accent, --line, --tile…) */

/* barra superior de entrega */
.t-bar { background: var(--strong); color: var(--on-strong); font-size: 12.5px; line-height: 1.4; text-align: center; padding: 8px 16px; }
.t-bar b { font-weight: 600; }
.t-bar .sep { opacity: .5; margin-inline: 8px; }
@media (max-width: 640px) { .t-bar .sep { display: block; height: 0; overflow: hidden; } }

/* botón de carrito en el header */
.nav .t-right { display: flex; align-items: center; gap: 10px; }
.t-cartbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.t-cartbtn:hover { background: var(--tile-2); }
.t-cartbtn .ico { width: 20px; height: 20px; }
.t-count { position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 600 11px/19px var(--mono); text-align: center; }
.t-count[hidden] { display: none; }
.t-cartbtn.bump { animation: t-bump .45s var(--ease); }
@keyframes t-bump { 30% { transform: scale(1.14); } }

/* botones agregados */
button.pill { font-family: inherit; cursor: pointer; }
.pill.t-wa-ico { width: 37px; height: 37px; padding: 0; }
.prod .row .t-acts, .prod .info > .t-acts { display: inline-flex; gap: 6px; align-items: center; }
.prod.d .pill.line, .prod.d .pill.t-wa-ico { background: transparent; color: var(--on-strong); border-color: rgba(238,242,232,.35); }
.prod.d .pill.line:hover, .prod.d .pill.t-wa-ico:hover { background: rgba(238,242,232,.12); }
.offer .t-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.offer .t-acts .pill { margin-top: 0; }

/* ficha: envío y ¿Dónde lo recibes? */
.t-envio { margin-top: 14px; font-size: 13.5px; color: var(--muted); display: flex; gap: 8px; align-items: baseline; }
.t-envio .ico { color: var(--accent); transform: translateY(3px); }
.t-donde { margin-top: 18px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; max-width: 560px; }
.t-donde h2 { font-size: 15px; letter-spacing: -.01em; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.t-opt { padding: 16px 18px; display: grid; gap: 8px; }
.t-opt + .t-opt { border-top: 1px solid var(--line); }
.t-opt b { font-weight: 600; font-size: 14.5px; }
.t-opt p { font-size: 13.5px; color: var(--muted); }
.t-opt .t-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 2px; }
.t-opt .pill { justify-self: start; }

/* campos */
.t-field { display: grid; gap: 6px; min-width: 0; }
.t-field label, .t-label { font: 500 11px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.t-field input, .t-field select, .t-field textarea, .t-select { font: inherit; font-size: 15px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%; min-height: 44px; }
.t-select { width: auto; min-height: 37px; padding: 7px 10px; font-size: 13.5px; }
.t-field textarea { min-height: 72px; resize: vertical; }
.t-field input:focus, .t-field select:focus, .t-field textarea:focus, .t-select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.t-field .err { font-size: 12.5px; color: #b42318; display: none; }
.t-field.bad input, .t-field.bad select { border-color: #b42318; }
.t-field.bad .err { display: block; }
:root[data-theme="dark"] .t-field .err { color: #ff8a80; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .t-field .err { color: #ff8a80; } }

/* panel del carrito */
.t-scrim { position: fixed; inset: 0; background: rgba(8,14,12,.45); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); z-index: 90; }
.t-scrim.on { opacity: 1; pointer-events: auto; }
.t-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--bg); color: var(--ink); z-index: 91; display: grid; grid-template-rows: auto 1fr auto; transform: translateX(102%); transition: transform .42s var(--ease); box-shadow: -18px 0 48px var(--shadow); }
.t-drawer.on { transform: none; }
.t-drawer header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.t-drawer h2 { font-size: 20px; }
.t-x { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; font-size: 20px; line-height: 1; }
.t-x:hover { background: var(--tile-2); }
.t-items { overflow-y: auto; padding: 8px 20px; overscroll-behavior: contain; }
.t-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.t-item .th { width: 64px; height: 72px; border-radius: 10px; background: var(--tile); display: grid; place-items: center; overflow: hidden; }
.t-item .th img { max-height: 58px; width: auto; }
.t-item .nm { font-weight: 600; font-size: 14.5px; line-height: 1.25; }
.t-item .pr { font: 500 13px var(--mono); color: var(--muted); margin-top: 4px; }
.t-item .rm { background: none; border: 0; padding: 0; margin-top: 6px; color: var(--muted); font: inherit; font-size: 12.5px; text-decoration: underline; cursor: pointer; }
.t-qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.t-qty button { width: 34px; height: 34px; border: 0; background: none; color: var(--ink); font-size: 17px; cursor: pointer; border-radius: 999px; }
.t-qty button:hover { background: var(--tile-2); }
.t-qty span { min-width: 22px; text-align: center; font: 500 14px var(--mono); }
.t-note { margin: 14px 0 6px; padding: 12px 14px; border-radius: 12px; background: var(--tile-2); font-size: 13px; color: var(--muted); }
.t-note b { color: var(--ink); font-weight: 600; }
.t-empty { padding: 48px 0; text-align: center; color: var(--muted); display: grid; gap: 16px; justify-items: center; }
.t-foot { padding: 18px 20px calc(18px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: grid; gap: 10px; background: var(--surface); }
.t-sum { display: flex; justify-content: space-between; align-items: baseline; }
.t-sum .v { font: 500 20px var(--mono); font-variant-numeric: tabular-nums; }
.t-sum.free .v { font-size: 13px; color: var(--accent); }
.t-foot .pill { width: 100%; }

/* elegir base del trío */
.t-modal { position: fixed; left: 50%; top: 50%; width: min(440px, calc(100% - 32px)); transform: translate(-50%, -46%); opacity: 0; pointer-events: none; transition: .35s var(--ease); z-index: 92; background: var(--bg); border-radius: 18px; padding: 22px; box-shadow: 0 24px 60px var(--shadow); display: grid; gap: 14px; }
.t-modal.on { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; }
.t-modal h2 { font-size: 20px; }
.t-modal .t-bases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.t-modal .t-base { border: 1px solid var(--line); border-radius: 14px; background: var(--tile-2); padding: 14px 8px 12px; display: grid; justify-items: center; gap: 8px; cursor: pointer; font: inherit; color: var(--ink); }
.t-modal .t-base:hover { border-color: var(--accent); }
.t-modal .t-base img { height: 74px; width: auto; }
.t-modal .t-base span { font-size: 13px; font-weight: 600; line-height: 1.2; }

/* página de pedido */
.t-page { padding-block: clamp(20px, 3vw, 40px) clamp(56px, 7vw, 96px); }
.t-page h1 { font-size: clamp(36px, 5vw, 60px); line-height: 1; letter-spacing: -.045em; }
.t-page .lede { color: var(--muted); margin-top: 10px; max-width: 60ch; }
.t-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(24px, 4vw, 56px); margin-top: 28px; align-items: start; }
@media (max-width: 880px) { .t-grid { grid-template-columns: 1fr; } .t-resumen { order: -1; } }
.t-step { border: 1px solid var(--line); border-radius: 16px; padding: clamp(18px, 2.4vw, 26px); display: grid; gap: 16px; }
.t-step + .t-step { margin-top: 16px; }
.t-step h2 { font-size: 19px; display: flex; gap: 10px; align-items: baseline; }
.t-step h2 .n { font: 500 12px var(--mono); color: var(--accent); }
.t-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .t-choices { grid-template-columns: 1fr; } }
.t-choice { position: relative; border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 6px; cursor: pointer; background: var(--bg); }
.t-choice input { position: absolute; opacity: 0; }
.t-choice b { font-weight: 600; font-size: 15px; padding-right: 26px; }
.t-choice span { font-size: 13.5px; color: var(--muted); }
.t-choice::after { content: ""; position: absolute; top: 16px; right: 16px; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); }
.t-choice:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--surface); }
.t-choice:has(input:checked)::after { border: 5px solid var(--accent); }
.t-choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.t-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.t-row3 { display: grid; grid-template-columns: 1.2fr .8fr 1fr; gap: 12px; }
@media (max-width: 560px) { .t-row2, .t-row3 { grid-template-columns: 1fr; } }
.t-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted); }
.t-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.t-check a { color: var(--accent); text-decoration: underline; }
.t-resumen { position: sticky; top: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); padding: 20px; display: grid; gap: 12px; }
.t-resumen h2 { font-size: 17px; }
.t-resumen .t-item { grid-template-columns: 52px 1fr auto; padding: 10px 0; }
.t-resumen .t-item .th { width: 52px; height: 58px; }
.t-resumen .t-item .th img { max-height: 46px; }
.t-submit { display: grid; gap: 10px; }
.t-submit .pill { width: 100%; padding-block: 14px; font-size: 15px; }
.t-submit .fine { font-size: 12.5px; color: var(--muted); text-align: center; }
.t-alert { border-radius: 12px; padding: 12px 14px; font-size: 13.5px; background: var(--tile); }
.t-alert[hidden] { display: none; }
.t-done { text-align: center; display: grid; gap: 14px; justify-items: center; padding: clamp(32px, 6vw, 72px) 0; max-width: 620px; margin-inline: auto; }
.t-done .ok { width: 64px; height: 64px; border-radius: 50%; background: var(--tile); color: var(--accent); display: grid; place-items: center; }
.t-done .ok .ico { width: 30px; height: 30px; }
.t-done .ref { font: 500 13px var(--mono); color: var(--muted); }
.t-done .acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }
.t-hidden { display: none !important; }
@media (prefers-reduced-motion: reduce) { .t-drawer, .t-scrim, .t-modal { transition: none; } .t-cartbtn.bump { animation: none; } }
