/* ===== PASO 1: backgrounds desktop ===== */

.pc-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
}

/* Barra superior */
.pc-header__top {
  background: #ffffff;
  width: 100%;
  margin: auto;
  padding: 1rem 0;
}

/* Barra inferior */
.pc-header__bottom {
  background: var(--pc-color-primary);
}

/* ===== PASO 2: ocultar hamburguesa en top (desktop) ===== */
.pc-header__hamburger {
  display: none;
}

/* ===== PASO 3: color y tamaño de íconos (desktop) ===== */
.pc-icon,
.pc-icon-btn {
  color: var(--pc-color-primary);
  font-size: 24px;
}

/* ===== PASO 4: top header en horizontal ===== */
.pc-header__top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ===== PASO: tamaño del logo (selector exacto) ===== */
.pc-header__logo .custom-logo {
  height: 40px !important;
  width: auto !important;
  max-height: none !important;
  display: block;
}

/* ===== ICONOS HEADER (SVG + BOX) ===== */

/* contenedor de cada icono */
.pc-icon-box {
  position: relative;
  width: 44px;
  height: 44px;
  background: var(--pc-color-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* svg dentro del box */
.pc-icon-box svg {
  width: 22px;
  height: 22px;
  fill: #ffffff;
  display: block;
}

/* enlaces de iconos */
.pc-icon-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* badge carrito */
.pc-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #e53935; /* rojo notificación */
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== ocultar hamburguesa en top (desktop) ===== */
.pc-header__hamburger {
  display: none !important;
}

/* ===== SEARCH DESKTOP (estilo tipo La Rebaja) ===== */

.pc-search {
  width: 100%;
}

/* ===== hacer el buscador ancho dentro del top ===== */
.pc-header__search {
  flex: 1;
  max-width: 480px;
}

.pc-search__field {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  background: #f2f3f5;
  border: 1px solid #e2e4e8;
  border-radius: 999px;
  padding: 0 6px 0 18px;
}

/* input */
.pc-search__input {
  flex: 1;
  height: 100%;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.pc-search__input::placeholder {
  color: #6b7280;
  font-weight: 500;
}

/* botón lupa */
.pc-search__btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--pc-color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* svg lupa */
.pc-search__btn svg {
  width: 18px;
  height: 18px;
  fill: #ffffff;
  display: block;
}

/* ===== BOTTOM BAR (Desktop) ===== */
.pc-header__bottom {
  background: var(--pc-color-primary);
  height: 56px;
  display: flex;
  align-items: center;
}

.pc-header__bottom-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Left: hamburguesa + label */
.pc-bottom-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.pc-drawer-trigger {
  width: 40px;
  height: 40px;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pc-drawer-label {
  font-weight: 600;
  color: #fff;
}

/* Center: categorías */
.pc-header__featured {
  flex: 1;
  display: flex;
  justify-content: center;
}

.pc-featured-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 22px;
}

.pc-featured-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
}

/* Right: sucursales */
.pc-branches-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
}

/* ===== NAVBAR: underline hover animado ===== */

.pc-featured-list a {
  position: relative;
}

/* underline */
.pc-featured-list a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.25s ease;
}

/* hover */
.pc-featured-list a:hover::after {
  width: 80%; /* más largo que el texto */
}

/* Sombra solo cuando el header está "scrolled" */
.pc-header.is-scrolled .pc-header__bottom {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

/* Overlay (capa oscura) */
.pc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9998;
}

/* Drawer contenedor */
.pc-drawer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none; /* evita clicks cuando está cerrado */
}

/* Panel pegado a la izquierda */
.pc-drawer__panel {
  position: absolute;
  top: 0;
  left: 0;
  width: min(420px, 88vw);
  height: 100vh;
  background: #0b4aa2; /* azul de prueba */
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  pointer-events: auto;
}

/* Estado abierto */
.pc-drawer.is-open {
  pointer-events: auto;
}
.pc-drawer.is-open .pc-drawer__panel {
  transform: translateX(0);
}

