/* ── PREVENT HORIZONTAL OVERFLOW & SHIFTING ──────────────── */
html, body {
  overflow-x: hidden !important;
}

/* ═══════════════════════════════════════════════
   FURSIFEX SHENZHEN — Componente Base
   Header + Footer + Variables globales
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Open+Sans:wght@300;400;500;600&display=swap');

/* ── VARIABLES GLOBALES ──────────────────────── */
:root {
  /* ── Color corporativo (cambiar aquí para actualizar todo el sitio) */
  --fx-principal:       #3d9be8;
  --fx-principal-light: #6db8f5;
  --fx-principal-pale:  #dbeafe;

  --fx-navy:        #0d1b2a;
  --fx-navy-mid:    #162840;
  --fx-navy-light:  #1e3a56;
  --fx-gold:        var(--fx-principal);
  --fx-gold-light:  var(--fx-principal-light);
  --fx-gold-pale:   var(--fx-principal-pale);
  --fx-white:       #ffffff;
  --fx-off-white:   #f5f7fa;
  --fx-text:        #2d3748;
  --fx-text-muted:  #64748b;
  --fx-border:      #e2e8f0;

  --fx-font-h:  'Montserrat', sans-serif;
  --fx-font-b:  'Open Sans', sans-serif;

  --fx-r:   6px;
  --fx-sh:  0 2px 12px rgba(0,0,0,.07);
  --fx-shm: 0 6px 24px rgba(0,0,0,.11);
  --fx-t:   all 0.28s ease;

  --fx-w:  1200px;
  --fx-hh: 78px;
}

/* ── RESET BASE ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--fx-font-b);
  color: var(--fx-text);
  line-height: 1.65;
  background: var(--fx-white);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; }

/* ── UTILITIES GLOBALES ──────────────────────── */
.fx-container {
  max-width: var(--fx-w);
  margin: 0 auto;
  padding: 0 28px;
}
.fx-section-header { margin-bottom: 48px; }
.fx-section-header--center { text-align: center; }

.fx-section-tag {
  display: inline-block;
  font-family: var(--fx-font-h);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fx-gold);
  margin-bottom: 10px;
}
.fx-section-tag--gold { color: var(--fx-gold-light); }

.fx-section-title {
  font-family: var(--fx-font-h);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 700;
  color: var(--fx-navy);
  line-height: 1.2;
  margin-bottom: 18px;
}
.fx-section-title--white { color: var(--fx-white); }

.fx-btn {
  display: inline-block;
  padding: 13px 30px;
  font-family: var(--fx-font-h);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--fx-r);
  transition: var(--fx-t);
  white-space: nowrap;
}
.fx-btn--gold {
  background: var(--fx-gold);
  color: var(--fx-white);
  box-shadow: 0 2px 10px rgba(61,155,232,.35);
}
.fx-btn--gold:hover { background: var(--fx-gold-light); transform: translateY(-2px); }
.fx-btn--outline {
  background: transparent;
  color: var(--fx-white);
  border: 2px solid rgba(255,255,255,.75);
}
.fx-btn--outline:hover { background: var(--fx-white); color: var(--fx-navy); }
.fx-btn--outline-gold {
  background: transparent;
  color: var(--fx-gold);
  border: 2px solid var(--fx-gold);
}
.fx-btn--outline-gold:hover { background: var(--fx-gold); color: var(--fx-white); }

/* ══════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════ */
.fx-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10002; /* above drawer(10000) and overlay(9998) so toggle is always clickable */
  height: var(--fx-hh);
  background: rgba(13,27,42,0);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
