/* ============================================================
 * Uniclima Child Theme — Header Polish + Topbar tweaks + Dropdown repuestos
 * ------------------------------------------------------------
 * Origen: Astra Custom Layouts hook 461024
 *         "UCN Cleanup — hide Astra Footer duplicate"
 *         (action: wp_head, location: basic-global)
 * Fecha migracion: 2026-04-29 (agent E3)
 *
 * Bloques mergeados:
 *   - ucn-header-polish.css (10962 bytes)
 *   - ucn-hide-topbar-wa.css (142 bytes)
 *   - ucn-dropdown-repuestos-white.css (2754 bytes)
 * Total bytes: 13860
 * ============================================================ */

/* UCN-HEADER-POLISH-V3 — responsive, zoom-friendly, real DOM selectors */

/* Kill horizontal scroll caused by translated mobile menu panel */
html, body { overflow-x: clip !important; }
.ucn-mobile-menu { overflow: hidden !important; }
.ucn-mobile-menu:not(.is-open) .ucn-mobile-menu__panel { visibility: hidden !important; }

/* ======== Topbar ======== */
#ucn-header .ucn-topbar {
  display: block !important;
  background: #0f172a !important;
  color: #fff !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
  padding: 0 !important;
}
#ucn-header .ucn-topbar__inner {
  max-width: min(1280px, 100%) !important;
  margin: 0 auto !important;
  padding: 7px clamp(12px, 2vw, 24px) !important;
  display: flex !important;
  align-items: center !important;
  gap: clamp(10px, 1.3vw, 18px) !important;
  flex-wrap: wrap !important;
}
#ucn-header .ucn-topbar a,
#ucn-header .ucn-topbar span { color: #fff !important; text-decoration: none !important; }
#ucn-header .ucn-topbar__item {
  display: inline-flex !important; align-items: center !important; gap: 6px !important;
  color: #fff !important; font-size: 12.5px !important; line-height: 1 !important;
  text-decoration: none !important; transition: color .2s ease !important;
}
#ucn-header .ucn-topbar__item:hover { color: #ff6b7e !important; }
#ucn-header .ucn-topbar__item svg { width: 14px !important; height: 14px !important; flex-shrink: 0 !important; }
#ucn-header .ucn-topbar__sep { width: 1px !important; height: 12px !important; background: rgba(255,255,255,.2) !important; display: inline-block !important; }
#ucn-header .ucn-topbar__right { margin-left: auto !important; display: inline-flex !important; align-items: center !important; gap: 14px !important; }
body #ucn-header .ucn-topbar__whatsapp { display: inline-flex !important; align-items: center !important; gap: 6px !important; color: #fff !important; text-decoration: none !important; font-weight: 600 !important; }
body #ucn-header .ucn-topbar__whatsapp:hover { color: #25d366 !important; }
#ucn-header .ucn-topbar__whatsapp svg { width: 14px !important; height: 14px !important; }

/* ======== Fixed header (sticky breaks when body has overflow:clip; use fixed + spacer) ======== */
#ucn-header {
  position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; z-index: 999 !important;
  width: 100% !important;
  background: #fff !important;
  box-shadow: 0 1px 0 rgba(15,23,42,.06) !important;
  transition: box-shadow .2s ease !important;
  color-scheme: light !important;
}
body.admin-bar #ucn-header { top: 32px !important; }
#ucn-header.is-scrolled,
#ucn-header.scrolled { box-shadow: 0 6px 20px -10px rgba(15,23,42,.15) !important; }
/* Spacer so content doesn't slide under the fixed header (header.css already sets 96px; keep parity) */
body, body.astra-addon-pro { scroll-padding-top: 120px !important; }

/* ======== Navbar container (the real one is .ucn-navbar__inner) ======== */
#ucn-header .ucn-navbar { background: #fff !important; }
#ucn-header .ucn-navbar__inner {
  display: flex !important;
  align-items: center !important;
  gap: clamp(12px, 1.8vw, 24px) !important;
  max-width: min(1280px, 100%) !important;
  margin: 0 auto !important;
  padding: 10px clamp(12px, 2vw, 24px) !important;
  box-sizing: border-box !important;
}

/* Logo: fixed width, never shrinks below nothing */
#ucn-header .ucn-logo { flex: 0 0 auto !important; }
#ucn-header .ucn-logo__img { height: auto !important; max-height: 44px !important; width: auto !important; }

/* Nav desktop: grows but shrinks first */
#ucn-header .ucn-nav-desktop {
  flex: 1 1 auto !important;
  display: flex !important;
  align-items: center !important;
  gap: clamp(2px, 0.4vw, 8px) !important;
  justify-content: flex-start !important;
  min-width: 0 !important;
}
#ucn-header .ucn-nav-link {
  padding: 8px 10px !important;
  font-size: 14px !important;
  white-space: nowrap !important;
}

