/* =========================================================
   Tienda pública — Ferretería Online (PRD Soluciones)
   Los colores --accent e --ink los define cada tienda.
   ========================================================= */
:root {
  --bg: #F4F2EE;
  --surface: #FFFFFF;
  --surface-2: #ECE8E1;
  --ink: #1C1B19;
  --muted: #625E57;
  --line: #DDD8CF;
  --accent: #E8590C;
  --accent-hover: #C54B0A;
  --accent-ink: #FFFFFF;
  --dark: #1C1B19;
  --dark-ink: #FFFFFF;
  --ok: #1E7B45;
  --warn: #9A5B00;
  --bad: #B3261E;
  --wa: #1DA851;
  --wa-hover: #178A43;
  --r: 3px;
  --gutter: 24px;
  --maxw: 1280px;
  --f-head: 'Archivo', system-ui, sans-serif;
  --f-body: 'Public Sans', system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(20, 18, 14, .06), 0 6px 18px -8px rgba(20, 18, 14, .18);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-head); font-stretch: 88%; line-height: 1.08; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.3vw, 2.25rem); font-weight: 750; }
h3 { font-size: 1.05rem; font-weight: 650; font-stretch: 95%; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.ico { flex: none; }
.saltar { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 99; }
.saltar:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border: 1px solid transparent; border-radius: var(--r); font-weight: 650; text-decoration: none; cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease), transform .12s var(--ease), border-color .18s; white-space: nowrap; }
.btn:active { transform: translateY(1px) scale(.985); }
.btn--grande { min-height: 54px; padding: 0 26px; font-size: 1.05rem; }
.btn--bloque { width: 100%; }
.btn--primario { background: var(--accent); color: var(--accent-ink); }
.btn--primario:hover { background: var(--accent-hover); }
.btn--claro { background: transparent; color: inherit; border-color: currentColor; }
.btn--claro:hover { background: rgba(127, 127, 127, .12); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-hover); }
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn.is-cargando { position: relative; color: transparent !important; }
.btn.is-cargando::after { content: ''; position: absolute; width: 20px; height: 20px; border: 2px solid #fff; border-right-color: transparent; border-radius: 50%; animation: gira .7s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.lnk { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; text-decoration: none; color: var(--ink);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .25s var(--ease); padding-bottom: 2px; }
.lnk:hover { background-size: 100% 1.5px; }
.lnk .ico { transition: transform .2s var(--ease); }
.lnk:hover .ico { transform: translateX(3px); }

/* ---------- encabezado ---------- */
.top { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); }
.top__fila { display: flex; align-items: center; gap: 24px; height: 72px; }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; flex: none; }
.marca img { max-height: 46px; width: auto; }
.marca__sello { width: 40px; height: 40px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); border-radius: var(--r); }
.marca__nombre { font: 800 1.2rem/1 var(--f-head); font-stretch: 85%; text-transform: uppercase; letter-spacing: .01em; }
.buscador { flex: 1; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); max-width: 620px; transition: border-color .2s, background .2s; }
.buscador:focus-within { border-color: var(--ink); background: var(--surface); }
.buscador .ico { color: var(--muted); }
.buscador input { flex: 1; border: 0; background: transparent; outline: none; min-width: 0; height: 100%; }
.top__acciones { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.lnk-cat { font-weight: 600; text-decoration: none; }
.lnk-cat:hover { color: var(--accent-hover); }
.btn-carrito { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; background: var(--ink); color: var(--dark-ink); border-radius: var(--r); text-decoration: none; font-weight: 650; transition: transform .12s, background .2s; }
.btn-carrito:hover { background: var(--accent); color: var(--accent-ink); }
.btn-carrito:active { transform: scale(.97); }
.badge { min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 11px; background: var(--accent); color: var(--accent-ink); font: 700 .78rem/1 var(--f-body); }
.btn-carrito:hover .badge { background: var(--ink); color: var(--dark-ink); }
.badge--inv { background: var(--accent-ink); color: var(--accent); }
.cats { border-top: 1px solid var(--line); }
.cats__fila { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.cats__fila::-webkit-scrollbar { display: none; }
.cats a { flex: none; padding: 11px 12px; font-size: .92rem; font-weight: 550; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.cats a:first-child { padding-left: 0; }
.cats a:hover { color: var(--ink); }
.cats a.is-on { color: var(--ink); border-color: var(--accent); }

/* ---------- portada ---------- */
.hero { position: relative; background: var(--dark); color: var(--dark-ink); overflow: hidden; }
.hero__grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; min-height: min(640px, calc(100svh - 120px)); padding-top: 56px; padding-bottom: 56px; }
.hero--foto .hero__grid { grid-template-columns: minmax(0, 680px); }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero--foto::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(14, 13, 11, .86) 0%, rgba(14, 13, 11, .62) 55%, rgba(14, 13, 11, .15) 100%); }
.hero--foto .hero__grid { z-index: 2; }
.hero__lugar { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px; font-weight: 600; opacity: .85; }
.hero__lugar .ico { color: var(--accent); }
.hero h1 { font-size: clamp(2.6rem, 1.4rem + 4.4vw, 5.2rem); font-stretch: 78%; text-transform: uppercase; line-height: .95; letter-spacing: -.005em; }
.hero__lead { font-size: 1.2rem; max-width: 34em; margin: 22px 0 0; opacity: .9; }
.hero__dato { margin: 14px 0 0; opacity: .78; }
.hero__dato b { color: var(--accent); font-size: 1.1em; }
.hero__acc { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__vitrina { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vitrina__item { display: grid; grid-template-rows: auto auto auto; background: var(--surface); color: var(--ink); text-decoration: none; border-radius: var(--r); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s; }
.vitrina__item:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .5); }
.vitrina__foto { aspect-ratio: 4/3; background: var(--surface-2); overflow: hidden; }
.vitrina__foto > * { width: 100%; height: 100%; object-fit: contain; transition: transform .35s var(--ease); }
.vitrina__item:hover .vitrina__foto > * { transform: scale(1.03); }
.vitrina__nombre { padding: 12px 14px 0; font-weight: 600; font-size: .93rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vitrina__precio { padding: 6px 14px 14px; font: 750 1.05rem/1 var(--f-head); }

/* ---------- secciones ---------- */
.seccion { padding: 72px 0; }
.seccion--alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.seccion--oscura { background: var(--dark); color: var(--dark-ink); }
.seccion__cab { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; }
.seccion > .wrap > h2 { margin-bottom: 28px; }
.seccion--oscura .lnk { color: var(--dark-ink); }

.rubros { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.rubro { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px; min-height: 150px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; overflow: hidden; }
.rubro:hover { transform: translateY(-2px); border-color: var(--ink); box-shadow: var(--shadow); }
.rubro img { width: calc(100% + 40px); margin: -20px -20px 10px; aspect-ratio: 16/9; object-fit: cover; }
.rubro__ico { width: 52px; height: 52px; display: grid; place-items: center; border-radius: var(--r); background: var(--bg); color: var(--accent); margin-bottom: auto; transition: background .2s, color .2s; }
.rubro:hover .rubro__ico { background: var(--accent); color: var(--accent-ink); }
.rubro__nombre { font: 700 1.02rem/1.2 var(--f-head); font-stretch: 92%; margin-top: 18px; }
.rubro__cant { font-size: .85rem; color: var(--muted); }

.pasos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 2px solid var(--ink); }
.pasos li { padding: 28px 28px 8px 0; }
.pasos li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.pasos__n { display: block; font: 800 3.4rem/1 var(--f-head); font-stretch: 75%; color: var(--accent); margin-bottom: 14px; }
.pasos h3 { font-size: 1.25rem; margin-bottom: 8px; }
.pasos p { margin: 0; color: var(--muted); }

.visita { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px 64px; align-items: start; }
.visita h2 { font-size: clamp(2.2rem, 1.4rem + 3vw, 4rem); font-stretch: 78%; text-transform: uppercase; line-height: .95; }
.visita__dir { font: 700 clamp(1.3rem, 1rem + 1vw, 1.8rem)/1.2 var(--f-head); font-stretch: 90%; margin: 20px 0 0; color: var(--accent); }
.visita__datos { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.visita__datos li { display: flex; gap: 14px; }
.visita__datos .ico { color: var(--accent); margin-top: 2px; }
.visita__datos b { display: block; font-family: var(--f-head); font-size: 1.05rem; }
.visita__datos span { opacity: .8; }
.visita__acc { grid-column: 2; display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- tarjetas de producto ---------- */
.grilla { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #c9c3b8; }
.card__foto { display: block; aspect-ratio: 1; background: #fff; overflow: hidden; border-bottom: 1px solid var(--line); }
.card__foto > * { width: 100%; height: 100%; object-fit: contain; transition: transform .35s var(--ease); }
.card:hover .card__foto > * { transform: scale(1.03); }
.card__cuerpo { display: flex; flex-direction: column; flex: 1; padding: 14px 14px 16px; }
.card__marca { margin: 0; font-size: .78rem; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.card__marca span { font-weight: 500; letter-spacing: 0; text-transform: none; opacity: .8; }
.card__nombre { margin: 4px 0 14px; font-family: var(--f-body); font-stretch: 100%; font-size: .98rem; font-weight: 600; line-height: 1.3; letter-spacing: 0; }
.card__nombre a { text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__nombre a:hover { text-decoration: underline; text-underline-offset: 3px; }
.card__pie { margin-top: auto; display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.precio { display: block; font: 750 1.2rem/1.1 var(--f-head); font-stretch: 92%; }
.precio small { font: 500 .78rem var(--f-body); color: var(--muted); margin-left: 3px; }
.precio--grande { font-size: clamp(1.9rem, 1.5rem + 1.2vw, 2.5rem); }
.precio--consultar { font-size: 1rem; color: var(--muted); }
.stock { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .8rem; font-weight: 600; }
.stock::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stock--ok { color: var(--ok); }
.stock--pocas { color: var(--warn); }
.stock--consultar { color: var(--muted); }
.btn-add { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: var(--r); background: var(--accent); color: var(--accent-ink); cursor: pointer; transition: background .18s, transform .12s; }
.btn-add:hover { background: var(--accent-hover); }
.btn-add:active { transform: scale(.92); }
.btn-add.is-ok { background: var(--ok); color: #fff; }
.sinfoto { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: linear-gradient(180deg, #fff, var(--bg)); color: var(--accent); }
.sinfoto b { font: 700 .75rem/1 var(--f-body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.sinfoto--mini { width: 100%; height: 100%; }

/* ---------- catálogo ---------- */
.catalogo, .ficha, .carrito { padding: 32px 0 72px; }
.migas { font-size: .88rem; color: var(--muted); margin-bottom: 12px; }
.migas a { text-decoration: none; }
.migas a:hover { color: var(--ink); text-decoration: underline; }
.catalogo__cab { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.catalogo__cab h1 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.8rem); }
.catalogo__n { margin: 6px 0 0; color: var(--muted); }
.orden { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.chk { display: inline-flex; align-items: center; gap: 8px; font-weight: 550; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--accent); }
.sel { display: inline-flex; align-items: center; gap: 10px; font-weight: 550; }
.sel select { height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.catalogo__grid { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
.grilla--cat { grid-template-columns: repeat(3, 1fr); }
.filtros { position: sticky; top: 140px; }
.filtros details + details { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.filtros summary { font: 700 1rem var(--f-head); cursor: pointer; margin-bottom: 10px; list-style: none; }
.filtros summary::-webkit-details-marker { display: none; }
.filtros ul { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow: auto; }
.filtros li a { display: flex; justify-content: space-between; padding: 7px 10px; margin-left: -10px; border-radius: var(--r); text-decoration: none; color: var(--muted); font-size: .94rem; transition: background .15s, color .15s; }
.filtros li a:hover { background: var(--surface); color: var(--ink); }
.filtros li a.is-on { background: var(--ink); color: var(--dark-ink); }
.filtros li a span { opacity: .7; font-size: .85rem; }
.paginas { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 36px; }
.paginas a { min-width: 44px; height: 44px; padding: 0 12px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; background: var(--surface); font-weight: 600; transition: border-color .15s; }
.paginas a:hover { border-color: var(--ink); }
.paginas a.is-on { background: var(--ink); color: var(--dark-ink); border-color: var(--ink); }
.vacio { text-align: center; padding: 56px 20px; max-width: 520px; margin: 0 auto; }
.vacio .ico { color: var(--muted); margin: 0 auto 14px; }
.vacio h1, .vacio h2 { margin-bottom: 10px; }
.vacio p { color: var(--muted); margin: 0 0 22px; }

/* ---------- ficha ---------- */
.ficha__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.ficha__foto { position: sticky; top: 140px; aspect-ratio: 1; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ficha__foto > * { width: 100%; height: 100%; object-fit: contain; }
.ficha__foto .sinfoto .ico { width: 110px; height: 110px; }
.ficha__marca { margin: 0 0 6px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; color: var(--accent-hover); }
.ficha h1 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.8rem); }
.ficha__codigos { color: var(--muted); font-size: .9rem; margin: 10px 0 0; }
.ficha__precio { margin: 24px 0; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ficha__mayor { margin: 8px 0 0; font-weight: 600; color: var(--ok); }
.variantes { margin-bottom: 24px; }
.variantes__tit { margin: 0 0 10px; font-weight: 650; }
.variantes__lista { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-decoration: none; font-weight: 600; transition: border-color .15s, background .15s; }
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); color: var(--dark-ink); border-color: var(--ink); }
.chip--sin { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .3); }
.comprar__lbl { display: block; font-weight: 650; margin-bottom: 10px; }
.comprar__fila { display: flex; gap: 12px; flex-wrap: wrap; }
.comprar__nota { color: var(--muted); font-size: .9rem; margin: 10px 0 0; }
.stepper { display: inline-flex; align-items: stretch; height: 54px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.stepper button { width: 48px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; font-size: 1.3rem; transition: background .15s; }
.stepper button:hover { background: var(--bg); }
.stepper button:active { transform: scale(.94); }
.stepper input { width: 72px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font-weight: 700; font-size: 1.1rem; outline: none; -moz-appearance: textfield; background: transparent; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper--chico { height: 42px; }
.stepper--chico button { width: 38px; }
.stepper--chico input { width: 58px; font-size: 1rem; }
.ficha__desc { margin: 32px 0 24px; }
.ficha__desc h2 { font-size: 1.2rem; margin-bottom: 8px; }
.ficha__desc p { margin: 0; color: var(--muted); }

/* ---------- carrito ---------- */
.carrito h1 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.8rem); margin-bottom: 24px; }
.carrito__grid { display: grid; grid-template-columns: 1fr 400px; gap: 32px; align-items: start; }
.carrito__lista { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.cargando { padding: 24px; color: var(--muted); margin: 0; }
.linea { display: grid; grid-template-columns: 72px 1fr auto auto 36px; gap: 16px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); transition: opacity .2s; }
.linea:last-child { border-bottom: 0; }
.linea.is-sale { opacity: .3; }
.linea__foto { width: 72px; height: 72px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.linea__foto img { width: 100%; height: 100%; object-fit: contain; }
.linea__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.linea__nombre { font-weight: 650; text-decoration: none; }
.linea__nombre:hover { text-decoration: underline; }
.linea__cod, .linea__pu { font-size: .85rem; color: var(--muted); }
.linea__pu em { font-style: normal; color: var(--ok); font-weight: 600; }
.linea .stock { margin-top: 2px; }
.linea__cant { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.linea__cant small { color: var(--muted); font-size: .78rem; }
.linea__sub { font: 750 1.05rem var(--f-head); min-width: 120px; text-align: right; }
.linea__quitar { width: 36px; height: 36px; border: 0; background: transparent; border-radius: var(--r); cursor: pointer; color: var(--muted); }
.linea__quitar:hover { background: var(--bg); color: var(--bad); }
.resumen { position: sticky; top: 140px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.resumen__total { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.resumen__total span { font-weight: 650; }
.resumen__total b { font: 800 1.8rem/1 var(--f-head); font-stretch: 88%; }
.resumen__nota { font-size: .86rem; color: var(--muted); margin: 10px 0 0; }
.resumen__min { font-weight: 600; margin: 10px 0 0; font-size: .9rem; }
.resumen__min.is-mal { color: var(--bad); }
.form-pedido { margin-top: 22px; display: grid; gap: 14px; }
.form-pedido h2 { font-size: 1.2rem; }
.form-pedido label { display: grid; gap: 6px; font-weight: 600; font-size: .93rem; }
.form-pedido label small { font-weight: 400; color: var(--muted); }
.form-pedido input:not([type=radio]), .form-pedido textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); font-weight: 400; transition: border-color .15s, background .15s; }
.form-pedido input:focus, .form-pedido textarea:focus { outline: none; border-color: var(--ink); background: var(--surface); }
.entrega { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.entrega legend { font-weight: 600; font-size: .93rem; margin-bottom: 6px; }
.opcion { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 10px !important; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; transition: border-color .15s, background .15s; }
.opcion:has(input:checked) { border-color: var(--ink); background: var(--bg); }
.opcion input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); }
.opcion span { display: grid; gap: 2px; }
.opcion small { font-weight: 400; color: var(--muted); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; }
.form-error { color: var(--bad); font-weight: 600; margin: 0; padding: 10px 12px; background: #FBEAE8; border-radius: var(--r); }
.enviado { max-width: 620px; margin: 24px auto; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 48px 28px; }
.enviado__ico { width: 64px; height: 64px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; background: var(--ok); color: #fff; }
.enviado p { color: var(--muted); margin: 14px 0 26px; }
.enviado__acc { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- seguimiento ---------- */
.seguimiento { max-width: 760px; }
.seguimiento__fecha { color: var(--muted); margin: -14px 0 28px; }
.estados { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.estados li { display: grid; gap: 4px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.estados li span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; margin-bottom: 6px; }
.estados li.is-on { color: var(--ink); border-color: var(--ink); }
.estados li.is-on span { background: var(--accent); color: var(--accent-ink); }
.estados small { font-size: .82rem; }
.tabla-pedido { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 14px; }
.tabla-pedido__fila, .tabla-pedido__total { display: flex; justify-content: space-between; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.tabla-pedido__total { border: 0; border-top: 2px solid var(--ink); font-size: 1.1rem; }
.aviso { padding: 14px 16px; border-radius: var(--r); font-weight: 600; }
.aviso--mal { background: #FBEAE8; color: var(--bad); }
.seguimiento .btn { margin-top: 20px; }

/* ---------- pie ---------- */
.pie { background: var(--surface); border-top: 1px solid var(--line); padding: 44px 0 0; }
.pie__grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 28px; align-items: start; padding-bottom: 32px; }
.pie__nombre { font: 800 1.3rem var(--f-head); font-stretch: 85%; text-transform: uppercase; margin: 0; }
.pie__txt { color: var(--muted); margin: 6px 0 0; }
.pie__dato { display: flex; gap: 10px; margin: 0 0 10px; color: var(--muted); }
.pie__dato .ico { color: var(--accent); margin-top: 2px; }
.pie__legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 22px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.pie__legal a { text-decoration: none; }
.pie__legal a:hover { color: var(--ink); text-decoration: underline; }

.barra-movil { display: none; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 16px); opacity: 0; background: var(--ink); color: var(--dark-ink); padding: 12px 18px; border-radius: var(--r); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5); font-weight: 550; transition: transform .25s var(--ease), opacity .25s; max-width: calc(100% - 32px); }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.toast a { color: var(--accent); font-weight: 700; margin-left: 8px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .rubros { grid-template-columns: repeat(4, 1fr); }
  .grilla { grid-template-columns: repeat(3, 1fr); }
  .grilla--cat { grid-template-columns: repeat(2, 1fr); }
  .carrito__grid { grid-template-columns: 1fr 360px; }
}
@media (max-width: 900px) {
  :root { --gutter: 20px; }
  html { scroll-padding-top: 120px; }
  .top__fila { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 12px; gap: 12px; }
  .buscador { order: 3; flex-basis: 100%; max-width: none; }
  .lnk-cat { display: none; }
  .hero__grid { grid-template-columns: 1fr; min-height: 0; padding-top: 44px; padding-bottom: 44px; gap: 32px; }
  .rubros { grid-template-columns: repeat(3, 1fr); }
  .grilla, .grilla--cat { grid-template-columns: repeat(2, 1fr); }
  .catalogo__grid { grid-template-columns: 1fr; }
  .filtros { position: static; display: flex; gap: 10px; overflow-x: auto; }
  .filtros details { flex: none; margin: 0 !important; padding: 0 !important; border: 0 !important; }
  .filtros details[open] { flex-basis: 100%; }
  .filtros summary { margin: 0; height: 42px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: .95rem; }
  .filtros details[open] summary { margin-bottom: 8px; }
  .filtros ul { max-height: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 6px 6px 16px; }
  .ficha__grid { grid-template-columns: 1fr; gap: 24px; }
  .ficha__foto { position: static; max-width: 520px; }
  .carrito__grid { grid-template-columns: 1fr; }
  .resumen { position: static; }
  .pasos { grid-template-columns: 1fr; }
  .pasos li, .pasos li + li { padding: 22px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .visita { grid-template-columns: 1fr; }
  .visita__acc { grid-column: auto; }
  .pie__grid { grid-template-columns: 1fr; }
  .seccion { padding: 56px 0; }
  body { padding-bottom: 76px; }
  .barra-movil { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
  .barra-movil .btn { min-height: 50px; padding: 0 12px; }
  .barra-movil .btn:only-child { grid-column: 1 / -1; }
  .toast { bottom: 92px; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .btn-carrito span { display: none; }
  .btn-carrito { padding: 0 12px; }
  .marca__nombre { font-size: 1.02rem; }
  .hero h1 { font-size: clamp(2.3rem, 1.2rem + 7vw, 3.2rem); }
  .hero__lead { font-size: 1.05rem; }
  .hero__acc .btn { width: 100%; }
  .rubros { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .rubro { min-height: 128px; padding: 16px; }
  .grilla, .grilla--cat { gap: 8px; }
  .card__cuerpo { padding: 10px 10px 12px; }
  .card__nombre { font-size: .9rem; margin-bottom: 10px; }
  .precio { font-size: 1.05rem; }
  .btn-add { width: 40px; height: 40px; }
  .seccion__cab { flex-direction: column; align-items: start; }
  .orden { width: 100%; justify-content: space-between; }
  .comprar__fila .btn { flex: 1; }
  .linea { grid-template-columns: 56px 1fr 30px; grid-template-areas: "f i x" "f c s"; gap: 8px 12px; padding: 14px; }
  .linea__foto { grid-area: f; width: 56px; height: 56px; }
  .linea__info { grid-area: i; }
  .linea__cant { grid-area: c; align-items: start; }
  .linea__sub { grid-area: s; min-width: 0; align-self: center; }
  .linea__quitar { grid-area: x; align-self: start; }
  .estados { grid-template-columns: 1fr; }
  .resumen { padding: 18px; }
  .enviado { padding: 36px 18px; }
  .enviado__acc .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
[hidden] { display: none !important; }
.form-pedido label > small { margin-top: -4px; }
.sinfoto--mini { display: grid; place-items: center; color: var(--accent); }
