/* ── Cabecera de la tienda (logo · buscador · cuenta/favoritos/carrito · cita) ──
   Reemplaza los estilos de `header .contenedor` de main.css para el bloque
   `.contenedor.hdr2` (views/header.php). */

header .contenedor.hdr2 {
  display: flex; align-items: center; gap: 28px;
  max-width: 1413px; margin: 0 auto; padding: 18px 24px;
  border-bottom: 1px solid #edf0f4;
}
header .contenedor.hdr2:after { display: none; }
header .hdr2 .logo { float: none; flex: 0 0 auto; }
header .hdr2 .logo img { display: block; height: 78px; width: auto; }

/* Buscador */
.hdr2-buscar {
  flex: 1 1 auto; max-width: 620px; margin: 0 auto;
  display: flex; align-items: center; gap: 8px;
  height: 52px; padding: 0 20px 0 14px;
  border: 1px solid #d9dee6; border-radius: 999px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.hdr2-buscar:focus-within { border-color: #1b3a66; box-shadow: 0 0 0 3px rgba(27,58,102,.12); }
.hdr2-buscar input {
  flex: 1 1 auto; border: 0; outline: 0; background: transparent;
  font-size: 15px; color: #1a2942; min-width: 0; padding: 0; height: 100%;
}
.hdr2-buscar input::placeholder { color: #8791a1; }
.hdr2-lupa { border: 0; background: none; padding: 4px; color: #1a2942; cursor: pointer; display: flex; }
.hdr2-lupa svg { width: 22px; height: 22px; }

/* Mi cuenta / Favoritos / Carrito */
.hdr2-acc { display: flex; align-items: center; gap: 30px; margin: 0; padding: 0; list-style: none; flex: 0 0 auto; }
.hdr2-item { position: relative; }
.hdr2-item > a {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px;
  color: #1a2942; text-decoration: none; font-size: 13px; line-height: 1;
}
.hdr2-item > a svg { width: 25px; height: 25px; }
.hdr2-item > a:hover { color: #0795C4; }
.hdr2-item .total-items {
  position: absolute; top: -8px; left: calc(50% + 6px);
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: linear-gradient(135deg, #0795C4 0%, #0D3C61 100%); color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  width: auto; right: auto; box-shadow: 0 0 0 2px #fff;
}
.hdr2-item .total-items[hidden] { display: none; }

/* Panel «Mis favoritos» (se abre desde el botón Favoritos) */
html.hdr2-fav-on { overflow: hidden; }
.hdr2-fav { position: fixed; inset: 0; z-index: 10050; }
.hdr2-fav[hidden] { display: none; }
.hdr2-fav-fondo { position: absolute; inset: 0; background: rgba(13,60,97,.45); opacity: 0; transition: opacity .25s; }
.hdr2-fav-caja {
  position: absolute; top: 0; right: 0; bottom: 0; width: 380px; max-width: 100%;
  background: #fff; display: flex; flex-direction: column;
  box-shadow: -12px 0 30px rgba(13,60,97,.2); transform: translateX(100%); transition: transform .25s ease;
}
.hdr2-fav.on .hdr2-fav-fondo { opacity: 1; }
.hdr2-fav.on .hdr2-fav-caja { transform: none; }
.hdr2-fav-cab {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 18px; color: #fff; background: linear-gradient(110deg, #0795C4 0%, #0795C4 38%, #0D3C61 38.1%, #0D3C61 100%);
}
.hdr2-fav-cab h3 { margin: 0; font-size: 18px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 8px; }
.hdr2-fav-cab h3 svg { width: 20px; height: 20px; }
.hdr2-fav-cab h3 small { font-size: 14px; font-weight: 500; opacity: .85; }
.hdr2-fav-x { border: 0; background: rgba(255,255,255,.15); color: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 24px; line-height: 1; cursor: pointer; }
.hdr2-fav-x:hover { background: rgba(255,255,255,.28); }
.hdr2-fav-lista { flex: 1 1 auto; overflow: auto; padding: 8px 14px; -webkit-overflow-scrolling: touch; }
.hdr2-fav-it { position: relative; display: flex; gap: 12px; padding: 12px 34px 12px 0; border-bottom: 1px solid #eef1f5; }
.hdr2-fav-img { flex: 0 0 86px; height: 86px; border-radius: 10px; background: #f5f7fa; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hdr2-fav-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.hdr2-fav-dat { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hdr2-fav-dat small { font-size: 11px; letter-spacing: .06em; color: #0795C4; font-weight: 700; }
.hdr2-fav-dat > a:not(.hdr2-fav-add) { color: #1a2942; font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr2-fav-dat > a:not(.hdr2-fav-add):hover { color: #0795C4; }
.hdr2-fav-pre s { color: #8791a1; font-size: 12.5px; margin-right: 6px; }
.hdr2-fav-pre b { color: #0D3C61; font-size: 15px; }
.hdr2-fav-add {
  align-self: flex-start; margin-top: 4px; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: #fff !important; text-decoration: none; background: #0D3C61; transition: background .15s;
}
.hdr2-fav-add:hover { background: #0795C4; }
.hdr2-fav-add.agregado { background: #0795C4; }
.hdr2-fav-ago { font-size: 12.5px; color: #b0413e; font-weight: 600; margin-top: 4px; }
.hdr2-fav-quitar {
  position: absolute; top: 12px; right: 0; border: 0; background: none; padding: 4px; cursor: pointer; color: #0795C4;
}
.hdr2-fav-quitar svg { width: 22px; height: 22px; }
.hdr2-fav-quitar:hover { color: #0D3C61; }
.hdr2-fav-vacio { text-align: center; padding: 48px 20px; color: #5b6577; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hdr2-fav-vacio svg { width: 54px; height: 54px; color: #0795C4; margin-bottom: 6px; }
.hdr2-fav-vacio b { color: #1a2942; font-size: 16px; }
.hdr2-fav-vacio span { font-size: 14px; max-width: 260px; }
.hdr2-fav-ir { margin-top: 12px; padding: 10px 20px; border-radius: 999px; background: #0D3C61; color: #fff !important; text-decoration: none; font-weight: 600; font-size: 14px; }
.hdr2-fav-ir:hover { background: #0795C4; }
.hdr2-fav-cargando { padding: 40px 10px; text-align: center; color: #8791a1; }
.hdr2-fav-pie { padding: 12px 18px; font-size: 12.5px; color: #8791a1; border-top: 1px solid #eef1f5; text-align: center; }

/* Menú de la cuenta (sesión iniciada) */
.hdr2-cuenta .hdr2-menu {
  position: absolute; top: 100%; right: -20px; z-index: 20; margin: 10px 0 0; padding: 6px 0;
  list-style: none; min-width: 210px; background: #fff; border: 1px solid #e5e9f0; border-radius: 12px;
  box-shadow: 0 12px 30px rgba(26,41,66,.14); display: none;
}
.hdr2-cuenta:hover .hdr2-menu, .hdr2-cuenta:focus-within .hdr2-menu { display: block; }
.hdr2-cuenta .hdr2-menu:before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.hdr2-cuenta .hdr2-menu li a { display: block; padding: 9px 16px; color: #1a2942; font-size: 14px; text-decoration: none; }
.hdr2-cuenta .hdr2-menu li a:hover { background: #eaf6fb; color: #0795C4; }
.hdr2-cuenta .hdr2-hola { padding: 8px 16px 10px; font-size: 13px; color: #5b6577; border-bottom: 1px solid #eef1f5; margin-bottom: 4px; }
.hdr2-cuenta .hdr2-hola small { color: #0795C4; }

/* Agenda tu cita */
.hdr2-cita {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
  padding: 12px 22px; border-radius: 12px; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, #0795C4 0%, #0D3C61 100%);
  box-shadow: 0 6px 16px rgba(13,60,97,.28); transition: transform .15s, box-shadow .15s;
}
.hdr2-cita:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(13,60,97,.36); color: #fff; }
.hdr2-cita svg { width: 30px; height: 30px; flex: 0 0 auto; }
.hdr2-cita span { display: flex; flex-direction: column; line-height: 1.2; }
.hdr2-cita b { font-size: 15px; }
.hdr2-cita small { font-size: 12.5px; opacity: .85; }

/* Menú del celular: solo en pantallas angostas */
.hdr2-hamb { display: none; }

/* Buscador de celular (debajo de la cabecera) */
.hdr2-movil { display: none; padding: 0 16px 14px; }

@media (max-width: 1180px) {
  header .contenedor.hdr2 { gap: 18px; }
  .hdr2-acc { gap: 20px; }
  .hdr2-cita { padding: 10px 14px; }
  .hdr2-cita small { display: none; }
}
@media (max-width: 1075px) {
  .hdr2-cita { display: none; }
  .hdr2-hamb { display: block; }
}
@media (max-width: 900px) {
  .hdr2-buscar { display: none; }
  .hdr2-movil { display: block; }
  header .contenedor.hdr2 { justify-content: space-between; padding: 12px 16px; }
  header .hdr2 .logo img { height: 56px; }
}
@media (max-width: 480px) {
  .hdr2-acc { gap: 14px; }
  .hdr2-item > a svg { width: 23px; height: 23px; }
  .hdr2-lbl { font-size: 11px; }
  header .hdr2 .logo img { height: 46px; }
}

/* ── Menú de celular (views/menu-modal.php, modal #modal-height-100) ── */
#modal-height-100:has(.mm2) { width: 400px; max-width: 88%; background: #fff; }
.mm2 { min-height: 100%; display: flex; flex-direction: column; text-align: left; font-size: 16px; background: #fff; }
.mm2-cab {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: 22px 56px 30px; background: linear-gradient(180deg, #eaf6fb 0%, #f6fbfe 100%);
  border-bottom: 3px solid #0795C4; border-radius: 0 0 50% 50% / 0 0 26px 26px;
}
.mm2-logo img { display: block; height: 70px; width: auto; }
.mm2-x { position: absolute; top: 16px; right: 14px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: #0D3C61; border-radius: 50%; }
.mm2-x:hover { background: rgba(13,60,97,.08); color: #0D3C61; }
.mm2-x svg { width: 26px; height: 26px; }

.mm2-cats { list-style: none; margin: 0; padding: 10px 14px 4px; }
.mm2-cat { border-bottom: 1px solid #edf0f4; }
.mm2-cat > a { display: flex; align-items: center; gap: 14px; padding: 9px 2px; color: #0D3C61; text-decoration: none; }
.mm2-foto {
  flex: 0 0 64px; height: 52px; border-radius: 12px; background: #eef2f7;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.mm2-foto img { max-width: 88%; max-height: 84%; object-fit: contain; }
.mm2-ico { width: 30px; height: 30px; color: #0D3C61; }
.mm2-ico-of { color: #e0312f; }
.mm2-cat:last-child .mm2-foto { background: #fdecec; }
.mm2-tx { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.2; }
.mm2-tx b { font-size: 15.5px; font-weight: 700; letter-spacing: .2px; text-transform: uppercase; }
.mm2-tx small { font-size: 13px; color: #5b6577; }
.mm2-chev { width: 20px; height: 20px; flex: 0 0 auto; color: #0D3C61; transition: transform .2s; }
.mm2-cat > a.active .mm2-chev { transform: rotate(90deg); }
.mm2-cat.on .mm2-tx b { color: #0795C4; }
.mm2-sub { display: none; list-style: none; margin: 0 0 10px 78px; padding: 0; }
.mm2-cat > a.active + .mm2-sub { display: block; }
.mm2-sub li a { display: block; padding: 7px 0; font-size: 14.5px; color: #1a2942; text-decoration: none; }
.mm2-sub li a:hover { color: #0795C4; }

.mm2-cita {
  display: flex; align-items: center; gap: 14px; margin: 12px 12px 6px; padding: 16px 16px;
  border-radius: 14px; background: #0D3C61; color: #fff; text-decoration: none;
  box-shadow: 0 10px 22px rgba(13,60,97,.25);
}
.mm2-cita:hover { color: #fff; }
.mm2-cita-ico svg { width: 50px; height: 50px; color: #fff; }
.mm2-cita-tx { flex: 1 1 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; line-height: 1.2; }
.mm2-cita-tx em { font-style: normal; font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; background: #0795C4; color: #fff; padding: 3px 9px; border-radius: 6px; }
.mm2-cita-tx b { font-size: 19px; }
.mm2-cita-tx small { font-size: 13px; opacity: .9; }
.mm2-cita .mm2-chev { color: #fff; }

.mm2-links { list-style: none; margin: 10px 12px; padding: 4px 14px; border: 1px solid #edf0f4; border-radius: 14px; box-shadow: 0 4px 14px rgba(13,60,97,.06); }
.mm2-links li + li { border-top: 1px solid #f0f2f6; }
.mm2-links a { display: flex; align-items: center; gap: 14px; padding: 11px 0; color: #1a2942; text-decoration: none; font-size: 15px; }
.mm2-links a > svg:first-child { width: 22px; height: 22px; flex: 0 0 auto; color: #0D3C61; }
.mm2-links a span { flex: 1 1 auto; }
.mm2-links a .mm2-chev { width: 16px; height: 16px; color: #5b6577; }
.mm2-links a:hover { color: #0795C4; }

.mm2-redes { display: flex; justify-content: space-around; gap: 6px; padding: 12px 10px 22px; margin-top: auto; }
.mm2-redes a { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; color: #1a2942; text-decoration: none; }
.mm2-redes a > span { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; }
.mm2-redes a svg { width: 26px; height: 26px; }
.mm2-redes .wsp > span { background: #25D366; }
.mm2-redes .ig > span { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.mm2-redes .fb > span { background: #1877F2; }
.mm2-redes .tt > span { background: #111; }
/* Con el menú abierto, el regalo y el botón de WhatsApp flotantes no lo tapan. */
body:has(#modal-height-100 .mm2) .regalo-cupon,
body:has(#modal-height-100 .mm2) .joinchat { display: none !important; }