/* Search container: the REAL selector is .ucn-search (not .ucn-search-pill) */
#ucn-header .ucn-search {
  flex: 0 1 auto !important;
  width: clamp(180px, 22vw, 300px) !important;
  max-width: 100% !important;
  min-width: 0 !important;
}
#ucn-header .ucn-search-pill,
#ucn-header .ucn-search .ucn-search-pill { width: 100% !important; }
#ucn-header .ucn-search-pill__field {
  display: flex !important; align-items: center !important; gap: 8px !important;
  height: 36px !important; padding: 0 4px 0 12px !important;
  background: #fff !important;
  border: 1px solid rgba(200,16,46,.45) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  transition: border-color .2s ease, box-shadow .2s ease !important;
}
#ucn-header .ucn-search-pill__field:focus-within { border-color: #C8102E !important; box-shadow: 0 0 0 3px rgba(200,16,46,.1) !important; }
#ucn-header .ucn-search-pill__field > svg,
#ucn-header .ucn-search-pill__field > .ucn-icon--search-inner {
  width: 14px !important; height: 14px !important; color: #C8102E !important; stroke: #C8102E !important;
  flex-shrink: 0 !important; background: transparent !important; border: 0 !important; margin: 0 !important;
}
#ucn-header .ucn-search-pill__input {
  flex: 1 1 auto !important; min-width: 0 !important;
  border: 0 !important; outline: 0 !important; background: transparent !important;
  color: #0f172a !important; font-size: 13px !important; font-family: inherit !important;
  padding: 0 !important; height: 100% !important;
}
#ucn-header .ucn-search-pill__input::placeholder { color: #94a3b8 !important; }
#ucn-header .ucn-search-pill__voice {
  width: 28px !important; height: 28px !important; padding: 0 !important;
  background: transparent !important; border: 0 !important; border-radius: 999px !important;
  color: #64748b !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  flex-shrink: 0 !important; cursor: pointer !important;
}
#ucn-header .ucn-search-pill__voice:hover { background: #fef1f2 !important; color: #C8102E !important; }
#ucn-header .ucn-search-pill__voice svg { width: 14px !important; height: 14px !important; }

/* Actions (Acceder + cart) — never shrink */
#ucn-header .ucn-actions {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}
#ucn-header .ucn-action-btn { white-space: nowrap !important; }

/* Mobile search overlay reuse */
#ucn-header .ucn-search-overlay {
  background: #fff !important; padding: 10px 12px !important; color-scheme: light !important;
}
#ucn-header .ucn-search-overlay__bar { display: flex !important; align-items: center !important; gap: 8px !important; max-width: 720px !important; margin: 0 auto !important; width: 100% !important; }
#ucn-header .ucn-search-overlay__pill,
body #ucn-header .ucn-search-overlay__pill.ups-index-ready {
  flex: 1 1 auto !important; display: flex !important; align-items: center !important; gap: 10px !important;
  padding: 8px 16px 8px 18px !important; height: 44px !important;
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 999px !important; box-shadow: none !important;
}
#ucn-header .ucn-search-overlay__pill:focus-within { border-color: #C8102E !important; box-shadow: 0 0 0 3px rgba(200,16,46,.08) !important; }
#ucn-header .ucn-search-overlay__pill > svg,
#ucn-header .ucn-search-overlay__pill > .ucn-icon--search-inner { width: 18px !important; height: 18px !important; color: #C8102E !important; stroke: #C8102E !important; flex-shrink: 0 !important; background: transparent !important; border: 0 !important; margin: 0 !important; }
#ucn-header .ucn-search-overlay__input { flex: 1 1 auto !important; border: 0 !important; outline: 0 !important; background: transparent !important; font-size: 14px !important; padding: 0 !important; color: #0f172a !important; font-family: inherit !important; min-width: 0 !important; }
#ucn-header .ucn-search-overlay__input::placeholder { color: #94a3b8 !important; }
#ucn-header .ucn-search-overlay__close { width: 40px !important; height: 40px !important; padding: 0 !important; background: transparent !important; border: 0 !important; border-radius: 999px !important; color: #64748b !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; flex-shrink: 0 !important; cursor: pointer !important; }
#ucn-header .ucn-search-overlay__close:hover { background: #f1f5f9 !important; color: #C8102E !important; }

/* Mobile search trigger button */
#ucn-header .ucn-search__mobile-trigger {
  width: 40px !important; height: 40px !important; padding: 0 !important;
  border-radius: 999px !important; color: #0f172a !important;
  background: transparent !important; border: 0 !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
}
#ucn-header .ucn-search__mobile-trigger:hover { background: #fef1f2 !important; color: #C8102E !important; }
#ucn-header .ucn-search__mobile-trigger svg { width: 20px !important; height: 20px !important; }

