:root{
  --bg:#eef6ff;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --primary:#1f8cff;
  --primary-2:#0b6bd6;
  --shadow:0 12px 30px rgba(2,8,23,.12);
  --radius:18px;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
}
.container{
  max-width:1100px;
  margin:0 auto;
  padding:16px;
}
.topbar{
  position:sticky;
  top:0;
  z-index:20;
  background:rgba(238,246,255,.8);
  backdrop-filter: blur(10px);
  border-bottom:1px solid rgba(15,23,42,.06);
}
.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 16px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
}
.brand-logo{
  width:42px;height:42px;
  border-radius:14px;
  overflow:hidden;
  background:#0b1220;
  display:grid;place-items:center;
  color:#fff;font-weight:800;
}
.brand h1{font-size:18px;margin:0;line-height:1.1}
.brand p{margin:0;color:var(--muted);font-size:12px}
.actions{display:flex;gap:10px;align-items:center}
.pill{
  border:0;
  background:#e9f3ff;
  color:#0b3b77;
  padding:10px 12px;
  border-radius:999px;
  font-weight:700;
  cursor:pointer;
}
.cart-btn{
  position:relative;
  border:0;
  width:44px;height:44px;
  border-radius:14px;
  background:var(--primary);
  color:#fff;
  cursor:pointer;
  box-shadow:0 10px 22px rgba(31,140,255,.35);
}
.cart-badge{
  position:absolute;
  top:-6px;right:-6px;
  min-width:22px;height:22px;
  padding:0 6px;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  font-size:12px;
  display:grid;
  place-items:center;
  border:2px solid var(--bg);
}
.hero{
  margin-top:14px;
  background: linear-gradient(90deg, rgba(31,140,255,.18), rgba(34,197,94,.12)),
              url('https://images.unsplash.com/photo-1511920170033-f8396924c348?auto=format&fit=crop&w=1600&q=60');
  background-size:cover;
  background-position:center;
  border-radius:var(--radius);
  padding:18px;
  color:#0b1220;
  overflow:hidden;
  position:relative;
}
.hero::after{
  content:'';
  position:absolute;inset:0;
  background:rgba(255,255,255,.74);
}
.hero-content{position:relative;z-index:1}
.hero-top{
  display:flex;align-items:flex-start;justify-content:space-between;gap:10px;
}
.hero h2{margin:6px 0 6px;font-size:26px;letter-spacing:-.02em}
.hero .sub{margin:0;color:#334155;font-weight:600}
.hero .meta{margin-top:10px;display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.chip{
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
  border-radius:999px;
  padding:10px 12px;
  display:flex;align-items:center;gap:8px;
  font-weight:700;
  box-shadow:0 6px 18px rgba(2,8,23,.08);
}
.search{
  margin-top:14px;
  display:flex;
  gap:10px;
}
.search input{
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.10);
  outline:none;
  background:#fff;
  box-shadow:0 8px 20px rgba(2,8,23,.06);
}
.tabs{
  margin-top:12px;
  display:flex;
  gap:10px;
  overflow:auto;
  padding-bottom:6px;
}
.tab{
  white-space:nowrap;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.12);
  background:#fff;
  font-weight:800;
  cursor:pointer;
}
.tab.active{
  background:var(--primary);
  border-color:transparent;
  color:#fff;
  box-shadow:0 10px 20px rgba(31,140,255,.30);
}
.section{
  margin-top:18px;
}
.section-title{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 10px;
  font-size:18px;
}
.grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
@media (min-width: 760px){
  .grid{grid-template-columns:repeat(3,minmax(0,1fr));}
}
.card{
  background:var(--card);
  border-radius:16px;
  padding:12px;
  box-shadow:var(--shadow);
  border:1px solid rgba(15,23,42,.06);
  display:flex;
  gap:12px;
  min-height:118px;
}
.card img{
  width:76px;height:76px;
  border-radius:14px;
  object-fit:cover;
  flex:0 0 auto;
  border:1px solid rgba(15,23,42,.08);
}
.card h4{margin:0;font-size:14px;line-height:1.2}
.card p{margin:6px 0 10px;color:var(--muted);font-size:12px;line-height:1.35}
.price-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.price{font-weight:900}
.add{
  width:40px;height:40px;
  border-radius:999px;
  border:0;
  background:var(--primary);
  color:#fff;
  font-size:18px;
  cursor:pointer;
  box-shadow:0 10px 18px rgba(31,140,255,.28);
}

