/* NutriPower Panama - site styles */
:root{
  --bg:#0b1020;
  --card: rgba(255,255,255,.06);
  --text:#e9edf7;
  --muted:rgba(233,237,247,.75);
  --accent:#00d7a7;
  --accent2:#33a3ff;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius:18px;
  --max:1100px;
  --font: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,Helvetica,Arial,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family:var(--font);color:var(--text);background:radial-gradient(1200px 800px at 10% 0%, rgba(51,163,255,.18), transparent 55%),
radial-gradient(900px 700px at 90% 10%, rgba(0,215,167,.16), transparent 55%), var(--bg);}
a{color:inherit;text-decoration:none}
.container{max-width:var(--max);margin:0 auto;padding:0 18px}
.header{position:sticky;top:0;z-index:20;background:rgba(11,16,32,.75);backdrop-filter: blur(12px);border-bottom:1px solid rgba(255,255,255,.08)}
.header-inner{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 0}
.brand{display:flex;align-items:center;gap:12px}
.brand img{height:34px;width:auto}
.brand .title{font-weight:800;letter-spacing:.2px}
.badge{font-size:12px;color:var(--muted)}
.nav{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;border:1px solid rgba(255,255,255,.14);
padding:10px 14px;border-radius:999px;background:rgba(255,255,255,.06);box-shadow:var(--shadow);transition:.15s transform ease,.15s background ease,.15s border-color ease}
.btn:hover{transform:translateY(-1px);background:rgba(255,255,255,.09);border-color:rgba(255,255,255,.22)}
.btn.primary{background:linear-gradient(135deg, rgba(0,215,167,.95), rgba(51,163,255,.95));border-color:rgba(255,255,255,.14);color:#07101d;font-weight:800}
.hero{position:relative;overflow:hidden;border-bottom:1px solid rgba(255,255,255,.08)}
.hero::before{
  content:"";position:absolute;inset:0;
  background:url("../img/hero.png") center/cover no-repeat;
  filter:saturate(1.1) contrast(1.05);
  transform:scale(1.02);
}
.hero::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(90deg, rgba(11,16,32,.92) 0%, rgba(11,16,32,.78) 45%, rgba(11,16,32,.35) 100%);
}
.hero-inner{position:relative;padding:56px 0 36px 0}
.hero h1{margin:0 0 10px 0;font-size:40px;line-height:1.05}
.hero p{margin:0 0 18px 0;color:var(--muted);max-width:54ch;font-size:16px}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:14px}
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:20px}
.card{background:var(--card);border:1px solid rgba(255,255,255,.10);border-radius:var(--radius);padding:14px;box-shadow:var(--shadow)}
.card .thumb{height:140px;display:flex;align-items:center;justify-content:center;margin-bottom:10px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.06);border-radius:14px;overflow:hidden}
.card .thumb .product-img{max-height:120px;max-width:100%;object-fit:contain}
.card .meta{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.card .meta .name{font-weight:800;line-height:1.1}
.card .meta .cat{color:var(--muted);font-size:12px;margin-top:4px}
.card .meta .edit-btn{border:1px solid rgba(255,255,255,.18);background:rgba(0,0,0,.25);color:var(--text);padding:6px 8px;border-radius:10px;cursor:pointer}
.card .meta .edit-btn:hover{border-color:rgba(255,255,255,.35)}
.card .k{font-weight:800}
.card .v{color:var(--muted);font-size:13px;margin-top:4px}
.section{padding:34px 0}
.section h2{margin:0 0 12px 0;font-size:22px}
.section p{margin:0 0 18px 0;color:var(--muted)}
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:10px 0 14px 0}
.search{flex:1;min-width:220px}
.search input{
  width:100%;padding:12px 14px;border-radius:12px;border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);color:var(--text);outline:none
}
.search input::placeholder{color:rgba(233,237,247,.55)}
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.tile{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.10);border-radius:16px;overflow:hidden;box-shadow:var(--shadow)}
.tile img{width:100%;height:130px;object-fit:contain;background:rgba(0,0,0,.20)}
.tile .cap{padding:10px 10px 12px 10px;font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.footer{padding:26px 0 40px 0;border-top:1px solid rgba(255,255,255,.08);color:var(--muted);font-size:13px}
@media (max-width: 980px){
  .grid{grid-template-columns:repeat(3,1fr)}
  .cards{grid-template-columns:1fr}
  .hero h1{font-size:34px}
}
@media (max-width: 640px){
  .grid{grid-template-columns:repeat(2,1fr)}
  .hero-inner{padding:46px 0 28px 0}
}


/* ===== Catalog UI upgrades (tabs + cart + compare) ===== */
.tabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:14px 0 12px;
}
.tab{
  border:1px solid rgba(255,255,255,.18);
  background:rgba(0,0,0,.25);
  color:#fff;
  padding:8px 12px;
  border-radius:999px;
  cursor:pointer;
  font-weight:600;
}
.tab.active{
  background:linear-gradient(135deg, rgba(0,210,255,.95), rgba(0,255,170,.85));
  color:#071018;
  border-color:transparent;
}

