:root {
  --t-bg: #f7f7f8;
  --t-card: #ffffff;
  --t-border: #e5e7eb;
  --t-text: #1a1d23;
  --t-muted: #6b7280;
  --t-primary: var(--brand-primary, #1f6feb);
  --t-primary-dark: var(--brand-primary-dark, #1857b8);
  --t-primary-light: var(--brand-primary-light, #e6f0fd);
  --t-secondary: var(--brand-secondary, #111827);
  --t-success: #1a7f37;
  --t-success-bg: #e9f7ef;
  --t-error: #b00020;
  --t-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 2px 8px rgba(16, 24, 40, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--t-bg);
  color: var(--t-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body.t-con-tabbar {
  padding-bottom: 66px;
}

@media (min-width: 860px) {
  body.t-con-tabbar {
    padding-bottom: 0;
  }
}

a { color: var(--t-primary); }

.t-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--t-card);
  border-bottom: 1px solid var(--t-border);
  padding: 10px 16px;
}

.t-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  max-width: 1080px;
  margin: 0 auto;
}

.t-header-marca {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex: 1 1 auto;
  min-width: 0;
  order: 1;
}

.t-logo {
  max-width: 140px;
  max-height: 44px;
  width: auto;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  background: transparent;
}

.t-store-name {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
}

.t-status {
  font-size: 0.76rem;
  padding: 2px 9px;
  border-radius: 999px;
  display: inline-block;
  font-weight: 600;
}
.t-status.abierta { background: var(--t-success-bg); color: var(--t-success); }
.t-status.cerrada { background: #fde2e2; color: var(--t-error); }

.t-cart-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--t-text);
  position: relative;
  flex-shrink: 0;
  order: 2;
}

.t-cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--t-primary);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

.t-cart-badge[hidden] {
  display: none;
}

.t-wrap {
  max-width: 1080px;
  margin: 0 auto;
}

/* ---------- Buscador e info rápida del encabezado ---------- */

.t-search-form {
  display: flex;
  gap: 8px;
  order: 3;
  flex: 1 1 100%;
}

.t-search-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--t-border);
  border-radius: 999px;
  font: inherit;
  background: var(--t-bg);
}

.t-search-form input:focus {
  outline: 2px solid var(--t-primary-light);
  border-color: var(--t-primary);
  background: #fff;
}

.t-search-form button {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--t-primary);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
}

.t-info-row {
  display: flex;
  gap: 18px;
  font-size: 0.8rem;
  color: var(--t-muted);
  font-weight: 600;
  order: 4;
  flex: 1 1 100%;
}

.t-info-row span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (min-width: 860px) {
  .t-header-inner {
    flex-wrap: nowrap;
    gap: 24px;
  }

  .t-header-marca {
    flex: 0 1 auto;
  }

  .t-search-form {
    order: 2;
    flex: 1 1 auto;
    max-width: 420px;
  }

  .t-info-row {
    order: 3;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .t-cart-link {
    order: 4;
  }
}

/* ---------- Layout de dos columnas en escritorio (categorías + contenido) ---------- */

.t-layout {
  display: flex;
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto;
  align-items: flex-start;
}

.t-sidebar-categorias {
  display: none;
}

@media (min-width: 860px) {
  .t-sidebar-categorias {
    display: block;
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 130px;
    background: var(--t-card);
    border: 1px solid var(--t-border);
    border-radius: 14px;
    padding: 14px;
  }

  .t-sidebar-categorias h2 {
    margin: 0 0 10px;
    font-size: 0.95rem;
  }

  .t-sidebar-categorias a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--t-text);
    font-size: 0.88rem;
    font-weight: 600;
  }

  .t-sidebar-categorias a:hover {
    background: var(--t-bg);
  }

  .t-sidebar-categorias img,
  .t-sidebar-categorias .t-cat-icon-fallback {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    object-fit: cover;
    flex-shrink: 0;
  }

  .t-sidebar-categorias .t-cat-icon-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .t-sidebar-categorias .t-cat-icon-fallback svg {
    width: 15px;
    height: 15px;
  }

  .t-categorias-moviles {
    display: none;
  }

  .t-content-col {
    flex: 1;
    min-width: 0;
  }
}

/* ---------- Categorías en círculos (móvil / tablet) ---------- */

.t-cat-seccion {
  max-width: 1080px;
  margin: 0 auto;
  padding: 4px 16px 18px;
}

.t-cat-seccion h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.t-cat-circulos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (min-width: 640px) {
  .t-cat-circulos { grid-template-columns: repeat(6, 1fr); }
}

@media (min-width: 860px) {
  .t-cat-circulos { grid-template-columns: repeat(8, 1fr); gap: 18px; }
}

.t-cat-circulo {
  text-decoration: none;
  color: var(--t-text);
  text-align: center;
  font-size: 0.76rem;
  font-weight: 600;
}

.t-cat-circulo-count {
  display: block;
  font-weight: 400;
  color: var(--t-muted);
  font-size: 0.7rem;
  margin-top: 1px;
}

.t-cat-circulo-img {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--t-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
}

.t-cat-circulo-img svg { width: 26px; height: 26px; }

@media (min-width: 860px) {
  .t-cat-circulo-img { width: 72px; height: 72px; }
  .t-cat-circulo-img svg { width: 34px; height: 34px; }
}

/* ---------- Insignias sobre la imagen del producto ---------- */

.t-card-media {
  position: relative;
}

.t-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #e11d48;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.t-card-badge-destacado {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #fff;
  border-radius: 999px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* ---------- Banner de bienvenida con foto ---------- */

.t-hero-foto {
  border-radius: 18px;
  overflow: hidden;
  background: var(--t-primary-light);
  display: grid;
  grid-template-columns: 1fr;
  margin: 14px 16px 4px;
}

@media (min-width: 640px) {
  .t-hero-foto { grid-template-columns: 1fr 1fr; align-items: center; }
}

.t-hero-foto-texto {
  padding: 28px 26px;
}

.t-hero-foto-texto h1 {
  font-size: 1.6rem;
  margin: 0 0 10px;
  color: var(--t-secondary);
}

.t-hero-foto-texto p {
  color: var(--t-muted);
  margin: 0 0 16px;
}

.t-hero-foto img {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  display: block;
}

/* ---------- Barra de navegación inferior (móvil) ---------- */

.t-tabbar {
  display: flex;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--t-card);
  border-top: 1px solid var(--t-border);
  z-index: 25;
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.t-tabbar a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--t-muted);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 0;
  position: relative;
}

.t-tabbar a .t-tab-icon {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 1px;
}

.t-tabbar a.t-tab-activo {
  color: var(--t-primary);
}

.t-tabbar .t-cart-badge {
  top: -2px;
  right: 50%;
  margin-right: -18px;
}

@media (min-width: 860px) {
  .t-tabbar { display: none; }
}

.t-hero {
  padding: 18px 16px 4px;
}

.t-hero h1 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.t-hero p {
  margin: 0 0 10px;
  color: var(--t-muted);
  font-size: 0.9rem;
}

.t-hero-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--t-muted);
  margin-bottom: 14px;
}

.t-hero-meta strong {
  color: var(--t-text);
}

