/* assets/css/styles.css
   ✅ Unificado y sin choques (catálogo + auth)
   - Evita colisiones de .wrap .card .btn .actions .brand
   - Mantiene el look negro + azul 💙 + naranja 🧡
*/

/* =========================
   THEME
========================= */
:root{
  --bg:#07070a;
  --panel:#0f1117;
  --card:#121623;

  --text:#eef2ff;
  --muted:#a6b0d4;
  --line:rgba(255,255,255,.10);

  --blue:#1f3bff;
  --orange:#ff7a00;

  --radius:18px;
  --radius2:14px;
  --shadow: 0 18px 40px rgba(0,0,0,.45);

  --container:1180px;
  --gutter:18px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 500px at 20% 0%, rgba(31,59,255,.18), transparent 60%),
    radial-gradient(1200px 500px at 80% 0%, rgba(255,122,0,.15), transparent 60%),
    var(--bg);
}

/* =========================
   HEADER (CATÁLOGO)
========================= */
.top{
  position:sticky; top:0; z-index:10;
  background: rgba(7,7,10,.78);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
  padding:18px 18px 12px;
}

.brand{
  max-width:var(--container);
  margin:0 auto;
  display:flex;
  gap:14px;
  align-items:center;
}

.logo{
  width:76px; height:76px;
  object-fit:contain;
  filter: drop-shadow(0 12px 22px rgba(0,0,0,.55));
}

.brand-text h1{
  margin:0;
  letter-spacing:.5px;
  font-size:30px;
}
.brand-text h1 span{ color: var(--blue); }
.brand-text p{ margin:4px 0 0; color:var(--muted); font-size:13px; }

.nav{
  max-width:var(--container);
  margin:12px auto 0;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}

.navlink{
  color:var(--text);
  text-decoration:none;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(18,22,35,.35);
}
.navlink:hover{ border-color: rgba(31,59,255,.55); }
.navlink.active{ border-color: rgba(255,122,0,.65); }

.navbtn{
  color:#0b0b0f;
  text-decoration:none;
  padding:10px 14px;
  border-radius:14px;
  background: linear-gradient(90deg, var(--orange), #ff9b2f);
  font-weight:800;
}

.cart{
  margin-left:auto;
  text-decoration:none;
  color:var(--text);
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(31,59,255,.45);
}

/* =========================
   LAYOUT (CATÁLOGO)
========================= */
.wrap{
  max-width:var(--container);
  margin:0 auto;
  padding:var(--gutter);
}

/* Hero */
.hero{
  margin-top:10px;
  padding:18px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18,22,35,.85), rgba(18,22,35,.55));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
}

.hero h2{ margin:0 0 6px; font-size:22px; }
.hero p{ margin:0; color:var(--muted); }

.badge{
  width:56px; height:56px;
  display:grid; place-items:center;
  border-radius:16px;
  background: rgba(31,59,255,.12);
  border: 1px solid rgba(31,59,255,.35);
}

/* Search */
.searchbar{
  display:flex;
  gap:10px;
  align-items:center;
  margin:18px 0 14px;
}

.searchbar input{
  flex:1;
  padding:14px 14px;
  border-radius:16px;
  border:1px solid var(--line);
  background: rgba(18,22,35,.55);
  color:var(--text);
  outline:none;
}

.searchbar button{
  padding:14px 16px;
  border-radius:16px;
  border:1px solid rgba(255,122,0,.6);
  background: rgba(255,122,0,.12);
  color:var(--text);
  font-weight:800;
  cursor:pointer;
}
.searchbar button:hover{ background: rgba(255,122,0,.18); }

/* Sections */
.section-head{ margin-top:6px; }
.section-head h3{ margin:14px 0 4px; font-size:18px; }
.section-head p{ margin:0 0 12px; color:var(--muted); font-size:13px; }

/* Categories */
.cats{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:14px;
  margin:12px 0 18px;
}

.cat{
  padding:20px 14px;
  border-radius:18px;
  background: linear-gradient(180deg, rgba(18,22,35,.92), rgba(18,22,35,.58));
  border:1px solid rgba(31,59,255,.35);
  color:var(--text);
  font-size:16px;
  font-weight:900;
  cursor:pointer;
  box-shadow: var(--shadow);
  text-transform: uppercase;
  letter-spacing:.4px;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.cat:hover{
  border-color: rgba(255,122,0,.75);
  transform: translateY(-1px);
}

.cat.active{
  border-color: rgba(255,122,0,.75);
  background: linear-gradient(180deg, rgba(255,122,0,.12), rgba(18,22,35,.65));
}

/* Products */
.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:16px;
}

/* ✅ IMPORTANTE:
   No se redefine .card/.btn en auth para NO romper el catálogo.
*/
.card{
  border-radius:18px;
  background: linear-gradient(180deg, rgba(18,22,35,.95), rgba(18,22,35,.65));
  border:1px solid var(--line);
  box-shadow: var(--shadow);
  padding:14px;
}

.thumb{
  border-radius:16px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
  height:180px;
  background: rgba(255,255,255,.03);
}
.thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.card h4{ margin:12px 0 6px; font-size:17px; }
.price{ color: var(--orange); font-weight:1000; margin-bottom:6px; }

.desc{
  color:var(--muted);
  font-size:13px;
  min-height:36px;
  line-height:1.35;
}