.fx-header--scrolled {
  background: rgba(13,27,42,0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.fx-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}
.fx-brand { display: flex; align-items: center; flex-shrink: 0; }
.fx-brand__img { height: 42px; width: auto; filter: brightness(0) invert(1); }

/* ── MENÚ WORDPRESS ──────────────────────────── */

/* El <nav> generado por [editor_ia_menu class="fx-nav"] */
.fx-nav {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
}

/* WordPress puede envolver en un <div> antes del <ul> */
.fx-nav > div { display: contents; }

/* La <ul class="menu"> principal */
.fx-nav .menu {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Cada <li class="menu-item"> */
.fx-nav .menu > .menu-item { position: relative; }

/* Links de primer nivel */
.fx-nav .menu > .menu-item > a {
  display: block;
  padding: 8px 12px;
  font-family: var(--fx-font-h);
  font-size: 0.79rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  letter-spacing: 0.02em;
  border-radius: var(--fx-r);
  transition: var(--fx-t);
  white-space: nowrap;
}
.fx-nav .menu > .menu-item > a:hover,
.fx-nav .menu > .menu-item-has-children:hover > a {
  color: var(--fx-white);
  background: rgba(255,255,255,.08);
}

/* Último ítem del menú (Contacto) como botón */
.fx-nav .menu > .menu-item:last-child > a {
  background: var(--fx-gold);
  color: var(--fx-white);
  padding: 8px 18px;
}
.fx-nav .menu > .menu-item:last-child > a:hover {
  background: var(--fx-gold-light);
}

/* Submenú <ul class="sub-menu"> */
.fx-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--fx-navy);
  border-top: 3px solid var(--fx-gold);
  border-radius: 0 0 var(--fx-r) var(--fx-r);
  box-shadow: var(--fx-shm);
  list-style: none;
  padding: 8px 0 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: var(--fx-t);
  pointer-events: none;
  z-index: 100;
}
.fx-nav .menu-item-has-children:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.fx-nav .sub-menu .menu-item a {
  display: block;
  padding: 11px 18px;
  font-family: var(--fx-font-h);
  font-size: 0.78rem;
  color: rgba(255,255,255,.75);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: var(--fx-t);
}
.fx-nav .sub-menu .menu-item:last-child a { border-bottom: none; }
.fx-nav .sub-menu .menu-item a:hover {
  color: var(--fx-white);
  background: rgba(255,255,255,.06);
  padding-left: 26px;
}

/* ── HAMBURGER ───────────────────────────────── */
.fx-nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  gap: 5px;
  flex-shrink: 0;
}
.fx-nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--fx-white);
  border-radius: 2px;
  transition: var(--fx-t);
  transform-origin: center;
}
.fx-nav__toggle.fx-toggle--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.fx-nav__toggle.fx-toggle--open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.fx-nav__toggle.fx-toggle--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */
.fx-footer {
  background: var(--fx-navy);
  border-top: 3px solid var(--fx-gold);
}
.fx-footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  padding-top: 60px;
  padding-bottom: 48px;
}
.fx-footer__logo {
  height: 38px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 18px;
}
.fx-footer__heading {
  font-family: var(--fx-font-h);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fx-gold);
  margin-bottom: 12px;
}
.fx-footer__text {
  font-size: 0.87rem;
  color: rgba(255,255,255,.5);
  line-height: 1.7;
  margin-bottom: 20px;
}
.fx-footer__text strong { color: rgba(255,255,255,.75); }

/* Menú footer generado por WP */
.fx-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 16px;
  margin-bottom: 22px;
}
.fx-footer__nav .menu {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 16px;
  list-style: none;
  padding: 0; margin: 0;
}
.fx-footer__nav .menu-item a {
  font-size: 0.82rem;
  color: rgba(255,255,255,.5);
  transition: color 0.2s;
}
.fx-footer__nav .menu-item a:hover { color: var(--fx-gold); }

.fx-footer__social { display: flex; gap: 10px; }
.fx-footer__social a {
  width: 34px; height: 34px;
  background: rgba(255,255,255,.07);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.55);
  transition: var(--fx-t);
}
.fx-footer__social a:hover { background: var(--fx-gold); color: var(--fx-white); }

.fx-footer__contact-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 22px;
}
.fx-footer__contact-block:last-child { margin-bottom: 0; }
.fx-footer__country {
  font-family: var(--fx-font-h);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--fx-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
}
.fx-footer__contact-block a,
.fx-footer__contact-block p {
  font-size: 0.84rem;
  color: rgba(255,255,255,.5);
  transition: color 0.2s;
}
.fx-footer__contact-block a:hover { color: var(--fx-gold); }

.fx-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 16px 0;
}
.fx-footer__bottom p {
  font-size: 0.78rem;
  color: rgba(255,255,255,.28);
  text-align: center;
}

