/* ===========================================================
   Soelar — diseño del escaparate (v2, moderno)
   =========================================================== */
:root {
  --primary: #1f44ff;
  --primary-dark: #0a1d8f;
  --accent: #ffc233;
  --ink: #0e1525;
  --ink-soft: #475069;
  --muted: #8a93a8;
  --line: #e9edf4;
  --bg: #f5f7fc;
  --surface: #ffffff;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 10px rgba(16, 28, 60, .06);
  --shadow: 0 12px 40px rgba(16, 28, 60, .10);
  --shadow-lg: 0 24px 70px rgba(16, 28, 60, .18);
  --max: 1240px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Sora', var(--font);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; line-height: 1.12; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  border: none; border-radius: 12px; padding: 13px 22px; font-weight: 600; font-size: .94rem; font-family: var(--font);
  background: var(--primary); color: #fff; transition: transform .15s ease, box-shadow .2s, filter .2s;
  box-shadow: 0 8px 20px rgba(31, 68, 255, .25);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(31, 68, 255, .35); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: #fff; color: var(--primary); border: 1.5px solid var(--line); box-shadow: var(--shadow-sm); }
.btn.ghost:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.btn.accent { background: linear-gradient(135deg, #ffd062, var(--accent)); color: #3a2c00; box-shadow: 0 8px 22px rgba(255, 194, 51, .4); }
.btn.wa { background: #25d366; box-shadow: 0 8px 20px rgba(37, 211, 102, .3); }
.btn.sm { padding: 9px 15px; font-size: .85rem; border-radius: 10px; box-shadow: none; }
.btn.block { width: 100%; }

/* ---------- Header ---------- */
header.site { position: sticky; top: 0; z-index: 60; transition: box-shadow .25s, background .25s; }
header.site::before { content: ''; position: absolute; inset: 0; background: rgba(255, 255, 255, .82); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .25s; }
header.site.scrolled::before { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
header.site .bar { position: relative; display: flex; align-items: center; gap: 18px; padding: 16px 0; }
.logo { font-family: var(--display); font-weight: 800; font-size: 1.32rem; display: flex; align-items: center; gap: 10px; }
.logo .spark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 1.1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); box-shadow: 0 6px 16px rgba(31, 68, 255, .4); }
.search { flex: 1; max-width: 520px; position: relative; }
.search input { width: 100%; padding: 13px 18px 13px 46px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; font-size: .95rem; outline: none; transition: .2s; }
.search input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(31, 68, 255, .1); }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.cart-btn { position: relative; }
.cart-badge { position: absolute; top: -7px; right: -7px; background: var(--accent); color: #3a2c00; font-size: .7rem; font-weight: 800; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; box-shadow: var(--shadow-sm); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff; padding: 88px 0 96px; background: linear-gradient(135deg, #1b34d8 0%, #0a1d8f 55%, #07134d 100%); }
.hero::before { content: ''; position: absolute; top: -120px; right: -60px; width: 520px; height: 520px; background: radial-gradient(circle, rgba(255, 194, 51, .35), transparent 65%); }
.hero::after { content: ''; position: absolute; bottom: -200px; left: -120px; width: 540px; height: 540px; background: radial-gradient(circle, rgba(80, 130, 255, .55), transparent 60%); }
.hero .container { position: relative; z-index: 2; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); padding: 7px 15px; border-radius: 30px; font-size: .82rem; font-weight: 600; margin-bottom: 22px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; max-width: 760px; }
.hero h1 .hl { background: linear-gradient(120deg, var(--accent), #ffe7a0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 1.16rem; opacity: .9; margin: 20px 0 30px; max-width: 580px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 38px; margin-top: 52px; flex-wrap: wrap; }
.hero-stats .s b { font-family: var(--display); font-size: 1.9rem; font-weight: 800; display: block; }
.hero-stats .s span { opacity: .75; font-size: .88rem; }

/* franja de ventajas */
.trust { background: var(--surface); border-bottom: 1px solid var(--line); }
.trust .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 20px 22px; }
.trust .t { display: flex; align-items: center; gap: 12px; font-size: .9rem; font-weight: 500; color: var(--ink-soft); }
.trust .t .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: rgba(31, 68, 255, .08); color: var(--primary); font-size: 1.2rem; flex: none; }

section { padding: 64px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 30px; gap: 16px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); font-weight: 700; }
.section-head .sub { color: var(--muted); font-size: .95rem; margin-top: 6px; }
.section-head a { color: var(--primary); font-weight: 600; font-size: .92rem; white-space: nowrap; }

/* ---------- Categorías ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.cat-card { position: relative; overflow: hidden; border-radius: var(--radius); padding: 22px; min-height: 140px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; transition: transform .2s, box-shadow .2s; box-shadow: var(--shadow-sm); }
.cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.cat-card .ic { font-size: 2rem; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .2)); }
.cat-card h3 { font-size: 1.05rem; font-weight: 700; }
.cat-card span { font-size: .8rem; opacity: .85; font-weight: 500; }
.cat-card::after { content: '→'; position: absolute; top: 20px; right: 20px; opacity: 0; transform: translateX(-6px); transition: .2s; font-weight: 700; }
.cat-card:hover::after { opacity: .9; transform: translateX(0); }

/* ---------- Tarjetas de producto ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.prod-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; display: flex; flex-direction: column; }
.prod-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.prod-card .thumb { position: relative; aspect-ratio: 5/4; display: grid; place-items: center; overflow: hidden; }
.prod-card .thumb img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.prod-card .thumb .glyph { font-size: 2.8rem; color: #fff; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .22)); }
.prod-card .thumb .ref-chip { position: absolute; bottom: 10px; left: 10px; background: rgba(255, 255, 255, .9); color: var(--ink); font-size: .7rem; font-weight: 700; padding: 4px 9px; border-radius: 8px; letter-spacing: .02em; }
.prod-card .badge-ask { position: absolute; top: 10px; right: 10px; background: var(--ink); color: #fff; font-size: .68rem; font-weight: 700; padding: 5px 10px; border-radius: 20px; }
.prod-card .body { padding: 15px 16px 0; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.prod-card .brand { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--primary); font-weight: 700; }
.prod-card h3 { font-family: var(--font); font-size: .96rem; font-weight: 600; line-height: 1.32; letter-spacing: 0; }
.prod-card .price { font-family: var(--display); font-size: 1.2rem; font-weight: 700; margin-top: auto; padding-top: 8px; }
.prod-card .price small { font-weight: 500; color: var(--muted); font-size: .72rem; }
.prod-card .price.ask { color: var(--primary); font-size: .95rem; }
.prod-card .actions { display: flex; gap: 8px; padding: 14px 16px; }
.prod-card .actions .btn { flex: 1; }

/* ---------- Detalle ---------- */
.crumbs { color: var(--muted); font-size: .88rem; margin-bottom: 22px; }
.crumbs a:hover { color: var(--primary); }
.detail { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; }
.detail .gallery { border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.detail .gallery .main { aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; overflow: hidden; }
.detail .gallery .main img { width: 100%; height: 100%; object-fit: contain; padding: 26px; }
.detail .gallery .main .glyph { font-size: 6rem; color: #fff; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .25)); }
.detail .info h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: 10px; }
.detail .info .brand-tag { color: var(--primary); font-weight: 700; text-transform: uppercase; font-size: .8rem; letter-spacing: .08em; }
.detail .info .meta { color: var(--muted); font-size: .9rem; margin: 6px 0 16px; }
.price-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 20px 0; box-shadow: var(--shadow-sm); }
.price-box .big { font-family: var(--display); font-size: 2rem; font-weight: 800; }
.price-box .ask-big { font-family: var(--display); font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.detail-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.tag-datasheet { display: inline-flex; align-items: center; gap: 8px; background: #fdecec; color: #d23b3b; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: .9rem; }
.attr-table { width: 100%; border-collapse: collapse; margin-top: 12px; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.attr-table td { padding: 13px 18px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.attr-table tr:last-child td { border-bottom: none; }
.attr-table td:first-child { color: var(--muted); width: 42%; font-weight: 500; }
.attr-table td:last-child { font-weight: 600; }
.h-block { font-family: var(--display); font-size: 1.15rem; font-weight: 700; margin: 26px 0 6px; }

/* ---------- Toolbar catálogo / filtros ---------- */
.layout { display: grid; grid-template-columns: 260px 1fr; gap: 30px; align-items: start; }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: sticky; top: 92px; box-shadow: var(--shadow-sm); max-height: calc(100vh - 110px); overflow-y: auto; }
.filters h4 { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 10px; }
.filters h4:first-child { margin-top: 0; }
.filters .flink { display: block; padding: 7px 10px; border-radius: 9px; font-size: .9rem; color: var(--ink-soft); transition: .15s; cursor: pointer; }
.filters .flink:hover { background: var(--bg); color: var(--ink); }
.filters .flink.active { background: rgba(31, 68, 255, .1); color: var(--primary); font-weight: 600; }
.filters .flink.sub { padding-left: 22px; font-size: .85rem; }
.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 14px; flex-wrap: wrap; }
.toolbar .count { color: var(--muted); font-size: .92rem; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { background: var(--surface); border: 1.5px solid var(--line); border-radius: 30px; padding: 7px 15px; font-size: .82rem; font-weight: 600; cursor: pointer; transition: .15s; color: var(--ink-soft); }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* paginación */
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 38px; }
.pager button { min-width: 42px; height: 42px; border: 1.5px solid var(--line); background: #fff; border-radius: 11px; font-weight: 600; cursor: pointer; transition: .15s; color: var(--ink-soft); }
.pager button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pager button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager button:disabled { opacity: .4; cursor: default; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(8, 16, 40, .55); backdrop-filter: blur(4px); display: none; place-items: center; z-index: 100; padding: 20px; }
.modal-bg.open { display: grid; animation: fade .2s; }
.modal { background: #fff; border-radius: 22px; max-width: 540px; width: 100%; max-height: 92vh; overflow-y: auto; padding: 32px; box-shadow: var(--shadow-lg); animation: pop .25s; }
.modal h2 { font-size: 1.5rem; margin-bottom: 4px; }
.modal .sub { color: var(--muted); font-size: .92rem; margin-bottom: 20px; }
.modal .close { float: right; cursor: pointer; color: var(--muted); font-size: 1.6rem; line-height: 1; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea { width: 100%; padding: 12px 15px; border: 1.5px solid var(--line); border-radius: 11px; font-size: .95rem; font-family: inherit; outline: none; transition: .2s; }
.field input:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(31, 68, 255, .1); }
.quote-items { background: var(--bg); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; font-size: .9rem; }
.quote-items strong { display: block; margin-bottom: 8px; font-size: .82rem; }
.quote-items .qi { display: flex; justify-content: space-between; padding: 5px 0; border-top: 1px solid var(--line); }
.quote-items .qi:first-of-type { border-top: none; }

/* ---------- Footer ---------- */
footer.site { background: #0a1024; color: #97a1bb; padding: 60px 0 30px; margin-top: 40px; }
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
footer.site h4 { color: #fff; margin-bottom: 14px; font-size: 1.05rem; font-family: var(--display); }
footer.site .flogo { font-family: var(--display); font-weight: 800; font-size: 1.3rem; color: #fff; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
footer.site .flogo .spark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
footer.site a { display: block; padding: 4px 0; font-size: .92rem; transition: .15s; }
footer.site a:hover { color: #fff; }
footer.site .copy { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 40px; padding-top: 22px; font-size: .82rem; opacity: .6; }

/* ---------- Utilidades ---------- */
.empty { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty .big { font-size: 3rem; margin-bottom: 12px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.skel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); height: 320px; overflow: hidden; position: relative; }
.skel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 15px 24px; border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 200; opacity: 0; transition: .3s; font-weight: 500; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 900px) {
  .layout, .detail, footer.site .cols { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; }
  .trust .container { grid-template-columns: 1fr 1fr; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  header.site .bar { flex-wrap: wrap; }
  .hero { padding: 60px 0 64px; }
}