.t-btn {
  display: inline-block;
  background: var(--t-primary);
  color: #fff;
  border: none;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.9rem;
}

.t-btn:hover { background: var(--t-primary-dark); }

.t-btn-outline {
  display: inline-block;
  background: #fff;
  color: var(--t-text);
  border: 1.5px solid var(--t-border);
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.9rem;
}

.t-categorias {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 16px 14px;
  position: sticky;
  top: 61px;
  background: var(--t-bg);
  z-index: 10;
  max-width: 1080px;
  margin: 0 auto;
}

.t-categorias a {
  flex: 0 0 auto;
  background: var(--t-card);
  border: 1px solid var(--t-border);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--t-text);
  white-space: nowrap;
}

.t-categorias a:hover {
  border-color: var(--t-primary);
  color: var(--t-primary);
}

.t-seccion {
  padding: 6px 16px 18px;
  max-width: 1080px;
  margin: 0 auto;
}

.t-seccion h2 {
  font-size: 1.05rem;
  margin: 8px 0 10px;
  scroll-margin-top: 110px;
}

.t-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (min-width: 640px) {
  .t-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 960px) {
  .t-grid { grid-template-columns: repeat(4, 1fr); }
}

.t-card {
  background: var(--t-card);
  border: 1px solid var(--t-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--t-shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.t-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.1);
}

.t-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--t-bg);
}

.t-card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.t-card-nombre {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 2px;
}

.t-card-presentacion {
  font-size: 0.75rem;
  color: var(--t-muted);
  margin: 0 0 6px;
}

.t-card-precio {
  font-weight: 700;
  margin: 0 0 8px;
}

.t-card-precio .t-precio-tachado {
  text-decoration: line-through;
  color: var(--t-muted);
  font-weight: 400;
  font-size: 0.8rem;
  margin-right: 4px;
}

.t-card-agotado {
  font-size: 0.78rem;
  color: var(--t-error);
  margin: 0 0 8px;
}

.t-card button,
.t-card-link-boton {
  margin-top: auto;
  width: 100%;
  background: var(--t-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: block;
  box-sizing: border-box;
}

.t-card button:hover,
.t-card-link-boton:hover {
  background: var(--t-primary-dark);
}

.t-cart-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 70px;
  z-index: 30;
  background: var(--t-primary);
  color: #fff;
  text-align: center;
  padding: 13px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  display: block;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.t-cart-bar[hidden] {
  display: none;
}

@media (min-width: 860px) {
  .t-cart-bar {
    display: none !important;
  }
}

.t-empty {
  text-align: center;
  color: var(--t-muted);
  padding: 40px 16px;
}

.t-linea {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--t-border);
}

.t-linea img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--t-bg);
}

.t-warning {
  background: #fff8e1;
  color: #8a6d00;
  border: 1px solid #ffe6a3;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

/* ---------- Cantidad con +/- ---------- */

.t-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--t-border);
  border-radius: 8px;
  overflow: hidden;
}

.t-qty button {
  background: var(--t-bg);
  border: none;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--t-text);
}

.t-qty input {
  width: 40px;
  text-align: center;
  border: none;
  padding: 0;
  height: 32px;
  -moz-appearance: textfield;
}

/* ---------- Contador de pasos del checkout ---------- */

.t-checkout-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 16px 6px;
  max-width: 1080px;
  margin: 0 auto;
  overflow-x: auto;
}

.t-checkout-step {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--t-muted);
}

.t-checkout-step .t-step-circle {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #e5e7eb;
  color: var(--t-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.t-checkout-step.t-step-activo {
  color: var(--t-text);
  font-weight: 700;
}

.t-checkout-step.t-step-activo .t-step-circle {
  background: var(--t-primary);
  color: #fff;
}

.t-checkout-step.t-step-hecho .t-step-circle {
  background: var(--t-success);
  color: #fff;
}

.t-checkout-step-line {
  width: 20px;
  height: 2px;
  background: var(--t-border);
  flex-shrink: 0;
}

/* ---------- Línea de tiempo de seguimiento ---------- */

.t-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.t-timeline li {
  display: flex;
  gap: 12px;
  padding-bottom: 22px;
  position: relative;
}

.t-timeline li:last-child {
  padding-bottom: 0;
}

.t-timeline li::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 26px;
  bottom: -4px;
  width: 2px;
  background: var(--t-border);
}

.t-timeline li:last-child::before {
  display: none;
}

.t-timeline-dot {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #e5e7eb;
  color: var(--t-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
  z-index: 1;
}

.t-timeline li.t-hecho .t-timeline-dot {
  background: var(--t-success);
  color: #fff;
}

.t-timeline li.t-hecho::before {
  background: var(--t-success);
}

.t-timeline li.t-actual .t-timeline-dot {
  background: var(--t-primary);
  color: #fff;
}

.t-timeline-titulo {
  font-weight: 700;
  font-size: 0.92rem;
}

.t-timeline-fecha {
  font-size: 0.78rem;
  color: var(--t-muted);
}

/* ---------- Formularios de la tienda ---------- */

.t-field {
  display: block;
  margin-bottom: 14px;
  font-size: 0.88rem;
  font-weight: 600;
}

.t-field input,
.t-field select,
.t-field textarea {
  display: block;
  width: 100%;
  padding: 10px 11px;
  margin-top: 5px;
  border: 1px solid var(--t-border);
  border-radius: 9px;
  font: inherit;
  font-weight: 400;
  background: #fff;
}

.t-field input:focus,
.t-field select:focus,
.t-field textarea:focus {
  outline: 2px solid var(--t-primary-light);
  border-color: var(--t-primary);
}

.t-row {
  display: flex;
  gap: 10px;
}

.t-row .t-field {
  flex: 1;
}

.t-option-card {
  display: block;
  border: 1.5px solid var(--t-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 0.9rem;
}

.t-option-card input {
  margin-right: 8px;
}

.t-option-card:has(input:checked) {
  border-color: var(--t-primary);
  background: var(--t-primary-light);
}

/* ---------- Pantalla "Gracias por tu compra" ---------- */

.t-gracias-layout {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 16px 90px;
  display: grid;
  gap: 20px;
}

@media (min-width: 960px) {
  .t-gracias-layout {
    grid-template-columns: 1.6fr 1fr;
    align-items: start;
    padding-bottom: 40px;
  }
}

.t-gracias-icono {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: var(--t-success-bg);
  color: var(--t-success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 14px;
}

.t-gracias-titulo {
  font-size: 1.5rem;
  margin: 0 0 4px;
}

.t-gracias-sub {
  color: var(--t-muted);
  margin: 0 0 18px;
}

.t-gracias-folio {
  background: var(--t-card);
  border: 1px solid var(--t-border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.t-gracias-folio-label {
  font-size: 0.8rem;
  color: var(--t-muted);
  margin: 0 0 4px;
}

.t-gracias-folio-valor {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.t-gracias-folio-valor strong {
  font-size: 1.4rem;
  color: var(--t-success);
  letter-spacing: 0.02em;
}

.t-gracias-copiar {
  border: 1px solid var(--t-border);
  background: var(--t-bg);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--t-text);
}

.t-gracias-copiar:active {
  background: var(--t-primary-light);
}

.t-gracias-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--t-border);
}

.t-gracias-info-item {
  font-size: 0.85rem;
}

.t-gracias-info-item span {
  display: block;
  color: var(--t-muted);
  font-size: 0.76rem;
  margin-bottom: 2px;
}

.t-gracias-aviso {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--t-success-bg);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 0.86rem;
}

.t-gracias-aviso strong {
  display: block;
  color: var(--t-success);
  margin-bottom: 2px;
}

.t-gracias-resumen {
  background: var(--t-card);
  border: 1px solid var(--t-border);
  border-radius: 14px;
  padding: 16px 18px;
}

.t-gracias-resumen h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.t-gracias-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  margin-top: 6px;
  border-top: 1px solid var(--t-border);
  font-weight: 700;
  font-size: 1.05rem;
}

.t-gracias-seguro {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--t-bg);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 16px 0;
  font-size: 0.82rem;
  color: var(--t-muted);
}

.t-gracias-acciones {
  display: grid;
  gap: 10px;
}

/* ---------- Canasta ---------- */

.t-canasta-layout {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 16px 90px;
  display: grid;
  gap: 20px;
}

@media (min-width: 960px) {
  .t-canasta-layout {
    grid-template-columns: 1.6fr 1fr;
    align-items: start;
    padding-bottom: 40px;
  }
}

.t-canasta-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--t-card);
  border: 1px solid var(--t-border);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.t-canasta-item img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--t-bg);
  flex-shrink: 0;
}

