:root{
  --ink:#172033;
  --muted:#667085;
  --line:#d9e1ec;
  --panel:#ffffff;
  --bg:#f4f7fb;
  --accent:#0c8f87;
  --accent-dark:#08736d;
  --warm:#f59e0b;
  --danger:#c62828;
  --soft:#e9f7f5;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:Arial,Helvetica,sans-serif;
  background:var(--bg);
  color:var(--ink);
}

a{color:inherit;text-decoration:none}

.topbar{
  position:sticky;
  top:0;
  z-index:20;
  height:68px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:0 22px;
  background:rgba(255,255,255,.96);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(12px);
}

.brand{display:flex;align-items:center;gap:10px;min-width:0}
.brand-mark{
  width:42px;
  height:42px;
  border-radius:8px;
  display:grid;
  place-items:center;
  background:var(--ink);
  color:#fff;
  font-weight:950;
}
.brand strong{display:block;font-size:17px}
.brand small{display:block;color:var(--muted);font-size:12px;font-weight:800}
.top-whatsapp{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 16px;
  border-radius:8px;
  background:var(--accent);
  color:#fff;
  font-weight:900;
}

main{width:min(1440px,100%);margin:0 auto;padding:22px}

.search-panel{
  background:linear-gradient(135deg,#ffffff 0%,#eef8f7 100%);
  border:1px solid var(--line);
  border-radius:8px;
  padding:26px;
}

.eyebrow{
  margin:0 0 8px;
  color:var(--accent-dark);
  font-size:12px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.06em;
}

h1{
  margin:0 0 18px;
  font-size:clamp(30px,4vw,52px);
  line-height:1.05;
  letter-spacing:0;
}

.search-box input{
  width:100%;
  height:56px;
  border:1px solid #bfd0df;
  border-radius:8px;
  padding:0 16px;
  font-size:17px;
  color:var(--ink);
  outline:none;
  background:#fff;
}

.search-box input:focus{border-color:var(--accent);box-shadow:0 0 0 4px rgba(12,143,135,.14)}

.quick-categories{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}

.quick-categories button{
  min-height:42px;
  border:1px solid #bfd0df;
  border-radius:8px;
  background:#fff;
  color:var(--ink);
  padding:0 13px;
  font-weight:900;
  cursor:pointer;
}

.quick-categories button.active{
  background:var(--ink);
  color:#fff;
  border-color:var(--ink);
}

.content-grid{
  display:grid;
  grid-template-columns:280px minmax(0,1fr);
  gap:18px;
  margin-top:18px;
  align-items:start;
}

.filters,.catalog-section{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:8px;
}

.filters{
  position:sticky;
  top:86px;
  padding:16px;
  display:grid;
  gap:13px;
}

.filter-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.filter-head strong{font-size:16px}
.filter-head button{
  border:0;
  background:transparent;
  color:var(--accent-dark);
  font-weight:900;
  cursor:pointer;
}

label{display:grid;gap:6px;font-size:12px;font-weight:950;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
select{
  width:100%;
  height:42px;
  border:1px solid #ccd7e3;
  border-radius:8px;
  background:#fff;
  color:var(--ink);
  padding:0 10px;
  font-size:14px;
  font-weight:800;
  text-transform:none;
  letter-spacing:0;
}

.catalog-section{padding:16px}

.catalog-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-bottom:14px;
}

.catalog-toolbar p{margin:0 0 4px;color:var(--muted);font-size:13px;font-weight:800}
.catalog-toolbar strong{font-size:22px}
.catalog-toolbar select{width:190px}

.product-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(250px,1fr));
  gap:14px;
}

.product-card{
  min-width:0;
  overflow:hidden;
  background:#fff;
  border:1px solid var(--line);
  border-radius:8px;
  display:flex;
  flex-direction:column;
}

.product-media{
  aspect-ratio:4/3;
  background:#eef2f7;
  display:grid;
  place-items:center;
  border-bottom:1px solid var(--line);
}

