/* ==========================================================================
   Sumaq Tecnologia - portal de exhibicion
   CSS propio, sin framework ni paso de compilacion.
   ========================================================================== */

:root {
  --ink: #0b1220;
  --ink-2: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #eef2f7;
  --bg: #ffffff;
  --bg-soft: #f7f9fc;
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-soft: #eef2ff;
  --ok: #059669;
  --ok-soft: #ecfdf5;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --danger: #be123c;
  --danger-soft: #fff1f2;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, .07), 0 2px 4px -2px rgba(15, 23, 42, .05);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, .08), 0 8px 10px -6px rgba(15, 23, 42, .04);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1rem; }

.container { width: min(1200px, calc(100% - 2.5rem)); margin-inline: auto; }
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section--soft { background: var(--bg-soft); border-block: 1px solid var(--line-soft); }
.stack > * + * { margin-top: 1rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.25rem; border-radius: 10px;
  font-weight: 600; font-size: .95rem; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--brand-dark); }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--muted-2); }
.btn--wa { background: #16a34a; color: #fff; }
.btn--wa:hover { background: #15803d; }
.btn--block { width: 100%; justify-content: center; }
.btn--lg { padding: .9rem 1.6rem; font-size: 1rem; }

/* ---------- Cabecera ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header__bar { display: flex; align-items: center; gap: 1.5rem; height: 72px; }
.logo { display: flex; align-items: center; gap: .65rem; font-weight: 800; color: var(--ink); letter-spacing: -.03em; font-size: 1.1rem; }
.logo__mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #4f46e5, #06b6d4); display: grid; place-items: center; color: #fff; font-size: .95rem; font-weight: 800; flex: none; }
.logo__sub { display: block; font-size: .68rem; font-weight: 600; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-top: -2px; }

.nav { display: flex; gap: .35rem; margin-left: auto; align-items: center; }
.nav a { padding: .5rem .85rem; border-radius: 8px; font-weight: 550; font-size: .95rem; color: var(--ink-2); }
.nav a:hover { background: var(--bg-soft); }
.nav a.is-active { color: var(--brand); background: var(--brand-soft); }

.search { position: relative; flex: 1; max-width: 340px; }
.search input {
  width: 100%; padding: .6rem .9rem .6rem 2.4rem;
  border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: .92rem;
  background: var(--bg-soft); color: var(--ink);
}
.search input:focus { outline: 2px solid var(--brand); outline-offset: -1px; background: #fff; }
.search svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted-2); }

.burger { display: none; background: none; border: 1px solid var(--line); border-radius: 9px; padding: .5rem .6rem; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto -10%; height: 130%;
  background:
    radial-gradient(45% 55% at 18% 25%, rgba(79, 70, 229, .55), transparent 70%),
    radial-gradient(40% 50% at 82% 15%, rgba(6, 182, 212, .40), transparent 70%),
    radial-gradient(35% 45% at 60% 90%, rgba(217, 70, 239, .30), transparent 70%);
  filter: blur(10px);
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; padding: clamp(3.5rem, 7vw, 6rem) 0; }
.hero h1 { color: #fff; }
.hero p { color: #cbd5e1; font-size: 1.1rem; max-width: 52ch; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: #a5b4fc; background: rgba(99, 102, 241, .15); border: 1px solid rgba(165, 180, 252, .25); padding: .35rem .8rem; border-radius: 999px; margin-bottom: 1.25rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero__stats { display: flex; gap: 2.5rem; margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid rgba(255, 255, 255, .12); }
.hero__stat b { display: block; font-size: 1.6rem; color: #fff; font-weight: 750; letter-spacing: -.02em; }
.hero__stat span { font-size: .85rem; color: #94a3b8; }
.hero__art { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hero__tile { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius-lg); padding: 1.25rem; backdrop-filter: blur(6px); }
.hero__tile:nth-child(2) { transform: translateY(1.75rem); }
.hero__tile:nth-child(3) { transform: translateY(-1.75rem); }
.hero__tile h4 { color: #fff; font-size: .95rem; margin: .75rem 0 .15rem; }
.hero__tile p { color: #94a3b8; font-size: .82rem; margin: 0; }

/* ---------- Cabeceras de seccion ---------- */
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section__head p { color: var(--muted); margin: 0; max-width: 60ch; }
.section__head h2 { margin-bottom: .35rem; }
.link-more { color: var(--brand); font-weight: 600; font-size: .95rem; display: inline-flex; align-items: center; gap: .3rem; }
.link-more:hover { gap: .55rem; transition: gap .15s ease; }

/* ---------- Categorias ---------- */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.cat {
  position: relative; overflow: hidden; padding: 1.4rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.cat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.cat__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: .9rem; }
.cat__icon svg { width: 22px; height: 22px; }
.cat h3 { font-size: 1rem; margin-bottom: .2rem; }
.cat p { font-size: .85rem; color: var(--muted); margin: 0; }
.cat__count { position: absolute; top: 1.4rem; right: 1.4rem; font-size: .75rem; font-weight: 650; color: var(--muted-2); background: var(--bg-soft); padding: .2rem .55rem; border-radius: 999px; }

/* ---------- Tarjetas de producto ---------- */
.grid-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.card {
  display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card__media { position: relative; aspect-ratio: 4 / 3; background: var(--bg-soft); overflow: hidden; }
.card__media svg { width: 100%; height: 100%; }
.card__badge { position: absolute; top: .7rem; left: .7rem; font-size: .7rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; background: var(--ink); color: #fff; padding: .28rem .6rem; border-radius: 6px; }
.card__off { position: absolute; top: .7rem; right: .7rem; font-size: .78rem; font-weight: 750; background: var(--danger); color: #fff; padding: .28rem .55rem; border-radius: 6px; }
.card__body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; flex: 1; }
.card__brand { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-2); }
.card__title { font-size: .98rem; font-weight: 650; color: var(--ink); margin: .25rem 0 .5rem; line-height: 1.35; }
.card__desc { font-size: .85rem; color: var(--muted); margin: 0 0 .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; }
.price { font-size: 1.25rem; font-weight: 780; color: var(--ink); letter-spacing: -.02em; }
.price small { font-size: .8rem; font-weight: 600; color: var(--muted); }
.price-old { font-size: .85rem; color: var(--muted-2); text-decoration: line-through; margin-left: .4rem; }

.pill { font-size: .74rem; font-weight: 650; padding: .22rem .55rem; border-radius: 999px; white-space: nowrap; }
.pill.is-ok { background: var(--ok-soft); color: var(--ok); }
.pill.is-low { background: var(--warn-soft); color: var(--warn); }
.pill.is-out { background: var(--danger-soft); color: var(--danger); }

/* ---------- Aviso de exhibicion ---------- */
.notice {
  display: flex; gap: .9rem; align-items: flex-start;
  background: var(--brand-soft); border: 1px solid #c7d2fe;
  border-radius: var(--radius); padding: 1rem 1.2rem; color: #3730a3; font-size: .92rem;
}
.notice svg { width: 20px; height: 20px; flex: none; margin-top: .12rem; }
.notice strong { display: block; margin-bottom: .15rem; }

/* ---------- Catalogo ---------- */
.catalog { display: grid; grid-template-columns: 260px 1fr; gap: 2.5rem; align-items: start; }
.filters { position: sticky; top: 92px; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; background: #fff; }
.filters h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 1.4rem 0 .6rem; }
.filters h4:first-child { margin-top: 0; }
.filters ul { list-style: none; margin: 0; padding: 0; }
.filters li a { display: flex; justify-content: space-between; gap: .5rem; padding: .38rem .55rem; border-radius: 8px; font-size: .9rem; color: var(--ink-2); }
.filters li a:hover { background: var(--bg-soft); }
.filters li a.is-active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 650; }
.filters li span { color: var(--muted-2); font-size: .82rem; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.toolbar__count { color: var(--muted); font-size: .92rem; }
.toolbar select { padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: .9rem; background: #fff; color: var(--ink); }

.chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .75rem; font-size: .85rem; }
.chip a { color: var(--muted); font-weight: 700; }
.chip a:hover { color: var(--danger); }

.empty { text-align: center; padding: 4rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty h3 { margin-bottom: .35rem; }
.empty p { color: var(--muted); }

/* ---------- Paginacion ---------- */
.pagination { display: flex; gap: .3rem; justify-content: center; margin-top: 2.5rem; list-style: none; padding: 0; flex-wrap: wrap; }
.pagination li span, .pagination li a { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 .6rem; border: 1px solid var(--line); border-radius: 9px; font-size: .9rem; color: var(--ink-2); background: #fff; }
.pagination li a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .active span { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 650; }
.pagination .disabled span { color: var(--muted-2); background: var(--bg-soft); }

/* ---------- Ficha de producto ---------- */
.breadcrumb { display: flex; gap: .5rem; align-items: center; font-size: .85rem; color: var(--muted); padding: 1.25rem 0; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span { color: var(--muted-2); }

.product { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; padding-bottom: 3rem; }
.product__media { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-soft); aspect-ratio: 1; }
.product__media svg { width: 100%; height: 100%; }
.product__brand { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.product h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); margin: .4rem 0 .75rem; }
.product__lead { font-size: 1.05rem; color: var(--muted); }
.product__price { display: flex; align-items: baseline; gap: .75rem; margin: 1.5rem 0; flex-wrap: wrap; }
.product__price .price { font-size: 2.1rem; }
.product__meta { display: flex; gap: 1.5rem; flex-wrap: wrap; font-size: .88rem; color: var(--muted); margin-bottom: 1.5rem; }
.product__meta b { color: var(--ink-2); font-weight: 650; }
.product__actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.75rem; }

.specs { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: .92rem; }
.specs th, .specs td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line-soft); }
.specs th { color: var(--muted); font-weight: 600; width: 45%; }
.specs td { color: var(--ink-2); font-weight: 550; }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 0; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; background: #fff; }
.panel h3 { font-size: .95rem; margin-bottom: .25rem; }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { display: flex; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line-soft); }
.info-list li:last-child { border-bottom: 0; }
.info-list svg { width: 20px; height: 20px; color: var(--brand); flex: none; margin-top: .2rem; }
.info-list b { display: block; color: var(--ink); font-size: .95rem; }
.info-list span { color: var(--muted); font-size: .92rem; }

