/* Shopify-like clean mobile-first theme */
:root{
  --bg:#f6f8fa;
  --card:#ffffff;
  --accent:#22c55e;
  --accent-dark:#16a34a;
  --muted:#6b7280;
  --border:#e5e7eb;
}
*{box-sizing:border-box;margin:0;padding:0}
body{
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial;
  background:var(--bg);
  color:#111827;
}
/* HEADER FIXED & BEAUTIFUL */
.site-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 16px;
  background:var(--card);
  box-shadow:0 1px 0 rgba(15,23,42,.06);
  position:sticky;
  top:0;
  z-index:20;
}

.header-left img{
  width:62px;
  height:auto;
  border-radius:10px;
}

.header-right{
  display:flex;
  align-items:center;
  gap:10px;
}

.cart-icon{
  width:46px;
  height:auto;
}

.cart-info-box{
  display:flex;
  flex-direction:column;
  text-align:right;
  line-height:1.2;
}

.cart-info-box .cart-line{
  font-size:13px;
  color:#374151;
  font-weight:600;
}

/* FIXED: only hide old header styles */
header .cart-info{ display:none; }
header .cart-summary{ display:none; }

.brand{font-weight:700;font-size:16px}
.cart-link{
  font-size:14px;
  color:var(--muted);
  text-decoration:none;
}
.cart-link .badge{
  background:var(--accent);
  color:white;
  border-radius:999px;
  padding:2px 8px;
  margin-left:4px;
  font-size:12px;
}
.container{padding:12px 12px 16px 12px;}
.hero{
  background:linear-gradient(135deg,rgba(34,197,94,.12),rgba(59,130,246,.06));
  border-radius:16px;
  padding:14px;
  margin-bottom:14px;
}
.hero h1{
  font-size:18px;
  margin-bottom:4px;
}
.hero p{
  font-size:14px;
  color:var(--muted);
}

/* Product grid */
.grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}
.card{
  background:var(--card);
  border-radius:14px;
  padding:10px;
  box-shadow:0 8px 24px rgba(15,23,42,.06);
}
.card-title{
  font-size:16px;
  margin-bottom:8px;
}
.variant{
  display:flex;
  gap:10px;
  padding:8px;
  border-radius:10px;
  background:#f9fafb;
  margin-bottom:8px;
}
.opt-img{
  width:100%;
  height:auto;
  max-height:450px;
  object-fit:contain;
  border-radius:14px;
  background:#fff;
  border:1px solid var(--border);
  cursor:zoom-in;
  display:block;
  margin-bottom:6px;
}
variant-info{flex:1;min-width:0;}
.variant-label{font-weight:600;font-size:14px;}
.variant-price{
  color:var(--accent-dark);
  font-weight:600;
  margin-top:4px;
}
.variant-stock{
  font-size:12px;
  color:var(--muted);
  margin-top:2px;
}
.badge-reserved{
  display:inline-block;
  margin-top:6px;
  padding:4px 8px;
  border-radius:999px;
  background:#fee2e2;
  color:#b91c1c;
  font-size:11px;
}
.add-form{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:8px;
}
.qty-row{
  display:flex;
  align-items:center;
  border-radius:999px;
  overflow:hidden;
  border:1px solid var(--border);
  background:#fff;
}
.qty-input{
  width:52px;
  padding:6px 4px;
  border:0;
  text-align:center;
  font-size:14px;
}
.qty-btn{
  border:0;
  background:#f3f4f6;
  padding:6px 10px;
  cursor:pointer;
  font-size:16px;
}
.btn{
  border:0;
  background:var(--accent);
  color:white;
  padding:8px 14px;
  border-radius:999px;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
}
.btn:hover{background:var(--accent-dark);}

/* Cart */
.cart-list{margin-top:10px;}
.cart-item{
  display:flex;
  justify-content:space-between;
  gap:10px;
  background:var(--card);
  border-radius:12px;
  padding:10px;
  margin-bottom:8px;
}
.ci-left{flex:1;}
.ci-price{font-size:13px;color:var(--muted);margin-top:3px;}
.ci-right{text-align:right;}
.inline-form{
  display:flex;
  align-items:center;
  gap:6px;
  margin-bottom:4px;
  justify-content:flex-end;
}
.small-qty .qty-input{width:48px;}
.small{
  border:0;
  padding:6px 8px;
  border-radius:8px;
  background:#e5e7eb;
  font-size:12px;
  cursor:pointer;
}
.small.danger{
  background:#fee2e2;
  color:#b91c1c;
}
.ci-line{font-weight:600;font-size:14px;}

.cart-summary{
  margin-top:10px;
  background:var(--card);
  border-radius:12px;
  padding:10px;
  box-shadow:0 8px 24px rgba(15,23,42,.04);
}
.summary-row{
  display:flex;
  justify-content:space-between;
  font-size:14px;
  margin-bottom:4px;
}
.summary-row.total{
  font-weight:700;
  font-size:16px;
}
.checkout{
  display:block;
  margin-top:8px;
  text-align:center;
  padding:12px;
  font-size:16px;
  font-weight:700;
  background:var(--accent);
  color:white;
  border-radius:999px;
  text-decoration:none;
}
/* Fix footer smaller & clean */
.site-footer {
    padding: 10px 12px;
    font-size: 11px;
    line-height: 1.35;      /* giảm độ cao dòng */
    color: var(--muted);
    text-align: center;
    max-width: 700px;       /* thu gọn chiều ngang */
    margin: 20px auto 10px auto;
    opacity: 0.85;          /* nhẹ hơn 1 chút */
}

/* Footer links nhỏ và nhẹ */
.site-footer a {
    color: #4b5563;
    text-decoration: underline;
    font-size: 11px;
}

/* Nếu footer có nhiều <br> thì giảm spacing */
.site-footer br {
    line-height: 0.2;
}

/* Responsive */
@media(min-width:720px){
  .grid{grid-template-columns:repeat(2,1fr);}
  .container{max-width:960px;margin:0 auto;}
}