/* botones catálogo */
.actions{ display:flex; gap:10px; margin-top:10px; }

.btn{
  flex:1;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,122,0,.55);
  background: rgba(255,122,0,.12);
  color:var(--text);
  font-weight:900;
  cursor:pointer;
}
.btn:hover{ background: rgba(255,122,0,.18); }

.btn.ghost{
  border-color: rgba(31,59,255,.5);
  background: rgba(31,59,255,.10);
}
.btn.ghost:hover{ background: rgba(31,59,255,.16); }

.loading{
  padding:16px;
  border-radius:16px;
  border:1px dashed rgba(255,255,255,.16);
  color:var(--muted);
}

/* Footer catálogo */
.footer{
  margin:26px 0 14px;
  padding:16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(18,22,35,.35);
  color: var(--muted);
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.footer strong{ color: var(--text); }
.footer .mini{ opacity:.9; }

/* =========================
   AUTH (login/registro/forgot/reset)
   ✅ Totalmente aislado: NO toca .wrap/.card/.btn/.actions del catálogo
========================= */

/* barra superior auth */
.auth-top{
  max-width:var(--container);
  margin:24px auto 0;
  padding:0 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

/* ✅ Evita choque con .brand del header: se usa más específico */
.auth-top .brand{
  max-width:none;
  margin:0;
  display:flex;
  align-items:center;
  gap:12px;
}

.auth-top .brand img{
  width:44px;height:44px;
  object-fit:contain;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.45));
}

.auth-top .brand h1{
  margin:0;
  font-size:18px;
  letter-spacing:.6px;
}

.auth-top .brand h1 span{ color:var(--blue); }

.auth-top .brand small{
  display:block;
  color:var(--muted);
  margin-top:2px;
}

/* contenedor auth */
.auth-wrap{
  min-height: calc(100vh - 120px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px 16px 44px;
}

.auth-grid{
  width: min(980px, 100%);
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
  align-items:stretch;
}

@media (max-width: 860px){
  .auth-grid{ grid-template-columns: 1fr; }
}

/* tarjeta auth (usa auth-card, NO .card) */
.auth-card{
  width:100%;
  max-width:520px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(0,0,0,.45);
  overflow:hidden;
}

.auth-card:first-child{ justify-self:end; }
.auth-card:last-child{ justify-self:start; }

@media (max-width: 860px){
  .auth-card{ max-width:560px; justify-self:center; }
  .auth-card:first-child,
  .auth-card:last-child{ justify-self:center; }
}

.auth-head{ padding:16px 16px 0; }
.auth-title{ margin:0; font-size:20px; letter-spacing:.3px; }
.auth-sub{ margin:8px 0 0; color:var(--muted); font-size:13px; line-height:1.35; }
.auth-body{ padding:16px; }

.auth-field label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin:0 0 6px;
}

.auth-input{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  color:#fff;
  outline:none;
}

.auth-input:focus{
  border-color: rgba(31,59,255,.55);
  box-shadow: 0 0 0 3px rgba(31,59,255,.18);
}

.auth-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}

.auth-btn{
  border:none;
  cursor:pointer;
  padding:11px 14px;
  border-radius:999px;
  font-weight:800;
  color:#0b0f18;
  background: linear-gradient(90deg, var(--orange), #ffb03a);
  box-shadow: 0 14px 28px rgba(255,138,31,.20);
}

.auth-btn2{
  border:1px solid rgba(255,255,255,.14);
  cursor:pointer;
  padding:10px 13px;
  border-radius:999px;
  color:#fff;
  background: rgba(0,0,0,.18);
  text-decoration:none;
}

.auth-link{ color: var(--blue); text-decoration:none; }
.auth-link:hover{ text-decoration:underline; }

.auth-alert{
  margin-top:12px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  font-size:13px;
}
.auth-alert.ok{ border-color: rgba(60,210,130,.35); }
.auth-alert.err{ border-color: rgba(255,80,90,.35); }

.footer-mini{
  max-width:var(--container);
  margin:0 auto;
  padding:14px 18px 20px;
  color:rgba(232,238,252,.55);
  font-size:12px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

/* =========================
   RESPONSIVE CATÁLOGO
========================= */
@media (max-width: 980px){
  .cats,.grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px){
  .cats,.grid{ grid-template-columns: 1fr; }
  .cart{ margin-left:0; }
  .hero{ flex-direction:column; align-items:flex-start; }
}
.quick.active{
  outline:2px solid rgba(255,138,0,.55);
  box-shadow:0 0 0 4px rgba(255,138,0,.12);
}
.wrap-contacto{
max-width:600px;
margin:60px auto;
padding:20px;
}

.card-contacto{
background:#ffffff;
border-radius:20px;
padding:30px;
box-shadow:0 10px 40px rgba(0,0,0,.25);
border:1px solid #ddd;
}

.card-contacto h2{
margin-bottom:20px;
color:#111;
}

.contact-item{
margin-bottom:15px;
}

.contact-item strong{
display:block;
font-size:14px;
color:#555;
}

.contact-item p{
margin:0;
font-size:16px;
color:#000;
}

.btn-whatsapp{
display:inline-block;
margin-top:20px;
padding:12px 20px;
border-radius:999px;
background:linear-gradient(135deg,#25D366,#128C7E);
color:white;
text-decoration:none;
font-weight:bold;
}