
/* ====================================================================
   ZONAEROTIK · Mobile UI overrides
   Drop this AFTER your main styles.css (or paste at the end of it).
   It only affects the mobile layout. Desktop keeps the original look.
   ==================================================================== */

/* ================== THEME TOKENS ================== */
:root{
  --brand: #ff2ec4;        /* Rosa de marca */
  --brand-900: #e125ab;
  --bg-900: #0e0e11;       /* Fondo oscuro principal */
  --bg-800: #15151a;       /* Fondo módulos */
  --border: #2a2a33;
  --text: #ffffff;
  --muted: #9aa0a6;
}

/* ================== HAMBURGUESA ================== */
.menu-toggle{
  /* Oculto por defecto: solo móvil la mostrará (ver @media más abajo) */
  display: none;
  position: relative;
  z-index: 1301;
  width: 40px; height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;                 /* separación real entre barras */
  padding: 0;
  transition: background .2s ease;
}
.menu-toggle:hover{ background: rgba(255,46,196,.12); }
.menu-toggle:focus-visible{ outline: 2px solid var(--brand); outline-offset: 2px; }

.menu-toggle span{
  display: block;
  width: 22px; height: 2px; border-radius: 2px;
  background: currentColor;           /* usa el color actual (blanco) */
  transition: transform .2s ease, opacity .2s ease;
}
/* Animación a “X” cuando el botón tenga .is-open (tu JS ya la alterna) */
.menu-toggle.is-open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2){ opacity: 0; }
.menu-toggle.is-open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* ================== OFF-CANVAS ================== */
body.offcanvas-open { overflow: hidden; }

#main-menu.offcanvas{
  position: fixed;
  top: 0; left: 0; bottom: 0; right: auto;
  width: 82vw; max-width: 320px;
  background: linear-gradient(180deg, var(--bg-900), #121217 60%, #0b0b0d);
  color: var(--text);
  z-index: 1200;
  transform: translateX(-100%);
  transition: transform .25s ease;
  box-shadow: 6px 0 24px rgba(0,0,0,.45);
  display: flex; flex-direction: column;
}
#main-menu.offcanvas.open{ transform: translateX(0); }

#main-menu .close-menu{
  align-self: flex-end;
  margin: 10px;
  width: 40px; height: 40px;
  border: 0; border-radius: 50%;
  background: #23232a; color: var(--text);
  cursor: pointer;
}

#main-menu .menu-list{
  list-style: none;
  margin: 0; padding: 8px 12px 18px 12px;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
#main-menu .menu-list li a{
  display: block;
  padding: 12px 10px; border-radius: 10px;
  color: var(--text); text-decoration: none;
  border: 1px solid transparent;
}
#main-menu .menu-list li a:hover{
  background: rgba(255,46,196,.10);
  border-color: rgba(255,46,196,.35);
}

/* Backdrop del off-canvas */
.menu-backdrop{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 1190;
}
.menu-backdrop[hidden]{ display: none; }


/* ================== ICONOS HEADER ================== */
header .nav-actions{
  display: flex; align-items: center; gap: 10px;
}
header .nav-actions a,
header .nav-actions button{
  background: transparent !important;
  border: 0 !important;
  padding: 0;
  line-height: 1;
  color: #fff;
}
header .nav-actions a:hover,
header .nav-actions button:hover{ color: var(--brand); }
header .nav-actions a:focus-visible,
header .nav-actions button:focus-visible{
  outline: 2px solid var(--brand); outline-offset: 3px;
}

/* ================== BUSCADOR MÓVIL ================== */
/* Escritorio: mantener barra clásica y ocultar UI móvil */
@media (min-width: 769px){
  header .search-bar{ display: flex !important; }
  header .nav-actions .search-toggle{ display: none !important; }
  #mobile-search{ display: none !important; }
  #main-menu.offcanvas, .menu-backdrop{ display: none !important; }
  .menu-toggle{ display: none !important; }
}

/* Móvil: ocultar barra desktop y mostrar UI móvil */
@media (max-width: 768px){
  header .search-bar{ display: none !important; }
  .menu-toggle{ display: inline-flex !important; }

  /* Botón lupa junto a iconos (solo el icono, sin recuadro) */
  header .nav-actions .search-toggle{
    display: inline-flex !important;
    align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
  }
  header .nav-actions .search-toggle:hover{ color: var(--brand); }
  header .nav-actions .search-toggle i{ font-size: 18px; line-height: 1; }

  /* Contenedor del buscador móvil */
  #mobile-search[hidden]{ display: none !important; }
  #mobile-search{
    display: block;
    padding: 10px 12px;
    background: var(--bg-800);
    border-top: 1px solid var(--border);
  }

  /* Caja del buscador móvil */
  #mobile-search .search-bar{
    display: flex !important; align-items: center; gap: 8px;
    margin: 0; padding: 6px 8px;
    background: #111418;
    border: 1px solid var(--border) !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    transition: box-shadow .2s ease, border-color .2s ease;
  }
  #mobile-search .search-bar:focus-within{
    border-color: rgba(255,46,196,.45) !important;
    box-shadow: 0 0 0 2px rgba(255,46,196,.20);
  }

  #mobile-search [data-search-input]{
    flex: 1 1 auto; width: 100%;
    border: 0; outline: none;
    padding: 10px 12px; font-size: 16px;
    color: var(--text); background: transparent;
  }
  #mobile-search [data-search-input]::placeholder{ color: var(--muted); }

  #mobile-search .search-bar button[type="submit"]{
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 44px; height: 42px;
    border: 0; border-radius: 10px;
    background: var(--brand); color: #fff;
    font-size: 14px;
    transition: background .15s ease, transform .05s ease-in-out;
  }
  #mobile-search .search-bar button[type="submit"]:hover{ background: var(--brand-900); }
  #mobile-search .search-bar button[type="submit"]:active{ transform: translateY(1px); }
}

/* ===== Mostrar menú de categorías solo en DESKTOP ===== */
@media (max-width: 768px){
  .desktop-nav { 
    display: none !important; /* oculto en móvil/tablet chica */
  }
}

@media (min-width: 769px){
  .desktop-nav { 
    display: block !important; /* visible en desktop */
  }
}
