/* ═══════════════════════════════════════════════════════════
   FUNGIVERSE — HEADER CSS (Seed.com Redesign v2)
   3 capas: Announcement · Header · Sticky Pills
   ═══════════════════════════════════════════════════════════ */

/* ─── CAPA 1: ANNOUNCEMENT BAR (Rotativo) ──────────────────── */
.fv-announcement {
  position: relative;
  z-index: 1001;
  height: var(--fv-announcement-height, 36px);
  background: var(--fv-announcement-bg);
  overflow: hidden;
}
.fv-announcement__track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fv-announcement__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--fv-font-body, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  white-space: nowrap;
}
.fv-announcement__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.fv-announcement__slide:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ─── CAPA 2: HEADER PRINCIPAL ──────────────────────────────── */
.fv-header {
  position: relative;
  z-index: 1000;
  background: #fff;
  height: var(--fv-header-height, 64px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.fv-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 20px;
}

/* Logo */
.fv-header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.fv-header__logo-img {
  height: 32px;
  width: auto;
  display: block;
}

/* Nav — estilo limpio */
.fv-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}
.fv-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.fv-nav__item {
  position: relative;
}
.fv-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  color: var(--fv-text, #000000);
  font-family: var(--fv-font-body, 'Inter', sans-serif);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.fv-nav__link:hover,
.fv-nav__item.is-current > .fv-nav__link {
  background: rgba(0, 0, 0, 0.04);
}
.fv-nav__label {
  pointer-events: none;
}
.fv-nav__caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.4;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.fv-nav__item--has-panel:hover > .fv-nav__link .fv-nav__caret,
.fv-nav__item--has-panel.is-open > .fv-nav__link .fv-nav__caret {
  transform: rotate(180deg);
  opacity: 0.7;
}

/* Acciones derecha */
.fv-header__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.fv-header__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--fv-text, #000000);
  text-decoration: none;
  transition: background 0.2s ease;
}
.fv-header__icon:hover {
  background: rgba(0, 0, 0, 0.05);
}
.fv-header__cart {
  position: relative;
}
.fv-header__cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  background: var(--fv-red, #e84d44);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  border-radius: 9999px;
  padding: 0 4px;
}

/* CTA pill en header */
.fv-header__cta {
  font-size: 13px;
  padding: 8px 20px;
}

/* Hamburguesa mobile — 2 líneas estilo Seed */
.fv-header__toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 8px;
  transition: background 0.2s ease;
}
.fv-header__toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}
.fv-header__toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--fv-text, #000000);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ─── CAPA 3: STICKY PILLS ─────────────────────────────────── */
.fv-header-sticky {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-140%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.3s ease;
}
.fv-header-sticky.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.fv-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 9999px;
  padding: 6px 8px;
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.08),
              0 0 0 1px rgba(0, 0, 0, 0.04);
}
.fv-pill--nav {
  padding-left: 12px;
}
.fv-pill--actions {
  padding-right: 6px;
}

/* Logo en pill */
.fv-pill__logo {
  display: flex;
  align-items: center;
  margin-right: 8px;
}
.fv-pill__logo img {
  height: 22px;
  width: auto;
}

/* Nav en pill */
.fv-pill__nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.fv-pill__nav a {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-family: var(--fv-font-body, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 500;
  color: var(--fv-text, #000000);
  text-decoration: none;
  border-radius: 9999px;
  transition: background 0.2s ease;
  white-space: nowrap;
}
.fv-pill__nav a:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* Iconos en pill */
.fv-pill__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--fv-text, #000000);
  text-decoration: none;
  transition: background 0.2s ease;
}
.fv-pill__icon:hover {
  background: rgba(0, 0, 0, 0.06);
}
.fv-pill__cart {
  position: relative;
}
.fv-pill__cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 14px;
  height: 14px;
  background: var(--fv-red, #e84d44);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  border-radius: 9999px;
  padding: 0 3px;
}

/* CTA en pill */
.fv-pill__cta {
  font-size: 12px;
  padding: 7px 16px;
}

/* ─── MEGA MENÚ PANELS ──────────────────────────────────────── */
.fv-mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 640px;
  max-width: 860px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.1),
              0 0 0 1px rgba(0, 0, 0, 0.04);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  padding: 0;
  overflow: hidden;
  margin-top: 8px;
}
.fv-nav__item--has-panel:hover > .fv-mega-menu,
.fv-nav__item--has-panel.is-open > .fv-mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.fv-mega-menu__inner {
  display: grid;
  grid-template-columns: 1fr 280px;
  min-height: 280px;
}

.fv-mega-menu__content {
  padding: 28px 32px;
}

