/* Arte y Fiesta — shared header (all pages; WoodMart Header Builder) */
@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;650&family=Plus+Jakarta+Sans:wght@500;600;700&display=swap");

:root {
  --ayf-header-brand: #872e8c;
  --ayf-header-brand-deep: #6a2470;
  --ayf-header-coral: #fa6b42;
  --ayf-header-rose: #f12964;
  --ayf-header-ink: #1e1524;
  --ayf-header-muted: #5e5266;
  --ayf-header-paper: #faf7fb;
  --ayf-header-display: "Fredoka", system-ui, sans-serif;
  --ayf-header-body: "Plus Jakarta Sans", system-ui, sans-serif;
}

/* Top bar — same brand gradient everywhere (home was missing this before) */
.whb-top-bar {
  background: linear-gradient(
    90deg,
    var(--ayf-header-brand-deep) 0%,
    var(--ayf-header-brand) 45%,
    var(--ayf-header-rose) 100%
  ) !important;
}

.whb-top-bar,
.whb-top-bar a,
.whb-top-bar .wd-header-text,
.whb-top-bar .wd-header-text * {
  color: #fff !important;
}

.whb-top-bar .wd-header-text {
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: 0.82rem;
}

.whb-top-bar .wd-header-text strong {
  color: #fff !important;
  font-weight: 700;
}

/* Main header row */
.whb-general-header {
  background: #fff !important;
  border-bottom: 1px solid rgba(135, 46, 140, 0.08);
}

.whb-header-bottom {
  background: var(--ayf-header-paper) !important;
  border-bottom: 1px solid rgba(135, 46, 140, 0.08);
}

/* Logo: no custom overrides — WoodMart Header Builder controls size/padding. */

/* Search */
.whb-general-header .searchform,
.whb-general-header .wd-search-form .searchform {
  border-radius: 999px !important;
  overflow: hidden;
  border: 1px solid rgba(135, 46, 140, 0.14) !important;
  background: #faf7fb !important;
  box-shadow: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.whb-general-header .searchform:focus-within {
  border-color: rgba(135, 46, 140, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(135, 46, 140, 0.12) !important;
}

.whb-general-header .searchform input[type="text"],
.whb-general-header .searchform .s {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--ayf-header-ink) !important;
}

.whb-general-header .searchform input::placeholder {
  color: var(--ayf-header-muted) !important;
  opacity: 1;
}

.whb-general-header .searchform .searchsubmit,
.whb-general-header .searchform button[type="submit"] {
  color: var(--ayf-header-brand) !important;
}

/* Account / tools */
.whb-general-header .wd-header-my-account a,
.whb-general-header .wd-tools-element > a {
  color: var(--ayf-header-ink) !important;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.whb-general-header .wd-header-my-account a:hover,
.whb-general-header .wd-tools-element > a:hover {
  color: var(--ayf-header-brand) !important;
}

.wd-header-cart .wd-tools-count,
.wd-header-wishlist .wd-tools-count {
  background: var(--ayf-header-rose) !important;
  color: #fff !important;
}

.wd-header-cart .wd-cart-subtotal .amount,
.wd-header-cart .wd-cart-number {
  color: var(--ayf-header-ink) !important;
  font-weight: 700;
}

/* Main nav — menos amontonado + tipografía marca */
.whb-header-bottom .wd-header-main-nav,
.whb-header-bottom .wd-header-nav {
  width: 100%;
}

.whb-header-bottom .wd-nav-main,
.whb-header-bottom .wd-nav {
  --nav-gap: clamp(0.55rem, 1.1vw, 1.35rem);
  --nav-pd: 0.45rem 0.15rem;
  width: 100%;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 0.2rem var(--nav-gap);
}

.whb-header-bottom .wd-nav-main > li > a,
.whb-header-bottom .wd-nav > li > a {
  position: relative;
  font-family: var(--ayf-header-display) !important;
  font-weight: 600 !important;
  font-size: clamp(0.78rem, 0.72rem + 0.25vw, 0.88rem) !important;
  color: var(--ayf-header-ink) !important;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  padding-block: 0.45rem !important;
  padding-inline: 0.2rem !important;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.whb-header-bottom .wd-nav-main > li > a .nav-link-text,
.whb-header-bottom .wd-nav > li > a .nav-link-text {
  position: relative;
  display: inline-block;
}

/* Underline accent on hover / current */
.whb-header-bottom .wd-nav-main > li > a .nav-link-text::after,
.whb-header-bottom .wd-nav > li > a .nav-link-text::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.32rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--ayf-header-brand),
    var(--ayf-header-rose)
  );
  transform: translateX(-50%);
  transition: width 0.22s ease;
}

.whb-header-bottom .wd-nav-main > li > a:hover,
.whb-header-bottom .wd-nav > li > a:hover,
.whb-header-bottom .wd-nav-main > li.current-menu-item > a,
.whb-header-bottom .wd-nav > li.current-menu-item > a,
.whb-header-bottom .wd-nav-main > li.current-menu-ancestor > a,
.whb-header-bottom .wd-nav > li.current-menu-ancestor > a {
  color: var(--ayf-header-brand) !important;
}