.t-canasta-borrar {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--t-muted);
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
}

.t-canasta-borrar:hover {
  color: var(--t-error);
}

.t-canasta-acciones {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.t-canasta-vaciar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--t-border);
  background: none;
  color: var(--t-muted);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.85rem;
  cursor: pointer;
}

.t-canasta-vaciar:hover {
  border-color: var(--t-error);
  color: var(--t-error);
}

.t-canasta-resumen {
  background: var(--t-card);
  border: 1px solid var(--t-border);
  border-radius: 14px;
  padding: 16px 18px;
}

.t-canasta-resumen h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.t-canasta-resumen-linea {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--t-muted);
  margin-bottom: 8px;
}

.t-canasta-resumen-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid var(--t-border);
  font-weight: 700;
  font-size: 1.1rem;
}

.t-canasta-resumen .t-btn {
  display: block;
  text-align: center;
  margin-top: 14px;
}

/* ---------- Franja de confianza ---------- */

.t-trust-footer {
  max-width: 1080px;
  margin: 20px auto 0;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  background: var(--t-bg);
}

@media (min-width: 640px) {
  .t-trust-footer {
    grid-template-columns: repeat(4, 1fr);
  }
}

.t-trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
}

.t-trust-item span:first-child {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t-primary);
  flex-shrink: 0;
}

.t-trust-item span:first-child svg {
  width: 24px;
  height: 24px;
}

.t-trust-item strong {
  display: block;
  font-size: 0.85rem;
}

.t-trust-item small {
  color: var(--t-muted);
}

/* ========================================================================== 
   Rediseño Vleeko 2026 — capa visual sin dependencias
   ========================================================================== */

:root {
  --t-bg: #fbfcfb;
  --t-card: #fff;
  --t-border: #dfe4e1;
  --t-text: #101828;
  --t-muted: #667085;
  --t-soft: var(--brand-primary-lighter, #f2f8f3);
  --t-radius-sm: 12px;
  --t-radius: 18px;
  --t-radius-lg: 24px;
  --t-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.04);
}