/* html.pc-lock, body.pc-lock{
  overflow: hidden;
} */

/* ===== Drawer: Close (X) ===== */
.pc-drawer__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* ===== Drawer: Logo area ===== */
.pc-drawer__logo-area {
  height: 30%;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

/* Logo imagen */
.pc-drawer__logo-area .custom-logo {
  max-width: 160px;
  height: auto;
}

/* Fallback texto logo */
.pc-drawer__logo-text {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
}

/* ===== Drawer: Nav area ===== */
.pc-drawer__nav {
  height: 70%;
  display: flex;
  flex-direction: column;
  padding: 12px 0 18px;
}

/* Lista */
.pc-drawer__grid {
  list-style: none;
  margin: 0;
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Link full width */
.pc-drawer__link {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease,
    border-color 0.18s ease;
}

/* Icon box (compacto) */
.pc-drawer__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  flex: 0 0 34px;
}

.pc-drawer__icon i {
  font-size: 16px;
}

/* Texto */
.pc-drawer__label {
  margin-left: 12px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.1;
}

/* Flecha al final (si la tienes) */
.pc-drawer__chev {
  margin-left: auto;
  opacity: 0.9;
  font-size: 18px;
}

/* Hover: invierte (fondo blanco, texto/ícono azul) */
.pc-drawer__link:hover {
  background: #fff;
  color: #0b4aa2;
  border-color: rgba(255, 255, 255, 0.55);
  transform: translateX(2px);
}

.pc-drawer__link:hover .pc-drawer__icon {
  background: #0b4aa2;
  color: #fff;
}

/* Active (por si luego quieres marcar página actual) */
.pc-drawer__link:active {
  transform: translateX(1px);
}

/* Tablet/Mobile: un poquito más compacto */
@media (max-width: 768px) {
  .pc-drawer__grid {
    padding: 0 12px;
    gap: 9px;
  }
  .pc-drawer__link {
    padding: 11px 12px;
    border-radius: 11px;
  }
  .pc-drawer__label {
    font-size: 14.5px;
  }
}

/* Desktop: ocultar search de barra inferior */
.pc-bottom-search {
  display: none;
}

/* Tablet + Mobile: mostrar search de barra inferior */
@media (max-width: 1024px) {
  .pc-bottom-search {
    display: block;
  }
}

.pc-bottom-search {
  display: none;
}

@media (max-width: 1024px) {
  /* 1) TOP: ocultar buscador desktop */
  .pc-header__search {
    display: none !important;
  }

  /* 2) BOTTOM: ocultar navbar horizontal de categorías */
  .pc-header__featured {
    display: none !important;
  }

  /* 3) BOTTOM: ocultar texto “Más categorías” (solo queda el icono) */
  .pc-drawer-label {
    display: none !important;
  }

  /* 4) Mostrar el buscador de la barra inferior (el que agregaste) */
  .pc-bottom-search {
    display: block !important;
    flex: 1;
    max-width: 520px;
  }

  /* 5) Layout barra inferior: hamburger | search | sucursales */
  .pc-header__bottom-inner {
    justify-content: space-between;
    gap: 14px;
  }

  .pc-bottom-left {
    flex: 0 0 auto;
  }

  .pc-branches-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  /* 6) Ajuste de buscador en tablet (un poco más compacto) */
  .pc-bottom-search .pc-search__field {
    height: 46px;
  }
  .pc-bottom-search .pc-search__btn {
    width: 38px;
    height: 38px;
    color: #fff;
  }
  .pc-bottom-search .pc-search__input {
    font-size: 15px;
  }
}

/* =========================
   MOBILE (<=768px)
   ========================= */
@media (max-width: 768px) {
  /* Oculta buscador del top */
  .pc-header__search {
    display: none !important;
  }

  /* Ocultar search default de WordPress (mobile row) */
  .pc-header__search-row {
    display: none;
  }

  /* Oculta botón de sucursales en la barra inferior */
  .pc-branches-btn {
    display: none !important;
  }
}