/* ---------- Marcas ---------- */
.brands { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.brand-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .55rem 1.35rem; font-weight: 650; color: var(--ink-2); font-size: .95rem; transition: all .15s ease; }
.brand-chip:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }

/* ---------- Pie ---------- */
.footer { background: var(--ink); color: #94a3b8; padding: 3.5rem 0 2rem; margin-top: 1rem; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2.5rem; }
.footer h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer a { color: #94a3b8; font-size: .92rem; }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: .55rem; }
.footer p { font-size: .92rem; }
.footer__bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; justify-content: space-between; gap: 1rem; font-size: .85rem; flex-wrap: wrap; }
.footer .logo { color: #fff; margin-bottom: 1rem; }
.footer .logo__sub { color: #64748b; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cats { grid-template-columns: repeat(2, 1fr); }
  .grid-products { grid-template-columns: repeat(3, 1fr); }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { max-width: 460px; }
  .catalog { grid-template-columns: 1fr; }
  .filters { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav { display: none; }
  .nav.is-open { display: flex; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; border-bottom: 1px solid var(--line); padding: .75rem 1.25rem 1.25rem; gap: .15rem; }
  .burger { display: block; margin-left: auto; }
  .search { display: none; }
  .grid-products { grid-template-columns: repeat(2, 1fr); gap: .9rem; }
  .product, .contact { grid-template-columns: 1fr; gap: 2rem; }
  .hero__stats { gap: 1.5rem; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .card__body { padding: .85rem .9rem 1rem; }
}

@media (max-width: 420px) {
  .cats { grid-template-columns: 1fr; }
  .grid-products { grid-template-columns: 1fr; }
}

/* Icono de Sumaq como marca del logo */
svg.logo__mark { background: none; border-radius: 0; padding: 0; }