/* Intro del panel */
.fv-mega-menu__intro {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.fv-mega-menu__eyebrow {
  display: block;
  font-family: var(--fv-font-body, 'Inter', sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fv-kraft, #e84d44);
  margin-bottom: 4px;
}
.fv-mega-menu__title {
  font-family: var(--fv-font-body, 'Inter', sans-serif);
  font-size: 14px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.6);
  line-height: 1.5;
  margin: 0;
}

/* Columnas */
.fv-mega-menu__columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.fv-mega-menu__column-title {
  font-family: var(--fv-font-body, 'Inter', sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.4);
  margin: 0 0 10px 0;
}
.fv-mega-menu__links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fv-mega-menu__link-item {
  margin-bottom: 2px;
}
.fv-mega-menu__link {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.fv-mega-menu__link:hover {
  background: rgba(0, 0, 0, 0.03);
}
.fv-mega-menu__link-label {
  display: block;
  font-family: var(--fv-font-body, 'Inter', sans-serif);
  font-size: 14px;
  font-weight: 500;
  color: var(--fv-text, #000000);
  line-height: 1.3;
}
.fv-mega-menu__link-description {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.5);
  line-height: 1.4;
  margin-top: 2px;
}

/* Imagen lateral */
.fv-mega-menu__media {
  position: relative;
  background: var(--fv-beige, #F5F5F5);
  overflow: hidden;
}
.fv-mega-menu__media-frame {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.fv-mega-menu__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fv-mega-menu__media-cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 16px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  color: var(--fv-text, #000000);
  font-family: var(--fv-font-body, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 9999px;
  transition: background 0.2s ease;
}
.fv-mega-menu__media-cta:hover {
  background: #fff;
}

/* ─── MOBILE DRAWER ─────────────────────────────────────────── */
.fv-mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  visibility: hidden;
}
.fv-mobile-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

/* Overlay */
.fv-mobile-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.fv-mobile-drawer.is-open .fv-mobile-drawer__overlay {
  opacity: 1;
}

/* Panel */
.fv-mobile-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 85vw);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(24px);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.fv-mobile-drawer.is-open .fv-mobile-drawer__panel {
  transform: translateX(0);
}

/* Drawer top */
.fv-mobile-drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.fv-mobile-drawer__logo img {
  height: 28px;
  width: auto;
}
.fv-mobile-drawer__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fv-text, #000000);
  border-radius: 50%;
  transition: background 0.2s ease;
}
.fv-mobile-drawer__close:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Drawer nav */
.fv-mobile-drawer__nav {
  flex: 1;
  padding: 16px 24px;
}
.fv-mobile-drawer__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fv-mobile-drawer__list li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.fv-mobile-drawer__list a {
  display: block;
  padding: 16px 0;
  font-family: var(--fv-font-body, 'Inter', sans-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--fv-text, #000000);
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.fv-mobile-drawer__list a:hover {
  opacity: 0.6;
}

/* Drawer acciones */
.fv-mobile-drawer__actions {
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.fv-mobile-drawer__action-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--fv-font-body, 'Inter', sans-serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--fv-text, #000000);
  text-decoration: none;
}
.fv-mobile-drawer__cta {
  text-align: center;
  padding: 12px 24px;
  font-size: 15px;
}

/* Drawer footer links */
.fv-mobile-drawer__footer {
  padding: 16px 24px;
  display: flex;
  gap: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}
.fv-mobile-drawer__footer a {
  font-family: var(--fv-font-body, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.5);
  text-decoration: none;
  transition: color 0.2s ease;
}
.fv-mobile-drawer__footer a:hover {
  color: var(--fv-text, #000000);
}

/* ─── BOTÓN PILL (definido también en buttons.css, fallback aquí) ── */
.fv-btn--pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 9999px;
  padding: 8px 20px;
  font-family: var(--fv-font-body, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--fv-text, #000000);
  color: #fff;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.25s ease;
}
.fv-btn--pill:hover {
  background: #1a1a1a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ─── RESPONSIVE ────────────────────────────────────────────── */

/* Tablet: ocultar nav desktop, mostrar hamburguesa */
@media (max-width: 1024px) {
  .fv-nav {
    display: none;
  }
  .fv-header__cta {
    display: none;
  }
  .fv-header__toggle {
    display: flex;
  }
  .fv-header-sticky .fv-pill--nav .fv-pill__nav {
    display: none;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .fv-announcement__cta {
    display: none;
  }
  .fv-announcement__tripack-badge {
    display: none;
  }
  .fv-announcement__message {
    font-size: 12px;
  }
  .fv-header__logo-img {
    height: 26px;
  }
  .fv-header {
    height: 56px;
  }
  .fv-pill__nav {
    display: none;
  }
  .fv-pill--nav {
    padding: 6px 12px;
  }
  .fv-pill__cta {
    font-size: 11px;
    padding: 6px 14px;
  }
  .fv-header-sticky {
    top: 10px;
  }
}

/* Ultrachico */
@media (max-width: 380px) {
  .fv-announcement__message span:not(.fv-announcement__icon) {
    font-size: 11px;
  }
  .fv-header__icon:not(.fv-header__cart) {
    display: none;
  }
}

/* ─── BODY LOCK (cuando drawer está abierto) ─────────────────── */
body.fv-drawer-open {
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════
   SEARCH OVERLAY
   ═══════════════════════════════════════════════════════════ */
.fv-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fv-search-overlay.is-open {
  pointer-events: auto;
  opacity: 1;
}

.fv-search-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.fv-search-overlay__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  margin: 15vh auto 0;
  padding: 0 1.5rem;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.fv-search-overlay.is-open .fv-search-overlay__panel {
  transform: translateY(0);
}

.fv-search-overlay__form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border-radius: 999px;
  padding: 0.5rem 1rem 0.5rem 1.25rem;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
}

.fv-search-overlay__icon {
  flex-shrink: 0;
  color: rgba(0, 0, 0, 0.4);
}

.fv-search-overlay__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.1rem;
  font-family: var(--fv-font-body, 'Inter', sans-serif);
  font-weight: 500;
  color: #111;
  background: transparent;
  padding: 0.75rem 0;
}

.fv-search-overlay__input::placeholder {
  color: rgba(0, 0, 0, 0.35);
}

.fv-search-overlay__close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 50%;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

.fv-search-overlay__close:hover {
  background: rgba(232, 77, 68, 0.1);
  color: var(--fv-red, #e84d44);
}

/* Search toggle button reset */
.fv-search-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}