/*
 * Encabezado de Calzado Caprino (entrega del 22 de octubre de 2026): franja de envío,
 * encabezado fijo, menú lateral en celular y buscador. Diseño primero para celular:
 * base hasta 767 px, tableta desde 768 px y computador desde 1024 px.
 * Clases con prefijo ch- para no chocar con Bootstrap ni con las hojas heredadas.
 * Los colores salen de css/sistema-diseno.css (y del módulo Diseño).
 */
.ch-franja, .ch-head, .ch-menu { --ch-gutter: 16px; font-family: var(--fuente-texto, Roboto, Arial, sans-serif); }
.ch-franja *, .ch-head *, .ch-menu * { box-sizing: border-box; }
.ch-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ch-head :focus-visible, .ch-menu :focus-visible { outline: 3px solid var(--rojo, #92151b); outline-offset: 2px; }
.ch-head [hidden], .ch-menu [hidden] { display: none !important; }
.ch-wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--ch-gutter); }

/* 1. Franja de envío */
.ch-franja { background: var(--rojo, #92151B); color: #fff; font-size: 13px; line-height: 1.5; text-align: center; padding: 8px var(--ch-gutter); }
.ch-franja b { font-weight: var(--peso-fuerte, 500); }
.ch-solo-desk { display: none; }

/* 2. Encabezado fijo */
.ch-head { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--borde, #d9d9d9); color: var(--tinta, #363636); }
.ch-bar { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; height: 60px; }
.ch-logo { justify-self: center; display: block; }
.ch-logo img { height: 30px; width: auto; display: block; max-width: none; }
.ch-icon { width: 48px; height: 48px; display: inline-grid; place-items: center; border: 0; background: none; color: var(--tinta, #363636); border-radius: 50%; text-decoration: none; position: relative; padding: 0; cursor: pointer; }
.ch-icon:hover, .ch-icon:focus { background: var(--fondo-calido, #f7f2ec); color: var(--tinta, #363636); text-decoration: none; }
.ch-icons { display: flex; align-items: center; }
.ch-badge { position: absolute; top: 6px; right: 4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--rojo, #92151b); color: #fff; font-size: 11px; font-weight: var(--peso-fuerte, 500); line-height: 18px; text-align: center; padding: 0 4px; }
.ch-nav, .ch-buscar-desk, .ch-cuenta { display: none; }

/* Buscador (celular: se abre debajo del encabezado) */
.ch-buscar-movil { padding: 0 var(--ch-gutter) 12px; margin: 0; }
.ch-campo { display: flex; align-items: center; gap: 8px; height: 44px; border: 1px solid var(--borde, #d9d9d9); border-radius: 999px; padding: 0 6px 0 16px; background: #fff; margin: 0; font-weight: 400; }
.ch-campo input { flex: 1; border: 0; outline: 0; font: 16px var(--fuente-texto, Roboto, Arial, sans-serif); min-width: 0; background: transparent; box-shadow: none; height: auto; margin: 0; padding: 0; color: var(--tinta, #363636); }
.ch-campo button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--rojo, #92151b); color: #fff; display: grid; place-items: center; padding: 0; flex: none; cursor: pointer; }

/* Menú lateral (celular y tableta) */
.ch-menu { position: fixed; inset: 0; z-index: 1100; visibility: hidden; }
.ch-menu.abierto { visibility: visible; }
.ch-menu-fondo { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .25s; }
.ch-menu.abierto .ch-menu-fondo { opacity: 1; }
.ch-menu-panel { position: absolute; top: 0; left: 0; bottom: 0; width: min(86vw, 360px); background: #fff; transform: translateX(-100%); transition: transform .25s ease; display: flex; flex-direction: column; overflow-y: auto; color: var(--tinta, #363636); }
.ch-menu.abierto .ch-menu-panel { transform: none; }
.ch-menu-cab { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px var(--ch-gutter); border-bottom: 1px solid var(--borde, #d9d9d9); }
.ch-menu-cab img { height: 26px; width: auto; max-width: none; }
.ch-menu-lista { list-style: none; margin: 0; padding: 8px 0; }
.ch-menu-lista li { display: block; float: none; margin: 0; padding: 0; }
.ch-menu-lista a { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 var(--ch-gutter); text-decoration: none; color: var(--tinta, #363636); font: var(--peso-fuerte, 500) 18px var(--fuente-titulo, 'Roboto Condensed', Arial, sans-serif); letter-spacing: .02em; text-transform: none; }
.ch-menu-lista a:hover, .ch-menu-lista a:focus { background: var(--fondo-calido, #f7f2ec); color: var(--tinta, #363636); text-decoration: none; }
.ch-menu-lista .ch-oferta, .ch-menu-lista .ch-oferta:hover { color: var(--rojo, #92151b); }
.ch-menu-extra { margin-top: auto; padding: 16px var(--ch-gutter) 24px; border-top: 1px solid var(--borde, #d9d9d9); display: grid; gap: 4px; }
.ch-menu-extra a { display: flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; font-size: 15px; color: var(--tinta, #363636); }
.ch-menu-extra a:hover { color: var(--rojo-oscuro, #741016); }

/* Tableta */
@media (min-width: 768px) {
  .ch-franja, .ch-head, .ch-menu { --ch-gutter: 24px; }
}

/* Computador */
@media (min-width: 1024px) {
  .ch-franja { font-size: 14px; }
  .ch-solo-desk { display: inline; }
  .ch-bar { grid-template-columns: auto 1fr auto; height: 72px; gap: 24px; }
  .ch-btn-menu, .ch-btn-buscar, .ch-buscar-movil { display: none !important; }
  .ch-logo { justify-self: start; }
  .ch-logo img { height: 40px; }
  .ch-nav { display: flex; gap: 4px; justify-self: center; }
  .ch-nav a { display: flex; align-items: center; height: 72px; padding: 0 12px; white-space: nowrap; text-decoration: none; color: var(--tinta, #363636); font: var(--peso-fuerte, 500) 15px var(--fuente-titulo, 'Roboto Condensed', Arial, sans-serif); letter-spacing: .06em; text-transform: uppercase; border-bottom: 3px solid transparent; }
  .ch-nav a:hover, .ch-nav a:focus, .ch-nav a[aria-current="page"] { border-bottom-color: var(--rojo, #92151b); color: var(--tinta, #363636); text-decoration: none; }
  .ch-nav .ch-oferta, .ch-nav .ch-oferta:hover { color: var(--rojo, #92151b); }
  .ch-buscar-desk { display: block; width: 220px; margin: 0; }
  .ch-icons { gap: 4px; }
  .ch-cuenta { display: inline-flex; width: auto; border-radius: 999px; padding: 0 12px; gap: 8px; font-size: 14px; font-weight: 500; white-space: nowrap; }
  /* En el home el banner ya trae la franja de envío dibujada */
  .ch-franja--solo-movil { display: none; }
}
/* Entre 1024 y 1279 px el menú completo no cabe con el buscador ancho:
   logo más bajo, buscador angosto e "Ingresar" solo con el ícono */
@media (min-width: 1024px) and (max-width: 1279px) {
  .ch-bar { gap: 12px; }
  .ch-logo img { height: 32px; }
  .ch-nav { gap: 0; }
  .ch-nav a { padding: 0 8px; font-size: 14px; letter-spacing: .03em; }
  .ch-buscar-desk { width: 150px; }
  .ch-cuenta { width: 44px; padding: 0; justify-content: center; }
  .ch-cuenta .ch-solo-desk { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ch-menu * { transition: none !important; } }

/* Páginas nuevas (home, catálogo, ficha, Club y tiendas): que no se ensanchen en celular.
   bootstrap-responsive le da padding a los lados al body y deja franjas blancas. */
html, body { max-width: 100%; }
body { padding: 0 !important; overflow-x: clip; }
