/* ROBLE — "fácil de usar" (2026-10-24). Botones grandes (mínimo 44–48 px, lo recomendado para
   tocar con el dedo), pasos numerados en la ficha, cantidad con − / +, barra fija de compra y
   menú visibles en celular. Se carga DESPUÉS de los estilos de index.html y de cart.css, así
   que estas reglas mandan sobre las anteriores. */

:root { --toque: 48px; }

/* Foco visible al navegar con teclado */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--roble-verde); outline-offset: 2px;
}

/* ===== Header ===== */
.site-nav a { padding: 0.6rem 0.2rem; font-size: 0.98rem; }
.cart-fab { width: 48px; height: 48px; }
.cart-badge { min-width: 22px; height: 22px; font-size: 0.75rem; }

/* ===== Hero ===== */
.hero .cta { min-height: 52px; padding: 0.95rem 1.8rem; font-size: 1.02rem; display: inline-flex; align-items: center; }
.hero-swatch { width: 38px; height: 38px; }

/* ===== Compra rápida ===== */
.tab { min-height: var(--toque); padding: 0.75rem 1.5rem; font-size: 1rem; }
.tienda-material { gap: 0.6rem; margin: -0.4rem 0 1.6rem; }
.tienda-material .talla-chip { font-size: 1rem; }
.tienda-material small { font-size: 0.9rem; }
.qs-info { padding: 1rem 1.1rem 1.15rem; gap: 0.75rem; }
.qs-titulo b { font-size: 1.08rem; }
.qs-punto { width: 18px; height: 18px; }
.qs-precio { font-size: 1.12rem; }
.qs-tallas { gap: 0.45rem; }
.qs-talla { flex: 1 1 0; min-width: 48px; min-height: 46px; font-size: 0.98rem; border-width: 2px; border-radius: 10px; }
.qs-talla:hover { border-color: var(--roble-negro); }
.qs-opciones { gap: 0.45rem; }
.qs-opcion {
  flex: 1 1 0; min-height: 46px; border: 2px solid var(--roble-borde); background: #fff; border-radius: 10px;
  font: inherit; font-size: 0.92rem; font-weight: 700; color: var(--roble-negro); cursor: pointer; padding: 0.4rem;
}
.qs-opcion:hover { border-color: var(--roble-negro); }
.qs-opcion.activo { background: var(--roble-negro); border-color: var(--roble-negro); color: #fff; }
.qs-agregar { min-height: 52px; font-size: 1.05rem; border-radius: 12px; }
.qs-comprar { min-height: 48px; font-size: 1rem; border-width: 2px; border-radius: 12px; }
.qs-ver { font-size: 0.85rem; padding: 0.5rem 1rem; }
/* En pantallas táctiles no hay "pasar el mouse": el aviso "Ver detalle" se ve siempre. */
@media (hover: none) {
  .qs-ver { opacity: 1; transform: translate(-50%, 0); }
  .qs-card:hover { transform: none; }
}

/* ===== Ficha del producto ===== */
.volver-link { min-height: var(--toque); font-size: 1rem; padding: 0.4rem 0; }
.galeria-nav { width: 52px; height: 52px; font-size: 2rem; }
.galeria-thumbs { gap: 0.6rem; padding: 0.9rem; }
.galeria-thumbs img { width: 72px; height: 72px; border-width: 3px; }

/* Pasos numerados: 1 Material · 2 Color · 3 Bolsillo · 4 Talla · 5 Cantidad (según lo que haya). */
.producto-info { counter-reset: paso; }
.producto-info .campo-label { font-size: 0.88rem; color: var(--roble-negro); display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.7rem; }
.producto-info .campo-label::before {
  counter-increment: paso; content: counter(paso);
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 26px; height: 26px; border-radius: 50%; background: var(--roble-verde); color: #fff;
  font-size: 0.82rem; letter-spacing: 0;
}
.color-row { gap: 0.75rem; }
.swatch { width: 46px; height: 46px; transition: transform 0.15s; }
.swatch:hover { transform: scale(1.08); }
.swatch.activo { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--roble-negro); }
.color-nombre { font-size: 1rem; font-weight: 600; color: var(--roble-negro); margin: -0.6rem 0 1.5rem; }
.talla-row { gap: 0.6rem; margin-bottom: 1.5rem; }
.talla-chip {
  min-height: var(--toque); min-width: 60px; padding: 0.7rem 1.3rem; font-size: 1rem;
  border-width: 2px; border-radius: 12px; transition: border-color 0.15s, background 0.15s;
}
.talla-chip:not(:disabled):not(.activo):hover { border-color: var(--roble-negro); }
.opcion-nota { font-size: 0.9rem; margin: -0.8rem 0 1.5rem; }