body { line-height: 1.45; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; }
.t-header { position: relative; padding: 0 20px; }
.t-header-inner { max-width: 1440px; min-height: 86px; gap: 18px; }
.t-header-marca { max-width: 270px; }
.t-logo { max-width: 72px; max-height: 54px; }
.t-store-name { font-size: 1.08rem; letter-spacing: -.02em; }
.t-status { padding: 0; background: transparent !important; }
.t-status::before { content:""; display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; background:currentColor; box-shadow:0 0 0 4px var(--t-success-bg); }
.t-header-location { display:none; align-items:center; gap:9px; min-width:195px; padding-left:18px; border-left:1px solid var(--t-border); color:var(--t-text); text-decoration:none; }
.t-header-location > svg { color:var(--t-primary); }
.t-header-location span { display:flex; flex-direction:column; min-width:0; }
.t-header-location small,.t-cart-copy small { color:var(--t-muted); font-size:.72rem; }
.t-header-location strong,.t-cart-copy strong { font-size:.82rem; white-space:nowrap; }
.t-search-form { max-width:470px; position:relative; }
.t-search-form input { min-height:46px; border-radius:12px; background:#fff; padding-right:50px; }
.t-search-form button { position:absolute; right:4px; top:4px; width:38px; height:38px; color:var(--t-text); background:transparent; }
.t-info-row { gap:12px; }
.t-info-row span { border-left:1px solid var(--t-border); padding-left:12px; }
.t-cart-link { border:1px solid var(--t-border); border-radius:12px; padding:10px 13px; gap:10px; }
.t-cart-copy { display:none; flex-direction:column; }
.t-cart-badge { top:-7px; right:-7px; min-width:20px; height:20px; font-size:.68rem; }

.t-hero-foto { max-width:1160px; min-height:360px; margin:28px auto 18px; border-radius:var(--t-radius); grid-template-columns:1fr 1.25fr; }
.t-hero-foto-texto { padding:56px 48px; align-self:center; }
.t-hero-foto-texto h1 { font-size:clamp(2rem,4vw,3.3rem); line-height:1.05; color:var(--t-secondary); letter-spacing:-.045em; }
.t-hero-foto-texto p { font-size:1.05rem; max-width:42ch; }
.t-hero-foto img { min-height:360px; }
.t-btn { border-radius:12px; padding:12px 20px; display:inline-flex; align-items:center; justify-content:center; gap:9px; background:linear-gradient(135deg,var(--t-primary),var(--t-primary-dark)); box-shadow:0 6px 16px color-mix(in srgb,var(--t-primary) 20%,transparent); }
.t-btn-outline { border-color:var(--t-primary); color:var(--t-primary-dark); border-radius:12px; }

.t-trust-footer { max-width:1160px; margin:18px auto 26px; padding:18px 24px; border:1px solid var(--t-border); border-radius:var(--t-radius); background:linear-gradient(90deg,#fff,var(--t-soft),#fff); }
.t-trust-item { justify-content:center; padding:0 12px; }
.t-trust-item + .t-trust-item { border-left:1px solid var(--t-border); }
.t-trust-item span:first-child { width:42px; height:42px; border-radius:50%; background:var(--t-soft); }

.t-cat-seccion { max-width:1160px; padding:12px 0 34px; }
.t-cat-seccion h2 { font-size:1.35rem; margin-bottom:3px; }
.t-cat-seccion-sub { margin:0 0 18px; color:var(--t-muted); }
.t-cat-circulos { grid-template-columns:repeat(6,1fr); gap:16px; }
.t-cat-circulo { border:1px solid var(--t-border); border-radius:var(--t-radius); padding:14px 10px; min-height:148px; display:flex; flex-direction:column; justify-content:center; font-size:.84rem; transition:.18s ease; }
.t-cat-circulo:hover { transform:translateY(-2px); border-color:var(--t-primary); box-shadow:var(--t-shadow); }
.t-cat-circulo-img { width:78px; height:78px; }

.t-layout { max-width:1160px; gap:26px; }
.t-sidebar-categorias { width:230px; border-radius:var(--t-radius); padding:16px 10px; box-shadow:none; }
.t-sidebar-categorias h2 { padding:0 10px 10px; font-size:1rem; }
.t-sidebar-categorias a { min-height:46px; font-weight:500; }
.t-sidebar-categorias a:hover { background:var(--t-soft); color:var(--t-primary-dark); }
.t-sidebar-arrow { margin-left:auto; display:flex; color:var(--t-muted); }
.t-seccion h2 { font-size:1.3rem; margin:14px 0; }
.t-grid { gap:16px; }
.t-card { border-radius:var(--t-radius); box-shadow:none; min-width:0; }
.t-card:hover { border-color:color-mix(in srgb,var(--t-primary) 42%,var(--t-border)); box-shadow:var(--t-shadow); }
.t-card img { object-fit:contain; padding:10px; aspect-ratio:1.2/1; }
.t-card-body { padding:13px 14px 15px; }
.t-card-nombre { font-size:.96rem; font-weight:700; min-height:1.45em; }
.t-card-precio { color:var(--t-primary-dark); font-size:1rem; }
.t-card button,.t-card-link-boton { min-height:40px; border:1px solid color-mix(in srgb,var(--t-primary) 45%,var(--t-border)); background:var(--t-soft); color:var(--t-primary-dark); display:flex; align-items:center; justify-content:center; gap:7px; border-radius:10px; }
.t-card button:hover,.t-card-link-boton:hover { color:#fff; background:var(--t-primary); }
.t-card-badge-destacado { color:var(--t-primary); border:1px solid var(--t-border); box-shadow:none; }

.t-tabbar { box-shadow:0 -8px 30px rgba(16,24,40,.08); padding:8px 6px max(8px,env(safe-area-inset-bottom)); }
.t-tabbar a { font-size:.68rem; padding:5px 2px; }
.t-tabbar a .t-tab-icon { display:flex; justify-content:center; }
.t-cart-bar { max-width:650px; left:50%; right:auto; width:calc(100% - 28px); transform:translateX(-50%); }

/* Encabezados interiores */
.t-page-header { min-height:76px; padding:12px max(18px,calc((100% - 1160px)/2)); display:grid; grid-template-columns:44px 1fr 44px; align-items:center; gap:12px; text-align:center; background:#fff; border-bottom:1px solid var(--t-border); position:relative; z-index:10; }
.t-page-header > div { display:flex; flex-direction:column; }
.t-page-header strong { font-size:1.05rem; }
.t-page-header small { color:var(--t-muted); font-size:.74rem; }
.t-icon-button { width:44px; height:44px; display:flex; align-items:center; justify-content:center; border:1px solid var(--t-border); border-radius:12px; color:var(--t-text); text-decoration:none; background:#fff; }
.t-eyebrow { color:var(--t-primary-dark); font-size:.74rem; text-transform:uppercase; letter-spacing:.08em; font-weight:800; margin:0 0 3px; }
.t-section-heading { display:flex; justify-content:space-between; align-items:end; gap:16px; margin:0 0 18px; }
.t-section-heading h1 { margin:0; font-size:1.55rem; }
.t-section-heading a { font-weight:700; font-size:.84rem; text-decoration:none; }
.t-feature-icon { width:48px; height:48px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:var(--t-soft); color:var(--t-primary-dark); flex-shrink:0; }

/* Detalle de producto */
.t-product-detail { max-width:1160px; margin:32px auto 70px; padding:0 20px; display:grid; grid-template-columns:minmax(0,1fr) minmax(380px,.95fr); gap:56px; }
.t-product-gallery { border:1px solid var(--t-border); border-radius:var(--t-radius-lg); background:#fff; min-height:560px; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.t-product-gallery img { width:100%; height:100%; max-height:620px; object-fit:contain; padding:28px; }
.t-product-placeholder { color:var(--t-muted); }
.t-product-copy { padding-top:16px; }
.t-product-heading { display:flex; justify-content:space-between; gap:20px; align-items:start; }
.t-product-heading h1 { font-size:2.15rem; line-height:1.1; margin:0; }
.t-product-price { font-size:1.65rem; font-weight:800; color:var(--t-primary-dark); white-space:nowrap; margin:18px 0 0; }
.t-product-price .t-precio-tachado { display:block; text-decoration:line-through; color:var(--t-muted); font-size:.8rem; font-weight:400; }
.t-product-presentation { color:var(--t-muted); margin:8px 0; }
.t-product-description { color:var(--t-muted); border-bottom:1px solid var(--t-border); padding-bottom:20px; }
.t-product-form h2 { font-size:1rem; margin:22px 0 10px; display:flex; justify-content:space-between; }
.t-product-form h2 span { color:var(--t-muted); font-weight:500; font-size:.75rem; }
.t-option-grid,.t-choice-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.t-option-card { display:flex; align-items:center; gap:9px; min-height:58px; margin:0; }
.t-option-card span { display:flex; flex-direction:column; }
.t-option-card small { color:var(--t-muted); }
.t-option-card input { accent-color:var(--t-primary); width:18px; height:18px; flex-shrink:0; }
.t-product-quantity { display:flex; align-items:center; justify-content:space-between; border-top:1px solid var(--t-border); margin-top:22px; }
.t-qty { border-radius:10px; border-color:color-mix(in srgb,var(--t-primary) 25%,var(--t-border)); }
.t-qty button { color:var(--t-primary-dark); background:var(--t-soft); }
.t-product-submit { width:100%; margin-top:18px; min-height:52px; }

/* Canasta */
.t-canasta-layout { max-width:1160px; grid-template-columns:minmax(0,1.65fr) minmax(310px,.7fr); gap:30px; padding-top:34px; }
.t-canasta-item { border-radius:var(--t-radius); min-height:108px; box-shadow:none; }
.t-canasta-item img { width:88px; height:78px; object-fit:contain; }
.t-item-unit-price { color:var(--t-primary-dark); font-weight:700; margin-top:5px; }
.t-canasta-resumen { border-radius:var(--t-radius); padding:24px; position:sticky; top:20px; box-shadow:var(--t-shadow); }
.t-canasta-resumen h2 { font-size:1.25rem; }
.t-canasta-resumen-total { font-size:1.3rem; margin-top:18px; }
.t-secure-note,.t-privacy-note { display:flex; align-items:center; justify-content:center; gap:7px; color:var(--t-muted); font-size:.76rem; }

/* Checkout */
.t-checkout-page { background:#fff; }
.t-checkout-steps { max-width:900px; padding:24px 20px 14px; justify-content:center; }
.t-checkout-step { flex-direction:column; text-align:center; min-width:92px; }
.t-checkout-step-line { flex:1; max-width:220px; }
.t-checkout-shell { max-width:900px; margin:0 auto; padding:24px 20px 70px; }
.t-checkout-intro { display:flex; gap:16px; align-items:center; margin-bottom:20px; }
.t-checkout-intro h1 { font-size:1.65rem; margin:0 0 4px; }
.t-checkout-intro p:last-child { margin:0; color:var(--t-muted); }
.t-location-card,.t-pickup-card { border:1px solid var(--t-border); border-radius:var(--t-radius); padding:24px; box-shadow:var(--t-shadow); }
.t-gps-callout { display:grid; grid-template-columns:42px 1fr auto; gap:12px; align-items:center; padding:18px; border:1px solid color-mix(in srgb,var(--t-primary) 35%,var(--t-border)); border-radius:14px; background:var(--t-soft); }
.t-gps-callout > span { color:var(--t-primary-dark); }
.t-gps-callout div { display:flex; flex-direction:column; }
.t-gps-callout small { color:var(--t-muted); }
.t-gps-status { color:var(--t-primary-dark); font-size:.8rem; min-height:18px; }
.t-divider { display:flex; align-items:center; gap:12px; color:var(--t-muted); font-size:.76rem; margin:20px 0; }
.t-divider::before,.t-divider::after { content:""; height:1px; background:var(--t-border); flex:1; }
.t-address-grid,.t-contact-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 12px; }
.t-field-wide { grid-column:1/-1; }
.t-field span { font-weight:400; color:var(--t-muted); }
.t-wide-button { width:100%; min-height:50px; margin-top:4px; }
.t-pickup-card { margin-top:14px; padding:0; box-shadow:none; }
.t-pickup-card .t-btn-outline { border:0; width:100%; display:grid; grid-template-columns:32px 1fr 20px; align-items:center; text-align:left; gap:12px; }
.t-pickup-card span { display:flex; flex-direction:column; }
.t-pickup-card small { color:var(--t-muted); }
.t-checkout-layout { max-width:1160px; margin:0 auto; padding:26px 20px 70px; display:grid; }
.t-checkout-form-card { max-width:820px; width:100%; margin:0 auto; border:1px solid var(--t-border); border-radius:var(--t-radius); padding:28px; box-shadow:var(--t-shadow); }
.t-order-lines { border:1px solid var(--t-border); border-radius:14px; padding:0 16px; }
.t-order-totals { text-align:right; padding:14px; line-height:1.8; }
.t-checkout-summary-block,.t-form-section-title,.t-delivery-card { display:flex; gap:14px; align-items:flex-start; border-top:1px solid var(--t-border); padding-top:22px; margin-top:20px; }
.t-checkout-summary-block h2,.t-form-section-title h2,.t-delivery-card h2 { margin:0; font-size:1.08rem; }
.t-checkout-summary-block p,.t-form-section-title p,.t-delivery-card p { margin:3px 0 0; color:var(--t-muted); }
.t-form-section-title { margin-bottom:12px; }
.t-choice-grid #campos-programado { grid-column:1/-1; }

/* Confirmación y seguimiento */
.t-gracias-layout { max-width:900px; padding-top:32px; display:block; }
.t-success-heading { display:flex; gap:16px; align-items:center; margin-bottom:8px; }
.t-gracias-icono { margin:0; width:76px; height:76px; color:#fff; background:linear-gradient(135deg,var(--t-primary),var(--t-primary-dark)); box-shadow:0 0 0 12px var(--t-soft); }
.t-gracias-folio,.t-gracias-resumen { border-radius:var(--t-radius); padding:22px; }
.t-gracias-folio-valor strong { font-size:1.65rem; color:var(--t-primary-dark); }
.t-gracias-copiar { display:inline-flex; align-items:center; gap:6px; color:var(--t-primary-dark); }
.t-gracias-info-item { border-left:1px solid var(--t-border); padding-left:12px; }
.t-gracias-aviso,.t-gracias-seguro { border:1px solid color-mix(in srgb,var(--t-primary) 20%,var(--t-border)); background:var(--t-soft); color:var(--t-text); }
.t-gracias-acciones .t-btn,.t-gracias-acciones .t-btn-outline { min-height:50px; display:flex; align-items:center; justify-content:center; gap:8px; }
.t-tracking-shell { max-width:1160px; margin:0 auto; padding:34px 20px 80px; }
.t-tracking-folio { display:flex; justify-content:space-between; align-items:center; border:1px solid var(--t-border); border-radius:var(--t-radius); padding:18px 22px; margin-bottom:18px; }
.t-tracking-folio div { display:flex; flex-direction:column; }
.t-tracking-folio small { color:var(--t-muted); }
.t-tracking-folio strong { font-size:1.45rem; color:var(--t-primary-dark); }
.t-tracking-folio > span { display:flex; align-items:center; gap:7px; color:var(--t-muted); font-size:.8rem; }
.t-tracking-grid { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(300px,.65fr); gap:20px; }
.t-tracking-status-card,.t-tracking-summary,.t-delivery-card { border:1px solid var(--t-border); border-radius:var(--t-radius); padding:24px; background:#fff; }
.t-tracking-status-card > h1 { margin:0 0 24px; }
.t-timeline li { padding-bottom:28px; }
.t-timeline-dot { width:34px; height:34px; }
.t-timeline li::before { left:16px; top:35px; }
.t-timeline-titulo { font-size:1rem; }
.t-tracking-summary h2 { margin-top:0; }
.t-delivery-card { border-top:1px solid var(--t-border); }

@media (min-width:860px) {
  .t-header-location { display:flex; }
  .t-cart-copy { display:flex; }
  .t-header-inner { flex-wrap:nowrap; }
  .t-header-marca { order:1; }
  .t-header-location { order:2; }
  .t-search-form { order:3; }
  .t-info-row { order:4; }
  .t-cart-link { order:5; }
  .t-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
}

@media (max-width:859px) {
  body.t-con-tabbar { padding-bottom:78px; }
  .t-header { padding:12px 16px; }
  .t-header-inner { min-height:auto; }
  .t-header-marca { min-height:48px; }
  .t-logo { width:52px; height:52px; border-radius:50%; }
  .t-search-form { order:3; }
  .t-info-row { order:4; display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .t-info-row span { border:1px solid var(--t-border); border-radius:12px; padding:11px; justify-content:center; }
  .t-hero-foto { margin:12px 16px; grid-template-columns:1fr; min-height:0; }
  .t-hero-foto-texto { padding:26px 22px; }
  .t-hero-foto-texto h1 { font-size:1.8rem; }
  .t-hero-foto img { min-height:180px; max-height:240px; }
  .t-trust-footer { margin:12px 16px 24px; grid-template-columns:1fr 1fr; padding:14px; }
  .t-trust-item { justify-content:flex-start; padding:5px; }
  .t-trust-item + .t-trust-item { border:0; }
  .t-cat-seccion { padding:14px 16px 28px; }
  .t-cat-seccion h2 { font-size:1.55rem; }
  .t-cat-circulos { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .t-cat-circulo { min-height:150px; font-size:.86rem; }
  .t-cat-circulo-img { width:86px; height:86px; }
  .t-cat-circulo-count { display:none; }
  .t-layout { display:block; }
  .t-seccion { padding:8px 12px 20px; }
  .t-grid { gap:10px; }
  .t-card { border-radius:14px; }
  .t-card img { padding:6px; aspect-ratio:1/1; }
  .t-card-body { padding:9px; }
  .t-card-nombre { font-size:.82rem; }
  .t-card-presentacion { font-size:.7rem; }
  .t-card-precio { font-size:.88rem; }
  .t-page-header { min-height:68px; padding:10px 16px; }
  .t-product-detail { display:block; margin:0 0 76px; padding:0; }
  .t-product-gallery { min-height:300px; border:0; border-radius:0; background:var(--t-bg); }
  .t-product-gallery img { max-height:350px; padding:16px; }
  .t-product-copy { margin-top:-18px; position:relative; border-radius:24px 24px 0 0; padding:24px 18px; background:#fff; }
  .t-product-heading h1 { font-size:1.55rem; }
  .t-product-price { font-size:1.35rem; }
  .t-option-grid { grid-template-columns:1fr; }
  .t-canasta-layout { display:block; padding:22px 12px 90px; }
  .t-section-heading h1 { font-size:1.2rem; }
  .t-canasta-item { display:grid; grid-template-columns:72px 1fr 36px; gap:8px; padding:10px; }
  .t-canasta-item img { width:72px; height:72px; }
  .t-canasta-item .t-qty { grid-column:2; }
  .t-canasta-borrar { grid-column:3; grid-row:1; }
  .t-canasta-resumen { position:static; margin-top:20px; }
  .t-checkout-steps { padding-top:14px; }
  .t-checkout-step { min-width:64px; font-size:.68rem; }
  .t-checkout-shell { padding:18px 14px 80px; }
  .t-checkout-intro { align-items:flex-start; }
  .t-checkout-intro h1 { font-size:1.35rem; }
  .t-location-card { padding:16px; }
  .t-gps-callout { grid-template-columns:38px 1fr; }
  .t-gps-callout .t-btn { grid-column:1/-1; width:100%; }
  .t-address-grid,.t-contact-grid { grid-template-columns:1fr; }
  .t-field-wide { grid-column:auto; }
  .t-checkout-layout { padding:18px 12px 80px; }
  .t-checkout-form-card { padding:18px 14px; border:0; box-shadow:none; }
  .t-choice-grid { grid-template-columns:1fr; }
  .t-gracias-layout { padding:24px 14px 90px; }
  .t-success-heading { align-items:flex-start; }
  .t-gracias-icono { width:58px; height:58px; }
  .t-gracias-info { grid-template-columns:1fr 1fr; }
  .t-tracking-shell { padding:20px 12px 90px; }
  .t-tracking-folio { align-items:flex-start; }
  .t-tracking-folio > span { display:none; }
  .t-tracking-grid { display:block; }
  .t-tracking-summary { margin-top:14px; }
  .t-delivery-card { margin-top:14px; }
}

/* Encabezado completo reutilizado en las vistas interiores de escritorio. */
.t-commerce-header { background:#fff; border-bottom:1px solid var(--t-border); }
.t-commerce-header-inner { width:calc(100% - clamp(64px,5vw,104px)); max-width:1900px; min-height:104px; margin:0 auto; display:flex; align-items:center; gap:clamp(18px,2vw,34px); }
.t-commerce-brand { display:flex; align-items:center; gap:12px; color:var(--t-text); text-decoration:none; min-width:220px; }
.t-commerce-brand img { max-width:64px; max-height:54px; object-fit:contain; }
.t-commerce-brand strong { font-size:1.2rem; }
.t-commerce-location { min-width:210px; display:flex; align-items:center; gap:10px; color:var(--t-text); text-decoration:none; padding-left:20px; border-left:1px solid var(--t-border); }
.t-commerce-location > svg { color:var(--t-primary); }
.t-commerce-location span { display:flex; flex-direction:column; }
.t-commerce-location small { color:var(--t-muted); }
.t-commerce-header .t-search-form { order:initial; flex:1; max-width:520px; margin-left:auto; }
.t-commerce-header .t-cart-link { margin-left:auto; }
.t-mobile-only-header { display:none; }

@media (max-width:859px) {
  .t-commerce-header { display:none; }
  .t-mobile-only-header { display:grid; }
}

@media (min-width:860px) {
  .t-checkout-layout { max-width:1440px; grid-template-columns:minmax(0,1.55fr) minmax(340px,.68fr); gap:28px; align-items:start; }
  .t-checkout-form-card { max-width:none; margin:0; }
  .t-checkout-aside { position:sticky; top:20px; padding:24px; border:1px solid var(--t-border); border-radius:var(--t-radius); background:#fff; box-shadow:var(--t-shadow); }
}
.t-checkout-aside .t-section-heading { align-items:center; }
.t-checkout-aside .t-section-heading h2 { margin:0; }
.t-checkout-aside-line { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:13px 0; border-bottom:1px solid var(--t-border); }
.t-checkout-aside-line span { display:flex; flex-direction:column; }
.t-checkout-aside-line small { color:var(--t-muted); }
.t-checkout-aside-totals { padding-top:12px; }
.t-checkout-aside-totals p { display:flex; justify-content:space-between; margin:9px 0; }
.t-checkout-aside-total { border-top:1px solid var(--t-border); padding-top:14px; font-size:1.2rem; color:var(--t-primary-dark); }
.t-secure-panel { display:flex; gap:11px; align-items:center; padding:15px; border-radius:12px; background:var(--t-soft); color:var(--t-primary-dark); }
.t-secure-panel span { display:flex; flex-direction:column; }
.t-secure-panel small { color:var(--t-muted); }
@media (max-width:859px) { .t-checkout-aside { display:none; } }

/* Canasta como tabla en escritorio y tarjetas en móvil. */
@media (min-width:860px) {
  .t-canasta-layout { max-width:1440px; grid-template-columns:minmax(0,1.65fr) minmax(330px,.62fr); }
  .t-canasta-table-head { display:grid; grid-template-columns:100px minmax(180px,1fr) 120px 126px 110px 40px; gap:12px; padding:13px 16px; border:1px solid var(--t-border); border-radius:14px 14px 0 0; background:#f8faf9; color:var(--t-muted); font-size:.75rem; font-weight:700; text-transform:uppercase; }
  .t-canasta-table-head span:first-child { grid-column:1/3; }
  .t-canasta-item { display:grid; grid-template-columns:100px minmax(180px,1fr) 120px 126px 110px 40px; gap:12px; min-height:116px; margin:0; border-top:0; border-radius:0; }
  .t-canasta-item:last-child { border-radius:0 0 14px 14px; }
  .t-canasta-item img { width:90px; height:82px; }
  .t-canasta-item .t-qty { grid-column:4; }
  .t-canasta-item .t-item-unit-price { grid-column:3; }
  .t-canasta-item .t-item-subtotal { grid-column:5; color:var(--t-primary-dark); }
  .t-canasta-item .t-canasta-borrar { grid-column:6; }
}
.t-canasta-table-head { display:none; }
.t-item-subtotal { white-space:nowrap; }
@media (min-width:860px) { .t-canasta-table-head { display:grid; } }
@media (max-width:859px) { .t-item-subtotal { grid-column:2; text-align:right; } }

/* Resultados con densidad equivalente a las referencias. */
.t-search-page .t-seccion { max-width:1440px; padding-top:30px; }
@media (min-width:860px) { .t-search-page .t-grid { grid-template-columns:repeat(6,minmax(0,1fr)); } }
@media (max-width:859px) {
  .t-search-page .t-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
  .t-search-page .t-card-body { padding:7px; }
  .t-search-page .t-card-nombre { font-size:.74rem; }
  .t-search-page .t-card button,.t-search-page .t-card-link-boton { font-size:.68rem; padding:7px 3px; }
}

/* Confirmación: contenido principal y detalle lateral en escritorio. */
@media (min-width:960px) {
  .t-gracias-layout { max-width:1440px; display:grid; grid-template-columns:minmax(0,1.45fr) minmax(340px,.7fr); gap:28px; }
  .t-gracias-aside { position:sticky; top:20px; padding:24px; border:1px solid var(--t-border); border-radius:var(--t-radius); background:#fff; }
}
.t-gracias-aside h2 { margin-top:0; }
.t-gracias-aside .t-btn,.t-gracias-aside .t-btn-outline { width:100%; min-height:48px; margin-top:12px; display:flex; align-items:center; justify-content:center; gap:8px; }
@media (max-width:959px) { .t-gracias-aside { display:none; } }

@media (max-width:420px) {
  .t-grid { gap:8px; }
  .t-card-body { padding:8px; }
  .t-card button,.t-card-link-boton { font-size:.74rem; }
  .t-gracias-info { grid-template-columns:1fr; }
  .t-gracias-folio-valor strong,.t-tracking-folio strong { font-size:1.18rem; }
}

/* Ajuste de fidelidad: retícula de inicio igual a los mockups de referencia. */
.t-header-inner,
.t-home-layout {
  width: calc(100% - clamp(64px, 5vw, 104px));
  max-width: 1900px;
}

.t-header-inner { min-height: clamp(96px, 6.4vw, 132px); }
.t-logo-fallback {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--t-primary);
  border-radius: 14px;
  color: var(--t-primary-dark);
  background: var(--t-soft);
  flex: 0 0 auto;
}
.t-logo-fallback[hidden] { display: none; }

.t-home-layout {
  margin: clamp(28px, 2.4vw, 48px) auto 0;
  display: grid;
  grid-template-columns: clamp(270px, 18vw, 360px) minmax(0, 1fr);
  gap: clamp(24px, 2vw, 36px);
  align-items: start;
}

.t-home-layout > .t-sidebar-categorias {
  display: block;
  width: 100%;
  position: sticky;
  top: 18px;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
}
.t-home-layout > .t-sidebar-categorias h2 {
  min-height: 74px;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 22px;
  font-size: 1.3rem;
  border-bottom: 1px solid var(--t-border);
}
.t-home-layout > .t-sidebar-categorias a {
  min-height: clamp(50px, 3.2vw, 64px);
  padding: 10px 22px;
  border-radius: 0;
  border-bottom: 1px solid var(--t-border);
  font-size: clamp(.83rem, .95vw, 1rem);
}
.t-home-layout > .t-sidebar-categorias a:first-of-type {
  color: var(--t-primary-dark);
  background: var(--t-soft);
}
.t-home-layout > .t-sidebar-categorias a:last-child { border-bottom: 0; }
.t-home-layout > .t-sidebar-categorias img,
.t-home-layout > .t-sidebar-categorias .t-cat-icon-fallback {
  width: 32px;
  height: 32px;
  background: transparent !important;
}

.t-home-main { min-width: 0; }
.t-home-main .t-hero-foto {
  max-width: none;
  width: 100%;
  aspect-ratio: 2.8 / 1;
  min-height: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 43% 57%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 14px;
}
.t-home-main .t-hero-foto-texto {
  padding: clamp(32px, 4vw, 78px);
  align-self: center;
}
.t-home-main .t-hero-foto-texto h1 {
  max-width: 12ch;
  font-size: clamp(2.15rem, 3.25vw, 4.15rem);
  line-height: 1.08;
  color: var(--t-primary-dark);
}
.t-home-main .t-hero-foto-texto p {
  max-width: 32ch;
  font-size: clamp(.95rem, 1.15vw, 1.3rem);
}
.t-home-main .t-hero-foto > img {
  grid-column: 2;
  object-fit: contain;
  object-position: center bottom;
  min-height: 0;
  background: transparent;
}
.t-home-main > .t-trust-footer,
.t-home-main > .t-cat-seccion,
.t-home-main > .t-products-layout {
  max-width: none;
  width: 100%;
}
.t-home-main > .t-trust-footer { margin: clamp(18px, 1.8vw, 30px) 0; padding:clamp(18px, 1.5vw, 28px) 24px; }
.t-home-main > .t-trust-footer .t-trust-item span:first-child { width:clamp(42px, 2.7vw, 54px); height:clamp(42px, 2.7vw, 54px); }
.t-home-main > .t-cat-seccion { padding: 8px 0 34px; }
.t-home-main .t-cat-seccion h2 {
  font-size: clamp(1.18rem, 1.35vw, 1.55rem);
  margin-bottom: 14px;
}
.t-cat-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.t-cat-heading a { display:inline-flex; align-items:center; gap:5px; font-size:.88rem; font-weight:700; text-decoration:none; white-space:nowrap; }
.t-home-main .t-cat-seccion-sub { display: none; }
.t-home-main .t-cat-circulos { grid-template-columns: repeat(6, minmax(0, 1fr)); gap:clamp(16px, 1.3vw, 26px); }
.t-home-main .t-cat-circulo {
  min-height: clamp(165px, 12vw, 242px);
  padding: 12px;
  font-size: clamp(.75rem, .9vw, 1rem);
}
.t-home-main .t-cat-circulo:nth-child(n+7) { display: none; }
.t-home-main .t-cat-circulo-count { display: none; }
.t-home-main .t-cat-circulo-img,
.t-cat-media-wrap {
  width: clamp(90px, 7.5vw, 145px);
  height: clamp(90px, 7.5vw, 145px);
}
.t-cat-media-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  border-radius: 50%;
  overflow: hidden;
}
.t-cat-media-wrap .t-cat-circulo-img {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 4px;
  object-fit: contain;
  background: transparent;
}
.t-cat-media-fallback { display: flex; align-items: center; justify-content: center; }
.t-cat-media-fallback[hidden] { display: none; }
.t-products-layout { display: block; }
.t-product-image-fallback { width:100%; aspect-ratio:1.2/1; display:flex; align-items:center; justify-content:center; color:var(--t-muted); background:linear-gradient(145deg,var(--t-soft),#fff); }
.t-product-image-fallback[hidden] { display:none; }

.t-shelf-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.t-shelf-heading h2 { margin:0; }
.t-shelf-arrows { display:flex; gap:8px; flex-shrink:0; }
.t-shelf-arrow { width:34px; height:34px; border-radius:50%; border:1px solid var(--t-border); background:#fff; display:flex; align-items:center; justify-content:center; color:var(--t-muted); cursor:pointer; padding:0; }
.t-shelf-arrow:hover { background:var(--t-soft); color:var(--t-primary-dark); border-color:color-mix(in srgb,var(--t-primary) 35%,var(--t-border)); }
.t-shelf-arrow:disabled { opacity:.35; cursor:default; }
.t-shelf-arrow:disabled:hover { background:#fff; color:var(--t-muted); border-color:var(--t-border); }

.t-products-layout .t-shelf {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.t-products-layout .t-shelf::-webkit-scrollbar { display: none; }
.t-products-layout .t-shelf > .t-card { flex: 0 0 auto; width: 208px; scroll-snap-align: start; }

@media (max-width: 1100px) and (min-width: 860px) {
  .t-header-inner,
  .t-home-layout { width: calc(100% - 40px); }
  .t-home-layout { grid-template-columns: 230px minmax(0, 1fr); gap: 20px; }
  .t-home-main .t-hero-foto { aspect-ratio: 2.35 / 1; }
  .t-home-main .t-cat-circulo { min-height: 145px; }
}

@media (max-width: 859px) {
  .t-header-inner { width: 100%; min-height: auto; }
  .t-logo-fallback { width: 50px; height: 50px; border-radius: 50%; }
  .t-home-layout { width: 100%; display: block; margin: 0; }
  .t-home-layout > .t-sidebar-categorias { display: none; }
  .t-home-main .t-hero-foto { display: none; }
  .t-home-main > .t-trust-footer { margin: 14px 16px 24px; width: auto; }
  .t-home-main > .t-cat-seccion { padding: 18px 16px 28px; }
  .t-home-main .t-cat-seccion-sub { display: block; }
  .t-home-main .t-cat-circulos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-home-main .t-cat-circulo:nth-child(n+7) { display: flex; }
  .t-home-main .t-cat-circulo { min-height: 164px; }
  .t-home-main .t-cat-circulo-img,
  .t-cat-media-wrap { width: 92px; height: 92px; }
  .t-shelf-arrows { display: none; }
  .t-products-layout .t-shelf > .t-card { width: 148px; }
}

/* Detalle fiel: galería, información y configuración en tres columnas. */
@media (min-width: 860px) {
  .t-product-detail {
    max-width: 1440px;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, .88fr) minmax(330px, .82fr);
    gap: clamp(28px, 3vw, 52px);
    align-items: start;
  }
  .t-product-gallery { min-height: 520px; }
  .t-product-info { padding-top: 8px; }
  .t-product-heading { display:block; }
  .t-product-heading h1 { font-size:2rem; }
  .t-product-price { margin:18px 0 4px; }
  .t-product-form {
    padding:24px;
    border:1px solid var(--t-border);
    border-radius:var(--t-radius);
    background:#fff;
    box-shadow:var(--t-shadow);
    position:sticky;
    top:20px;
  }
  .t-product-form h2:first-of-type { margin-top:0; }
  .t-product-form .t-option-grid { grid-template-columns:1fr; }
}
.t-product-benefits { margin-top:20px; padding-top:10px; border-top:1px solid var(--t-border); }
.t-product-benefits p { display:flex; gap:11px; align-items:flex-start; margin:13px 0; color:var(--t-primary-dark); }
.t-product-benefits span { display:flex; flex-direction:column; }
.t-product-benefits strong { color:var(--t-text); font-size:.88rem; }
.t-product-benefits small { color:var(--t-muted); font-size:.75rem; }

@media (max-width:859px) {
  .t-product-info { margin-top:-18px; position:relative; border-radius:24px 24px 0 0; padding:24px 18px 8px; background:#fff; }
  .t-product-form { padding:0 18px 28px; background:#fff; }
  .t-product-benefits { display:none; }
}

/* Ubicacion: formulario principal y resumen persistente en escritorio. */
.t-location-layout { width:min(1440px,calc(100% - 40px)); margin:24px auto 56px; }
.t-location-layout .t-location-shell { width:100%; margin:0; }
.t-location-aside h2 { margin:0 0 18px; }
.t-aside-items { display:grid; gap:14px; margin-bottom:18px; }
.t-aside-item { display:grid; grid-template-columns:30px minmax(0,1fr) auto; gap:10px; align-items:start; }
.t-aside-item strong,.t-aside-item small { display:block; }
.t-aside-item strong { font-size:.83rem; }
.t-aside-item small { min-height:1em; margin-top:2px; color:var(--t-muted); font-size:.72rem; }
.t-aside-item b { font-size:.82rem; white-space:nowrap; }
.t-aside-qty { width:26px; height:26px; display:flex; align-items:center; justify-content:center; border-radius:8px; color:var(--t-primary-dark); background:var(--t-soft); font-size:.75rem; font-weight:800; }
.t-aside-note { margin:12px 0 20px; color:var(--t-muted); font-size:.78rem; line-height:1.5; }
.t-secure-note { display:flex; gap:11px; align-items:center; padding:14px; border-radius:12px; color:var(--t-primary-dark); background:var(--t-soft); }
.t-secure-note span,.t-secure-note strong,.t-secure-note small { display:block; }
.t-secure-note small { margin-top:2px; color:var(--t-muted); }
@media (min-width:960px) {
  .t-location-layout { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(320px,.62fr); gap:28px; align-items:start; }
  .t-location-aside { position:sticky; top:20px; padding:24px; border:1px solid var(--t-border); border-radius:var(--t-radius); background:#fff; box-shadow:var(--t-shadow); }
}
@media (max-width:959px) {
  .t-location-layout { width:100%; margin:0; }
  .t-location-aside { display:none; }
}

/* ---------- Dirección de la tienda, pedido activo, barra de ubicación al inicio, contador en tarjeta ---------- */

.t-store-direccion { display:flex; align-items:center; gap:4px; margin-top:2px; color:var(--t-muted); font-size:.72rem; text-decoration:none; }
.t-store-direccion:hover { color:var(--t-primary-dark); }
.t-store-direccion-inline { display:flex; align-items:center; gap:4px; color:var(--t-muted); font-size:.72rem; font-weight:400; }

.t-pedido-activo-pill { display:flex; align-items:center; gap:6px; padding:8px 14px; border-radius:999px; background:var(--t-soft); color:var(--t-primary-dark); font-size:.78rem; font-weight:700; text-decoration:none; white-space:nowrap; }
.t-pedido-activo-pill:hover { background:var(--t-primary-light); }

.t-ubicacion-gate { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; width:min(1440px,calc(100% - 40px)); margin:14px auto 0; padding:14px 18px; border-radius:var(--t-radius,14px); background:var(--t-soft); color:var(--t-primary-dark); }
.t-ubicacion-gate-texto { display:flex; align-items:center; gap:10px; font-size:.85rem; font-weight:600; }
.t-ubicacion-gate-acciones { display:flex; align-items:center; gap:14px; }
.t-ubicacion-gate-omitir { color:var(--t-muted); font-size:.8rem; text-decoration:underline; }

.t-card-qty { display:flex; align-items:center; justify-content:space-between; gap:6px; min-height:40px; border-radius:10px; background:var(--t-primary); color:#fff; padding:0 4px; }
.t-card-qty button { width:32px; height:32px; min-height:0; border:none; background:transparent; color:#fff; font-size:1.05rem; font-weight:700; cursor:pointer; border-radius:8px; }
.t-card-qty button:hover { background:rgba(255,255,255,.2); }
.t-card-qty [data-card-qty-value] { font-weight:700; font-size:.92rem; }

@media (max-width:640px) {
  .t-ubicacion-gate { flex-direction:column; align-items:flex-start; }
  .t-ubicacion-gate-acciones { width:100%; justify-content:space-between; }
}
