/*
 * LA TIENDA DE LA WEB (v0.5.8x): /tienda, la ficha de un producto, la cesta y el pedido.
 *
 * Paginas interiores que viven dentro de CUALQUIERA de los 17 temas, asi que aqui no se
 * inventa ni un color ni una letra: todo sale de lo que el armazon del tema pone en :root
 * (--site-accent, --site-fg, --site-bg-2, --font-display...). Lo propio es la composicion:
 * el escaparate con un producto grande y los demas en rejilla sin cajas, la ficha con la foto
 * a sangre, y la cesta con el ticket al lado que se recalcula al elegir la entrega.
 *
 * Sin sombras en reposo, sin degradados, sin rayas finas (los campos de formulario si llevan
 * su borde, como manda la casa). Los botones, redondos del todo; las fotos, cuadradas.
 */
.tn {
  /* Primero lo que pone el TEMA (--ink, --display...: un tema tematico los cambia, la pizarra
     pinta tiza sobre negro) y, si no, lo de la web (--site-*). */
  --tn-ink: var(--ink, var(--site-fg, #171717));
  --tn-ground: var(--ground, var(--site-bg, #ffffff));
  --tn-field: var(--field, var(--site-bg-2, #f4f4f4));
  --tn-card: var(--card, var(--site-card, #ffffff));
  --tn-line: var(--site-line, color-mix(in srgb, var(--tn-ink) 22%, transparent));
  --tn-muted: var(--muted, var(--site-muted, #555555));
  --tn-accent: var(--accent, var(--site-accent, #0f766e));
  --tn-accent-ink: var(--accent-ink, var(--site-accent-ink, #ffffff));
  --tn-accent-text: var(--accent-text, var(--site-accent-text, var(--tn-accent)));
  --tn-display: var(--display, var(--font-display, inherit));
  --tn-body: var(--text, var(--font-body, inherit));
  --tn-error: color-mix(in srgb, #d92d20 78%, var(--tn-ink));
  --tn-ok: color-mix(in srgb, #1f8a4c 80%, var(--tn-ink));
  --tn-ease: cubic-bezier(.2, .7, .2, 1);
  /* Los botones con la esquina del tema: redondos, en arco o rectos (los del juego comun la dicen
     en --btn-radius; Escenario los quiere rectos). */
  --tn-radius: var(--btn-radius, 999px);
  box-sizing: border-box;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 88px) clamp(16px, 4vw, 32px) clamp(72px, 9vw, 128px);
  color: var(--tn-ink);
  font-family: var(--tn-body);
}
.tn *, .tn *::before, .tn *::after { box-sizing: border-box; }
.tn [hidden] { display: none !important; }
.tn.tn-t-escenario { --tn-radius: 0; }
.tn img { max-width: 100%; }

/* LA CABECERA: el titulo lo dimensiona el tema (como en el resto de sus paginas). */
.tn-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: end; margin-bottom: clamp(28px, 4vw, 56px); }
.tn-head h1 { margin: 0; font-family: var(--tn-display); text-wrap: balance; }
/* EL ROTULO DE LA TIENDA: una palabra, grande, como el letrero de la puerta. Solo en el escaparate. */
:is(#top, #contenido, main) .tn .tn-sign, .tn .tn-sign { font-size: clamp(3.4rem, 1rem + 7.4vw, 8.4rem) !important; line-height: .9 !important; letter-spacing: -.045em !important; }
.tn-lead { grid-column: 1; margin: 14px 0 0; max-width: 52ch; font-size: 1.2rem; line-height: 1.5; color: var(--tn-ink); }
.tn-back { display: inline-block; margin-bottom: 18px; color: var(--tn-ink); font-size: 1rem; font-weight: 600; text-decoration: none; }
.tn-back:hover { text-decoration: underline; text-underline-offset: 3px; }
.tn-back-end { grid-column: 2; grid-row: 1; justify-self: end; align-self: end; margin: 0; }

.tn-alert { margin: 0 0 24px; padding: 14px 18px; background: color-mix(in srgb, #d92d20 13%, var(--tn-ground)); color: var(--tn-ink); font-weight: 600; line-height: 1.45; }
.tn-alert p { margin: 0; }
.tn-alert p + p { margin-top: 6px; }
.tn-note { margin: 0 0 24px; padding: 14px 18px; background: color-mix(in srgb, #1f8a4c 12%, var(--tn-ground)); color: var(--tn-ink); font-weight: 600; line-height: 1.45; }
.tn-error { display: block; margin: 8px 0 0; color: var(--tn-error); font-style: normal; font-size: 1rem; font-weight: 600; }
.tn-hint { margin: 8px 0 0; max-width: 62ch; color: color-mix(in srgb, var(--tn-muted) 55%, var(--tn-ink)); font-size: 1rem; line-height: 1.5; }
.tn-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* EL BOTON: uno, del color del negocio, redondo del todo. */
.tn-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px;
  background: var(--tn-accent); color: var(--tn-accent-ink);
  border: 0; border-radius: var(--tn-radius); cursor: pointer;
  font-family: var(--tn-body); font-size: 1rem; font-weight: 700; text-decoration: none; line-height: 1.2; text-align: center;
  transition: transform .18s var(--tn-ease), opacity .18s var(--tn-ease), background-color .18s var(--tn-ease);
}
.tn-btn:hover { transform: translateY(-2px); }
.tn-btn:active { transform: translateY(1px); }
.tn-btn:focus-visible { outline: 3px solid var(--tn-ink); outline-offset: 3px; }
.tn-btn[disabled], .tn-btn.is-off { opacity: .45; cursor: not-allowed; transform: none; }
.tn-btn-ghost { background: var(--tn-field); color: var(--tn-ink); }
.tn-btn-small { min-height: 42px; padding: 0 18px; font-size: .95rem; }
.tn-btn-wide { width: 100%; }

/* LA CESTA DE LA CABECERA: un boton redondo con lo que lleva. Sale cuando hay algo. */
.tn-bag { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px; background: var(--tn-ink); color: var(--tn-ground); border-radius: var(--tn-radius); text-decoration: none; font-weight: 700; transition: transform .18s var(--tn-ease); }
.tn-bag:hover { transform: translateY(-2px); }
.tn-bag-count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: var(--tn-accent); color: var(--tn-accent-ink); font-variant-numeric: tabular-nums; font-size: .95rem; }
.tn-bag.is-bump { animation: tn-bump .4s var(--tn-ease); }

/* LAS CATEGORIAS: anclas planas, sin pildoras con borde. */
.tn-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 clamp(32px, 4vw, 48px); padding: 0; list-style: none; }
.tn-cats a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; background: var(--tn-field); color: var(--tn-ink); border-radius: var(--tn-radius); font-weight: 600; text-decoration: none; transition: background-color .18s var(--tn-ease), color .18s var(--tn-ease); }
.tn-cats a:hover { background: var(--tn-accent); color: var(--tn-accent-ink); }

/* EL ESCAPARATE: el primero de cada grupo, grande y a lo ancho; los demas, en rejilla. */
.tn-group { margin: 0 0 clamp(56px, 8vw, 112px); scroll-margin-top: calc(var(--nav, 72px) + 16px); }
:is(#top, #contenido, main) .tn .tn-group-h,
.tn .tn-group-h { display: block; margin: 0 0 22px; padding: 0; font-family: var(--tn-display) !important; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.6rem) !important; font-weight: 600 !important; line-height: 1.05 !important; letter-spacing: -.02em !important; text-transform: none !important; color: var(--tn-ink) !important; text-wrap: balance; }
.tn-feature { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(20px, 3.5vw, 56px); align-items: center; margin-bottom: clamp(28px, 4vw, 48px); color: inherit; text-decoration: none; }
.tn-feature .tn-photo { aspect-ratio: 4 / 3; }
/* Los nombres los mide la tienda, no el tema: algunos temas agrandan todo h3 de la pagina y un
   nombre de producto en una columna estrecha acababa en tres lineas. */
:is(#top, #contenido, main) .tn .tn-feature-name,
.tn .tn-feature-name { margin: 0; font-family: var(--tn-display) !important; font-size: clamp(1.7rem, 1.1rem + 2.2vw, 3.4rem) !important; font-weight: 600 !important; line-height: 1 !important; letter-spacing: -.03em !important; text-transform: none !important; text-wrap: balance; }
.tn-feature-text { margin: 16px 0 0; max-width: 46ch; font-size: 1.1rem; line-height: 1.55; }
.tn-feature .tn-price { margin-top: 22px; font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.6rem); }
.tn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) clamp(16px, 2vw, 28px); }
.tn-item { position: relative; display: grid; align-content: start; gap: 10px; min-width: 0; }
.tn-item-link { color: inherit; text-decoration: none; display: grid; gap: 12px; }
:is(#top, #contenido, main) .tn .tn-item-name,
.tn .tn-item-name { margin: 0; font-family: var(--tn-display) !important; font-size: 1.3rem !important; font-weight: 600 !important; line-height: 1.15 !important; letter-spacing: -.01em !important; text-transform: none !important; overflow-wrap: anywhere; }
.tn-item-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; }
.tn-price { margin: 0; font-family: var(--tn-display); font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tn-price small { font-family: var(--tn-body); font-size: .95rem; font-weight: 600; letter-spacing: 0; }
.tn-stock { margin: 0; font-size: 1rem; font-weight: 600; color: var(--tn-accent-text); }
.tn-stock.is-out { color: var(--tn-error); }

/* LAS FOTOS: cuadradas, del mismo corte, con un leve acercamiento al pasar. */
.tn-photo { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; background: var(--tn-field); }
.tn-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--tn-ease); }
.tn-item-link:hover .tn-photo img, .tn-feature:hover .tn-photo img { transform: scale(1.04); }
/* Sin foto: un campo del color del negocio con el nombre, dibujado aqui. Nunca un icono. */
.tn-photo-none { display: grid; align-items: end; padding: clamp(16px, 2vw, 24px); background: var(--tn-accent); color: var(--tn-accent-ink); }
.tn-photo-none span { font-family: var(--tn-display); font-size: clamp(1.6rem, 1rem + 2vw, 2.8rem); font-weight: 700; line-height: .95; letter-spacing: -.03em; text-transform: none; overflow-wrap: anywhere; }
.tn-photo-out::after { content: attr(data-out); position: absolute; left: 0; top: 0; padding: 8px 14px; background: var(--tn-ink); color: var(--tn-ground); font-weight: 700; font-size: .95rem; }

/* LA CABECERA DE LA TIENDA con fotos de la casa, si sus productos no traen. */
.tn-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin: 0 0 clamp(32px, 5vw, 64px); }
.tn-strip-foot { margin: clamp(56px, 8vw, 104px) 0 0; }
.tn-strip img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

/* LA FICHA DEL PRODUCTO: la foto grande a un lado, lo que hay que decidir al otro. */
.tn-product { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.tn-product-page .tn-head { margin-bottom: clamp(16px, 2vw, 28px); }
.tn-gallery { display: grid; gap: 10px; min-width: 0; }
.tn-gallery .tn-photo { aspect-ratio: 1 / 1; }
.tn-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.tn-thumb { padding: 0; border: 0; background: var(--tn-field); cursor: pointer; aspect-ratio: 1 / 1; overflow: hidden; opacity: .7; transition: opacity .18s var(--tn-ease); }
.tn-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tn-thumb.is-on, .tn-thumb:hover { opacity: 1; outline: 3px solid var(--tn-accent); outline-offset: -3px; }
.tn-buy { position: sticky; top: calc(var(--nav, 72px) + 24px); min-width: 0; }
:is(#top, #contenido, main) .tn .tn-buy h1,
.tn .tn-buy h1 { margin: 0; font-family: var(--tn-display) !important; font-size: clamp(2rem, 1.1rem + 2.1vw, 3.2rem) !important; line-height: 1 !important; letter-spacing: -.03em !important; text-transform: none !important; text-wrap: balance; }
.tn-buy .tn-price { margin-top: 18px; font-size: clamp(2rem, 1.5rem + 1.6vw, 3rem); }
.tn-tax { margin: 4px 0 0; font-size: 1rem; color: color-mix(in srgb, var(--tn-muted) 55%, var(--tn-ink)); }
.tn-desc { margin: 22px 0 0; max-width: 60ch; font-size: 1.05rem; line-height: 1.6; white-space: pre-line; }
.tn-label { display: block; margin: 26px 0 10px; font-size: 1rem; font-weight: 700; }
.tn-variant-set { margin: 0; padding: 0; border: 0; min-width: 0; }
.tn-variant-set legend { padding: 0; }
.tn-variants { display: flex; flex-wrap: wrap; gap: 8px; }
.tn-chip { position: relative; cursor: pointer; }
.tn-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tn-chip span { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 76px; min-height: 52px; padding: 6px 18px; background: var(--tn-field); color: var(--tn-ink); border-radius: var(--tn-radius); font-weight: 700; line-height: 1.15; transition: background-color .18s var(--tn-ease), color .18s var(--tn-ease), transform .18s var(--tn-ease); }
.tn-chip span small { font-weight: 600; font-size: .85rem; opacity: .85; }
.tn-chip:hover span { transform: translateY(-2px); }
.tn-chip input:checked + span { background: var(--tn-accent); color: var(--tn-accent-ink); }
.tn-chip input:disabled + span { opacity: .4; text-decoration: line-through; cursor: not-allowed; transform: none; }
.tn-chip input:focus-visible + span { outline: 3px solid var(--tn-accent); outline-offset: 3px; }
.tn-qty { display: inline-flex; align-items: center; gap: 4px; padding: 4px; background: var(--tn-field); border-radius: var(--tn-radius); }
.tn-qty button, .tn-qty a { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--tn-radius); background: var(--tn-card); color: var(--tn-ink); font-size: 1.3rem; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .18s var(--tn-ease); }
.tn-qty button:hover, .tn-qty a:hover { transform: scale(1.06); }
.tn-qty input { width: 52px; height: 44px; border: 0; background: transparent; color: var(--tn-ink); font: inherit; font-weight: 700; font-size: 1.1rem; text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.tn-qty input::-webkit-outer-spin-button, .tn-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tn-qty span { min-width: 34px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.tn-buy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 26px; }
.tn-added { margin: 16px 0 0; padding: 14px 18px; background: color-mix(in srgb, var(--tn-accent) 14%, var(--tn-ground)); font-weight: 600; line-height: 1.5; }
.tn-added a { color: var(--tn-ink); text-underline-offset: 3px; }
.tn-facts { display: grid; gap: 6px; margin: 32px 0 0; padding: 0; }
.tn-fact { display: grid; grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr); gap: 14px; align-items: baseline; padding: 14px 18px; background: var(--tn-field); }
.tn-fact dt { font-weight: 700; font-size: 1rem; }
.tn-fact dd { margin: 0; font-size: 1rem; line-height: 1.5; }

/* LA CESTA: el formulario por pasos y, al lado, el ticket que se recalcula. */
.tn-checkout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 430px); gap: clamp(32px, 5vw, 72px); align-items: start; }
.tn-form { grid-column: 1; grid-row: 1; min-width: 0; }
.tn-ticket { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--nav, 72px) + 24px); min-width: 0; padding: clamp(20px, 2.5vw, 30px); background: var(--tn-field); }
.tn-ticket-h { margin: 0 0 18px; font-family: var(--tn-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em; }
.tn-lines { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.tn-line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.tn-line-photo { width: 64px; height: 64px; object-fit: cover; background: var(--tn-card); }
.tn-line-none { display: grid; place-items: center; width: 64px; height: 64px; background: var(--tn-accent); color: var(--tn-accent-ink); font-family: var(--tn-display); font-weight: 700; font-size: 1.4rem; }
.tn-line-name { margin: 0; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.tn-line-meta { margin: 2px 0 8px; font-size: .95rem; color: color-mix(in srgb, var(--tn-muted) 55%, var(--tn-ink)); }
.tn-line-total { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tn-line .tn-qty { padding: 2px; }
.tn-line .tn-qty a { width: 34px; height: 34px; font-size: 1.1rem; }
.tn-remove { display: inline-block; margin-left: 10px; color: var(--tn-ink); font-size: .95rem; font-weight: 600; }
.tn-sums { display: grid; gap: 8px; margin: 22px 0 0; padding: 18px 0 0; }
.tn-sum { display: flex; justify-content: space-between; gap: 16px; margin: 0; font-size: 1rem; font-variant-numeric: tabular-nums; }
.tn-sum-total { margin-top: 6px; font-family: var(--tn-display); font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em; }
.tn-sum-gift { color: var(--tn-ok); font-weight: 700; }
.tn-sum-due { font-weight: 700; }
.tn-step { margin: 0 0 clamp(32px, 4.5vw, 48px); padding: 0; border: 0; min-width: 0; }
:is(#top, #contenido, main) .tn .tn-h,
.tn .tn-h {
  display: block; float: none; width: 100%;
  margin: 0 0 16px; padding: 0;
  font-family: var(--tn-display) !important;
  font-size: clamp(1.4rem, 1.15rem + .9vw, 2rem) !important;
  font-weight: 600 !important; line-height: 1.1 !important; letter-spacing: -.02em !important;
  text-transform: none !important; color: var(--tn-ink) !important;
}
.tn-option { position: relative; display: block; margin: 0 0 10px; cursor: pointer; }
.tn-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tn-option > span { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 16px 18px 16px 52px; background: var(--tn-field); line-height: 1.45; position: relative; transition: background-color .18s var(--tn-ease); }
.tn-option > span::before { content: ''; position: absolute; left: 18px; top: 19px; width: 18px; height: 18px; border-radius: 50%; background: var(--tn-card); box-shadow: inset 0 0 0 2px var(--tn-ink); }
.tn-option input:checked + span::before { box-shadow: inset 0 0 0 6px var(--tn-accent); background: var(--tn-accent-ink); }
.tn-option input:focus-visible + span { outline: 3px solid var(--tn-accent); outline-offset: 3px; }
.tn-option strong { font-size: 1rem; }
.tn-option em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tn-option small { grid-column: 1 / -1; font-size: .98rem; }
.tn-hours { display: grid; grid-template-columns: max-content 1fr; gap: 2px 14px; margin: 8px 0 0; font-size: .95rem; }
.tn-hours dt { font-weight: 600; }
.tn-hours dd { margin: 0; font-variant-numeric: tabular-nums; }
.tn-hours-box { margin: -4px 0 14px; padding: 12px 18px 14px 52px; background: var(--tn-field); }
.tn-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.tn-trio { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 0 16px; }
.tn-field-label { display: block; margin: 0 0 16px; min-width: 0; }
.tn-field-label > span { display: block; margin-bottom: 8px; font-size: 1rem; font-weight: 600; color: var(--tn-ink); }
.tn-field {
  display: block; width: 100%; min-height: 52px; padding: 12px 16px;
  background: var(--tn-card); color: var(--tn-ink);
  border: 1px solid var(--tn-line); border-radius: 6px; /* taste-skill-ignore: campo de formulario */
  font: inherit; font-size: 1rem;
}
textarea.tn-field { min-height: 96px; resize: vertical; line-height: 1.5; }
.tn-field:focus { outline: 3px solid var(--tn-accent); outline-offset: 1px; border-color: var(--tn-accent); }
.tn-field-code { font-family: var(--tn-display); letter-spacing: .06em; text-transform: uppercase; }
.tn-gift-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.tn-gift-row .tn-field-label { margin: 0; }
.tn-check { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 14px; font-size: 1rem; line-height: 1.5; cursor: pointer; }
.tn-check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--tn-accent); }
.tn-check a, .tn-terms a, .tn-facts a, .tn-pickup a { color: var(--tn-accent-text); text-decoration: underline; text-underline-offset: 3px; }
.tn-required { margin: 0 0 14px; padding: 12px 16px; background: color-mix(in srgb, var(--tn-accent) 12%, var(--tn-ground)); font-weight: 600; line-height: 1.45; }
.tn-terms { max-width: 760px; margin-top: clamp(48px, 7vw, 88px); }
.tn-terms-text { max-width: 66ch; font-size: 1rem; line-height: 1.6; color: var(--tn-ink); }
.tn-empty { display: grid; gap: 18px; justify-items: start; max-width: 620px; padding: clamp(24px, 4vw, 40px); background: var(--tn-field); }
.tn-empty p { margin: 0; font-size: 1.15rem; line-height: 1.5; }
.tn-credits { max-width: 90ch; margin: 12px auto 0; padding: 0 clamp(16px, 4vw, 32px); font-size: 1rem; }
.tn-credits summary { cursor: pointer; opacity: .8; }
.tn-credits p { margin: 8px 0 0; line-height: 1.5; }

/* EL PEDIDO: el estado en grande, el camino que le queda y el ticket. */
.tn-order { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 430px); gap: clamp(32px, 5vw, 72px); align-items: start; }
/* EL ESTADO es lo que se viene a mirar: en grande, como el rotulo de la tienda. */
.tn-state { margin: 0; font-family: var(--tn-display); font-size: clamp(2.6rem, 1rem + 5.4vw, 7rem); font-weight: 700; line-height: .95; letter-spacing: -.04em; color: var(--tn-accent-text); text-wrap: balance; }
.tn-path { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.tn-path li { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; background: var(--tn-field); border-radius: 999px; font-weight: 600; opacity: .55; }
.tn-path li.is-done { opacity: 1; }
.tn-path li.is-now { opacity: 1; background: var(--tn-accent); color: var(--tn-accent-ink); }
.tn-pickup { margin: 28px 0 0; padding: 20px 22px; background: var(--tn-field); line-height: 1.55; }
.tn-pickup p { margin: 0; }
.tn-pickup p + p { margin-top: 6px; }
.tn-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }

/* LA CABECERA DEL PEDIDO: todo en una columna (el estado debajo del titulo). */
.tn-order-head > * { grid-column: 1 / -1; }
.tn-order-head .tn-state { margin-top: 14px; }

/* LA PIZARRA (tema tematico de restaurante): el tema convierte en pizarra el <main> de las
   paginas interiores que empiezan con su cabecera, y escribe a tiza. Aqui solo se le dan a la
   tienda los colores de esa pizarra; los campos de formulario siguen claros para escribir. */
.k-pizarra.k-inner #top > main.tn:has(> header) {
  --tn-ink: var(--chalk, #EFEFEB);
  --tn-muted: var(--chalk-soft, #C4C6C2);
  --tn-field: var(--slate-up, #2A302D);
  --tn-ground: var(--slate, #1C211F);
  --tn-card: var(--slate, #1C211F);
  --tn-line: color-mix(in srgb, var(--chalk, #EFEFEB) 30%, transparent);
}
.k-pizarra.k-inner #top > main.tn:has(> header) .tn-field { background: #F7F5EF; color: #1C211F; }
.k-pizarra.k-inner #top > main.tn:has(> header) .tn-field::placeholder { color: #5b605d; }

/* EL MOVIL: una columna, el ticket encima del formulario, todo a lo ancho. */
@media (max-width: 960px) {
  .tn-checkout, .tn-order, .tn-product, .tn-feature { grid-template-columns: minmax(0, 1fr); }
  .tn-ticket { grid-column: 1; grid-row: 1; position: static; }
  .tn-form { grid-row: 2; }
  .tn-buy { position: static; }
  .tn-order .tn-ticket { grid-row: auto; }
  .tn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .tn-head { grid-template-columns: minmax(0, 1fr); }
  .tn-pair, .tn-trio { grid-template-columns: minmax(0, 1fr); }
  /* En el movil la rejilla pasa a FILAS: la foto a un lado y el nombre con su precio al otro. */
  .tn-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .tn-item { grid-template-columns: minmax(0, 40%) minmax(0, 1fr); column-gap: 16px; align-items: start; }
  .tn-item-link { display: contents; }
  .tn-item .tn-photo { grid-row: 1 / span 3; }
  .tn-item-name, .tn-item-row, .tn-item .tn-stock { grid-column: 2; }
  :is(#top, #contenido, main) .tn .tn-item-name, .tn .tn-item-name { font-size: 1.15rem !important; align-self: end; }
  .tn-price { font-size: 1.15rem; }
  .tn-photo-none span { font-size: 1.3rem; }
  .tn-fact { grid-template-columns: minmax(0, 6.5rem) minmax(0, 1fr); gap: 12px; }
  .tn-btn-wide-m { width: 100%; }
  .tn-gift-row { grid-template-columns: minmax(0, 1fr); }
  .tn-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tn-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* LO QUE SE MUEVE: las piezas entran escalonadas, las fotos respiran y la cesta salta al llenarse. */
@media (prefers-reduced-motion: no-preference) {
  .tn-rise { animation: tn-rise .7s var(--tn-ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
  .tn.tn-live [data-tn-reveal] { transition: opacity .7s var(--tn-ease), transform .7s var(--tn-ease); transition-delay: calc(var(--i, 0) * 70ms); }
  .tn.tn-live [data-tn-reveal]:not(.in) { opacity: 0; transform: translateY(24px); }
  .tn-feature .tn-photo img, .tn-gallery .tn-photo img { animation: tn-drift 16s ease-in-out infinite alternate; transform-origin: 50% 60%; }
  .tn-strip img { animation: tn-rise .8s var(--tn-ease) both; animation-delay: calc(var(--i, 0) * 90ms + 150ms); }
  .tn-sum-total, .tn-sum-due { transition: color .3s var(--tn-ease); }
  .tn-sum.is-bump { animation: tn-bump .36s var(--tn-ease); }
}
@keyframes tn-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes tn-drift { from { transform: scale(1); } to { transform: scale(1.07); } }
@keyframes tn-bump { 0% { transform: scale(1); } 40% { transform: scale(1.05); } 100% { transform: scale(1); } }

/* LA PRIVACIDAD DEL NEGOCIO: texto a buena medida, una seccion detras de otra, sin cajas. */
.tn-legal-body { max-width: 760px; }
.tn-legal-part { margin: 0 0 clamp(32px, 4vw, 48px); }
.tn-legal-part .tn-terms-text { max-width: 66ch; }
.tn-privacy-link { margin: 14px 0 0; font-size: 1rem; }
.tn-privacy-link a { color: var(--tn-accent-text); text-decoration: underline; text-underline-offset: 3px; }

/* En la pizarra, una pagina sin cabecera propia no se vuelve pizarra: su titulo no puede
   quedarse escrito a tiza sobre el fondo claro. */
.k-pizarra.k-inner #top > main.tn:not(:has(> header)) h1 { color: var(--tn-ink); -webkit-mask: none; mask: none; }