/* Cart drawer */
.overlay{
  position:fixed;inset:0;
  background:rgba(2,8,23,.45);
  display:none;
  z-index:50;
}
.overlay.show{display:block}
.drawer{
  position:fixed;
  top:0;right:0;
  width:min(420px, 92vw);
  height:100vh;
  background:#fff;
  border-left:1px solid rgba(15,23,42,.08);
  box-shadow: -20px 0 50px rgba(2,8,23,.25);
  transform: translateX(110%);
  transition: transform .25s ease;
  z-index:60;
  display:flex;
  flex-direction:column;
}
.drawer.show{transform: translateX(0)}
.drawer-header{
  padding:16px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:1px solid rgba(15,23,42,.08);
}
.drawer-title{font-weight:900}
.icon-btn{
  border:0;background:transparent;
  width:40px;height:40px;
  border-radius:12px;
  cursor:pointer;
}
.drawer-body{padding:14px;overflow:auto;flex:1}
.cart-item{
  display:flex;
  gap:12px;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 10px 24px rgba(2,8,23,.08);
  margin-bottom:12px;
}
.cart-item img{width:68px;height:68px;border-radius:14px;object-fit:cover;border:1px solid rgba(15,23,42,.10)}
.cart-item h5{margin:0;font-size:13px}
.cart-item .muted{color:var(--muted);font-size:12px;margin-top:4px}
.qty{
  display:flex;align-items:center;gap:10px;
  background:#f1f5f9;
  border-radius:999px;
  padding:6px;
  width:max-content;
}
.qty button{
  width:32px;height:32px;border-radius:999px;border:0;
  background:#fff;cursor:pointer;
  box-shadow:0 6px 16px rgba(2,8,23,.10);
}
.qty span{min-width:18px;text-align:center;font-weight:900}
.remove{
  margin-top:8px;
  border:0;background:transparent;
  color:#ef4444;
  font-weight:900;
  cursor:pointer;
}
.drawer-footer{
  padding:16px;
  border-top:1px solid rgba(15,23,42,.08);
}
.total-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.total-row b{font-size:20px}
.primary-btn{
  width:100%;
  border:0;
  border-radius:16px;
  padding:14px 16px;
  background:var(--primary);
  color:#fff;
  font-weight:900;
  cursor:pointer;
  font-size:16px;
  box-shadow:0 14px 26px rgba(31,140,255,.35);
}
.primary-btn:disabled{opacity:.55;cursor:not-allowed}

/* Modal */
.modal{
  position:fixed;inset:0;
  display:none;
  place-items:center;
  z-index:80;
}
.modal.show{display:grid}
.modal-card{
  width:min(520px, 92vw);
  background:#fff;
  border-radius:18px;
  box-shadow:0 30px 70px rgba(2,8,23,.35);
  border:1px solid rgba(15,23,42,.10);
  overflow:hidden;
}
.modal-head{
  padding:14px 16px;
  border-bottom:1px solid rgba(15,23,42,.08);
  display:flex;align-items:center;justify-content:space-between;
}
.modal-head h3{margin:0;font-size:16px}
.modal-body{padding:16px;max-height:70vh;overflow:auto}
.field{margin-bottom:12px}
.field label{display:block;font-size:12px;color:var(--muted);margin-bottom:6px;font-weight:800}
.field input, .field textarea, .field select{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.12);
  outline:none;
}
.pay-option{display:flex;align-items:center;gap:10px;border:1px solid rgba(15,23,42,.10);border-radius:14px;padding:10px 12px;margin-bottom:10px}
.pay-option input{width:18px;height:18px}
.small{font-size:12px;color:var(--muted)}
.success{
  background:#ecfdf5;
  border:1px solid rgba(16,185,129,.25);
  color:#065f46;
  padding:12px;
  border-radius:16px;
}
