/* ═══════════════════════════════════════════════════════════════════════════
   Joyería 24 — Estilos globales
   Archivo: css/global.css
   Responsabilidad: Reset, variables, menú lateral, header, footer, dark mode base
   Se usa en TODAS las páginas
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
  --50: #f4f6fb;
  --100: #e8edf6;
  --200: #ccd8eb;
  --300: #9fb9da;
  --400: #6b93c5;
  --500: #4876af;
  --600: #375e95;
  --700: #2d4b77;
  --800: #284064;
  --900: #263854;
  --950: #192438;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
* {
  font-family: "Montserrat", sans-serif;
  margin: 0;
  box-sizing: border-box;
}

/* ── Menú lateral ──────────────────────────────────────────────────────── */
.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
}
.menu-overlay.abierto {
  display: block;
}

.menu-lateral {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100vh;
  background: #111;
  z-index: 300;
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}
.menu-lateral.abierto {
  left: 0;
}

.menu-cerrar {
  align-self: flex-end;
  background: none;
  border: none;
  color: #888;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px 20px;
  transition: color 0.2s;
}
.menu-cerrar:hover {
  color: white;
}

.menu-nav {
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}
.menu-nav a {
  color: #aaa;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 400;
  padding: 14px 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
  letter-spacing: 0.3px;
  width: 100%;
}
.menu-nav a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  width: 90%;
}
.menu-nav a.activo {
  color: white;
  font-weight: 600;
}
.menu-nav a i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}
.menu-nav hr {
  border: none;
  border-top: 1px solid #222;
  margin: 10px 28px;
}

/* ── Header (sticky en todas las páginas) ──────────────────────────────── */
header {
  background-color: black;
  position: sticky;
  top: 0;
  z-index: 100;
}
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 1rem;
}
nav a {
  color: var(--50);
  text-decoration: none;
}
nav > a {
  font-size: 1rem;
}
nav div:last-child a:nth-child(2) {
  display: none;
}
nav div:last-child a:last-child {
  display: none;
}

/* ── Footer ────────────────────────────────────────────────────────────── */
footer {
  margin-top: 5rem;
  background-color: black;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 2rem 1.5rem;
  color: white;
}
footer a {
  text-decoration: none;
  color: white;
}
.footer-legal {
  margin-top: 1rem;
  text-align: center;
  max-width: 500px;
}
footer .footer-links {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  justify-content: center;
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}
footer .footer-links a {
  font-size: 1.1rem;
  padding: 0;
}
.footer-legal p {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.6;
  margin: 0 0 0.3rem 0;
}
.footer-legal p:first-child {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0.5rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Compartido
   ══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 767px) {
  nav {
    padding: 20px 2rem;
  }
  nav div:last-child a:nth-child(2) {
    display: block;
  }
  nav div:last-child a:last-child {
    display: block;
  }
  nav div:first-child {
    flex: 1;
  }
  nav a {
    font-size: 1.5rem;
  }
  nav > a {
    text-align: center;
    flex: 2;
    font-size: 1.5rem;
  }
  nav div:last-child {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 30px;
  }

  footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 4rem;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   DARK MODE — Base
   ══════════════════════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
  body {
    background: #0d0d0d;
    color: #f5f5f5;
  }
}