/* Cantidad: − [ 1 ] + */
.stepper { display: inline-flex; align-items: stretch; border: 2px solid var(--roble-borde); border-radius: 12px; overflow: hidden; }
.stepper button { width: 54px; min-height: 54px; border: none; background: var(--roble-crema); font-size: 1.5rem; font-weight: 700; color: var(--roble-negro); cursor: pointer; }
.stepper button:hover { background: var(--roble-borde); }
.stepper input, .qty-row .stepper input {
  width: 70px; border: none; text-align: center; font-size: 1.15rem; font-weight: 700; padding: 0; border-radius: 0;
  -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.btn-comprar-ya, .btn-primario { min-height: 58px; font-size: 1.08rem; border-radius: 12px; }
.btn-secundario { min-height: 54px; font-size: 1.02rem; border-radius: 12px; border-width: 2px; display: flex; align-items: center; justify-content: center; }

/* Barra fija de compra: solo en celular (ver abajo). */
.barra-compra { display: none; }

/* ===== Mayoreo y contacto ===== */
.mayoreo-calc input, .mayoreo-calc select, .form-lead input, .form-lead textarea { font-size: 16px; padding: 0.8rem; min-height: var(--toque); border-radius: 10px; }
.mayoreo-calc button, .form-lead button { min-height: 52px; font-size: 1rem; border-radius: 12px; }

/* ===== Aviso "Agregado" ===== */
.toast { font-size: 0.98rem; padding: 0.8rem 0.8rem 0.8rem 1.2rem; }
.toast button { min-height: 44px; padding: 0.6rem 1.1rem; font-size: 0.95rem; }

/* ===== Carrito ===== */
/* Todo el panel se desplaza junto (antes solo la lista, y el pie con los datos de entrega la
   aplastaba hasta dejarla de ~20 px: no se veían ni los botones − / +). El encabezado queda fijo. */
.cart-panel { width: min(380px, calc(100vw - 36px)); max-height: min(86vh, 760px); overflow-y: auto; overscroll-behavior: contain; }
.cart-panel-head { position: sticky; top: 0; z-index: 2; background: #fff; flex-shrink: 0; }
.cart-items { flex: 0 0 auto; overflow: visible; }
.cart-panel-footer { flex-shrink: 0; }
.cart-panel-head { font-size: 1.05rem; padding: 1rem 1.1rem; }
.cart-panel-close { width: 44px; height: 44px; font-size: 1.7rem; }
.cart-item-img { width: 64px; height: 64px; }
.cart-item-nombre { font-size: 0.95rem; }
.cart-item-detalle { font-size: 0.82rem; }
.cart-item-precio { font-size: 0.88rem; }
.cart-item-qty { gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap; }
.cart-item-qty button { width: 44px; height: 44px; font-size: 1.3rem; font-weight: 700; border-radius: 12px; border-width: 2px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.cart-item-qty button:active { transform: scale(0.94); }
.cart-item-qty span { font-size: 1.05rem; font-weight: 700; min-width: 2rem; text-align: center; }
.cart-item-quitar { width: auto !important; min-width: 0; height: 44px !important; padding: 0 0.6rem !important; font-size: 0.85rem !important; border: none !important; background: none !important; color: #8a2a2a !important; text-decoration: underline; }
.cart-total { font-size: 1.15rem; }
/* Barra de premio del carrito (envío gratis y combos) */
.premios { display: grid; gap: 0.35rem; }
.premio { background: #fff7e6; border: 1px solid #f3d9a4; color: #6b4a12; border-radius: 10px; padding: 0.45rem 0.65rem; font-size: 0.84rem; line-height: 1.35; }
.premio small { display: block; margin-top: 0.2rem; font-size: 0.78rem; opacity: 0.85; }
.premio.logrado { background: #f0fdf4; border-color: #b7e4c4; color: #166534; }
.cart-antes { font-size: 0.85rem; color: #8a8a80; text-decoration: line-through; }
.cart-cambio { font-size: 0.8rem; color: #5c5c52; margin-top: 0.15rem; }
/* Ficha: envío, cambio de talla, guía de tallas y combo */
.combo-aviso { background: #fff7e6; border: 1px solid #f3d9a4; color: #6b4a12; border-radius: 10px; padding: 0.55rem 0.75rem; font-size: 0.92rem; margin: -0.6rem 0 1.4rem; }
.ficha-beneficios { list-style: none; padding: 0; margin: 1.2rem 0 0.6rem; display: grid; gap: 0.45rem; font-size: 0.9rem; line-height: 1.4; }
.guia-tallas { border: 1px solid rgba(0,0,0,0.12); border-radius: 10px; padding: 0.6rem 0.8rem; font-size: 0.9rem; }
.guia-tallas summary { cursor: pointer; font-weight: 700; min-height: 32px; display: flex; align-items: center; }
.guia-tallas p { margin: 0.4rem 0 0.2rem; line-height: 1.45; }
.cart-entrega-titulo { font-size: 0.82rem; }
.cart-entrega input { font-size: 16px; padding: 0.75rem 0.8rem; min-height: var(--toque); border-radius: 10px; }   /* 16 px: iPhone no hace zoom al escribir */
.cart-btn-mp, .cart-btn-pedir { min-height: 52px; font-size: 1.02rem; border-radius: 12px; }

/* ===== Celular y tablet ===== */
@media (max-width: 860px) {
  /* Barra fija abajo en la ficha: lo elegido, el precio y "Agregar al carrito" siempre a la mano. */
  .barra-compra {
    display: flex; align-items: center; gap: 0.8rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 130;
    background: #fff; border-top: 1px solid var(--roble-borde); box-shadow: 0 -8px 24px rgba(20,20,15,0.1);
    padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
  }
  .barra-compra-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .barra-compra-info b { font-size: 1.2rem; }
  .barra-compra-info small { font-size: 0.82rem; color: var(--roble-texto-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .barra-compra button {
    flex: 0 0 auto; min-height: 54px; padding: 0 1.3rem; border: none; border-radius: 12px;
    background: var(--roble-verde); color: #fff; font: inherit; font-size: 1.02rem; font-weight: 700; cursor: pointer;
  }
  body.en-detalle .page { padding-bottom: 7.5rem; }
  body.en-detalle .whatsapp-float { bottom: calc(96px + env(safe-area-inset-bottom)); }
  .producto-info h2 { font-size: 1.65rem; }
}

@media (max-width: 640px) {
  /* El menú ya no se esconde: queda como botones debajo del logo. */
  .site-header-inner { flex-wrap: wrap; row-gap: 0.6rem; padding: 0.7rem 1rem; }
  .site-nav { display: flex; order: 3; width: 100%; gap: 0.5rem; overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a {
    flex: 1 0 auto; text-align: center; min-height: 44px; display: flex; align-items: center; justify-content: center;
    padding: 0.55rem 0.9rem; border: 2px solid var(--roble-borde); border-radius: 999px; font-size: 0.95rem; white-space: nowrap;
  }
  #catalogo, .producto-detalle { scroll-margin-top: 140px; }

  .page { padding: 2.4rem 1rem; }
  .tienda-head h2 { font-size: 1.7rem; }
  .tabs { width: 100%; }
  .tab { flex: 1 1 0; }
  .tienda-material span { width: 100%; margin: 0; }
  .tienda-material .talla-chip { flex: 1 1 0; }
  .tienda-material small { width: 100%; text-align: center; }
  .tienda-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .qs-foto { aspect-ratio: 4 / 5; }

  .talla-row .talla-chip { flex: 1 1 0; min-width: 0; padding: 0.7rem 0.4rem; }
  .swatch { width: 48px; height: 48px; }
  .galeria-nav { width: 48px; height: 48px; }

  /* Carrito como hoja que sube desde abajo, a todo lo ancho. */
  .cart-panel {
    top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 88vh;
    border-radius: 20px 20px 0 0; transform-origin: bottom center; transform: translateY(24px);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .cart-panel.open { transform: translateY(0); }
  .whatsapp-float { width: 58px; height: 58px; }
}

/* Precio debajo del nombre del material (no se parte en dos renglones en celular). */
.talla-chip .chip-precio { display: block; font-size: 0.82rem; font-weight: 600; opacity: 0.8; margin-top: 0.1rem; }
.talla-chip { line-height: 1.15; }

/* Aviso "Agregado": ancho, texto en una sola columna y por encima de la barra fija del celular. */
.toast { width: min(520px, calc(100vw - 32px)); justify-content: space-between; }
.toast > span { flex: 1; min-width: 0; line-height: 1.35; }
@media (max-width: 860px) {
  body.en-detalle .toast { bottom: calc(100px + env(safe-area-inset-bottom)); }
}
/* El precio dentro del botón de material hereda el color del botón (blanco si está elegido). */
.tienda-material .talla-chip .chip-precio, .talla-chip .chip-precio { color: inherit; width: auto; text-align: inherit; font-size: 0.82rem; }
/* Misma tipografía de la página en todos los botones de opción. */
.talla-chip, .stepper button, .stepper input, .barra-compra button, .cart-item-qty button, .cart-panel-close { font-family: inherit; }

/* ===== Hombre: cada color como producto independiente ===== */
.color-elegido { display: flex; align-items: center; gap: 0.55rem; font-size: 1rem; margin: -0.2rem 0 1.4rem; color: var(--roble-texto-suave); }
.color-elegido b { color: var(--roble-negro); font-size: 1.05rem; }
.color-elegido-punto { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.18); display: inline-block; }
.otros-colores { margin-top: 3rem; }
.otros-colores h3 { font-family: 'Bitter', serif; font-size: 1.5rem; margin: 0 0 1.1rem; }
.otros-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.otro-color { display: flex; flex-direction: column; text-decoration: none; color: var(--roble-negro); border: 1px solid var(--roble-borde); border-radius: 14px; overflow: hidden; background: #fff; transition: box-shadow .2s, transform .2s; }
.otro-color:hover { box-shadow: 0 10px 26px rgba(20,20,15,0.12); transform: translateY(-2px); }
.otro-color-foto { aspect-ratio: 3 / 4; overflow: hidden; background: var(--roble-crema); }
.otro-color-foto img { width: 100%; height: 100%; object-fit: cover; }
.otro-color-info { display: flex; align-items: center; gap: 0.45rem; padding: 0.7rem 0.75rem; min-height: 48px; }
.otro-color-info b { font-size: 0.95rem; flex: 1; }
.otro-color-info small { color: var(--roble-verde); font-weight: 700; font-size: 0.85rem; }
.otro-color-punto { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.18); flex: 0 0 auto; }
@media (max-width: 640px) { .otros-grid { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; } }

#color-row-oxford, #color-row-crop { display: none !important; }   /* sin fila de colores (cada color es su producto) */
.una-foto .galeria-nav { display: none; }

/* ===== Aviso "Agregado": totalmente invisible cuando no está activo (antes asomaba en celular) ===== */
.toast:not(.visible) { opacity: 0; visibility: hidden; pointer-events: none; }
.toast { transition: transform .35s cubic-bezier(.2,.9,.3,1.2), opacity .25s, visibility .25s; }

/* ===== Franja de confianza ===== */
.franja-confianza {
  background: var(--roble-negro); color: #fff; font-size: 0.86rem; font-weight: 600;
  display: flex; justify-content: center; gap: 2.2rem; padding: 0.55rem 1rem; white-space: nowrap; overflow: hidden;
}
.franja-confianza span[hidden] { display: none; }

/* Botón "Elegir talla" de la tarjeta: solo en celular (tarjeta compacta). */
.qs-elegir { display: none; }

@media (max-width: 640px) {
  /* Franja: los mensajes pasan uno tras otro en una sola línea. */
  .franja-confianza { justify-content: flex-start; gap: 2.5rem; font-size: 0.8rem; }
  .franja-confianza > span:not([hidden]) { animation: franja-pasar 18s linear infinite; }
  @keyframes franja-pasar { from { transform: translateX(10%); } to { transform: translateX(-160%); } }

  /* Tienda: 2 camisas por fila con foto, nombre y precio; la talla se elige al entrar. */
  .tienda-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .qs-foto { aspect-ratio: 3 / 4; }
  .qs-info { padding: 0.65rem 0.7rem 0.75rem; gap: 0.45rem; }
  .qs-titulo b { font-size: 0.95rem; }
  .qs-precio { font-size: 0.98rem; }
  .qs-tallas, .qs-opciones, .qs-agregar, .qs-comprar { display: none !important; }
  .qs-elegir {
    display: block; width: 100%; min-height: 44px; border: none; border-radius: 10px; margin-top: auto;
    background: var(--roble-verde); color: #fff; font: inherit; font-weight: 700; font-size: 0.92rem; cursor: pointer;
  }
  .qs-ver { display: none; }
}
@media (prefers-reduced-motion: reduce) { .franja-confianza > span { animation: none !important; } }

/* Categorías del menú (Mujer / Hombre): botones llenos, más notorios que los demás enlaces. */
.site-nav a.nav-categoria {
  background: var(--roble-negro); color: #fff; border: 2px solid var(--roble-negro); border-radius: 999px;
  padding: 0.6rem 1.5rem; font-size: 1.05rem; font-weight: 700; letter-spacing: 0.02em;
}
.site-nav a.nav-categoria:hover { background: var(--roble-verde); border-color: var(--roble-verde); color: #fff; }
@media (max-width: 640px) {
  .site-nav a.nav-categoria { flex: 1 1 0; font-size: 1.05rem; }
}
