/* ============================================================
   Paz House 8.2 F2 — navegación canónica
   Header sticky + drawer + buscador + carrito + chatbot.
   Esta hoja reemplaza en runtime las variantes legacy 7.x/8.1.
   ============================================================ */

:root {
  --ph-header-h: 56px;
  --ph-header-h-desktop: 72px;
  --ph-sticky-cta-h: 0px;
}

/* Marca tipográfica compacta: evita recortar el JPG cuadrado del logo. */
.ph-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: var(--ph-text);
  line-height: .9;
  white-space: nowrap;
}
.ph-wordmark b {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -.055em;
}
.ph-wordmark em {
  color: var(--ph-orange);
  font-size: .92rem;
  font-style: italic;
  font-weight: 600;
  letter-spacing: -.05em;
}
.ph-brand-pill {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  padding: 2px 7px;
  border-radius: var(--ph-radius-pill);
  background: var(--ph-text);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .13em;
}

/* Promo en flujo normal. Se desplaza con la página; el header queda sticky. */
.promo-bar {
  position: relative;
  inset: auto;
  z-index: calc(var(--ph-z-header) + 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 38px;
  padding: 8px max(16px, var(--safe-right)) 8px max(16px, var(--safe-left));
  border: 0;
  background: var(--ph-text);
  color: #fff;
  box-shadow: none;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: .01em;
  text-align: center;
  text-decoration: none;
}
.promo-bar strong {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: inherit;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.promo-bar .paz-icon { width: 14px; height: 14px; }
.promo-spacer { display: none; height: 0; }

/* Header */
.navbar {
  position: sticky;
  top: 0;
  left: auto;
  right: auto;
  z-index: var(--ph-z-header);
  width: 100%;
  padding: 0;
  border-bottom: 1px solid rgba(234, 223, 230, .86);
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 3px 16px rgba(52, 35, 46, .035);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  transform: none;
  transition: box-shadow var(--ph-fast), background-color var(--ph-fast), border-color var(--ph-fast);
}
.navbar.scrolled {
  padding: 0;
  border-bottom-color: var(--ph-border);
  background: rgba(255,255,255,.985);
  box-shadow: 0 8px 26px rgba(52,35,46,.08);
}
.navbar.hidden { transform: none; }
.navbar__container { width: 100%; }
.navbar__inner {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: var(--ph-header-h);
  transition: min-height var(--ph-fast);
}
.navbar__hamburger {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-color: transparent;
  background: transparent;
}
.navbar__hamburger .paz-icon { width: 23px; height: 23px; }
.navbar__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  color: var(--ph-text);
  text-decoration: none;
}
.navbar__logo img,
.navbar__logo-copy { display: none; }
.navbar__nav { display: none; }
.navbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  min-width: 0;
}
.navbar__action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--ph-radius-pill);
  background: transparent;
  color: var(--ph-text);
  font-size: var(--ph-fs-12);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  opacity: 1;
  transition: color var(--ph-fast), background-color var(--ph-fast), transform var(--ph-fast);
}
.navbar__action:hover {
  background: var(--ph-brand-soft);
  color: var(--ph-brand-text);
  transform: none;
}
.navbar__action .paz-icon { width: 21px; height: 21px; }
.navbar__action > span:not(.navbar__carrito-count) { display: none; }
.navbar__favorite,
.navbar__account { display: none; }
.navbar__carrito {
  border: 0;
  background: transparent;
  color: var(--ph-text);
  padding: 0 8px;
  opacity: 1;
}
.navbar__carrito-count {
  position: absolute;
  top: 2px;
  right: 1px;
  display: none;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: var(--ph-radius-pill);
  background: var(--ph-brand);
  color: var(--ph-text);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}
.navbar__account i {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--ph-success);
}