.whb-header-bottom .wd-nav-main > li > a:hover .nav-link-text::after,
.whb-header-bottom .wd-nav > li > a:hover .nav-link-text::after,
.whb-header-bottom .wd-nav-main > li.current-menu-item > a .nav-link-text::after,
.whb-header-bottom .wd-nav > li.current-menu-item > a .nav-link-text::after,
.whb-header-bottom .wd-nav-main > li.current-menu-ancestor > a .nav-link-text::after,
.whb-header-bottom .wd-nav > li.current-menu-ancestor > a .nav-link-text::after {
  width: 70%;
}

/* Soften dropdown indicators */
.whb-header-bottom .menu-item-has-children > a::after,
.whb-header-bottom .menu-item-has-children > a .wd-nav-arrow {
  opacity: 0.4;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.whb-header-bottom .menu-item-has-children:hover > a::after,
.whb-header-bottom .menu-item-has-children:hover > a .wd-nav-arrow,
.whb-header-bottom .menu-item-has-children.current-menu-ancestor > a::after {
  opacity: 0.85;
  color: var(--ayf-header-brand);
}

/* Dropdown — alinear con marca (mantener puente hover de WoodMart) */
.whb-header-bottom .wd-dropdown-menu.wd-design-default {
  --wd-dropdown-width: 240px;
  --ayf-dd-gap: 14px;
  margin-top: 15px !important;
  padding: 0.45rem !important;
  border-radius: 14px !important;
  border: 1px solid rgba(135, 46, 140, 0.12) !important;
  background: #fff !important;
  box-shadow:
    0 4px 10px rgba(30, 21, 36, 0.04),
    0 18px 40px rgba(135, 46, 140, 0.12) !important;
  /* no overflow:hidden — corta el :after puente */
  overflow: visible;
  z-index: 120;
}

/* Puente hover vertical (nivel 1 bajo el nav) */
.whb-header-bottom .wd-dropdown-menu.wd-design-default::after {
  content: "" !important;
  position: absolute !important;
  inset-inline: 0 !important;
  bottom: 100% !important;
  top: auto !important;
  height: 15px !important;
  width: auto !important;
  background: transparent !important;
  pointer-events: auto !important;
}

.whb-header-bottom .wd-dropdown-menu.wd-design-default > .container {
  padding: 0 !important;
  width: auto !important;
  max-width: none !important;
}

.whb-header-bottom .wd-dropdown-menu .wd-sub-menu,
.whb-header-bottom .wd-dropdown-menu .sub-sub-menu {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

/* Links de todos los niveles del desplegable */
.whb-header-bottom .wd-dropdown-menu .wd-sub-menu > li > a,
.whb-header-bottom .wd-dropdown-menu .sub-sub-menu > li > a,
.whb-header-bottom .wd-dropdown-menu li.item-level-1 > a,
.whb-header-bottom .wd-dropdown-menu li.item-level-2 > a {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  min-height: 0 !important;
  margin: 0.1rem 0;
  padding: 0.62rem 0.85rem !important;
  border-radius: 10px !important;
  font-family: var(--ayf-header-body) !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--ayf-header-ink) !important;
  background: transparent !important;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.whb-header-bottom .wd-dropdown-menu .wd-sub-menu > li > a:hover,
.whb-header-bottom .wd-dropdown-menu .sub-sub-menu > li > a:hover,
.whb-header-bottom .wd-dropdown-menu li.item-level-1 > a:hover,
.whb-header-bottom .wd-dropdown-menu li.item-level-2 > a:hover,
.whb-header-bottom .wd-dropdown-menu .wd-sub-menu > li.current-menu-item > a,
.whb-header-bottom .wd-dropdown-menu .sub-sub-menu > li.current-menu-item > a {
  background: var(--ayf-header-paper) !important;
  color: var(--ayf-header-brand) !important;
}

/* Flyout anidado (Temáticas → Futbol, etc.): misma piel + puente horizontal */
.whb-header-bottom .wd-dropdown-menu.wd-design-default .sub-sub-menu.wd-dropdown,
.whb-header-bottom .wd-dropdown-menu.wd-design-default .wd-dropdown {
  top: 0 !important;
  left: 100% !important;
  right: auto !important;
  margin: 0 0 0 var(--ayf-dd-gap) !important;
  padding: 0.45rem !important;
  width: var(--wd-dropdown-width) !important;
  min-width: 200px;
  border-radius: 14px !important;
  border: 1px solid rgba(135, 46, 140, 0.12) !important;
  background: #fff !important;
  box-shadow:
    0 4px 10px rgba(30, 21, 36, 0.04),
    0 16px 36px rgba(135, 46, 140, 0.12) !important;
  overflow: visible !important;
  z-index: 130;
}

.whb-header-bottom .wd-dropdown-menu.wd-design-default .sub-sub-menu.wd-dropdown::after,
.whb-header-bottom .wd-dropdown-menu.wd-design-default .wd-sub-menu > li > .wd-dropdown::after {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  right: 100% !important;
  left: auto !important;
  width: var(--ayf-dd-gap) !important;
  height: auto !important;
  background: transparent !important;
  pointer-events: auto !important;
}

/* Chevron de ítems con hijos dentro del dropdown */
.whb-header-bottom .wd-dropdown-menu.wd-design-default .menu-item-has-children > a::after {
  margin-left: auto;
  color: rgba(94, 82, 102, 0.45);
}
