:root {
  --bg: #F3EAD3;
  --panel: #E7D6A6;
  --ink: #2E2410;
  --accent: #A6791E;
  --accent-dark: #8B6417;
  --accent2: #6E5A22;
  --cream: #FBF6E8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, 'Iowan Old Style', 'Palatino Linotype', serif;
}

.sans {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

button { cursor: pointer; font-family: inherit; }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid rgba(46,36,16,0.1);
  position: sticky;
  top: 0;
  background: rgba(243,234,211,0.93);
  backdrop-filter: blur(6px);
  z-index: 10;
  flex-wrap: wrap;
  gap: 14px;
}
.brand { cursor: pointer; font-size: 22px; letter-spacing: 1px; }
.nav {
  display: flex;
  gap: 26px;
  align-items: center;
  font-size: 14.5px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.nav span { cursor: pointer; }
.nav-cart { position: relative; display: flex; align-items: center; gap: 6px; }
.cart-badge {
  background: var(--accent2);
  color: var(--cream);
  border-radius: 50%;
  width: 18px; height: 18px;
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  position: absolute; top: -10px; right: -16px;
}

/* ---------- Buttons / inputs ---------- */
.btn-primary {
  background: var(--accent); color: var(--cream); border: none; border-radius: 3px;
  padding: 12px 22px; font-size: 15px; letter-spacing: 0.2px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-outline {
  background: transparent; color: var(--ink); border: 1px solid rgba(46,36,16,0.33); border-radius: 3px;
  padding: 12px 22px; font-size: 15px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.btn-outline:hover { border-color: var(--ink); }

input, textarea, select {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  border: 1px solid rgba(46,36,16,0.2); border-radius: 3px; padding: 11px 12px;
  background: var(--cream); color: var(--ink); font-size: 15px; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- Layout helpers ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.section { padding: 40px 0 80px; }
.card { transition: transform .15s; cursor: pointer; }
.card:hover { transform: translateY(-3px); }

/* ---------- Home ---------- */
.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px;
  padding: 72px 0; align-items: center;
}
.hero h1 { font-size: 44px; line-height: 1.18; margin: 0; font-weight: 400; }
.hero p { font-size: 16px; line-height: 1.7; color: rgba(46,36,16,0.8); margin-top: 18px; max-width: 460px; }
.hero-address { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; color: rgba(46,36,16,0.6); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.hero-actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual {
  aspect-ratio: 4/3; border-radius: 4px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #C9A227 0%, #A6791E 55%, #6E5A22 100%);
  display: flex; align-items: flex-end; justify-content: flex-end;
  font-size: 90px; padding: 24px;
}

.section-label {
  font-size: 13px; letter-spacing: .5px; color: rgba(46,36,16,0.6); font-weight: 600; margin-bottom: 18px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cat-card {
  background: var(--panel); border-radius: 4px; padding: 26px 20px;
  display: flex; flex-direction: column; gap: 14px; align-items: flex-start;
}
.cat-card .icon { font-size: 30px; }
.cat-card .name { font-size: 16px; }

.custom-banner {
  margin-top: 16px; background: var(--ink); color: var(--cream); border-radius: 4px;
  padding: 26px 28px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.custom-banner-left { display: flex; align-items: center; gap: 16px; }
.custom-banner .icon { font-size: 26px; }
.custom-banner .title { font-size: 17px; }
.custom-banner .desc { font-size: 13.5px; color: rgba(251,246,232,0.7); margin-top: 4px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; max-width: 420px; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; }
.contact-card { background: var(--panel); border-radius: 4px; padding: 26px; display: flex; flex-direction: column; gap: 18px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 14.5px; }
.contact-item { display: flex; align-items: flex-start; gap: 12px; }
.map-embed { border-radius: 4px; overflow: hidden; min-height: 220px; }
.map-embed iframe { width: 100%; height: 100%; min-height: 220px; border: 0; display: block; }

/* ---------- Products ---------- */
.products-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 14px; }
.products-header h1 { font-size: 30px; font-weight: 400; margin: 0; }
.cat-filters { display: flex; gap: 10px; font-size: 14px; flex-wrap: wrap; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.cat-filters span { cursor: pointer; padding: 6px 12px; border-radius: 20px; border: 1px solid rgba(46,36,16,0.2); }
.cat-filters span.active { background: var(--ink); color: var(--cream); }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-card .thumb {
  aspect-ratio: 1/1; border-radius: 4px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px; font-size: 54px;
}
.product-card .name { font-size: 15.5px; }
.product-card .material { font-size: 13.5px; color: rgba(46,36,16,0.55); margin-top: 3px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.product-card .price { font-size: 15px; margin-top: 6px; color: var(--accent); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

/* ---------- Detail ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.detail-thumb { aspect-ratio: 1/1; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 140px; }
.detail-title { font-size: 30px; font-weight: 400; margin: 0 0 10px; }
.detail-price { font-size: 22px; color: var(--accent); margin-bottom: 18px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.detail-desc { font-size: 15px; line-height: 1.7; color: rgba(46,36,16,0.8); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.back-btn { margin-bottom: 24px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: 13.5px; }

/* ---------- Cart ---------- */
.cart-empty { color: rgba(46,36,16,0.55); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.cart-empty a { color: var(--accent); cursor: pointer; }
.cart-row {
  display: flex; align-items: center; gap: 16px; border-bottom: 1px solid rgba(46,36,16,0.1);
  padding-bottom: 16px; margin-bottom: 16px; flex-wrap: wrap;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.cart-row .thumb { width: 68px; height: 68px; border-radius: 4px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 30px; }
.cart-row .info { flex: 1; min-width: 160px; }
.cart-row .name { font-size: 15.5px; font-family: Georgia, serif; }
.cart-row .price { font-size: 14px; color: var(--accent); margin-top: 3px; }
.qty-controls { display: flex; align-items: center; gap: 10px; }
.qty-controls button { background: var(--panel); border: none; border-radius: 3px; width: 28px; height: 28px; }
.remove-btn { background: none; border: none; color: rgba(46,36,16,0.4); font-size: 18px; }
.cart-total { display: flex; justify-content: space-between; margin-top: 24px; font-size: 17px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.cart-total .value { color: var(--accent); }

/* ---------- Forms ---------- */
.form-page { max-width: 560px; }
.form-page h1 { font-size: 28px; font-weight: 400; margin-bottom: 8px; }
.form-page .subtitle { font-size: 14px; color: rgba(46,36,16,0.55); margin-bottom: 26px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.form-field { margin-bottom: 16px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.form-field label { display: block; font-size: 13.5px; margin-bottom: 6px; }
.order-summary { background: var(--panel); border-radius: 4px; padding: 16px; margin: 6px 0 16px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.order-summary .line { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.order-summary .total { display: flex; justify-content: space-between; font-size: 15px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(46,36,16,0.13); }
.order-summary .total .value { color: var(--accent); }
.form-error { color: #a12b2b; font-size: 13.5px; margin-bottom: 12px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

/* ---------- Confirmed ---------- */
.confirmed { max-width: 560px; text-align: center; padding: 80px 0; }
.confirmed .check-circle {
  width: 64px; height: 64px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 22px; color: var(--cream); font-size: 30px;
}
.confirmed h1 { font-size: 26px; font-weight: 400; margin-bottom: 10px; }
.confirmed p { font-size: 15px; color: rgba(46,36,16,0.8); line-height: 1.7; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.confirmed .zalo-note { margin-top: 20px; display: inline-flex; align-items: center; gap: 8px; color: rgba(46,36,16,0.55); font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.confirmed .actions { margin-top: 30px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid rgba(46,36,16,0.1); margin-top: 20px; padding: 36px 32px;
  display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center;
  max-width: 1180px; margin-left: auto; margin-right: auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.footer-brand { font-family: Georgia, serif; font-size: 16px; letter-spacing: .5px; }
.footer-item { font-size: 14px; color: rgba(46,36,16,0.8); }

@media (max-width: 900px) {
  .hero, .detail-grid, .contact-grid { grid-template-columns: 1fr; }
  .cat-grid, .product-grid { grid-template-columns: repeat(2, 1fr); }
}