/* Overlay compartido */
.ph-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--ph-z-overlay);
  visibility: hidden;
  background: rgba(25,23,28,.42);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition: opacity var(--ph-medium), visibility var(--ph-medium);
}
.ph-overlay.open,
.buscador-overlay.abierto {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Drawer mobile/tablet */
#nav-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: var(--ph-z-drawer);
  display: flex;
  flex-direction: column;
  width: min(390px, 90vw);
  height: 100dvh;
  max-height: 100vh;
  padding: var(--safe-top) 0 var(--safe-bottom);
  border: 0;
  border-right: 1px solid var(--ph-border);
  border-radius: 0 24px 24px 0;
  background: var(--ph-surface);
  color: var(--ph-text);
  box-shadow: 26px 0 70px rgba(52,35,46,.18);
  overflow: hidden;
  transform: translateX(-102%);
  transition: transform 280ms var(--ph-ease);
}
#nav-drawer.open { transform: translateX(0); right: auto; }
.drawer__header {
  position: relative;
  top: auto;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ph-border);
  background: var(--ph-surface);
}
.drawer__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ph-text);
  text-decoration: none;
}
.drawer__close { flex: 0 0 44px; }
.drawer__nav {
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px 12px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.drawer__search {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  margin-bottom: 10px;
  padding: 0 14px;
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius-md);
  background: var(--ph-surface-soft);
  color: var(--ph-text);
  font-size: var(--ph-fs-14);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.drawer__search > :last-child { color: var(--ph-text-muted); font-size: 15px; }
.drawer__section {
  margin: 0;
  padding: 16px 10px 7px;
  color: var(--ph-text-muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.drawer__link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--ph-radius-md);
  color: var(--ph-text-soft);
  font-size: var(--ph-fs-14);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--ph-fast), background-color var(--ph-fast);
}
.drawer__link .paz-icon { width: 20px; height: 20px; color: var(--ph-text-muted); }
.drawer__link:hover,
.drawer__link.activo {
  border-left-color: transparent;
  background: var(--ph-brand-soft);
  color: var(--ph-brand-text);
}
.drawer__link:hover .paz-icon,
.drawer__link.activo .paz-icon { color: var(--ph-brand-text); }
.drawer__link small {
  margin-left: auto;
  color: var(--ph-text-muted);
  font-size: 10px;
  font-weight: 500;
}
.drawer__link--danger { color: #9f3041; }
.drawer__link--whatsapp { margin-top: 2px; background: #f3fbf6; color: #13683f; }
.drawer-account-card {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) 18px;
  align-items: center;
  gap: 11px;
  margin: 2px 0 7px;
  padding: 11px;
  border: 1px solid var(--ph-brand-border);
  border-radius: var(--ph-radius-md);
  background: linear-gradient(135deg, var(--ph-brand-soft), rgba(244,134,52,.05));
  color: var(--ph-text);
  text-decoration: none;
}
.drawer-account-card__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: #fff;
  color: var(--ph-brand-text);
  box-shadow: var(--ph-shadow-sm);
}
.drawer-account-card__icon .paz-icon { width: 23px; height: 23px; }
.drawer-account-card__copy { min-width: 0; }
.drawer-account-card b,
.drawer-account-card small { display: block; }
.drawer-account-card b { font-size: var(--ph-fs-14); }
.drawer-account-card small { margin-top: 2px; color: var(--ph-text-muted); font-size: 10px; line-height: 1.35; }
.drawer-account-card > .paz-icon { width: 17px; height: 17px; color: var(--ph-brand-text); }
.drawer__footer {
  flex: 0 0 auto;
  padding: 13px 16px;
  border-top: 1px solid var(--ph-border);
  color: var(--ph-text-muted);
  font-size: 10px;
  text-align: center;
}

