:root {
  --bg:#0b0d10; --panel:#13171c; --panel2:#191f26; --text:#f5f7fa;
  --muted:#9ca6b2; --accent:#FDD301; --accent2:#D9B500; --line:#29313a;
}
*{box-sizing:border-box}
body{margin:0;background:linear-gradient(135deg,#090b0e,#151a20);color:var(--text);font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}
header{position:sticky;top:0;z-index:20;background:rgba(11,13,16,.94);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
.top{max-width:1200px;margin:auto;padding:20px 18px 14px;display:flex;gap:18px;align-items:center;justify-content:space-between}
.brand h1{margin:0;font-size:26px;letter-spacing:.5px} .brand p{margin:3px 0 0;color:var(--muted);font-size:13px}
.search{width:min(360px,55vw);background:#0d1115;border:1px solid var(--line);border-radius:12px;padding:11px 14px;color:#fff;outline:none}
.nav{max-width:1200px;margin:auto;padding:0 18px 14px;display:flex;gap:8px;overflow:auto;scrollbar-width:thin}
.nav button{white-space:nowrap;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:999px;padding:9px 14px;cursor:pointer}
.nav button.active,.nav button:hover{background:var(--accent);color:#111;border-color:var(--accent)}
main{max-width:1200px;margin:auto;padding:28px 18px 110px}
.section{margin-bottom:34px;scroll-margin-top:145px}
.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}
.section-title h2{font-size:22px;margin:0} .count{color:var(--muted);font-size:13px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px}
.card{background:linear-gradient(145deg,var(--panel),var(--panel2));border:1px solid var(--line);border-radius:16px;padding:17px;min-height:145px;display:flex;flex-direction:column;justify-content:space-between;transition:.18s}
.card:hover{transform:translateY(-2px);border-color:#53606d}
.card h3{margin:0 0 8px;font-size:16px;line-height:1.25}
.desc{font-size:12px;color:var(--muted);line-height:1.45;min-height:34px}
.bottom{display:flex;align-items:end;justify-content:space-between;gap:8px;margin-top:15px}
.price{font-size:18px;font-weight:800;color:var(--accent)}
.empty{padding:35px;text-align:center;color:var(--muted);border:1px dashed var(--line);border-radius:14px}
.qty button{border:1px solid var(--line);background:var(--panel);color:#fff;border-radius:8px;width:28px;height:28px}
@media(max-width:650px){.top{align-items:flex-start;flex-direction:column}.search{width:100%}.grid{grid-template-columns:1fr 1fr}}
@media(max-width:430px){.grid{grid-template-columns:1fr}}

/* Navegación de categorías en 2 filas */
.nav{
  max-width:1200px;
  margin:auto;
  padding:0 18px 14px;
  display:grid;
  grid-template-columns:repeat(6, max-content);
  justify-content:start;
  gap:8px;
  overflow:visible;
}
.nav button{
  white-space:nowrap;
}
@media(max-width:1100px){
  .nav{
    grid-template-columns:repeat(4, max-content);
    overflow-x:auto;
  }
}
@media(max-width:650px){
  .nav{
    display:flex;
    flex-wrap:wrap;
    overflow:visible;
  }
  .nav button{
    flex:0 0 auto;
  }
}


.nav button.active{
  background:var(--accent);
  color:#111;
  border-color:var(--accent);
}

.product-icon{
  display:inline-flex;
  width:28px;
  height:28px;
  align-items:center;
  justify-content:center;
  margin-right:5px;
  font-size:20px;
  vertical-align:middle;
}
.nav button{
  display:inline-flex;
  align-items:center;
  gap:6px;
}


.brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.brand-logo{
  display:block;
  width:150px;
  height:auto;
  max-height:72px;
  object-fit:contain;
}
.brand p{
  margin:0;
  color:var(--muted);
  font-size:13px;
}
@media(max-width:650px){
  .brand{
    justify-content:center;
    width:100%;
  }
  .brand-logo{
    width:135px;
    max-height:62px;
  }
  .brand p{
    display:none;
  }
}



/* ===== MENU HAMBURGUESA MOVIL CON SCROLL ===== */
.menu-toggle{
  display:none;
  border:1px solid var(--accent);
  background:var(--accent);
  color:#111;
  width:44px;
  height:42px;
  border-radius:10px;
  font-size:23px;
  font-weight:900;
  line-height:1;
  cursor:pointer;
  align-items:center;
  justify-content:center;
  z-index:1101;
}

@media (max-width:650px){
  header{
    position:sticky;
    top:0;
    z-index:1100;
  }

  .top{
    position:relative;
  }

  .menu-toggle{
    display:flex !important;
  }

  .nav{
    display:none !important;
    position:absolute !important;
    top:100% !important;
    left:12px !important;
    right:12px !important;
    width:auto !important;
    max-height:calc(100vh - 125px) !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    -webkit-overflow-scrolling:touch !important;
    scrollbar-width:thin;
    padding:10px !important;
    background:#101418 !important;
    border:1px solid var(--line) !important;
    border-radius:14px !important;
    box-shadow:0 14px 35px rgba(0,0,0,.75) !important;
    flex-direction:column !important;
    flex-wrap:nowrap !important;
    gap:6px !important;
  }

  .nav.mobile-open{
    display:flex !important;
  }

  .nav button{
    display:flex !important;
    width:100% !important;
    min-height:44px;
    flex:0 0 auto !important;
    align-items:center;
    justify-content:flex-start;
    text-align:left;
  }

  /* Barra de desplazamiento visible y cómoda */
  .nav::-webkit-scrollbar{
    width:7px;
  }

  .nav::-webkit-scrollbar-track{
    background:#171b20;
    border-radius:10px;
  }

  .nav::-webkit-scrollbar-thumb{
    background:#FDD301;
    border-radius:10px;
  }
}


/* ===== MOVIL: HAMBURGUESA + BUSCADOR EN LA MISMA FILA ===== */
@media (max-width:650px){
  .top{
    display:grid !important;
    grid-template-columns:44px minmax(0,1fr) !important;
    grid-template-rows:auto !important;
    gap:10px !important;
    align-items:center !important;
  }

  .brand{
    grid-column:1 / -1 !important;
    grid-row:1 !important;
  }

  .menu-toggle{
    grid-column:1 !important;
    grid-row:2 !important;
    width:44px !important;
    height:42px !important;
    margin:0 !important;
  }

  .search{
    grid-column:2 !important;
    grid-row:2 !important;
    width:100% !important;
    min-width:0 !important;
    margin:0 !important;
  }
}
