/* ==========================================================================
   NC Todo en gas y agua — prototipo de tienda
   ========================================================================== */

:root{
  --ink:        #141414;
  --ink-2:      #3f3f3f;
  --ink-3:      #767472;
  --paper:      #f8f7f5;
  --paper-2:    #f1efec;
  --white:      #ffffff;
  --line:       #e7e4e1;
  --line-2:     #d7d3cf;

  --brand:      #d91f26;
  --brand-dk:   #b3161c;
  --brand-soft: #fdeced;
  --nc-red:     #d91f26;
  --nc-red-dk:  #b3161c;
  --gas:        var(--brand);

  --ok:         #2b6b46;
  --ok-soft:    #eaf3ed;
  --warn:       #b3161c;
  --warn-soft:  #fdeced;

  --r:          14px;
  --r-sm:       9px;
  --shadow:     0 1px 2px rgba(20,20,20,.04), 0 8px 24px -12px rgba(20,20,20,.18);
  --wrap:       1180px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

[hidden]{ display:none !important; }

html{ scroll-behavior:smooth; scroll-padding-top:84px; }

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

img,svg{ display:block; max-width:100%; }
a{ color:inherit; text-decoration:none; }
button{ font:inherit; color:inherit; cursor:pointer; }
h1,h2,h3,h4,p,dl,dd,ol,ul{ margin:0; }
ul,ol{ list-style:none; padding:0; }

:focus-visible{
  outline:2px solid var(--brand);
  outline-offset:2px;
  border-radius:4px;
}

.wrap{
  width:100%;
  max-width:var(--wrap);
  margin-inline:auto;
  padding-inline:20px;
}

/* ---------- aviso de prototipo ---------- */
.proto{
  display:flex; align-items:center; justify-content:center; gap:10px;
  padding:7px 44px 7px 16px; position:relative;
  background:#141414; color:#ededed;
  font-size:12.5px; letter-spacing:.01em; text-align:center;
}
.proto strong{ color:#ffbfc2; font-weight:650; }
.proto-x{
  position:absolute; right:8px; top:50%; translate:0 -50%;
  width:26px; height:26px; display:grid; place-items:center;
  background:none; border:0; color:#9d9d9d; font-size:19px; line-height:1;
  border-radius:6px;
}
.proto-x:hover{ color:#fff; background:rgba(255,255,255,.08); }

/* ---------- header ---------- */
.head{
  position:sticky; top:0; z-index:40;
  background:rgba(248,247,245,.9);
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.head-in{
  display:flex; align-items:center; gap:16px;
  height:64px;
}
.logo{ display:flex; align-items:center; gap:9px; flex-shrink:0; }
.logo-nc{
  font-size:31px; font-weight:900; line-height:.76;
  letter-spacing:-.055em; color:var(--nc-red);
}
.logo-words{
  display:flex; flex-direction:column;
  font-size:9px; font-weight:800; letter-spacing:.055em;
  text-transform:uppercase; color:var(--nc-red);
  line-height:1.2; padding-top:1px;
}

.nav{ display:flex; gap:2px; }
.nav a{
  padding:7px 11px; border-radius:8px;
  font-size:14px; font-weight:550; color:var(--ink-2);
  white-space:nowrap;
}
.nav a:hover{ background:var(--paper-2); color:var(--ink); }

.head-search{
  display:flex; align-items:center; gap:8px;
  flex:1 1 auto; max-width:320px; margin-left:auto;
  height:38px; padding:0 11px;
  background:var(--white); border:1px solid var(--line); border-radius:9px;
  transition:border-color .15s, box-shadow .15s;
}
.head-search:focus-within{ border-color:var(--brand); box-shadow:0 0 0 3px rgba(217,31,38,.10); }
.head-search svg{ width:16px; height:16px; color:var(--ink-3); flex-shrink:0; }
.head-search input{
  flex:1; min-width:0; border:0; background:none; padding:0;
  font:inherit; font-size:13.5px; color:var(--ink);
}
.head-search input::placeholder{ color:var(--ink-3); }
.head-search input:focus{ outline:none; }

.icon-btn{
  position:relative; flex-shrink:0;
  width:38px; height:38px; display:grid; place-items:center;
  background:var(--white); border:1px solid var(--line);
  border-radius:9px; color:var(--ink);
  transition:border-color .15s, background .15s;
}
.icon-btn svg{ width:19px; height:19px; }
.icon-btn:hover{ border-color:var(--line-2); background:var(--paper-2); }
.cart-count{
  position:absolute; top:-6px; right:-6px; min-width:19px; height:19px;
  padding:0 5px; border-radius:99px;
  background:var(--gas); color:#fff;
  font-size:11px; font-weight:700; line-height:19px; text-align:center;
}

/* ---------- aviso de asesoramiento (dentro de "El local") ---------- */
.aviso{
  display:flex; align-items:flex-start; gap:14px;
  max-width:760px; margin:28px 0 0;
  padding:18px 22px;
  background:var(--warn-soft);
  border:1px solid #f3d3d4;
  border-radius:var(--r);
}
.aviso svg{ width:24px; height:24px; flex-shrink:0; margin-top:2px; color:var(--warn); }
.aviso-t{ font-size:16px; line-height:1.4; color:#5f1418; }
.aviso-p{ font-size:14.5px; line-height:1.55; color:#7a1a1f; margin-top:6px; }

/* ---------- hero ---------- */
.hero{
  position:relative;
  border-bottom:1px solid var(--line);
  background:
    radial-gradient(900px 380px at 82% -20%, rgba(217,31,38,.09), transparent 62%),
    radial-gradient(680px 320px at 6% 120%, rgba(217,31,38,.05), transparent 64%),
    var(--paper);
  overflow:hidden;
}
.hero::before{
  content:"";
  position:absolute; inset:0;
  background-image:
    linear-gradient(to right, rgba(217,31,38,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(217,31,38,.05) 1px, transparent 1px);
  background-size:26px 26px;
  mask-image:radial-gradient(1000px 460px at 50% 0%, #000 18%, transparent 76%);
  -webkit-mask-image:radial-gradient(1000px 460px at 50% 0%, #000 18%, transparent 76%);
  pointer-events:none;
}
.hero .wrap{ position:relative; padding-block:52px 54px; }
.eyebrow{
  font-size:11.5px; font-weight:700; letter-spacing:.11em; text-transform:uppercase;
  color:var(--brand); margin-bottom:12px;
}
.hero h1{
  font-size:clamp(2.4rem, 5vw, 3.6rem);
  line-height:1; letter-spacing:-.035em; font-weight:800;
  margin-bottom:16px;
}
.hero h1.h1-long{
  font-size:clamp(1.95rem, 4.4vw, 2.95rem);
  line-height:1.06; letter-spacing:-.03em;
  max-width:22ch;
  margin-bottom:4px;
}
.slogan{
  font-style:italic;
  font-size:clamp(1.1rem, 2.1vw, 1.4rem);
  font-weight:600; letter-spacing:.005em;
  color:var(--nc-red); line-height:1.25;
  margin:0 0 18px;
}
.lead{ font-size:17px; color:var(--ink-2); max-width:62ch; }

.hero-actions{ display:flex; flex-wrap:wrap; gap:10px; margin-top:26px; }

/* ---------- botones ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:9px;
  padding:12px 18px; border-radius:10px; border:1px solid transparent;
  font-size:14.5px; font-weight:650; cursor:pointer;
  transition:background .15s, border-color .15s, transform .1s;
}
.btn:active{ transform:translateY(1px); }
.btn-primary{ background:var(--brand); color:#fff; }
.btn-primary:hover{ background:var(--brand-dk); }
.btn-ghost{
  background:var(--white); border-color:var(--line-2); color:var(--ink);
  font-weight:600;
}
.btn-ghost:hover{ background:var(--paper-2); }
.btn-wa{ width:100%; background:#0f7a4a; color:#fff; }
.btn-wa:hover{ background:#0c6640; }
.btn-block{ width:100%; }

/* ---------- secciones ---------- */
.sec{ padding-block:58px; }
.sec-alt{
  background:var(--paper-2);
  border-block:1px solid var(--line);
}
.sec-head{ margin-bottom:26px; max-width:66ch; }
.sec-head h2{
  font-size:clamp(1.5rem, 2.6vw, 2rem);
  letter-spacing:-.025em; line-height:1.15; font-weight:750;
}
.sec-sub{ color:var(--ink-2); font-size:15.5px; margin-top:9px; }
.sec-head-row{
  display:flex; align-items:center; justify-content:space-between;
  gap:18px; flex-wrap:wrap; max-width:none;
}
.sec-head-row > div{ flex:1 1 380px; min-width:0; }
.sec-head-row .btn{ flex-shrink:0; }

/* ---------- filas por marca ---------- */
.brand-row{
  padding-block:26px;
  border-top:1px solid var(--line);
}
.brand-row:first-child{ border-top:0; padding-top:0; }

.brand-row-head{
  display:flex; align-items:center; gap:13px;
  margin-bottom:16px;
}
.brand-row-id{ min-width:0; }
.brand-row-id h3{
  font-size:18px; letter-spacing:-.02em; line-height:1.2; font-weight:750;
}
.brand-row-id p{ font-size:12.5px; color:var(--ink-3); }
.brand-row-link{
  margin-left:auto; flex-shrink:0;
  display:inline-flex; align-items:center; gap:6px;
  font-size:13.5px; font-weight:650; color:var(--brand);
  padding:7px 11px; border-radius:8px;
}
.brand-row-link svg{ width:15px; height:15px; }
.brand-row-link:hover{ background:var(--brand-soft); }

.brand-row-grid{ display:grid; grid-template-columns:repeat(4, 1fr); gap:16px; }

/* ---------- índice de marcas ---------- */
.brands-grid{
  display:grid; grid-template-columns:repeat(2, 1fr); gap:14px;
}
.brand-card{
  display:flex; align-items:center; gap:14px;
  padding:16px 18px;
  background:var(--white); border:1px solid var(--line); border-radius:var(--r);
  transition:border-color .16s, transform .16s, box-shadow .16s;
}
.brand-card:hover{ border-color:var(--line-2); transform:translateY(-2px); box-shadow:var(--shadow); }
.brand-card-id{ min-width:0; flex:1; }
.brand-card-id h3{ font-size:16px; letter-spacing:-.02em; line-height:1.2; font-weight:750; }
.brand-card-id p{ font-size:12.5px; color:var(--ink-3); margin-top:3px; }
.brand-card svg{ width:17px; height:17px; flex-shrink:0; color:var(--ink-3); }
.brand-card:hover svg{ color:var(--brand); }

.more-link{ margin-top:22px; }

.soon{
  margin-top:34px;
  padding:18px 22px;
  background:var(--paper-2);
  border:1px solid var(--line);
  border-radius:var(--r);
  font-size:17.5px; line-height:1.6; color:var(--ink-2);
  max-width:78ch;
}
.soon strong{ color:var(--ink); font-weight:750; }

/* ---------- chips / toolbar ---------- */
.toolbar{
  display:flex; align-items:center; gap:16px; flex-wrap:wrap;
  padding-bottom:18px; border-bottom:1px solid var(--line); margin-bottom:18px;
}
.toolbar .sort{ margin-left:auto; }
.chips{ display:flex; flex-wrap:wrap; gap:7px; flex:1; }
.chip{
  padding:7px 13px; border-radius:99px;
  background:var(--white); border:1px solid var(--line);
  font-size:13px; font-weight:550; color:var(--ink-2);
  transition:all .14s;
}
.chip:hover{ border-color:var(--line-2); color:var(--ink); }
.chip[aria-pressed="true"]{ background:var(--ink); border-color:var(--ink); color:#fff; }
.chip .n{ display:inline-block; margin-left:6px; font-size:11px; opacity:.6; font-variant-numeric:tabular-nums; }

.sort{ display:flex; align-items:center; gap:8px; font-size:13px; color:var(--ink-3); }
.sort select{
  font:inherit; font-size:13.5px; font-weight:550; color:var(--ink);
  padding:8px 11px; border-radius:9px;
  border:1px solid var(--line); background:var(--white); cursor:pointer;
}

.count{
  font-size:12.5px; color:var(--ink-3); margin-bottom:14px;
  font-variant-numeric:tabular-nums;
}

/* ---------- buscador de vista ---------- */
.search{
  display:flex; align-items:center; gap:10px;
  background:var(--white); border:1px solid var(--line-2);
  border-radius:11px; padding:4px 14px;
  max-width:520px; margin-bottom:22px;
  transition:border-color .15s, box-shadow .15s;
}
.search:focus-within{ border-color:var(--brand); box-shadow:0 0 0 3px rgba(217,31,38,.10); }
.search svg{ width:18px; height:18px; color:var(--ink-3); flex-shrink:0; }
.search input{
  flex:1; min-width:0; border:0; background:none; padding:11px 0;
  font:inherit; font-size:14.5px; color:var(--ink);
}
.search input::placeholder{ color:var(--ink-3); }
.search input:focus{ outline:none; }

/* ---------- grid de productos ---------- */
.grid{ display:grid; grid-template-columns:repeat(4, 1fr); gap:16px; }

.card{
  display:flex; flex-direction:column;
  background:var(--white); border:1px solid var(--line); border-radius:var(--r);
  overflow:hidden;
  transition:border-color .16s, transform .16s, box-shadow .16s;
}
.card:hover{ border-color:var(--line-2); transform:translateY(-2px); box-shadow:var(--shadow); }

.card-media{
  position:relative;
  aspect-ratio:4/3;
  display:grid; place-items:center;
  background:var(--paper);
  border:0; border-bottom:1px solid var(--line); width:100%;
  padding:0;
}
.card-media.has-photo{ background:#fff; }
.card-photo{ position:absolute; inset:0; width:100%; height:100%; object-fit:contain; padding:14px; box-sizing:border-box; }
.ph{ width:47%; max-width:104px; aspect-ratio:1; display:grid; place-items:center; border-radius:50%; }
.ph svg{ width:62%; height:62%; }

.ph-mochilas   { background:#f3eceb; color:#8f4d4c; }
.ph-griferia   { background:#f2efec; color:#6f6863; }
.ph-automaticos{ background:#f1efe9; color:#7d6a4e; }
.ph-flotantes  { background:#e9f1f2; color:#4d6f76; }
.ph-sifones    { background:#efeeee; color:#6a6d70; }
.ph-sopapas    { background:#f0ecf7; color:#5f5480; }
.ph-flexibles  { background:#f4ecea; color:#8a534e; }
.ph-flexibles-gas { background:#f6eee7; color:#8a5f45; }
.ph-pegamentos { background:#f5f0e7; color:#8a7443; }
.ph-plagas     { background:#eff1eb; color:#5f6f57; }
.ph-pinturas   { background:#f8ecea; color:#9a5b50; }
.ph-discos     { background:#f0efee; color:#63666a; }
.ph-pulverizadores { background:#eef3e0; color:#5d6f2a; }
.ph-cerraduras { background:#eceff5; color:#455273; }

.badge{
  position:absolute; top:10px; left:10px;
  font-size:10px; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  padding:4px 8px; border-radius:6px;
}
.badge-stock{ background:var(--ok-soft); color:var(--ok); }
.badge-ask{ background:var(--warn-soft); color:var(--warn); }

.card-body{ padding:13px 14px 14px; display:flex; flex-direction:column; flex:1; gap:2px; }
.card-top{ display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.card-brand{
  font-size:10px; font-weight:750; letter-spacing:.08em; text-transform:uppercase;
  color:var(--ink-3);
}
.card-code{
  font-size:10.5px; font-weight:650; color:var(--ink-3);
  font-variant-numeric:tabular-nums; letter-spacing:.02em;
  flex-shrink:0;
}
.card-name{
  font-size:14.5px; font-weight:600; line-height:1.32; letter-spacing:-.01em;
  text-align:left; background:none; border:0; padding:0;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.card-name:hover{ color:var(--brand); }
.card-meta{ font-size:12.5px; color:var(--ink-3); margin-top:auto; padding-top:6px; }
.card-foot{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  margin-top:11px;
}
.price{
  font-size:16.5px; font-weight:750; letter-spacing:-.02em;
  font-variant-numeric:tabular-nums;
}
.price-ask{ font-size:12.5px; font-weight:600; color:var(--warn); }
.add{
  flex-shrink:0;
  padding:7px 12px; border-radius:8px; border:1px solid var(--line-2);
  background:var(--white); font-size:12.5px; font-weight:650;
  transition:all .14s;
}
.add:hover{ background:var(--ink); border-color:var(--ink); color:#fff; }
.add-ask{ border-style:dashed; color:var(--ink-2); }
.add-ask:hover{ background:#0f7a4a; border-color:#0f7a4a; color:#fff; border-style:solid; }

.empty{
  text-align:center; padding:52px 20px;
  background:var(--white); border:1px dashed var(--line-2); border-radius:var(--r);
}
.empty p{ color:var(--ink-2); font-size:14.5px; }
.empty p strong{ color:var(--ink); font-size:16px; }
.empty .btn{ margin-top:16px; }
.empty-actions{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }
.empty-actions .btn{ margin-top:0; }

/* ---------- vista marca ---------- */
.back{
  display:inline-flex; align-items:center; gap:7px;
  font-size:13.5px; font-weight:600; color:var(--ink-2);
  margin-bottom:20px;
}
.back svg{ width:16px; height:16px; }
.back:hover{ color:var(--brand); }

.brand-head{
  display:flex; align-items:center; gap:16px;
  padding-bottom:20px; margin-bottom:22px;
  border-bottom:1px solid var(--line);
}
.brand-head h1{
  font-size:clamp(1.7rem, 3.4vw, 2.3rem);
  letter-spacing:-.03em; line-height:1.1; font-weight:800;
}
.brand-head p{ font-size:13.5px; color:var(--ink-3); margin-top:4px; }

.brand-mono{
  display:grid; place-items:center;
  font-weight:800; letter-spacing:-.02em; line-height:1;
  flex-shrink:0;
}
.brand-mono-lg{ width:46px; height:46px; font-size:15px; border-radius:12px; }
.brand-mono-xl{ width:62px; height:62px; font-size:21px; border-radius:16px; }

/* marcas con logo real: caja fija para que todos los nombres alineen */
.brand-mono-img{
  display:flex; align-items:center; justify-content:center;
  width:150px; height:46px; padding:7px 10px;
  background:#fff; border:1px solid var(--line);
  box-sizing:border-box; overflow:hidden;
}
.brand-mono-img img{
  display:block; width:100%; height:100%;
  object-fit:contain;
}
.brand-mono-xl.brand-mono-img{ width:190px; height:62px; padding:9px 12px; }

/* logos que ya traen su propio fondo de color: se lucen más grandes */
.brand-mono-plate{ padding:4px 8px; }
.brand-mono-xl.brand-mono-plate{ padding:5px 10px; }

/* ---------- nosotros ---------- */
.nosotros{ display:grid; grid-template-columns:1.1fr .9fr; gap:48px; align-items:start; }
.nosotros-txt h2{
  font-size:clamp(1.55rem, 3vw, 2.2rem);
  letter-spacing:-.028em; line-height:1.12; margin:2px 0 18px;
}
.txt{ font-size:15.5px; color:var(--ink-2); max-width:58ch; }
.txt + .txt{ margin-top:12px; }
.txt-note{
  margin-top:18px; padding-top:16px;
  border-top:1px solid var(--line-2);
  font-size:13.5px; color:var(--ink-3);
}
.stats{
  display:flex; flex-wrap:wrap; gap:14px 44px;
  margin-top:28px; padding-top:22px; border-top:1px solid var(--line-2);
}
.stats strong{
  display:block; font-size:29px; font-weight:800; letter-spacing:-.035em;
  line-height:1; color:var(--brand); font-variant-numeric:tabular-nums;
}
.stats span{ font-size:12px; color:var(--ink-3); }

.mayorista{
  background:var(--ink); color:#f1f0ee;
  border-radius:var(--r); padding:28px;
  box-shadow:0 18px 40px -28px rgba(20,20,20,.7);
}
.mayorista-tag{
  display:block; font-size:10.5px; font-weight:750; letter-spacing:.11em;
  text-transform:uppercase; color:#f0a9ac;
}
.mayorista h3{
  font-size:19.5px; line-height:1.22; letter-spacing:-.02em;
  margin-top:11px; color:#fff; font-weight:700;
}
.mayorista p{ font-size:14px; color:#c3c0bd; margin-top:10px; }
.mayorista-list{ margin-top:16px; display:grid; gap:9px; }
.mayorista-list li{ display:flex; align-items:center; gap:9px; font-size:13.5px; color:#e8e6e4; }
.mayorista-list li::before{
  content:""; width:5px; height:5px; border-radius:99px; background:var(--gas);
  flex-shrink:0;
}
.mayorista .btn{ margin-top:22px; }

/* ---------- pasos ---------- */
.steps{ display:grid; grid-template-columns:repeat(3, 1fr); gap:16px; }
.steps li{
  display:flex; gap:14px;
  background:var(--white); border:1px solid var(--line); border-radius:var(--r);
  padding:22px;
}
.steps li > span{
  flex-shrink:0; width:30px; height:30px; border-radius:99px;
  display:grid; place-items:center;
  background:var(--brand); color:#fff; font-size:13.5px; font-weight:750;
}
.steps strong{ display:block; font-size:15px; font-weight:650; letter-spacing:-.01em; }
.steps p{ font-size:13.5px; color:var(--ink-2); margin-top:4px; }

/* ---------- local ---------- */
.local{ display:grid; grid-template-columns:1.25fr .75fr; gap:40px; align-items:start; }
.local h2{ font-size:clamp(1.5rem,2.6vw,2rem); letter-spacing:-.025em; }
.lead-sm{ color:var(--ink-2); font-size:15.5px; margin-top:10px; max-width:56ch; }
.data{ display:grid; grid-template-columns:1fr 1fr; gap:22px 32px; margin-top:30px; }
.data dt{
  font-size:11px; font-weight:750; letter-spacing:.08em; text-transform:uppercase;
  color:var(--ink-3); margin-bottom:4px;
}
.data dd{ font-size:14.5px; color:var(--ink); line-height:1.5; }
.data dd a{ border-bottom:1px solid var(--line-2); }
.data dd a:hover{ color:var(--brand); border-color:var(--brand); }

.local-card{
  background:var(--white); border:1px solid var(--line); border-radius:var(--r);
  padding:24px; box-shadow:var(--shadow);
}
.local-card h3{ font-size:17px; letter-spacing:-.015em; }
.local-card p{ font-size:14px; color:var(--ink-2); margin-top:8px; }
.local-card .btn{ margin-top:18px; }
.tiny{ font-size:12px; color:var(--ink-3); }
.local-card .tiny{ margin-top:12px; }

/* ---------- footer ---------- */
.foot{ border-top:1px solid var(--line); background:var(--paper); padding-block:34px; }
.foot-in{ display:grid; grid-template-columns:1fr auto; gap:20px 40px; align-items:start; }
.foot-brand{ font-size:16px; font-weight:800; letter-spacing:.01em; }
.foot-brand span{
  font-weight:600; font-size:12px; color:var(--ink-3);
  letter-spacing:.06em; text-transform:uppercase; margin-left:6px;
}
.foot-slogan{
  font-style:italic; font-weight:600; font-size:13.5px;
  color:var(--nc-red); margin-top:2px;
}
.foot-nav{ display:flex; flex-wrap:wrap; gap:18px; font-size:13px; color:var(--ink-2); }
.foot-nav a:hover{ color:var(--brand); text-decoration:underline; text-underline-offset:3px; }
.foot-legal{ grid-column:1 / -1; max-width:76ch; padding-top:16px; border-top:1px solid var(--line); }

/* ---------- drawer (pedido) ---------- */
.scrim{
  position:fixed; inset:0; z-index:60;
  background:rgba(20,20,20,.42);
  backdrop-filter:blur(2px);
  animation:fade .18s ease;
}
@keyframes fade{ from{opacity:0} to{opacity:1} }

.drawer{
  position:fixed; top:0; right:0; bottom:0; z-index:70;
  width:min(420px, 100%);
  display:flex; flex-direction:column;
  background:var(--paper); border-left:1px solid var(--line);
  box-shadow:-24px 0 60px -30px rgba(20,20,20,.5);
  transform:translateX(102%);
  transition:transform .26s cubic-bezier(.32,.72,0,1);
}
.drawer[data-open="true"]{ transform:translateX(0); }
.drawer-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 20px; border-bottom:1px solid var(--line);
  background:var(--white);
}
.drawer-head h2{ font-size:17px; letter-spacing:-.015em; }
.drawer-head .icon-btn{ background:transparent; border:0; font-size:24px; line-height:1; width:34px; height:34px; }
.drawer-body{ flex:1; overflow-y:auto; padding:8px 20px; }
.drawer-foot{ padding:18px 20px 22px; border-top:1px solid var(--line); background:var(--white); }

/* ---------- forma de entrega ---------- */
.delivery{ margin-bottom:16px; }
.delivery label{
  display:block; margin-bottom:6px;
  font-size:11px; font-weight:700; letter-spacing:.09em; text-transform:uppercase;
  color:var(--ink-3);
}
.delivery select{
  width:100%; font:inherit; font-size:13.5px; color:var(--ink);
  padding:9px 11px; border-radius:9px;
  border:1px solid var(--line-2); background:var(--paper); cursor:pointer;
}
.delivery select:focus{ outline:none; border-color:var(--brand); box-shadow:0 0 0 3px rgba(217,31,38,.10); }
.delivery-note{
  font-size:11.5px; line-height:1.45; color:var(--ink-3); margin-top:7px;
}
.drawer-total{
  display:flex; align-items:baseline; justify-content:space-between;
  margin-bottom:6px; font-size:13.5px; color:var(--ink-2);
}
.drawer-total strong{ font-size:20px; letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
.drawer-foot .tiny{ margin-bottom:14px; }
.link-btn{
  display:block; width:100%; margin-top:10px; padding:8px;
  background:none; border:0; font-size:12.5px; color:var(--ink-3);
  text-decoration:underline; text-underline-offset:3px;
}
.link-btn:hover{ color:var(--gas); }

.line{
  display:flex; gap:12px; align-items:flex-start;
  padding:14px 0; border-bottom:1px solid var(--line);
}
.line:last-child{ border-bottom:0; }
.line-thumb{
  flex-shrink:0; width:50px; height:50px; border-radius:9px;
  display:grid; place-items:center; border:1px solid var(--line);
}
.line-thumb svg{ width:26px; height:26px; }
.line-thumb-img{ background:#fff; overflow:hidden; padding:4px; box-sizing:border-box; }
.line-thumb-img img{ width:100%; height:100%; object-fit:contain; display:block; }
.line-main{ flex:1; min-width:0; }
.line-name{ font-size:13.5px; font-weight:600; line-height:1.3; }
.line-meta{ font-size:12px; color:var(--ink-3); margin-top:2px; }
.line-price{ font-size:13.5px; font-weight:700; margin-top:5px; font-variant-numeric:tabular-nums; }
.line-qty{
  display:flex; align-items:center; gap:2px;
  border:1px solid var(--line); border-radius:8px; background:var(--white);
}
.line-qty button{
  width:26px; height:28px; display:grid; place-items:center;
  background:none; border:0; font-size:15px; color:var(--ink-2); line-height:1;
}
.line-qty button:hover{ color:var(--ink); background:var(--paper); }
.line-qty span{ min-width:20px; text-align:center; font-size:12.5px; font-weight:650; }

.cart-empty{ text-align:center; padding:60px 10px; color:var(--ink-3); font-size:14px; }
.cart-empty svg{ width:34px; height:34px; margin:0 auto 14px; opacity:.45; }

/* ---------- modal ---------- */
.modal{
  position:fixed; inset:0; z-index:80;
  display:grid; place-items:center; padding:20px;
  background:rgba(20,20,20,.45);
  backdrop-filter:blur(3px);
  animation:fade .16s ease;
}
.modal-box{
  position:relative;
  width:min(680px, 100%); max-height:88vh;
  display:flex; flex-direction:column; overflow:hidden;
  background:var(--white); border-radius:16px;
  box-shadow:0 30px 80px -30px rgba(20,20,20,.55);
  animation:pop .2s cubic-bezier(.32,.72,0,1);
}
@keyframes pop{ from{ opacity:0; transform:translateY(10px) scale(.985) } to{ opacity:1; transform:none } }
#modal-body{ display:flex; flex-direction:column; flex:1; min-height:0; }
.modal-scroll{ flex:1; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch; }
.modal-x{
  position:absolute; top:12px; right:12px; z-index:2;
  background:rgba(255,255,255,.9); font-size:23px; line-height:1;
  width:34px; height:34px;
}
.modal-grid{ display:grid; grid-template-columns:1fr 1fr; }
.modal-media{
  background:var(--paper); display:grid; place-items:center;
  padding:40px; border-right:1px solid var(--line);
}
.modal-media .ph{ max-width:180px; }
.modal-media.has-photo{ background:#fff; }
.modal-photo{ width:100%; max-height:380px; object-fit:contain; display:block; }
.modal-info{ padding:32px 30px; }
.modal-info .card-brand{ margin-bottom:6px; }
.modal-info h3{ font-size:22px; letter-spacing:-.025em; line-height:1.2; }
.modal-desc{ font-size:14px; color:var(--ink-2); margin-top:10px; }
.modal-specs{ margin-top:18px; display:grid; gap:9px; }
.modal-specs div{ display:flex; gap:10px; font-size:13.5px; }
.modal-specs dt{ color:var(--ink-3); min-width:86px; }
.modal-specs dd{ color:var(--ink); font-weight:550; }
.modal-price{ display:flex; align-items:baseline; gap:8px; margin-top:20px; }
.modal-price .price{ font-size:26px; }
.modal-actions{
  display:flex; flex-direction:column; gap:9px;
  padding:14px 20px 16px; border-top:1px solid var(--line);
  background:var(--white);
}
.modal-actions .btn{ width:100%; }

/* ---------- responsive ---------- */
@media (max-width:1040px){
  .brand-row-grid{ grid-template-columns:repeat(3, 1fr); }
  .brand-row-grid > .card:nth-child(4){ display:none; }
  .grid{ grid-template-columns:repeat(3, 1fr); }
  .nosotros{ grid-template-columns:1fr; gap:32px; }
  .local{ grid-template-columns:1fr; gap:28px; }
}

@media (max-width:980px){
  .nav{ display:none; }
}

@media (max-width:900px){
  .toolbar{ flex-direction:column; align-items:stretch; gap:12px; }
  .sort{ justify-content:flex-end; }
}

@media (max-width:820px){
  .steps{ grid-template-columns:1fr; }
  .data{ grid-template-columns:1fr; gap:18px; }
  .modal-grid{ grid-template-columns:1fr; }
  .modal-media{ border-right:0; border-bottom:1px solid var(--line); padding:20px; }
  .modal-media .ph{ max-width:96px; }
  .modal-info{ padding:22px 20px 24px; }
  .modal-info h3{ font-size:19px; }
}

@media (max-width:760px){
  .head{ position:static; }
  .head-in{ flex-wrap:wrap; height:auto; padding-block:10px; gap:10px 12px; }
  .head-search{ order:3; flex-basis:100%; max-width:none; margin-left:0; }
  html{ scroll-padding-top:16px; }
  .brand-row-grid{ grid-template-columns:repeat(2, 1fr); }
  .brand-row-grid > .card:nth-child(4){ display:flex; }
  .grid{ grid-template-columns:repeat(2, 1fr); }
}

@media (max-width:900px){
  .brands-grid{ grid-template-columns:1fr; gap:12px; }
}

@media (max-width:620px){
  .sec{ padding-block:44px; }
  .hero .wrap{ padding-block:40px 42px; }
  .hero h1{ font-size:2.35rem; }
  .lead{ font-size:15.5px; }
  .brand-row{ padding-block:22px; }
  .brand-row-head{ gap:11px; flex-wrap:wrap; }
  .brand-row-link{ margin-left:0; order:3; flex-basis:100%; padding-left:0; }
  .brand-row-grid{ grid-template-columns:1fr 1fr; gap:11px; }
  .grid{ grid-template-columns:1fr 1fr; gap:11px; }
  .brands-grid{ grid-template-columns:1fr; gap:10px; }
  .card-body{ padding:11px 11px 12px; }
  .card-name{ font-size:13px; }
  .price{ font-size:15px; }
  .add{ padding:7px 10px; font-size:12px; }
  .brand-mono-lg{ width:40px; height:40px; font-size:13px; }
  .brand-mono-xl{ width:50px; height:50px; font-size:17px; }
  .brand-mono-img{ width:124px; height:40px; padding:6px 8px; }
  .brand-mono-xl.brand-mono-img{ width:150px; height:50px; padding:7px 10px; }
  .logo-nc{ font-size:27px; }
  .logo-words{ font-size:8.5px; }
  .brand-head{ gap:13px; }
  .aviso{ padding:16px 18px; gap:11px; }
  .aviso-t{ font-size:14.5px; }
  .aviso-p{ font-size:13.5px; }
  .foot-in{ grid-template-columns:1fr; }
  .proto{ font-size:11.5px; }
}

@media (max-width:400px){
  .grid, .brand-row-grid{ grid-template-columns:1fr; }
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{ animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}