/* ======== Breakpoints ======== */
/* Between 1024-1279: nav + pill compressed, Acceder still visible */
@media (max-width: 1279px) {
  #ucn-header .ucn-nav-desktop { gap: 0 !important; }
  #ucn-header .ucn-nav-link { padding: 8px 6px !important; font-size: 13.5px !important; }
  #ucn-header .ucn-search { width: clamp(160px, 18vw, 220px) !important; }
}
/* Between 900-1099: hide pill (move to mobile trigger), keep nav */
@media (max-width: 1099px) and (min-width: 900px) {
  #ucn-header .ucn-search { width: auto !important; flex: 0 0 auto !important; }
  #ucn-header .ucn-search .ucn-search-pill { display: none !important; }
  #ucn-header .ucn-search__mobile-trigger { display: inline-flex !important; }
  #ucn-header .ucn-nav-link { padding: 8px 8px !important; }
}
/* <= 899: collapse to mobile pattern (logo + icons + hamburger) */
@media (max-width: 899px) {
  #ucn-header .ucn-nav-desktop { display: none !important; }
  #ucn-header .ucn-search { width: auto !important; flex: 0 0 auto !important; }
  #ucn-header .ucn-search .ucn-search-pill { display: none !important; }
  #ucn-header .ucn-search__mobile-trigger { display: inline-flex !important; }
}
/* Topbar simplification */
@media (max-width: 1023px) {
  #ucn-header .ucn-topbar__inner { justify-content: center !important; gap: 10px !important; padding: 6px 14px !important; }
  #ucn-header .ucn-topbar__right { margin-left: 0 !important; }
  #ucn-header .ucn-topbar__item--phone,
  #ucn-header .ucn-topbar__item--hours { display: none !important; }
}
@media (max-width: 640px) {
  #ucn-header .ucn-topbar__item--shipping { display: none !important; }
  #ucn-header .ucn-navbar__inner { padding: 8px 12px !important; gap: 10px !important; }
  #ucn-header .ucn-action-btn--user .ucn-action-btn__label,
  #ucn-header .ucn-action-btn--user span { display: none !important; }
}

/* Zoom tolerance: ensure we never overflow when user zooms */
@media (max-width: 380px) {
  #ucn-header .ucn-logo__img { max-height: 36px !important; }
  #ucn-header .ucn-actions { gap: 4px !important; }
}

/* UCN-HIDE-TOPBAR-WHATSAPP */
.ucn-topbar__whatsapp { display: none !important; }
.ucn-topbar__inner { justify-content: center !important; }

/* UCN-DROPDOWN-REPUESTOS-WHITE */
/* White card, 2 columns, bullet dot, no scroll, bigger type */
.ucn-dropdown--scrollable {
  left: 50% !important;
  transform: translateX(-50%) translateY(-4px) !important;
}
.ucn-nav-item--has-dropdown:hover .ucn-dropdown--scrollable {
  transform: translateX(-50%) translateY(0) !important;
}

.ucn-dropdown--scrollable .ucn-dropdown__list {
  max-height: none !important;
  overflow: visible !important;
  min-width: 680px !important;
  padding: 16px !important;
  border-radius: 14px !important;
  background: #fff !important;
  border: 1px solid rgba(0,0,0,.06) !important;
  box-shadow: 0 20px 48px -16px rgba(15,23,36,.22), 0 6px 14px -6px rgba(15,23,36,.12) !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  column-gap: 10px !important;
  row-gap: 2px !important;
}

.ucn-dropdown--scrollable .ucn-dropdown__link {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 16px !important;
  border-radius: 10px !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  color: #1f2937 !important;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease !important;
  white-space: nowrap !important;
}
.ucn-dropdown--scrollable .ucn-dropdown__link::before {
  content: "" !important;
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: #d1d5db !important;
  flex-shrink: 0 !important;
  transition: background 160ms ease, transform 160ms ease !important;
}
.ucn-dropdown--scrollable .ucn-dropdown__link:hover,
.ucn-dropdown--scrollable .ucn-dropdown__link--active {
  background: #fff5f6 !important;
  color: #C8102E !important;
  transform: translateX(2px) !important;
}
.ucn-dropdown--scrollable .ucn-dropdown__link:hover::before,
.ucn-dropdown--scrollable .ucn-dropdown__link--active::before {
  background: #C8102E !important;
  transform: scale(1.3) !important;
}

/* Responsive */
@media (max-width: 1200px) {
  .ucn-dropdown--scrollable .ucn-dropdown__list {
    min-width: 600px !important;
  }
  .ucn-dropdown--scrollable .ucn-dropdown__link {
    font-size: 15px !important;
    padding: 11px 14px !important;
  }
}
@media (max-width: 1024px) {
  .ucn-dropdown--scrollable .ucn-dropdown__list {
    min-width: 520px !important;
  }
}
@media (max-width: 920px) {
  .ucn-dropdown--scrollable {
    left: 0 !important;
    transform: translateY(-4px) !important;
  }
  .ucn-nav-item--has-dropdown:hover .ucn-dropdown--scrollable {
    transform: translateY(0) !important;
  }
  .ucn-dropdown--scrollable .ucn-dropdown__list {
    grid-template-columns: 1fr !important;
    min-width: 300px !important;
  }
}
