:root{
  --brand:#e0392b;
  --brand-dark:#b82c20;
  --ink:#1c1c1c;
  --muted:#6b6b6b;
  --bg:#f7f5f2;
  --card:#ffffff;
  --border:#ececec;
  --radius:14px;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg);
  color:var(--ink);
  padding-bottom:90px;
}
a{color:inherit}
img{max-width:100%;display:block}

/* header */
.banner{
  width:100%;
  height:180px;
  object-fit:cover;
  background:#ddd;
}
.header-card{
  max-width:720px;
  margin:-46px auto 0;
  background:var(--card);
  border-radius:20px;
  box-shadow:0 6px 24px rgba(0,0,0,.08);
  padding:20px 20px 14px;
  text-align:center;
  position:relative;
}
.logo{
  width:84px;height:84px;border-radius:50%;
  object-fit:cover;margin:-64px auto 8px;
  border:4px solid var(--card);
  background:#fff;
  box-shadow:0 2px 10px rgba(0,0,0,.12);
}
.header-card h1{margin:4px 0 6px;font-size:1.4rem}
.status-row{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-bottom:10px}
.pill{
  font-size:.78rem;padding:4px 12px;border-radius:999px;
  background:#eef8f0;color:#1c7c3a;font-weight:600;
}
.pill.closed{background:#fdeceb;color:var(--brand-dark)}
.info-row{
  display:flex;justify-content:center;gap:28px;
  font-size:.82rem;color:var(--muted);flex-wrap:wrap;
}
.info-row b{color:var(--ink);display:block;font-size:.95rem}
.contact-row{margin-top:12px;display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.contact-row a{
  font-size:.8rem;text-decoration:none;color:var(--brand-dark);
  border:1px solid var(--border);padding:6px 12px;border-radius:999px;
}

/* nav */
.cat-nav{
  max-width:720px;margin:18px auto 0;padding:0 14px;
  display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;
}
.cat-nav::-webkit-scrollbar{display:none}
.cat-nav button{
  flex:0 0 auto;border:1px solid var(--border);background:var(--card);
  padding:8px 14px;border-radius:999px;font-size:.85rem;cursor:pointer;
  white-space:nowrap;
}
.cat-nav button.active{background:var(--brand);color:#fff;border-color:var(--brand)}

main{max-width:720px;margin:0 auto;padding:18px 14px 0}
.category-block h2{
  font-size:1.05rem;margin:26px 0 10px;padding-bottom:6px;
  border-bottom:1px solid var(--border);
}
.product-card{
  display:flex;gap:12px;background:var(--card);border-radius:var(--radius);
  padding:12px;margin-bottom:10px;cursor:pointer;border:1px solid var(--border);
  transition:box-shadow .15s;
}
.product-card:hover{box-shadow:0 3px 14px rgba(0,0,0,.07)}
.product-card .info{flex:1;min-width:0}
.product-card h3{margin:0 0 4px;font-size:.98rem}
.product-card p{margin:0 0 8px;font-size:.82rem;color:var(--muted);
  overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}
.product-card .price{font-weight:700;color:var(--brand-dark);font-size:.92rem}
.product-card .price small{color:var(--muted);font-weight:400;font-size:.72rem}
.thumb{
  width:84px;height:84px;border-radius:10px;object-fit:cover;flex:0 0 auto;background:#eee;
}
.thumb.placeholder{display:flex;align-items:center;justify-content:center;font-size:1.6rem}

/* modal */
.overlay{
  position:fixed;inset:0;background:rgba(0,0,0,.45);
  display:flex;align-items:flex-end;justify-content:center;z-index:50;
}
.overlay[hidden]{display:none}
.modal{
  background:#fff;width:100%;max-width:520px;border-radius:18px 18px 0 0;
  max-height:88vh;overflow-y:auto;padding-bottom:96px;position:relative;
}
@media (min-width:560px){
  .overlay{align-items:center}
  .modal{border-radius:18px;max-height:80vh}
}
.modal img.hero{width:100%;height:200px;object-fit:cover}
.modal-body{padding:16px 18px}
.modal-body h2{margin:0 0 4px}
.modal-body .desc{color:var(--muted);font-size:.88rem;margin:0 0 16px}
.close-btn{
  position:absolute;top:10px;right:10px;background:#fff;border:none;
  width:32px;height:32px;border-radius:50%;font-size:1.1rem;cursor:pointer;
  box-shadow:0 2px 8px rgba(0,0,0,.2);
}
fieldset{border:none;padding:0;margin:0 0 18px}
.loading-state{text-align:center;color:var(--muted);padding:60px 20px;font-size:.95rem}
.error-state{text-align:center;color:#b82c20;padding:60px 20px;font-size:.95rem}
legend{font-weight:700;font-size:.92rem;margin-bottom:8px}
legend small{font-weight:400;color:var(--muted)}
.option-row{
  display:flex;justify-content:space-between;align-items:center;
  padding:10px 0;border-bottom:1px solid var(--border);font-size:.9rem;gap:10px;
}
.option-row label{display:flex;align-items:center;gap:10px;flex:1;cursor:pointer}
.option-row .op-price{color:var(--muted);font-size:.85rem;white-space:nowrap}
.qty-row{display:flex;align-items:center;justify-content:space-between;margin:16px 0}
.qty-control{display:flex;align-items:center;gap:14px}
.qty-control button{
  width:34px;height:34px;border-radius:50%;border:1px solid var(--border);
  background:#fff;font-size:1.1rem;cursor:pointer;
}
.modal-footer{
  position:absolute;left:0;right:0;bottom:0;background:#fff;padding:12px 18px;border-top:1px solid var(--border);
}
.btn{
  display:block;width:100%;background:var(--brand);color:#fff;border:none;
  padding:14px;border-radius:12px;font-size:1rem;font-weight:700;cursor:pointer;
  display:flex;justify-content:space-between;align-items:center;padding-inline:18px;
}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn.secondary{background:#25D366}

/* cart bar */
.cart-bar{
  position:fixed;bottom:0;left:0;right:0;padding:12px 14px;
  display:flex;justify-content:center;z-index:40;
}
.cart-bar[hidden]{display:none}
.cart-bar .btn{max-width:692px}

/* cart drawer */
.cart-items{padding:0 18px}
.cart-item{
  display:flex;justify-content:space-between;gap:10px;padding:12px 0;
  border-bottom:1px solid var(--border);font-size:.88rem;
}
.cart-item .meta{color:var(--muted);font-size:.78rem;margin-top:2px}
.cart-item .remove{color:var(--brand-dark);font-size:.78rem;background:none;border:none;cursor:pointer;padding:0;margin-top:4px}
.totals-row{display:flex;justify-content:space-between;padding:6px 18px;font-size:.9rem;color:var(--muted)}
.totals-row.grand{font-weight:700;color:var(--ink);font-size:1rem}
.form-group{padding:8px 18px}
.form-group label{display:block;font-size:.82rem;margin-bottom:4px;color:var(--muted)}
.form-group input,.form-group select,.form-group textarea{
  width:100%;padding:10px;border:1px solid var(--border);border-radius:10px;font-size:.9rem;font-family:inherit;
}
.seg{display:flex;gap:8px;padding:8px 18px}
.seg button{
  flex:1;padding:10px;border-radius:10px;border:1px solid var(--border);background:#fff;cursor:pointer;font-size:.88rem;
}
.seg button.active{background:var(--brand);color:#fff;border-color:var(--brand)}
.empty-cart{padding:40px 18px;text-align:center;color:var(--muted)}
.notice{
  margin:14px auto 0;max-width:692px;background:#fff8e6;border:1px solid #f2dd9e;
  color:#7a5b00;font-size:.8rem;padding:10px 14px;border-radius:10px;
}
footer{text-align:center;color:var(--muted);font-size:.75rem;padding:30px 14px 10px}
