/* ==========================================================================
   Tienda de tecnología — sistema de diseño (adaptado de la plantilla Stitch)
   Minimalista / monocromo / mobile-first / Colombia
   ========================================================================== */
:root {
  --primary: #000000;
  --on-primary: #ffffff;
  --bg: #ffffff;
  --surface: #f5f5f5;
  --surface-2: #efeded;
  --border: #e5e5e5;
  --text: #1b1c1c;
  --muted: #757575;
  --accent: #c4a24c;         /* dorado: acentos (anillo/monograma del logo) */
  --accent-soft: #f7f0dd;    /* dorado pálido: fondos sutiles */
  --gold-bright: #e8cc84;    /* dorado brillante: detalles sobre negro */
  --success: #16a34a;
  --wa: #25d366;             /* verde WhatsApp */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --maxw: 1200px;
  --header-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { height: 46px; width: auto; display: block; }
.brand-word { font-family: 'Playfair Display', Georgia, serif; font-size: 21px; font-weight: 700; letter-spacing: 0.01em; color: var(--text); white-space: nowrap; }
.brand-word b { color: var(--accent); font-weight: 700; }
.brand span { color: var(--accent); }
@media (max-width: 520px) { .brand-word { display: none; } }
.search {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border-radius: 999px; padding: 8px 16px;
  border: 1px solid transparent;
}
.search:focus-within { border-color: var(--primary); background: #fff; }
.search input { border: 0; background: transparent; outline: none; width: 100%; font-size: 15px; color: var(--text); }
.search svg { flex: none; color: var(--muted); }
.btn-wa {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--wa); color: #062e12; font-weight: 700;
  padding: 9px 16px; border-radius: 999px; border: 0; font-size: 14px; white-space: nowrap;
}
.btn-wa:hover { filter: brightness(0.97); }
.header .btn-wa .label { display: none; }
@media (min-width: 640px) { .header .btn-wa .label { display: inline; } }

/* ---------- Hero ---------- */
.hero { background: var(--primary); color: var(--on-primary); }
.hero__inner { padding: 40px 16px 44px; max-width: var(--maxw); margin: 0 auto; }
.hero h1 { font-size: clamp(28px, 6vw, 46px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; margin: 0 0 12px; }
.hero h1 span { color: var(--gold-bright); }
.hero p { color: #c9c9c9; font-size: 16px; max-width: 560px; margin: 0 0 20px; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
  padding: 7px 12px; border-radius: 999px;
}
.chip--light { background: rgba(255,255,255,0.12); color: #fff; }
.chip--accent { background: var(--accent); color: #1b1c1c; }

/* ---------- Trust bar ---------- */
.trust { border-bottom: 1px solid var(--border); background: var(--surface); }
.trust__inner { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 20px; padding: 14px 16px; max-width: var(--maxw); margin: 0 auto; }
@media (min-width: 720px) { .trust__inner { grid-template-columns: repeat(4, 1fr); } }
.trust__item { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.trust__item svg { color: var(--accent); flex: none; }

/* ---------- Category chips ---------- */
.cats { position: sticky; top: var(--header-h); z-index: 40; background: var(--bg); border-bottom: 1px solid var(--border); }
.cats__scroll { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; max-width: var(--maxw); margin: 0 auto; scrollbar-width: none; }
.cats__scroll::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: none; border: 1px solid var(--border); background: #fff; color: var(--text);
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap;
}
.cat-chip .count { color: var(--muted); font-weight: 500; }
.cat-chip.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
.cat-chip.is-active .count { color: #bdbdbd; }

/* ---------- Section title ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 0 16px; }
.section-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.section-head .muted { color: var(--muted); font-size: 14px; }

/* ---------- Product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding-bottom: 40px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); transition: box-shadow .18s, transform .18s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card__imgwrap { position: relative; aspect-ratio: 1 / 1; background: var(--surface); cursor: pointer; }
.card__imgwrap img { width: 100%; height: 100%; object-fit: cover; }
.card__tag { position: absolute; top: 8px; left: 8px; }
.card__out { position: absolute; inset: 0; background: rgba(255,255,255,.6); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: var(--muted); }
.card__body { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__name { font-size: 14px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__cat { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.card__actions { margin-top: auto; display: flex; gap: 8px; }
.card .btn-wa { flex: 1; justify-content: center; padding: 10px; font-size: 13px; }
.btn-ghost { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 10px 12px; font-size: 13px; font-weight: 600; }
.btn-ghost:hover { border-color: var(--primary); }

/* ---------- Empty / loading ---------- */
.state { text-align: center; padding: 60px 16px; color: var(--muted); }
.spinner { width: 34px; height: 34px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Modal (detalle) ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.is-open { display: block; }
.modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.modal__panel {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(920px, 94vw); max-height: 92vh; overflow: auto; background: #fff;
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.modal__close { position: absolute; top: 12px; right: 12px; z-index: 2; background: #fff; border: 1px solid var(--border); border-radius: 999px; width: 38px; height: 38px; font-size: 18px; line-height: 1; }
.modal__grid { display: grid; grid-template-columns: 1fr; }
@media (min-width: 760px) { .modal__grid { grid-template-columns: 1fr 1fr; } }
.modal__media { background: var(--surface); }
.modal__media img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.modal__thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.modal__thumbs img { width: 60px; height: 60px; border-radius: var(--radius-sm); object-fit: cover; border: 2px solid transparent; cursor: pointer; }
.modal__thumbs img.is-active { border-color: var(--primary); }
.modal__info { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.modal__info h3 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.modal__desc { color: #333; font-size: 15px; }
.modal__info .btn-wa { justify-content: center; padding: 14px; font-size: 15px; }
.pay-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pay-badge { font-size: 11px; font-weight: 700; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }

/* ---------- Cómo comprar ---------- */
.how { background: var(--surface); border-top: 1px solid var(--border); }
.how__inner { max-width: var(--maxw); margin: 0 auto; padding: 36px 16px; }
.how h2 { text-align: center; font-size: 22px; font-weight: 800; margin: 0 0 24px; }
.how__steps { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .how__steps { grid-template-columns: repeat(3, 1fr); } }
.how__step { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.how__num { width: 34px; height: 34px; border-radius: 999px; background: var(--primary); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.how__step h4 { margin: 0 0 6px; font-size: 16px; }
.how__step p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Footer ---------- */
.footer { background: var(--primary); color: #d0d0d0; }
.footer__inner { max-width: var(--maxw); margin: 0 auto; padding: 36px 16px; display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer__inner { grid-template-columns: 2fr 1fr 1fr; } }
.footer .brand { color: #fff; }
.footer h5 { color: #fff; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 12px; }
.footer a { display: block; padding: 3px 0; font-size: 14px; }
.footer a:hover { color: #fff; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); text-align: center; padding: 16px; font-size: 12px; color: #9a9a9a; }

/* WhatsApp flotante */
.fab-wa { position: fixed; right: 16px; bottom: 16px; z-index: 60; width: 56px; height: 56px; border-radius: 999px; background: var(--wa); color: #062e12; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); border: 0; }
.fab-wa svg { width: 30px; height: 30px; }
