/* Velnox: producto tecnico/utilitario. Grafito + naranja de senalizacion de seguridad. */
:root {
  --ink: #15191d;
  --ink-2: #3b434b;
  --muted: #5a636b;
  --line: #d5dadd;
  --bg: #eef0f1;
  --card: #ffffff;
  --signal: #c2410c;      /* texto blanco sobre esto: 5.2:1 */
  --signal-hi: #ff6a2b;   /* solo sobre grafito */
  --wa: #0b7a43;          /* texto blanco: 5.4:1 */
  --r: 6px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem; line-height: 1.55; overflow-x: hidden;
}
img { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
.top :focus-visible, .hero :focus-visible, .how :focus-visible, .foot :focus-visible { outline-color: #fff; }
.pm-x:focus-visible, .pm-prev:focus-visible, .pm-next:focus-visible, #pm-wa:focus-visible { outline-color: var(--ink); }
#productos, #como-comprar { scroll-margin-top: 60px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: 0 1.4rem; border-radius: var(--r); border: 0;
  font: 700 1rem/1 'Archivo', sans-serif; text-decoration: none; cursor: pointer;
  transition: background-color .15s;
}
.btn-sm { min-height: 40px; padding: 0 1rem; font-size: .9375rem; }
.btn-main { background: var(--signal); color: #fff; }
.btn-main:hover { background: #a8380a; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #096639; }

/* cabecera: la marca es solo tipografia, condensada y pesada */
.top { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 20; }
.top-in { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.logo {
  font-weight: 900; font-stretch: 62%; font-size: 1.75rem; letter-spacing: .06em;
  text-decoration: none; line-height: 1;
}

/* hero */
.hero { background: var(--ink); color: #fff; padding: 28px 0 36px; border-bottom: 6px solid var(--signal); }
.hero h1 {
  margin: 0 0 16px; max-width: 14ch; font-weight: 900; font-stretch: 70%;
  font-size: clamp(2.25rem, 9vw, 5.5rem); line-height: .95; letter-spacing: -.01em; text-wrap: balance;
}
.hero-sub { margin: 0 0 20px; max-width: 34ch; font-size: 1.125rem; color: #d3d9de; }

/* catalogo */
.sec { padding-top: 24px; padding-bottom: 48px; }
.loading { text-align: center; color: var(--ink-2); padding: 48px 0; margin: 0; }
.loading a { color: var(--signal); font-weight: 700; }
.col-block + .col-block { margin-top: 40px; }
.col-title {
  margin: 0 0 16px; padding-bottom: 8px; border-bottom: 2px solid var(--ink);
  font-weight: 800; font-stretch: 80%; font-size: 1.5rem; line-height: 1.1;
}
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 360px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 600px) { .grid { gap: 20px; } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.prod {
  position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; transition: border-color .15s, box-shadow .15s;
}
@media (hover: hover) {
  .prod:hover { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
  .prod:hover .p-more { color: var(--signal); }
}
.p-img { --pad: 8px; position: relative; flex: none; aspect-ratio: 1 / 1; min-height: 0; overflow: hidden; background: #fff; border-bottom: 1px solid var(--line); }
.p-img img { position: absolute; inset: var(--pad); width: calc(100% - 2 * var(--pad)); height: calc(100% - 2 * var(--pad)); object-fit: contain; display: block; }
.p-noimg { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border: 3px solid var(--line); border-radius: 50%; }
.p-noimg::after { content: ''; position: absolute; inset: 14px; background: var(--line); border-radius: 2px; }
.p-body { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; flex: 1; min-width: 0; }
.p-name { margin: 0; font-weight: 700; font-size: .9375rem; line-height: 1.25; overflow-wrap: anywhere; }
.p-prices { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.p-price { font-weight: 900; font-stretch: 85%; font-size: 1.375rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.p-promo { font-size: .8125rem; font-weight: 600; color: var(--signal); font-variant-numeric: tabular-nums; }
.nw { white-space: nowrap; }
.p-more {
  margin: auto 0 0; padding: 4px 0 0; border: 0; background: none; text-align: left; cursor: pointer;
  font: 700 .875rem/1.2 'Archivo', sans-serif; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px;
}
.p-more::after { content: ''; position: absolute; inset: 0; z-index: 1; }   /* toda la tarjeta es el boton */
.p-more:focus-visible { outline: none; }
.p-more:focus-visible::after { outline: 3px solid var(--signal); outline-offset: -3px; border-radius: var(--r); }
@media (min-width: 600px) {
  .p-img { --pad: 12px; }
  .p-body { gap: 8px; padding: 16px; }
  .p-name { font-size: 1.125rem; }
  .p-price { font-size: 1.5rem; }
  .p-promo { font-size: .9375rem; }
  .p-more { font-size: .9375rem; }
}

/* como comprar */
.how { background: var(--ink); color: #fff; padding: 40px 0; }
.how-in { display: grid; gap: 24px; }
.how h2 { margin: 0 0 4px; font-weight: 800; font-stretch: 80%; font-size: 1.375rem; }
.how p { margin: 0; color: #d3d9de; max-width: 36ch; }
@media (min-width: 760px) { .how-in { grid-template-columns: repeat(3, 1fr); gap: 40px; } }

.foot { background: #0e1114; color: #c4cbd1; padding: 20px 0; font-size: .9375rem; }
.foot-in { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.foot a { color: #fff; font-weight: 600; }

/* ficha de producto */
.pm {
  display: none; position: fixed; inset: 0; z-index: 50; background: rgba(14, 17, 20, .72);
  align-items: flex-end; justify-content: center;
}
.pm.open { display: flex; }
.pm-card {
  position: relative; width: 100%; max-height: 94vh; max-height: 94dvh; display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border-radius: 12px 12px 0 0; animation: pm-in .2s ease-out;
}
@keyframes pm-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.pm-x {
  position: absolute; top: 8px; right: 8px; z-index: 3; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 1.75rem; line-height: 1; cursor: pointer;
}
.pm-x:hover { background: var(--ink); color: #fff; }
.pm-gal { position: relative; flex: none; background: #fff; height: clamp(220px, 38vh, 380px); height: clamp(220px, 38dvh, 380px); display: flex; align-items: center; justify-content: center; padding: 16px 16px 36px; border-bottom: 1px solid var(--line); }
.pm.no-photo .pm-gal { display: none; }
/* nunca ampliar la foto mas alla de su tamano natural */
#pm-img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.pm-prev, .pm-next {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 1.75rem; line-height: 1; cursor: pointer;
}
.pm-prev { left: 8px; }
.pm-next { right: 8px; }
.pm-prev:hover, .pm-next:hover { background: var(--ink); color: #fff; }
#pm-dots { position: absolute; left: 0; right: 0; bottom: 4px; display: flex; justify-content: center; }
#pm-dots i { position: relative; width: 28px; height: 28px; cursor: pointer; }
#pm-dots i::before { content: ''; position: absolute; left: 9px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: #c3cace; }
#pm-dots i.on::before { background: var(--signal); }
.pm-info { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; }
.pm-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 16px 16px; display: flex; flex-direction: column; gap: 16px; }
.pm-scroll > * { flex: none; }
.pm-scroll h2 { margin: 0; padding-right: 48px; overflow-wrap: anywhere; font-weight: 800; font-size: 1.5rem; line-height: 1.2; }
.pm.no-photo .pm-scroll { padding-top: 24px; }
.pm-foot { flex: none; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 12px -8px rgba(21, 25, 29, .25); }
#pm-prices { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
#pm-prices li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
#pm-prices li span { color: var(--ink-2); }
#pm-prices li b { font-weight: 900; font-stretch: 85%; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
#pm-desc { color: var(--ink-2); max-width: 62ch; overflow-wrap: anywhere; }
#pm-desc p { margin: 0 0 .75em; }
#pm-desc ul, #pm-desc ol { margin: 0 0 .75em; padding-left: 1.25rem; }
#pm-desc li { margin-bottom: .3em; }
#pm-desc > :last-child { margin-bottom: 0; }
#pm-wa { width: 100%; }

@media (min-width: 820px) {
  .pm { align-items: center; padding: 24px; }
  .pm-card { width: 960px; max-width: 100%; height: min(720px, 90vh); max-height: none; border-radius: var(--r); display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr); }
  .pm.no-photo .pm-card { display: flex; height: auto; max-height: 90vh; max-width: 520px; }
  .pm-gal { height: auto; min-height: 0; border-bottom: 0; border-right: 1px solid var(--line); }
  .pm-scroll { padding: 32px 28px 20px; }
  .pm-foot { padding: 14px 28px; }
  #pm-wa { width: auto; }
}
@media (min-width: 480px) and (max-width: 819.98px) and (max-height: 520px) and (orientation: landscape) {
  .pm-card { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); grid-template-rows: minmax(0, 1fr); height: 94vh; height: 94dvh; }
  .pm.no-photo .pm-card { display: flex; height: auto; }
  .pm-gal { height: auto; min-height: 0; padding: 12px 12px 32px; border-bottom: 0; border-right: 1px solid var(--line); }
  .pm-scroll { padding: 14px 16px 12px; gap: 12px; }
  .pm-foot { padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