.toolbar{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin:10px 0 18px;
}
.search{
  flex:1 1 280px;
}
.search input{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(0,0,0,.35);
  color:#fff;
  outline:none;
}
.search input::placeholder{ color: rgba(255,255,255,.55); }

.btn{
  border:1px solid rgba(255,255,255,.18);
  background:rgba(0,0,0,.35);
  color:#fff;
  padding:10px 12px;
  border-radius:999px;
  text-decoration:none;
  display:inline-flex;
  gap:8px;
  align-items:center;
  cursor:pointer;
  font-weight:700;
}
.btn:hover{ background:rgba(0,0,0,.5); }
.btn.ghost{ background:transparent; }
.btn.small{ padding:8px 10px; font-weight:700; }
.btn.full{ width:100%; justify-content:center; border-radius:14px; }

.badge{
  min-width:24px;
  height:24px;
  padding:0 8px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
}

.card .actions{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:space-between;
  margin-top:10px;
  flex-wrap:wrap;
}
.qty{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(0,0,0,.25);
}
.icon-btn{
  width:32px;
  height:32px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(0,0,0,.35);
  color:#fff;
  cursor:pointer;
}
.icon-btn:hover{ background:rgba(0,0,0,.55); }
.btn.ghost.active{ background:rgba(0,210,255,.18); border-color:rgba(0,210,255,.35); }

/* Drawer */
.drawer{
  position:fixed;
  top:0; right:0;
  width:min(420px, 92vw);
  height:100vh;
  background:rgba(7,16,24,.98);
  border-left:1px solid rgba(255,255,255,.12);
  transform:translateX(102%);
  transition:transform .2s ease;
  z-index:2000;
  display:flex;
  flex-direction:column;
}
.drawer.open{ transform:translateX(0); }
.drawer-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 14px;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.drawer-body{
  padding:12px 14px;
  overflow:auto;
  flex:1;
}
.drawer-footer{
  padding:12px 14px 16px;
  border-top:1px solid rgba(255,255,255,.10);
  display:flex;
  flex-direction:column;
  gap:10px;
}
.cart-row{
  display:grid;
  grid-template-columns:56px 1fr auto;
  gap:10px;
  align-items:center;
  padding:10px 0;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.cart-img{
  width:56px;
  height:56px;
  object-fit:contain;
  border-radius:12px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
}
.cart-name{ font-weight:800; }
.cart-qty{
  display:flex;
  align-items:center;
  gap:8px;
}
.empty{ padding:10px 0; }

/* Modal */
.modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  display:none;
  z-index:2100;
  padding:18px;
}
.modal.open{ display:flex; align-items:center; justify-content:center; }
.modal-card{
  width:min(860px, 96vw);
  max-height:92vh;
  overflow:auto;
  background:rgba(7,16,24,.98);
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  box-shadow:0 18px 70px rgba(0,0,0,.55);
}
.modal-header,.modal-footer{
  padding:14px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.modal-footer{ border-top:1px solid rgba(255,255,255,.10); border-bottom:none; }
.modal-body{ padding:14px; }
.compare-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:12px;
}
.compare-card{
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  border-radius:16px;
  padding:10px;
}
.compare-card img{
  width:100%;
  height:200px;
  object-fit:contain;
  background:rgba(0,0,0,.25);
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
}
.compare-name{ font-weight:900; margin-top:8px; }

/* Better contrast for hero text */
.hero::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, rgba(0,0,0,.75), rgba(0,0,0,.25));
}
.hero *{ position:relative; z-index:1; }
.no-scroll{ overflow:hidden; }
