/* SmartPerú — estilos de la tienda pública.
   Sin dependencias, sin frameworks. Mobile-first.
   Paleta: rojo peruano (#D91A21), antracita (#0F172A), oro (#F5B301), blanco roto (#FAFAF7). */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --rojo: #d91a21;
  --rojo-dark: #a51017;
  --antracita: #0f172a;
  --texto: #1a1a1a;
  --tenue: #5b6472;
  --oro: #f5b301;
  --linea: #e6e6e2;
  --fondo: #fafaf7;
  --tarjeta: #ffffff;
  --sombra: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --radio: 14px;
  --max: 1180px;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  color: var(--texto);
  background: var(--fondo);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--rojo);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Cabecera ---------- */

.topbar {
  background: var(--antracita);
  color: #d3d6de;
  font-size: 13px;
  padding: 8px 0;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar a {
  color: #fff;
}

header.site {
  background: #fff;
  border-bottom: 1px solid var(--linea);
  position: sticky;
  top: 0;
  z-index: 10;
}

header.site .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--antracita);
}

.brand .logo-mark {
  width: 34px;
  height: 34px;
  background: var(--rojo);
  color: #fff;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.brand .accent {
  color: var(--rojo);
}

nav.main {
  display: flex;
  gap: 20px;
  font-size: 15px;
}

nav.main a {
  color: var(--texto);
  font-weight: 500;
}

nav.main a:hover {
  color: var(--rojo);
  text-decoration: none;
}

/* ---------- Hero ---------- */

.hero {
  background:
    radial-gradient(1200px 400px at 20% -10%, rgba(217, 26, 33, 0.08), transparent 60%),
    radial-gradient(800px 300px at 100% 0%, rgba(245, 179, 1, 0.10), transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--fondo) 100%);
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--linea);
}

.hero h1 {
  font-size: clamp(30px, 5vw, 48px);
  margin: 0 0 14px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--antracita);
}

.hero h1 .accent {
  color: var(--rojo);
}

.hero p.lead {
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--tenue);
  max-width: 640px;
  margin: 0 0 24px;
}

.hero .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--rojo);
  color: #fff;
}

.btn-primary:hover {
  background: var(--rojo-dark);
}

.btn-ghost {
  background: #fff;
  color: var(--antracita);
  border-color: var(--linea);
}

.btn-ghost:hover {
  border-color: var(--antracita);
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
}

.btn-whatsapp:hover {
  background: #1ebe5b;
}

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.stat {
  background: #fff;
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 18px 20px;
  box-shadow: var(--sombra);
}

.stat .num {
  font-size: 28px;
  font-weight: 800;
  color: var(--antracita);
  letter-spacing: -0.02em;
}

.stat .lbl {
  font-size: 13px;
  color: var(--tenue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* ---------- Secciones ---------- */

section {
  padding: 56px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-head h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--antracita);
}

.section-head p {
  margin: 0;
  color: var(--tenue);
  font-size: 14px;
}

/* ---------- Filtros ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.chip {
  background: #fff;
  border: 1px solid var(--linea);
  color: var(--texto);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

.chip:hover {
  border-color: var(--antracita);
}

.chip.active {
  background: var(--antracita);
  color: #fff;
  border-color: var(--antracita);
}

/* ---------- Productos ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background: var(--tarjeta);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sombra);
  border-color: #d8d8d2;
}

.card .img {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, #f3f4f7 0%, #e7eaf0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card .placeholder {
  font-size: 38px;
  color: #b0b6c1;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.card .badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  font-weight: 600;
}

.badge.sale {
  background: var(--rojo);
}

.badge.tag {
  background: var(--oro);
  color: #2a1f00;
}

.card .body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card .cat {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tenue);
}

.card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  color: var(--antracita);
  font-weight: 700;
}

.card .price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}

.price {
  font-size: 19px;
  font-weight: 800;
  color: var(--antracita);
  letter-spacing: -0.01em;
}

.price.sale {
  color: var(--rojo);
}

.price.old {
  font-size: 14px;
  color: var(--tenue);
  text-decoration: line-through;
  font-weight: 500;
}

.card .meta {
  font-size: 12px;
  color: var(--tenue);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.card .btn-row {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
}

.card .btn-row .btn {
  flex: 1;
  justify-content: center;
  padding: 9px 12px;
  font-size: 13px;
}

.empty {
  text-align: center;
  color: var(--tenue);
  padding: 40px 20px;
  font-size: 15px;
}

/* ---------- Sección Meta ---------- */

.meta-band {
  background: var(--antracita);
  color: #e7e9ee;
}

.meta-band h2 {
  color: #fff;
}

.meta-band .section-head p {
  color: #aab1bf;
}

.integrations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.integration {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radio);
  padding: 22px;
}

.integration h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.integration h3 .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

.integration p {
  margin: 0 0 12px;
  color: #c2c7d2;
  font-size: 14px;
  line-height: 1.5;
}

.integration code {
  font-size: 13px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.10);
  padding: 6px 10px;
  border-radius: 8px;
  display: inline-block;
  word-break: break-all;
  color: #f5f5f5;
}

/* ---------- Pie ---------- */

footer.site {
  background: #0a0f1d;
  color: #9aa2b1;
  padding: 36px 0 28px;
  font-size: 14px;
}

footer.site .row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

footer.site a {
  color: #d3d6de;
}

footer.site .brand {
  color: #fff;
  font-size: 17px;
}

footer.site .brand .logo-mark {
  width: 26px;
  height: 26px;
  font-size: 13px;
}

/* ---------- Móvil ---------- */

@media (max-width: 640px) {
  nav.main {
    display: none;
  }
  .hero {
    padding: 48px 0 40px;
  }
  section {
    padding: 40px 0;
  }
}