.product-media img{width:100%;height:100%;object-fit:cover}
.placeholder{
  width:76px;
  height:76px;
  border-radius:8px;
  display:grid;
  place-items:center;
  background:#fff;
  border:1px solid var(--line);
  color:var(--accent-dark);
  font-size:24px;
  font-weight:950;
}

.product-body{padding:13px;display:flex;flex-direction:column;gap:10px;flex:1}
.product-meta{display:flex;justify-content:space-between;gap:8px;align-items:center}
.category-chip,.stock-chip{
  min-height:28px;
  display:inline-flex;
  align-items:center;
  padding:0 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:950;
}
.category-chip{background:#eef2f7;color:var(--ink)}
.stock-chip{background:var(--soft);color:var(--accent-dark)}

.product-card h2{
  min-height:44px;
  margin:0;
  color:var(--ink);
  font-size:16px;
  line-height:1.28;
  letter-spacing:0;
}

.spec-line{
  min-height:38px;
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.35;
  font-weight:800;
}

.spec-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}

.spec-grid div{
  min-width:0;
  border:1px solid #e5ebf2;
  border-radius:8px;
  padding:8px;
  background:#fbfcfe;
}

.spec-grid small{
  display:block;
  color:var(--muted);
  font-size:10px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.04em;
  margin-bottom:3px;
}

.spec-grid strong{
  display:block;
  color:var(--ink);
  font-size:12px;
  line-height:1.25;
  overflow-wrap:anywhere;
}

.product-footer{
  margin-top:auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-top:8px;
  border-top:1px solid #edf1f5;
}

.price small{display:block;color:var(--muted);font-size:11px;font-weight:900}
.price strong{display:block;font-size:20px;font-weight:950;color:var(--danger)}
.buy-link{
  min-height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 12px;
  border-radius:8px;
  background:var(--accent);
  color:#fff;
  font-weight:950;
  white-space:nowrap;
}

.loading-card,.empty-card{
  grid-column:1/-1;
  min-height:180px;
  display:grid;
  place-items:center;
  text-align:center;
  border:1px dashed #c8d5e1;
  border-radius:8px;
  background:#fff;
  color:var(--muted);
  font-size:16px;
  font-weight:800;
  padding:24px;
}

@media (max-width: 860px){
  .topbar{height:auto;min-height:64px;padding:10px 14px}
  .brand-mark{width:38px;height:38px}
  .top-whatsapp{min-height:38px;padding:0 12px}
  main{padding:12px}
  .search-panel{padding:18px}
  .quick-categories{
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:4px;
    scroll-snap-type:x mandatory;
  }
  .quick-categories button{
    flex:0 0 auto;
    scroll-snap-align:start;
  }
  .content-grid{grid-template-columns:1fr;gap:12px}
  .filters{
    position:static;
    grid-template-columns:1fr 1fr;
    gap:10px;
  }
  .filter-head{grid-column:1/-1}
  .catalog-toolbar{align-items:flex-start;flex-direction:column}
  .catalog-toolbar select{width:100%}
  .product-grid{grid-template-columns:1fr;gap:11px}
  .product-card{display:grid;grid-template-columns:118px minmax(0,1fr)}
  .product-media{aspect-ratio:auto;min-height:100%;border-bottom:0;border-right:1px solid var(--line)}
  .placeholder{width:58px;height:58px;font-size:19px}
  .product-card h2{font-size:14px;min-height:0}
  .spec-line{font-size:12px;min-height:0}
  .spec-grid{display:none}
  .product-footer{align-items:flex-end}
  .price strong{font-size:18px}
}

@media (max-width: 460px){
  .topbar{align-items:flex-start}
  .brand strong{font-size:15px}
  .brand small{font-size:11px}
  .top-whatsapp{font-size:13px}
  h1{font-size:30px}
  .search-box input{height:52px;font-size:15px}
  .filters{grid-template-columns:1fr}
  .product-card{grid-template-columns:104px minmax(0,1fr)}
  .product-body{padding:10px;gap:8px}
  .product-meta{align-items:flex-start;flex-direction:column}
  .category-chip,.stock-chip{min-height:24px;font-size:11px}
  .product-footer{gap:8px}
  .buy-link{min-height:36px;padding:0 10px;font-size:13px}
}
