/* ═══════════════════════════════════════════════
   GLOBAL.CSS — Estilos compartidos
   ConvertirTallas.es
═══════════════════════════════════════════════ */

/* ── VARIABLES ─────────────────────────────── */
:root {
  --bg:           #faf9f6;
  --surface:      #ffffff;
  --border:       rgba(0,0,0,0.09);
  --border-strong:rgba(0,0,0,0.18);
  --text:         #1a1814;
  --muted:        #7a7771;
  --accent:       #c8522a;
  --accent-bg:    #fdf1ec;
  --radius:       10px;
  --font:         'DM Sans', sans-serif;
  --font-display: 'DM Serif Display', serif;
  --nav-height:   56px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #141210;
    --surface:      #1e1c19;
    --border:       rgba(255,255,255,0.08);
    --border-strong:rgba(255,255,255,0.18);
    --text:         #f0ede8;
    --muted:        #8a8780;
    --accent:       #e8724a;
    --accent-bg:    #2a1a14;
  }
}

/* ── RESET ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img   { max-width: 100%; display: block; }
a     { color: inherit; }

/* ── TIPOGRAFÍA ────────────────────────────── */
h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.15; }
h2 { font-family: var(--font-display); font-size: 1.7rem; }
h3 { font-size: 1rem; font-weight: 500; }
p  { font-size: 0.95rem; color: var(--muted); line-height: 1.75; }

/* ── NAV ───────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 0.5px solid var(--border);
  padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-height);
}
.nav-logo { font-family: var(--font-display); font-size: 20px; text-decoration: none; color: var(--text); }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { font-size: 13px; color: var(--muted); text-decoration: none; transition: color 0.15s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }

/* ── FOOTER ────────────────────────────────── */
.footer {
  border-top: 0.5px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 3rem;
}
.footer a { color: var(--muted); text-decoration: underline; }
.footer p + p { margin-top: 6px; }

/* ── CONTENEDOR ────────────────────────────── */
.container { max-width: 760px; margin: 0 auto; padding: 0 1.5rem; }
.container-wide { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }

/* ── HERO ──────────────────────────────────── */
.hero { padding: 3.5rem 0 2rem; text-align: center; }
.hero h1 { margin-bottom: 0.75rem; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { max-width: 520px; margin: 0 auto 1.5rem; font-size: 1.05rem; }

/* ── CARD ──────────────────────────────────── */
.card {
  background: var(--surface);
  border: 0.5px solid var(--border-strong);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.card-title {
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
}

/* ── BOTONES ───────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 0.5px solid var(--border-strong);
  background: transparent;
  font-size: 14px; font-family: var(--font);
  cursor: pointer; color: var(--muted);
  text-decoration: none;
  transition: all 0.15s;
}
.btn:hover { color: var(--text); border-color: var(--text); }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover { opacity: 0.85; color: var(--bg); }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { opacity: 0.85; color: #fff; }

/* ── TABS ──────────────────────────────────── */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 1.5rem; }
.tab {
  padding: 7px 16px; border-radius: 999px;
  border: 0.5px solid var(--border-strong);
  background: transparent; font-size: 13px;
  cursor: pointer; color: var(--muted);
  font-family: var(--font); transition: all 0.15s;
}
.tab:hover { color: var(--text); border-color: var(--text); }
.tab.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ── INPUTS ────────────────────────────────── */
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group label { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
input[type="text"],
input[type="number"],
select {
  width: 100%; padding: 10px 14px;
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg); color: var(--text);
  font-size: 15px; font-family: var(--font);
  outline: none; transition: border 0.15s;
}
input:focus, select:focus { border-color: var(--accent); }
input[type="range"] { width: 100%; accent-color: var(--accent); }

/* ── BADGES ────────────────────────────────── */
.badge-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.badge {
  font-size: 12px; padding: 4px 12px;
  border: 0.5px solid var(--border-strong);
  border-radius: 999px; color: var(--muted);
}

/* ── ANUNCIOS ──────────────────────────────── */
.ad-wrap { margin-bottom: 1.5rem; }
.ad-label { font-size: 10px; color: var(--muted); text-align: center; margin-bottom: 4px; letter-spacing: 0.05em; text-transform: uppercase; }
.ad-wrap ins { display: block; background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); overflow: hidden; }

/* ── DIVIDER ───────────────────────────────── */
.divider { height: 0.5px; background: var(--border); margin: 2rem 0; }

/* ── BACK LINK ─────────────────────────────── */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted);
  text-decoration: none; margin-bottom: 1.5rem;
  transition: color 0.15s;
}
.back-link:hover { color: var(--text); }

/* ── EMPTY STATE ───────────────────────────── */
.empty { font-size: 14px; color: var(--muted); padding: 1rem 0; }

/* ── PRODUCTO CARD ─────────────────────────── */
.producto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.producto-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: border 0.15s;
  display: flex; flex-direction: column;
}
.producto-card:hover { border-color: var(--border-strong); }
.producto-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; background: var(--bg); }
.producto-card .producto-info { padding: 10px 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.producto-card .producto-marca { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.producto-card .producto-nombre { font-size: 13px; font-weight: 500; line-height: 1.3; }
.producto-card .producto-precio { font-size: 14px; font-weight: 500; margin-top: auto; padding-top: 6px; }
.producto-card .producto-talla { font-size: 11px; color: var(--muted); }

/* ── RESPONSIVE ────────────────────────────── */
@media (max-width: 600px) {
  .card { padding: 1.25rem; }
  .nav-links { display: none; }
  .hero { padding: 2rem 0 1rem; }
  .producto-grid { grid-template-columns: repeat(2, 1fr); }
}
