:root{
  --bg:#ffffff;
  --text:#111;
  --muted: rgba(0,0,0,.65);
  --border:#eaeaea;
  --card:#fff;
  --shadow: 0 6px 20px rgba(0,0,0,.06);
  --radius:14px;

  --accent-border: rgba(140,170,230,.38);
  --accent-bg: #f3f4f6;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
}

a{color:inherit}
img{max-width:100%; display:block}

.container{max-width:1100px; margin:0 auto; padding:20px;}

/* ---------- Header (center title) ---------- */
.topbar{
  display:flex;
  align-items:center;
  justify-content:center;
  margin:10px 0 12px;
}
.brand{
  font-size:38px;
  font-weight:900;
  letter-spacing:.2px;
  text-decoration:none;
  color:inherit;
}

/* ---------- common ---------- */
.muted{opacity:.7; font-size:13px}

.btn, .btn-link{
  font-weight:650;
  text-decoration:none;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.btn:hover,.btn-link:hover{background:#fafafa}
.pager{display:flex; gap:10px; align-items:center; margin:18px 0;}
.pager a[aria-disabled="true"]{opacity:.4; pointer-events:none;}

/* ---------- Product grid ---------- */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
  gap:16px;
}

.card{
  display:block;
  text-decoration:none;
  color:inherit;
  border:1px solid var(--border);
  padding:12px;
  border-radius:12px;
  background:var(--card);
  box-shadow:var(--shadow);
  transition: transform .08s ease, box-shadow .2s ease;
}
.card:hover{transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0,0,0,.08);}

.img{
  width:100%;
  height:180px;
  object-fit:cover;
  border-radius:10px;
  background:#f6f6f6;
}

.name{margin-top:10px; font-weight:650; line-height:1.25;}
.price{margin-top:8px; font-weight:800;}
.card .muted{margin-top:6px}

/* ---------- Search Form (header) ---------- */
/* Dùng cho SearchForm.astro: .search-form .search-box .search-input + button.search-btn svg.search-icon */

.search-form{width:100%}
.search-box{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;

  padding:2px 12px;
  border-radius:22px;
  background:#fff;

  border:1px solid var(--accent-border);
  box-shadow: 0 6px 20px rgba(0,0,0,.05);
  margin: 8px 0 18px;
}

.search-input{
  flex:1;
  width:100%;
  border:0;
  outline:0;
  background:transparent;

  font-size:18px;
  line-height:1.2;
  padding:4px 10px;

  -webkit-appearance:none;
  appearance:none;
}

.search-input::placeholder{color:rgba(0,0,0,.38)}

/* nút kính lúp bên phải (KHÔNG viền, KHÔNG nền) */
.search-btn{
  width:44px;
  height:44px;
  border:0;
  background:transparent;
  padding:0;
  cursor:pointer;

  display:flex;
  align-items:center;
  justify-content:center;

  box-shadow:none;
}

.search-btn:hover{opacity:.8}
.search-btn:active{opacity:.65}

/* icon kính lúp */
.search-icon{
  width:26px;
  height:26px;
  color:rgba(0,0,0,.42);
}

/* ✅ chống iOS zoom khi focus (input <16px sẽ zoom) */
@media (max-width: 600px){
  .search-input{ font-size:16px; }
  .brand{ font-size:30px; }
  .container{ padding:16px; }
}
.row{display:flex; justify-content:center;}
/* ===== CTA BUY BUTTON ===== */
.btn-buy{
  display:flex;
  align-items:center;
  justify-content:center;

  width: min(520px, 100%);   /* dài như "Thêm 1 ảnh" */
  margin: 16px auto 10px;    /* căn giữa */

  padding: 15px 22px;        /* chiều dọc lớn */
  border-radius: 6px;      /* bo tròn pill */

  background:#FF0000;        /* đỏ giống ảnh "Đặt mua" */
  color:#fff;
  font-weight:900;
  font-size:22px;
  letter-spacing:.2px;

  text-decoration:none;
  border:0;
  cursor:pointer;

  box-shadow: 0 12px 30px rgba(198,58,51,.25);
  transition: transform .08s ease, opacity .15s ease;
}

.btn-buy:hover{ opacity:.95; }
.btn-buy:active{ transform: translateY(1px); }

/* ---------- Footer ---------- */
.site-footer{
  margin-top: 26px;
  padding: 18px 0 26px;
  text-align: center;
}

.footer-line{
  border: 0;
  height: 1px;
  background: #e5e7eb;
  margin: 14px 0 16px;
}

.footer-copy{
  font-size: 13px;
  opacity: .8;
  margin-bottom: 10px;
}

.footer-desc{
  font-size: 13px;
  opacity: .75;
  line-height: 1.55;
  max-width: 720px;
  margin: 0 auto;
}
.footer-desc p{
  margin: 4px 0;
}
.footer-link{
  margin-top: 10px;
}
.footer-link a{
  color: #111;
  font-weight: 800;
  text-decoration: none;
}
.footer-link a:hover{
  text-decoration: underline;
}