/* Carrito lateral */
#carrito-overlay { z-index: var(--ph-z-overlay); }
#carrito-modal {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: var(--ph-z-drawer);
  display: flex;
  flex-direction: column;
  width: min(440px, 96vw);
  height: 100dvh;
  max-height: 100vh;
  padding-bottom: var(--safe-bottom);
  border: 0;
  border-left: 1px solid var(--ph-border);
  background: var(--ph-surface);
  color: var(--ph-text);
  box-shadow: -26px 0 70px rgba(52,35,46,.18);
  overflow: hidden;
  transform: translateX(102%);
  transition: transform 280ms var(--ph-ease);
}
#carrito-modal.open { right: 0; transform: translateX(0); }
.cm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ph-border);
  background: var(--ph-surface);
}
.cm-head__title { display: flex; align-items: center; gap: 8px; }
.cm-titulo {
  color: var(--ph-text);
  font-family: var(--ph-font-sans);
  font-size: var(--ph-fs-18);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  text-transform: none;
}
.cm-count {
  display: none;
  min-width: 22px;
  padding: 3px 7px;
  border-radius: var(--ph-radius-pill);
  background: var(--ph-brand-soft);
  color: var(--ph-brand-text);
  font-size: 10px;
  font-weight: 800;
}
.cm-close { width:44px; height:44px; }
.cm-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.cm-item {
  grid-template-columns: 76px minmax(0,1fr) auto;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--ph-border);
  background: #fff;
}
.cm-item:hover { background: var(--ph-bg); }
.cm-item__img { width: 76px; height: 95px; border: 1px solid var(--ph-border); border-radius: 10px; background: var(--ph-surface-muted); object-fit: cover; }
.cm-item__nombre { color: var(--ph-text); font-family: var(--ph-font-sans); font-size: 13px; font-weight: 700; letter-spacing: -.01em; }
.cm-item__meta,
.cm-item__precio-unit { color: var(--ph-text-muted); font-size: 11px; }
.cm-qty { border-color: var(--ph-border); border-radius: var(--ph-radius-sm); overflow:hidden; }
.cm-qty__btn { min-width:34px; min-height:34px; border-color:var(--ph-border); background:#fff; color:var(--ph-text); }
.cm-qty__btn:hover { background:var(--ph-brand-soft); color:var(--ph-brand-text); }
.cm-qty__num { color:var(--ph-text); }
.cm-item__subtotal { color:var(--ph-text); font-size:12px; }
.cm-item__del { color:#9f3041; font-size:10px; }
.cm-empty { min-height: 55vh; padding: 48px 20px; }
.cm-empty__ico { display:grid; place-items:center; width:56px; height:56px; margin:0 auto 14px; border-radius:50%; background:var(--ph-brand-soft); color:var(--ph-brand-text); }
.cm-empty__ico .paz-icon { width:25px; height:25px; }
.cm-empty__txt { color:var(--ph-text-muted); font-size:var(--ph-fs-14); }
.cm-foot { padding: 14px 16px 16px; border-top:1px solid var(--ph-border); background:#fff; }
.cm-linea { color:var(--ph-text-muted); font-size:12px; }
.cm-linea dd { color:var(--ph-text); }
.cm-linea.descuento dd { color:var(--ph-success); }
.cm-total-wrap { border-color:var(--ph-border); }
.cm-total-label { color:var(--ph-text-muted); font-size:11px; }
.cm-total-valor { color:var(--ph-text); font-family:var(--ph-font-sans); font-size:1.35rem; font-weight:800; }
.cm-checkout { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; margin-top:10px; text-decoration:none; }
.cm-checkout .paz-icon { width:18px; height:18px; }
.cm-full-link { color:var(--ph-text-muted); font-size:12px; }
.cm-full-link:hover { color:var(--ph-brand-text); }

/* Buscador global */
.buscador-overlay { z-index: calc(var(--ph-z-search) - 1); }
.buscador-rapido {
  position: fixed;
  inset: 0;
  z-index: var(--ph-z-search);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(72px, 10vh, 112px) 16px 16px;
  visibility: hidden;
  pointer-events: none;
}
.buscador-rapido.abierto { visibility: visible; pointer-events: auto; }
.buscador-rapido__panel {
  width: min(760px, 100%);
  max-height: min(720px, 82dvh);
  padding: 24px;
  border: 1px solid var(--ph-border);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--ph-shadow-md);
  overflow: auto;
  opacity: 0;
  transform: translateY(-10px) scale(.99);
  transition: opacity var(--ph-fast), transform var(--ph-fast);
}
.buscador-rapido.abierto .buscador-rapido__panel { opacity:1; transform:none; }
.buscador-rapido__head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; }
.buscador-rapido__head h2 { margin:3px 0 0; color:var(--ph-text); font-size:clamp(1.4rem,3vw,2rem); }
.buscador-rapido__cerrar { flex:0 0 44px; }
.buscador-rapido__form {
  display:grid;
  grid-template-columns:22px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:6px 6px 6px 14px;
  border:1px solid var(--ph-border-strong);
  border-radius:var(--ph-radius-md);
  background:#fff;
  box-shadow:0 0 0 4px rgba(255,79,168,.06);
}
.buscador-rapido__form > .paz-icon { color:var(--ph-brand-text); }
.buscador-rapido__form input { min-width:0; min-height:44px; padding:0; border:0; border-radius:0; box-shadow:none; background:transparent; }
.buscador-rapido__form input:focus { box-shadow:none; }
.buscador-rapido__form .btn { min-height:42px; padding-inline:18px; }
.buscador-rapido__ayuda { margin:10px 2px 14px; color:var(--ph-text-muted); font-size:11px; }
.buscador-resultados { display:grid; gap:6px; }
.buscador-inicio,.buscador-vacio,.buscador-cargando { padding:24px 16px; border-radius:var(--ph-radius-md); background:var(--ph-bg); color:var(--ph-text-muted); text-align:center; font-size:12px; }
.buscador-grupo { margin:12px 0 2px; padding:0 4px; color:var(--ph-text-muted); font-size:10px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.buscador-item { display:grid; grid-template-columns:62px minmax(0,1fr) auto; align-items:center; gap:12px; padding:8px; border:1px solid var(--ph-border); border-radius:var(--ph-radius-md); background:#fff; color:var(--ph-text); text-decoration:none; }
.buscador-item:hover,.buscador-item.activo { border-color:var(--ph-brand-border); background:var(--ph-bg); transform:none; }
.buscador-item img { width:62px; height:76px; border-radius:9px; object-fit:cover; }
.buscador-item__info strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.buscador-item__info small { display:block; margin-top:3px; color:var(--ph-text-muted); font-size:10px; }
.buscador-item__precio { color:var(--ph-brand-text); font-size:12px; font-weight:800; white-space:nowrap; }
.buscador-sugerencias { display:flex; flex-wrap:wrap; gap:6px; }
.buscador-chip { display:inline-flex; min-height:36px; align-items:center; padding:7px 11px; border:1px solid var(--ph-brand-border); border-radius:var(--ph-radius-pill); background:var(--ph-brand-soft); color:var(--ph-brand-text); font-size:11px; font-weight:700; text-decoration:none; }
.buscador-marcas-relacionadas { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.buscador-marca { display:grid; grid-template-columns:50px minmax(0,1fr); grid-template-rows:auto auto; column-gap:10px; align-items:center; min-height:58px; padding:8px 10px; border:1px solid var(--ph-line); border-radius:13px; background:#fff; color:var(--ph-ink); text-decoration:none; }
.buscador-marca:hover,.buscador-marca:focus-visible { border-color:var(--ph-brand-border); background:var(--ph-brand-soft); }
.buscador-marca>span { grid-row:1/3; display:grid; place-items:center; width:50px; height:40px; padding:4px; overflow:hidden; border-radius:9px; background:#fff; color:var(--ph-brand-text); font-size:10px; font-weight:800; }
.buscador-marca img { display:block; max-width:100%; max-height:100%; object-fit:contain; }
.buscador-marca b { align-self:end; overflow:hidden; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.buscador-marca small { align-self:start; color:var(--ph-text-muted); font-size:10px; }
@media(max-width:560px){.buscador-marcas-relacionadas{grid-template-columns:1fr}}
.buscador-ver-todo { display:flex; align-items:center; justify-content:center; gap:7px; margin-top:12px; min-height:44px; border-radius:var(--ph-radius-md); background:var(--ph-text); color:#fff; font-size:12px; font-weight:700; text-decoration:none; }
.buscador-ver-todo .paz-icon { width:16px; height:16px; }

/* Chatbot único 8.2 */
.chatbot-toggle {
  position: fixed;
  right: max(20px, var(--safe-right));
  bottom: calc(20px + var(--safe-bottom) + var(--ph-sticky-cta-h));
  z-index: var(--ph-z-chat);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:auto;
  min-width:54px;
  height:54px;
  padding:0 17px;
  border:1px solid rgba(255,255,255,.55);
  border-radius:var(--ph-radius-pill);
  background:linear-gradient(135deg,var(--ph-brand),#e83f96);
  color:#fff;
  box-shadow:0 14px 34px rgba(196,31,122,.28);
  cursor:pointer;
  transition:opacity var(--ph-fast), transform var(--ph-fast), box-shadow var(--ph-fast);
}
.chatbot-toggle:hover { transform:translateY(-2px); box-shadow:0 18px 40px rgba(196,31,122,.34); }
.chatbot-toggle[aria-expanded="true"] { opacity:0; visibility:hidden; pointer-events:none; transform:translateY(8px); }
.chatbot-toggle .paz-icon { width:21px; height:21px; }
.chatbot-toggle span { font-size:11px; font-weight:800; }
.chatbot-panel {
  position:fixed;
  right:max(20px,var(--safe-right));
  bottom:calc(84px + var(--safe-bottom) + var(--ph-sticky-cta-h));
  z-index:calc(var(--ph-z-chat) + 1);
  display:none;
  width:min(380px,calc(100vw - 32px));
  max-height:min(70dvh,610px);
  border:1px solid var(--ph-border);
  border-radius:20px;
  background:#fff;
  color:var(--ph-text);
  box-shadow:var(--ph-shadow-md);
  overflow:hidden;
}
.chatbot-panel.open,
.chatbot-panel[aria-hidden="false"] { display:flex; flex-direction:column; animation:phChatIn .18s var(--ph-ease); }
.chatbot-head { display:flex; align-items:center; gap:10px; flex:0 0 auto; padding:13px 13px 12px; border-bottom:1px solid var(--ph-border); background:var(--ph-text); color:#fff; }
.chatbot-head > div:nth-child(2) { min-width:0; }
.chatbot-head b { font-size:12px; }
.chatbot-head small { display:block; margin-top:2px; color:#d9d1d6; font-size:9px; }
.chatbot-head small i { display:inline-block; width:7px; height:7px; border-radius:50%; background:#54d891; }
.chatbot-avatar { display:grid; place-items:center; flex:0 0 38px; width:38px; height:38px; border-radius:12px; background:linear-gradient(135deg,var(--ph-brand),#ff8fc8); color:#fff; font-size:10px; font-weight:900; }
.chatbot-head .ph-icon-button { margin-left:auto; flex:0 0 40px; width:40px; height:40px; border-color:rgba(255,255,255,.18); background:rgba(255,255,255,.07); color:#fff; }
.chatbot-body { flex:1 1 auto; min-height:150px; max-height:300px; padding:14px; background:var(--ph-bg); overflow:auto; overscroll-behavior:contain; }
.chatbot-msg { max-width:88%; margin:7px 0; padding:10px 12px; border-radius:13px; background:#f0e9ed; color:var(--ph-text-soft); font-size:12px; line-height:1.5; }
.chatbot-msg.user { margin-left:auto; background:var(--ph-brand); color:var(--ph-text); }
.chatbot-suggestions { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.chatbot-suggestions button { min-height:36px; padding:7px 10px; border:1px solid var(--ph-brand-border); border-radius:var(--ph-radius-pill); background:#fff; color:var(--ph-brand-text); font-size:10px; font-weight:700; cursor:pointer; }
.chatbot-form { display:grid; grid-template-columns:minmax(0,1fr) 44px; gap:0; flex:0 0 auto; padding:10px 12px 8px; border-top:1px solid var(--ph-border); background:#fff; }
.chatbot-form input { min-width:0; min-height:44px; padding:0 12px; border:1px solid var(--ph-border-strong); border-radius:12px 0 0 12px; background:#fff; color:var(--ph-text); font-size:16px; }
.chatbot-form button { display:grid; place-items:center; min-height:44px; border:0; border-radius:0 12px 12px 0; background:var(--ph-brand); color:var(--ph-text); cursor:pointer; }
.chatbot-form button .paz-icon { width:18px; height:18px; }
.chatbot-whatsapp { display:flex; align-items:center; justify-content:center; gap:7px; min-height:38px; margin:0 12px 7px; border-radius:10px; background:#eef9f2; color:#17683f; font-size:10px; font-weight:700; text-decoration:none; }
.chatbot-whatsapp .paz-icon { width:16px; height:16px; }
.chatbot-panel footer { flex:0 0 auto; padding:0 12px 10px; color:var(--ph-text-muted); font-size:9px; text-align:center; }
.drawer-abierto .chatbot-toggle,
.buscador-abierto .chatbot-toggle,
.carrito-abierto .chatbot-toggle { opacity:0; pointer-events:none; transform:translateY(8px); }
@keyframes phChatIn { from { opacity:0; transform:translateY(8px) scale(.985); } }

/* Sin dock inferior en 8.2. */
.mobile-dock { display:none; }
body { padding-bottom:0; }
.site-main-offset,
.checkout-main { padding-top:24px; }
.account-subnav { top:calc(var(--ph-header-h) + 8px); }

@media (max-width: 767px) {
  .promo-bar { min-height:40px; gap:7px; padding-block:7px; font-size:10px; }
  .promo-bar strong { font-size:10px; }
  .navbar__container { padding-inline:10px; }
  .navbar__inner { gap:4px; }
  .navbar__logo .ph-brand-pill { display:none; }
  .navbar__buscar { padding:0; }
  .navbar__carrito { padding:0; }

  #nav-drawer { width:min(390px,92vw); border-radius:0 22px 22px 0; }

  .buscador-overlay { background:#fff; backdrop-filter:none; -webkit-backdrop-filter:none; }
  .buscador-rapido { align-items:stretch; padding:0; }
  .buscador-rapido__panel {
    width:100%;
    height:100dvh;
    max-height:none;
    padding:calc(14px + var(--safe-top)) 16px calc(18px + var(--safe-bottom));
    border:0;
    border-radius:0;
    box-shadow:none;
    transform:translateY(8px);
  }
  .buscador-rapido__head { align-items:center; margin-bottom:16px; }
  .buscador-rapido__head h2 { font-size:1.45rem; }
  .buscador-rapido__form { grid-template-columns:20px minmax(0,1fr); padding:5px 10px; }
  .buscador-rapido__form .btn { display:none; }
  .buscador-rapido__ayuda { display:none; }
  .buscador-resultados { max-height:calc(100dvh - 176px - var(--safe-top) - var(--safe-bottom)); overflow:auto; padding-bottom:22px; }
  .buscador-item { grid-template-columns:54px minmax(0,1fr) auto; gap:9px; padding:7px 3px; border-left:0; border-right:0; border-radius:0; }
  .buscador-item img { width:54px; height:66px; }
  .buscador-item__precio { font-size:11px; }

  #carrito-modal { width:min(430px,100vw); border-radius:18px 0 0 18px; }
  .cm-item { grid-template-columns:68px minmax(0,1fr); }
  .cm-item__img { width:68px; height:86px; }
  .cm-item__derecha { grid-column:2; flex-direction:row; justify-content:space-between; align-items:center; }

  .chatbot-toggle {
    right:calc(16px + var(--safe-right));
    bottom:calc(16px + var(--safe-bottom) + var(--ph-sticky-cta-h));
    width:52px;
    min-width:52px;
    height:52px;
    padding:0;
  }
  .chatbot-toggle span { display:none; }
  .chatbot-panel {
    left:16px;
    right:16px;
    bottom:calc(80px + var(--safe-bottom) + var(--ph-sticky-cta-h));
    width:auto;
    max-height:70dvh;
    border-radius:18px;
  }
  .chatbot-body { max-height:calc(70dvh - 190px); }

  html { scroll-padding-bottom:16px; }
  .page-header { padding-top:2rem; }
  .site-main-offset,.checkout-main,.story-page,.news-page { padding-top:16px; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  :root { --ph-header-h: 60px; }
  .navbar__inner { min-height:60px; }
  .navbar__logo { justify-content:flex-start; }
  .navbar__favorite { display:inline-flex; }
  .navbar__favorite > span { display:none; }
}

@media (min-width: 1024px) {
  :root { --ph-header-h: var(--ph-header-h-desktop); }
  .navbar__inner {
    grid-template-columns:auto minmax(0,1fr) auto;
    gap:24px;
    min-height:var(--ph-header-h-desktop);
  }
  .navbar.scrolled .navbar__inner { min-height:64px; }
  .navbar__hamburger { display:none; }
  .navbar__logo { justify-content:flex-start; gap:9px; }
  .navbar__logo .ph-wordmark b { font-size:1.25rem; }
  .navbar__logo .ph-wordmark em { font-size:1rem; }
  .navbar__nav {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:clamp(16px,2.2vw,32px);
    margin:0;
    padding:0;
    list-style:none;
  }
  .navbar__link {
    position:relative;
    display:inline-flex;
    min-height:44px;
    align-items:center;
    padding:0 2px;
    color:var(--ph-text-soft);
    font-size:12px;
    font-weight:650;
    letter-spacing:0;
    text-transform:none;
    text-decoration:none;
    opacity:1;
  }
  .navbar__link::after {
    content:'';
    position:absolute;
    left:0;
    right:0;
    bottom:4px;
    width:auto;
    height:2px;
    border-radius:999px;
    background:var(--ph-brand);
    transform:scaleX(0);
    transform-origin:center;
    transition:transform var(--ph-fast);
  }
  .navbar__link:hover,.navbar__link.activo { color:var(--ph-text); }
  .navbar__link:hover::after,.navbar__link.activo::after { width:auto; transform:scaleX(1); }
  .navbar__actions { gap:2px; }
  .navbar__favorite,
  .navbar__account { display:inline-flex; }
  .navbar__action > span:not(.navbar__carrito-count) { display:inline; }
  .navbar__action { padding-inline:10px; }
  .navbar__carrito { padding-inline:10px; }
  .navbar__carrito-count { top:1px; right:0; }
  .site-main-offset,.checkout-main { padding-top:28px; }
}

@media (min-width: 1180px) {
  .navbar__actions { gap:4px; }
  .navbar__action { padding-inline:12px; }
}

@media (prefers-reduced-motion: reduce) {
  #nav-drawer,
  #carrito-modal,
  .buscador-rapido__panel,
  .chatbot-panel { transition:none; animation:none; }
}
.cm-empty__cta { margin-top:8px; font-size:12px; text-decoration:none; }

/* Neutralizaciones explícitas de selectores legacy más específicos. */
:root { --ph-bottom-ui-space: 0px; }
.promo-bar + .navbar { top: 0; }
#drawer-overlay { z-index: calc(var(--ph-z-drawer) - 1); background: rgba(25,23,28,.42); }
#drawer-overlay.open { background: rgba(25,23,28,.42); }
.page-header { padding-top:4rem; }
