
:root{
  --ink:#0b2545;
  --ink2:#123b67;
  --accent:#16a3d8;
  --bg:#f5f8fc;
  --card:#ffffff;
  --line:#dfe7f1;
  --muted:#66778b;
  --shadow:0 12px 35px rgba(11,37,69,.10);
  --radius:20px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
[hidden]{display:none!important}
body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#16283b;background:var(--bg)}
button,input,select{font:inherit}
button{cursor:pointer}
.topbar{
  position:sticky;top:0;z-index:30;height:74px;padding:0 max(18px,calc((100vw - 1240px)/2));
  display:flex;align-items:center;justify-content:space-between;background:rgba(255,255,255,.94);
  backdrop-filter:blur(14px);border-bottom:1px solid var(--line)
}
.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--ink)}
.brand-mark{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;color:white;font-weight:900;background:linear-gradient(135deg,var(--ink),var(--accent));box-shadow:0 8px 22px rgba(22,163,216,.28)}
.brand strong,.brand small{display:block}
.brand strong{font-size:17px}.brand small{font-size:12px;color:var(--muted);margin-top:1px}
.back-link{color:var(--ink2);text-decoration:none;font-weight:700;font-size:14px}
.hero{
  max-width:1240px;margin:0 auto;padding:56px 18px 30px;display:grid;grid-template-columns:1fr auto;gap:30px;align-items:end
}
.eyebrow{font-size:12px;font-weight:900;letter-spacing:.15em;color:var(--accent)}
.hero h1{font-size:clamp(38px,6vw,70px);line-height:.95;margin:10px 0 18px;max-width:760px;color:var(--ink);letter-spacing:-.045em}
.hero p{max-width:760px;color:var(--muted);font-size:18px;line-height:1.55;margin:0}
.hero-card{background:var(--ink);color:white;border-radius:22px;padding:23px 28px;min-width:190px;box-shadow:var(--shadow)}
.hero-card strong,.hero-card span{display:block}.hero-card strong{font-size:27px}.hero-card span{opacity:.75;margin-top:4px;font-size:13px}
.catalog-shell{max-width:1240px;margin:0 auto;padding:12px 18px 130px}
.toolbar{display:grid;grid-template-columns:minmax(260px,1fr) 250px 200px;gap:12px;position:sticky;top:86px;z-index:20;background:rgba(245,248,252,.94);backdrop-filter:blur(12px);padding:10px 0}
.searchbox{display:flex;align-items:center;gap:10px;background:white;border:1px solid var(--line);border-radius:14px;padding:0 15px;box-shadow:0 6px 20px rgba(11,37,69,.05)}
.searchbox span{font-size:24px;color:var(--muted)}
.searchbox input{width:100%;border:0;outline:0;background:transparent;height:48px;color:var(--ink)}
select{height:48px;border:1px solid var(--line);border-radius:14px;background:white;padding:0 13px;color:var(--ink);outline:0}
.chips{display:flex;gap:8px;overflow:auto;padding:14px 0 20px;scrollbar-width:none}
.chip{white-space:nowrap;border:1px solid var(--line);background:white;color:var(--ink2);border-radius:999px;padding:9px 14px;font-size:13px;font-weight:800}
.chip.active{background:var(--ink);border-color:var(--ink);color:white}
.status,.empty{min-height:320px;display:grid;place-items:center;align-content:center;text-align:center;color:var(--muted)}
.spinner{width:34px;height:34px;border-radius:50%;border:3px solid #d8e5f1;border-top-color:var(--accent);animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}
.product-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:17px;display:flex;flex-direction:column;min-height:250px;box-shadow:0 8px 26px rgba(11,37,69,.055);transition:.2s}
.product-card:hover{transform:translateY(-3px);box-shadow:var(--shadow)}
.product-visual{position:relative;height:92px;border-radius:16px;background:linear-gradient(135deg,#edf6fb,#f9fbfd);display:grid;place-items:center;margin-bottom:15px;overflow:hidden}
.product-visual span{font-size:33px;font-weight:950;color:var(--ink);opacity:.23}
.product-visual img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.category{font-size:11px;font-weight:900;color:var(--accent);text-transform:uppercase;letter-spacing:.06em}
.product-card h2{font-size:15px;line-height:1.32;margin:7px 0 5px;color:#132940;min-height:40px}
.code{font-size:12px;color:var(--muted);margin-bottom:13px}
.price-row{display:flex;align-items:end;justify-content:space-between;gap:10px;margin-top:auto}
.price{font-size:20px;font-weight:900;color:var(--ink)}
.add-btn{border:0;border-radius:12px;background:var(--ink);color:white;font-weight:900;padding:10px 13px}
.add-btn:hover{background:var(--ink2)}
.cart-fab{
  position:fixed;right:22px;bottom:20px;z-index:45;border:0;background:var(--ink);color:white;border-radius:18px;
  min-height:58px;padding:0 18px;display:flex;align-items:center;gap:10px;box-shadow:0 16px 40px rgba(11,37,69,.28);font-weight:850
}
.cart-fab b{display:grid;place-items:center;background:var(--accent);border-radius:999px;min-width:26px;height:26px;padding:0 7px}
.cart-panel{position:fixed;top:0;right:-430px;width:min(420px,100vw);height:100vh;z-index:60;background:white;box-shadow:-20px 0 55px rgba(11,37,69,.18);display:flex;flex-direction:column;transition:.28s ease}
.cart-panel.open{right:0}.overlay{position:fixed;inset:0;background:rgba(5,18,34,.42);z-index:50;opacity:0;pointer-events:none;transition:.25s}.overlay.show{opacity:1;pointer-events:auto}
.cart-head{height:78px;padding:0 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}
.cart-head strong,.cart-head span{display:block}.cart-head span{font-size:12px;color:var(--muted);margin-top:3px}
.icon-btn{border:0;background:#eef4f8;color:var(--ink);border-radius:12px;width:40px;height:40px;font-size:24px}
.cart-items{padding:15px 20px;overflow:auto;flex:1}
.cart-empty{padding:40px 10px;text-align:center;color:var(--muted)}
.cart-item{padding:13px 0;border-bottom:1px solid var(--line)}
.cart-item-top{display:flex;justify-content:space-between;gap:12px}
.cart-item strong{font-size:13px;line-height:1.35}.cart-item .mini-price{font-weight:900;color:var(--ink);white-space:nowrap}
.qty-row{display:flex;align-items:center;gap:8px;margin-top:10px}
.qty-btn{width:29px;height:29px;border:1px solid var(--line);background:white;border-radius:8px;font-weight:900;color:var(--ink)}
.remove{margin-left:auto;border:0;background:none;color:#a33;font-size:12px}
.cart-footer{padding:17px 20px 23px;border-top:1px solid var(--line);background:#fbfdff}
.total-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:13px}.total-row strong{font-size:22px;color:var(--ink)}
.primary-btn{width:100%;border:0;background:#19a85b;color:white;border-radius:14px;padding:14px;font-weight:900}
.cart-footer small{display:block;color:var(--muted);text-align:center;margin-top:10px;line-height:1.4}
footer{padding:25px 18px 100px;text-align:center;color:var(--muted);font-size:13px}
@media(max-width:950px){
  .grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .toolbar{grid-template-columns:1fr 1fr}.searchbox{grid-column:1/-1}
  .hero{grid-template-columns:1fr}.hero-card{justify-self:start}
}
@media(max-width:680px){
  .topbar{height:66px}.back-link{font-size:0}.back-link:after{content:"Inicio";font-size:13px}
  .hero{padding-top:34px}.hero h1{font-size:43px}.hero p{font-size:16px}
  .toolbar{top:72px;grid-template-columns:1fr}.searchbox{grid-column:auto}.toolbar select{width:100%}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .product-card{padding:12px;min-height:235px;border-radius:16px}.product-visual{height:72px}.product-card h2{font-size:13px}.price{font-size:17px}.add-btn{padding:9px 10px}
  .cart-fab{left:14px;right:14px;bottom:12px;justify-content:center}
}
@media(max-width:390px){.grid{grid-template-columns:1fr}}
