:root {
  --bg-page: #F7F5F0;
  --surface: #FFFFFF;
  --cream: #FAF5ED;
  --brand: #B26E28;
  --brand-dark: #8F551B;
  --brand-soft: #F3E5D3;
  --accent: #C83E37;
  --accent-soft: #FDECEB;
  --text: #231F20;
  --muted: #6E6A67;
  --border: #E8DFD3;
  --shadow-card: 0 6px 24px rgba(44, 29, 17, 0.05);
  --font-main: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
/* Ép font Be Vietnam Pro mềm mại đồng bộ toàn trang & nút bấm */
html, body, button, input, select, textarea {
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body.kaba-store-body,
body.kaba-store-body input,
body.kaba-store-body select,
body.kaba-store-body textarea,
body.kaba-store-body button {
  font-family: var(--font-main);
  font-size: 15px;
}

body.kaba-store-body {
  background: var(--bg-page);
  color: var(--text);
  font-weight: 400;
  line-height: 1.5;
}

body.kaba-store-body h1,
body.kaba-store-body h2,
body.kaba-store-body h3,
body.kaba-store-body h4,
body.kaba-store-body strong,
body.kaba-store-body b {
  font-weight: 600;
}

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

/* ================= BUTTONS & TAGS DÙNG CHUNG ================= */
.btn-brand-solid,
.btn-brand-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.2s;
}

.btn-brand-solid {
  background: var(--brand);
  color: #FFFFFF;
}
.btn-brand-solid:hover { background: var(--brand-dark); }

.btn-brand-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-brand-outline:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.prod-cat-tag.static {
  display: inline-block;
  background: var(--cream);
  color: var(--brand-dark);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
}

.empty-menu-box {
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

/* ================= MODAL CHI TIẾT MÓN & POPUP ================= */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(35, 23, 14, 0.55);
  z-index: 80;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop.show { display: flex; }

.product-modal-box {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: var(--surface);
  border-radius: 24px;
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.2);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--cream);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  z-index: 2;
}

.pm-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 22px;
  align-items: center;
}

.pm-img-box {
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  background: var(--cream);
  border: 1px solid var(--border);
}
.pm-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pm-info {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.pm-info h2 { font-size: 21px; }
.pm-desc { font-size: 15px; color: var(--muted); }

.pm-block {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.pm-label { font-weight: 600; color: var(--text); font-size: 15px; }
.pm-sizes { display: flex; flex-direction: column; gap: 7px; }

.pm-qty-row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--cream);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
}
.qty-control button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--brand-dark);
  font-weight: 600;
  cursor: pointer;
}
.pm-add-btn { width: 100%; margin-top: 4px; }

/* ================= CART DRAWER ================= */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(35, 23, 14, 0.5);
  z-index: 90;
}
.overlay.show { display: block; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: -440px;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  background: var(--surface);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: right 0.28s ease;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.14);
}
.cart-drawer.open { right: 0; }

.cart-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-header h2 { font-size: 19px; }

.close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--cream);
  cursor: pointer;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  background: var(--cream);
  border: 1px solid var(--border);
}
.ci-info strong { display: block; color: var(--text); font-size: 16px; }
.ci-info span { color: var(--brand-dark); font-size: 15px; }

.ci-qty { display: flex; align-items: center; gap: 8px; }
.ci-qty button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  cursor: pointer;
}

.checkout-form {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-page);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 4px;
}
.total-row strong { font-size: 19px; color: var(--brand-dark); }

.checkout-form input {
  width: 100%;
  padding: 10px 13px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 15px;
  outline: none;
}
.checkout-form input:focus { border-color: var(--brand); }

.submit-order-btn {
  padding: 13px;
  border-radius: 999px;
  border: none;
  background: var(--brand);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}
.submit-order-btn:hover { background: var(--brand-dark); }

/* ================= FOOTER & MOBILE BAR ================= */
.site-footer {
  background: var(--cream);
  border-top: 1px solid var(--border);
  padding: 20px 0;
  color: var(--muted);
  font-size: 15px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-brand strong {
  display: block;
  color: var(--text);
  font-size: 16px;
}

.mobile-cart-bar { display: none; }

@media (max-width: 640px) {
  .container { padding: 0 14px; }
  .pm-layout { grid-template-columns: 1fr; }
  .pm-img-box { max-height: 240px; }

  .mobile-cart-bar.has-items {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 45;
    background: var(--brand);
    color: #FFFFFF;
    padding: 14px 20px;
    border-radius: 999px;
    box-shadow: 0 10px 26px rgba(44, 29, 17, 0.28);
    cursor: pointer;
  }
  .site-footer { padding-bottom: 84px; }
}