/* ══════════════════════════════════════════════
   RESPONSIVE HEADER / FOOTER
   ══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  /* Header sólido en móvil */
  .fx-header { background: rgba(13,27,42,0.97); }

  /* Hamburguesa visible y encima del panel */
  .fx-nav__toggle { display: flex; position: relative; z-index: 10001; }

  /* PANEL LATERAL DRAWER */
  .fx-nav {
    display: flex !important;      /* override display:none desktop */
    flex-direction: column;
    justify-content: flex-start;   /* CRÍTICO: override justify-content:flex-end del desktop */
    align-items: stretch;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(300px, 82vw);
    height: 100%;
    height: 100dvh;
    background: var(--fx-navy);    /* color sólido — no rgba */
    overflow-y: auto;
    overflow-x: hidden;
    padding: calc(var(--fx-hh) + 12px) 0 40px;  /* debajo del header */
    z-index: 10000;                /* CRÍTICO — ver z-index hierarchy */
    transform: translateX(100%);   /* oculto por defecto */
    visibility: hidden;            /* Evita desbordamiento y lectura de pantalla cuando está cerrado */
    transition: transform 0.32s cubic-bezier(.4,0,.2,1), visibility 0.32s;
    box-shadow: -6px 0 32px rgba(0,0,0,.45);
  }
  .fx-nav--open {
    visibility: visible !important;
  }

  /* Items del menú */
  .fx-nav .menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .fx-nav .menu > .menu-item { position: static; }
  .fx-nav .menu > .menu-item > a {
    display: block;               /* NUNCA flex — causa text overflow */
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;               /* blanco explícito — no heredar del desktop */
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    text-decoration: none;
    background: transparent;
    line-height: 1.3;
    overflow: hidden;
  }

  /* Chevron de submenú */
  .fx-nav .menu > .menu-item-has-children > a::after {
    content: ' ›';
    color: var(--fx-gold);
    font-size: 1.1rem;
    font-weight: 400;
  }
  .fx-nav .menu > .menu-item-has-children.fx-sub--open > a {
    background: rgba(212,168,0,.12);
  }
  .fx-nav .menu > .menu-item-has-children.fx-sub--open > a::after {
    content: ' ›';
    display: inline-block;
    transform: rotate(90deg);
  }

  /* Último ítem como botón CTA dorado */
  .fx-nav .menu > .menu-item:last-child > a {
    margin: 18px 20px 4px;
    border-radius: 8px;
    text-align: center;
    background: var(--fx-gold);
    color: var(--fx-navy) !important;
    font-weight: 700;
    border-bottom: none;
    padding: 15px 20px;
    letter-spacing: 0.03em;
  }
  .fx-nav .menu > .menu-item:last-child > a::after { display: none; }

  /* Sub-menú acordeón */
  .fx-nav .sub-menu {
    position: static !important;    /* override position:absolute del desktop */
    visibility: visible !important; /* override visibility:hidden del desktop */
    opacity: 1 !important;          /* override opacity:0 del desktop */
    transform: none !important;
    pointer-events: auto !important;
    box-shadow: none !important;
    background: rgba(0,0,0,.25);
    list-style: none;
    display: none;                  /* cerrado por defecto */
    padding: 0;
    margin: 0;
    min-width: 0 !important;
  }
  .fx-nav .menu-item-has-children.fx-sub--open > .sub-menu {
    display: block;                 /* abre cuando tiene fx-sub--open */
  }
  .fx-nav .sub-menu .menu-item a {
    display: block;
    padding: 14px 24px 14px 40px;
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(255,255,255,.82);
    border-bottom: 1px solid rgba(255,255,255,.06);
    text-decoration: none;
    white-space: normal;
    line-height: 1.3;
  }

  /* Grid de Más Productos en móvil */
  .fx-mp__grid { grid-template-columns: repeat(2, 1fr); }

  /* Ajuste del Footer en móvil para evitar columnas estrechas y desbordamientos */
  .fx-footer__grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 48px;
    padding-bottom: 40px;
  }
}

@media (max-width: 480px) {
  .fx-masproductos { padding: 60px 0; }
  .fx-mp__grid { grid-template-columns: 1fr; }
}

/* Overlay para oscurecer el fondo */
.fx-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9998;
  backdrop-filter: blur(2px);
  transition: opacity 0.32s ease;
}
.fx-nav-overlay--open { display: block; }

/* ── FIXED BLUE BACKGROUND FOR SPECIFIC BLOG PAGE ──────────────── */
.page-id-21635 .fx-header {
  background: rgba(13, 27, 42, 0.97) !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,.3) !important;
}


/* ==========================================================================
   AJUSTE DE ESPACIADO DE TARJETAS EN MÓVIL
   ========================================================================== */
@media (max-width: 768px) {
  .fx-mp__grid {
    display: grid !important;
    gap: 32px !important;
  }
}


/* Ocultar el overlay 'Ver más' unstyled en las tarjetas de Más Productos */
.fx-mp__overlay {
  display: none !important;
}
