/* ==========================================================================
   Hoa Kinh Bắc — giao diện chung (trang khách)
   Biến màu/khoảng cách ở :root. CSS riêng từng trang: shop.css, checkout.css, content.css
   ========================================================================== */

:root {
  /* Màu thương hiệu */
  --c-primary: #b83a5e;
  --c-primary-600: #a3304f;
  --c-primary-700: #8a2743;
  --c-primary-50: #fdf1f4;
  --c-primary-100: #f9dfe6;
  --c-primary-200: #f2c2cf;
  --c-sage: #5b7f62;
  --c-sage-700: #46664c;
  --c-sage-50: #eef4ef;
  --c-gold: #c08a2e;
  --c-gold-50: #fbf3e4;
  --c-zalo: #0068ff;

  /* Nền & chữ */
  --c-bg: #fffaf8;
  --c-surface: #ffffff;
  --c-blush: #fcf1ee;
  --c-cream: #fbf6ef;
  --c-ink: #2d2327;
  --c-text: #3d3236;
  --c-muted: #6e6166;
  --c-line: #eee2e4;
  --c-line-strong: #dccbcf;

  /* Trạng thái */
  --c-success: #2e7d4f;
  --c-success-50: #eaf6ef;
  --c-warning: #8a5208;
  --c-warning-50: #fdf3e2;
  --c-danger: #c0392b;
  --c-danger-50: #fdecea;
  --c-info: #2563a6;
  --c-info-50: #eaf2fb;

  /* Chữ */
  --font-sans: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  /* Không dùng Georgia làm dự phòng: thiếu chữ tiếng Việt dựng sẵn nên dấu bị tách rời */
  --font-serif: 'Playfair Display', 'Times New Roman', Times, serif;
  --font-script: 'Dancing Script', 'Brush Script MT', cursive;

  /* Hình khối */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(61, 22, 37, 0.06), 0 1px 3px rgba(61, 22, 37, 0.05);
  --shadow: 0 6px 20px -8px rgba(92, 30, 52, 0.18);
  --shadow-lg: 0 18px 40px -16px rgba(92, 30, 52, 0.3);
  --ring: 0 0 0 3px rgba(184, 58, 94, 0.25);

  --container: 1200px;
  --gutter: 16px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 768px) {
  :root {
    --gutter: 24px;
  }
}

/* ---------- Đặt lại cơ bản ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 136px;
  font-variant-numeric: lining-nums;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img,
svg,
video {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}
a {
  color: var(--c-primary);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}
a:hover {
  color: var(--c-primary-700);
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  color: var(--c-ink);
  line-height: 1.25;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.005em;
  font-variant-numeric: lining-nums;
}
h1 {
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.6rem);
}
h2 {
  font-size: clamp(1.45rem, 1.2rem + 1.2vw, 2rem);
}
h3 {
  font-size: 1.2rem;
}
p {
  margin: 0 0 1em;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}
::selection {
  background: var(--c-primary-100);
  color: var(--c-ink);
}
[hidden] {
  display: none !important;
}
.icon {
  flex-shrink: 0;
}

/* ---------- Tiện ích ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow {
  max-width: 820px;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--c-ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  transition: top 0.2s;
}
.skip-link:focus {
  top: 12px;
  color: #fff;
}
.text-center {
  text-align: center;
}
.muted {
  color: var(--c-muted);
}
.small {
  font-size: 0.875rem;
}
.nowrap {
  white-space: nowrap;
}
.stack > * + * {
  margin-top: 1rem;
}
.mt-0 {
  margin-top: 0 !important;
}
.mb-0 {
  margin-bottom: 0 !important;
}
.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.5rem;
}
.mt-4 {
  margin-top: 2.5rem;
}
.hide-mobile {
  display: none;
}
@media (min-width: 768px) {
  .hide-mobile {
    display: revert;
  }
  .show-mobile {
    display: none !important;
  }
}

/* ---------- Khối & lưới ---------- */
.section {
  padding-block: 44px;
}
.section--tight {
  padding-block: 28px;
}
.section--blush {
  background: var(--c-blush);
}
.section--cream {
  background: var(--c-cream);
}
.section--white {
  background: var(--c-surface);
}
@media (min-width: 1024px) {
  .section {
    padding-block: 64px;
  }
}
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 20px;
}
@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 768px) {
  .card {
    padding: 28px;
  }
}
.card__title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

/* ---------- Nút ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease),
    transform 0.12s var(--ease);
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.btn--primary {
  background: var(--c-primary);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(184, 58, 94, 0.7);
}
.btn--primary:hover {
  background: var(--c-primary-600);
  color: #fff;
}
.btn--secondary {
  background: var(--c-sage);
  color: #fff;
}
.btn--secondary:hover {
  background: var(--c-sage-700);
  color: #fff;
}
.btn--outline {
  background: var(--c-surface);
  color: var(--c-primary);
  border-color: var(--c-primary-200);
}
.btn--outline:hover {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}
.btn--ghost {
  background: transparent;
  color: var(--c-ink);
}
.btn--ghost:hover {
  background: var(--c-primary-50);
  color: var(--c-primary-700);
}
.btn--light {
  background: #fff;
  color: var(--c-primary-700);
}
.btn--light:hover {
  background: var(--c-primary-50);
  color: var(--c-primary-700);
}
.btn--zalo {
  background: var(--c-zalo);
  color: #fff;
}
.btn--zalo:hover {
  background: #0057d6;
  color: #fff;
}
.btn--danger {
  background: var(--c-danger);
  color: #fff;
}
.btn--sm {
  min-height: 38px;
  padding: 7px 14px;
  font-size: 0.875rem;
}
.btn--lg {
  min-height: 52px;
  padding: 14px 30px;
  font-size: 1.05rem;
}
.btn--block {
  display: flex;
  width: 100%;
}
.btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn.is-loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn--outline.is-loading::after {
  border-color: var(--c-primary-200);
  border-top-color: var(--c-primary);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Biểu mẫu ---------- */
.field {
  margin-bottom: 16px;
}
.field__label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--c-ink);
}
.req {
  color: var(--c-danger);
}
.input,
.select,
.textarea {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1.5px solid var(--c-line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--c-ink);
  font-size: 1rem; /* >=16px để iPhone không tự phóng to */
  line-height: 1.4;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
.textarea {
  min-height: 110px;
  resize: vertical;
}
.select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236e6166' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.input::placeholder,
.textarea::placeholder,
.header-search__input::placeholder {
  color: #7a6b70;
}
.input:hover,
.select:hover,
.textarea:hover {
  border-color: #c9b5bb;
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: var(--ring);
}
.input.is-invalid,
.select.is-invalid,
.textarea.is-invalid,
.has-error .input,
.has-error .select,
.has-error .textarea {
  border-color: var(--c-danger);
}
.field__help {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--c-muted);
}
.field__error {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--c-danger);
  font-weight: 500;
}
.form-row {
  display: grid;
  gap: 0 16px;
}
@media (min-width: 640px) {
  .form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.check {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.45;
}
.check input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--c-primary);
  flex-shrink: 0;
}
/* Ô lựa chọn dạng thẻ (phương thức thanh toán, phiên bản sản phẩm...) */
.choice-list {
  display: grid;
  gap: 10px;
}
.choice {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--c-line-strong);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.choice:hover {
  border-color: var(--c-primary-200);
}
.choice input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--c-primary);
  flex-shrink: 0;
}
.choice:has(input:checked) {
  border-color: var(--c-primary);
  background: var(--c-primary-50);
  box-shadow: 0 0 0 1px var(--c-primary);
}
.choice:has(input:disabled) {
  opacity: 0.55;
  cursor: not-allowed;
}
.choice__title {
  display: block;
  font-weight: 600;
  color: var(--c-ink);
}
.choice__desc {
  display: block;
  font-size: 0.88rem;
  color: var(--c-muted);
}
.qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--c-line-strong);
  border-radius: var(--radius-pill);
  background: #fff;
  overflow: hidden;
}
.qty button {
  width: 40px;
  height: 42px;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  color: var(--c-ink);
}
.qty button:hover {
  background: var(--c-primary-50);
  color: var(--c-primary);
}
.qty button:focus-visible,
.qty input:focus-visible {
  outline: none;
  background: var(--c-primary-100);
  color: var(--c-primary-700);
  box-shadow: inset 0 0 0 2px var(--c-primary);
}
.qty:focus-within {
  border-color: var(--c-primary);
}
.qty input {
  width: 46px;
  height: 42px;
  border: 0;
  text-align: center;
  font-weight: 600;
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ---------- Thông báo & nhãn ---------- */
.flash-list {
  margin: 16px 0 0;
}
.alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  margin-bottom: 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  line-height: 1.5;
}
.alert > .icon {
  margin-top: 1px;
}
.alert--success {
  background: var(--c-success-50);
  border-color: #bfe3cd;
  color: #1f5a38;
}
.alert--error {
  background: var(--c-danger-50);
  border-color: #f5c3bd;
  color: #8f2a20;
}
.alert--warning {
  background: var(--c-warning-50);
  border-color: #f1d6a8;
  color: #7a4a0c;
}
.alert--info {
  background: var(--c-info-50);
  border-color: #c4d9f1;
  color: #1d4e84;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.4;
  white-space: nowrap;
}
.badge--sale {
  background: var(--c-primary);
  color: #fff;
}
.badge--hot {
  background: #946414;
  color: #fff;
}
.badge--new {
  background: var(--c-sage);
  color: #fff;
}
.badge--soft {
  background: var(--c-primary-50);
  color: var(--c-primary-700);
}
.badge--success {
  background: var(--c-success-50);
  color: var(--c-success);
}
.badge--warning {
  background: var(--c-warning-50);
  color: var(--c-warning);
}
.badge--info {
  background: var(--c-info-50);
  color: var(--c-info);
}
.badge--muted {
  background: #f1eced;
  color: var(--c-muted);
}
.badge--violet {
  background: #f1ebfb;
  color: #6a3fb0;
}
.badge--cyan {
  background: #e6f6f8;
  color: #12707d;
}

/* ---------- Thanh thông báo trên cùng ---------- */
.announcement {
  background: linear-gradient(90deg, var(--c-primary-700), var(--c-primary) 50%, var(--c-primary-700));
  color: #fff;
  font-size: 0.82rem;
  text-align: center;
}
.announcement .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding-block: 6px;
}
.announcement .icon {
  opacity: 0.85;
}

/* ---------- Đầu trang ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* KHÔNG dùng backdrop-filter ở đây: nó làm menu di động (position: fixed bên trong) bị cắt theo chiều cao đầu trang */
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--c-line);
  transition: box-shadow 0.2s;
}
.site-header.is-scrolled {
  box-shadow: 0 6px 20px -14px rgba(61, 22, 37, 0.35);
}
.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    'toggle logo actions'
    'search search search';
  align-items: center;
  gap: 10px 12px;
  padding-block: 10px;
}
.nav-toggle {
  grid-area: toggle;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--c-primary-50);
  color: var(--c-primary-700);
}
.logo {
  grid-area: logo;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--c-ink);
  min-width: 0;
}
.logo:hover {
  color: var(--c-ink);
}
.logo__mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.logo__img {
  max-height: 44px;
  width: auto;
}
.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 0;
}
.logo__name {
  font-family: var(--font-script);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--c-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.logo__tagline {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-muted);
  font-weight: 600;
  margin-top: 2px;
}
.header-search {
  grid-area: search;
  position: relative;
  display: flex;
}
.header-search__input {
  width: 100%;
  height: 44px;
  padding: 0 48px 0 18px;
  border: 1.5px solid var(--c-line-strong);
  border-radius: var(--radius-pill);
  background: var(--c-bg);
  font-size: 0.95rem;
  appearance: none;
}
.header-search__input:focus {
  outline: none;
  border-color: var(--c-primary);
  background: #fff;
  box-shadow: var(--ring);
}
.header-search__btn {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  display: grid;
  place-items: center;
}
.header-search__btn:hover {
  background: var(--c-primary-600);
}
.header-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-hotline {
  display: none;
  align-items: center;
  gap: 10px;
  color: var(--c-ink);
}
.header-hotline__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--c-primary-50);
  color: var(--c-primary);
  animation: ring 2.6s ease-in-out infinite;
}
.header-hotline__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.header-hotline__text small {
  font-size: 0.72rem;
  color: var(--c-muted);
}
.header-hotline__text strong {
  font-size: 1.05rem;
  color: var(--c-primary);
  letter-spacing: 0.01em;
}
.header-cart {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--c-ink);
  transition: background-color 0.15s;
}
.header-cart:hover {
  background: var(--c-primary-50);
  color: var(--c-primary);
}
.cart-count {
  position: absolute;
  top: 0;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--c-primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.cart-count.is-bump {
  animation: bump 0.45s var(--ease);
}
@keyframes bump {
  40% {
    transform: scale(1.35);
  }
}
@keyframes ring {
  0%,
  86%,
  100% {
    transform: rotate(0);
  }
  88% {
    transform: rotate(-14deg);
  }
  92% {
    transform: rotate(12deg);
  }
  96% {
    transform: rotate(-8deg);
  }
}

@media (min-width: 640px) {
  .site-header__inner {
    grid-template-columns: auto auto 1fr auto;
    grid-template-areas: 'toggle logo search actions';
    gap: 12px 18px;
  }
}
@media (min-width: 1024px) {
  .site-header__inner {
    grid-template-columns: auto minmax(260px, 1fr) auto;
    grid-template-areas: 'logo search actions';
    gap: 28px;
    padding-block: 14px;
  }
  .nav-toggle {
    display: none;
  }
  .logo__mark {
    width: 46px;
    height: 46px;
  }
  .logo__name {
    font-size: 1.9rem;
  }
  .header-search {
    max-width: 520px;
    justify-self: center;
    width: 100%;
  }
  .header-hotline {
    display: inline-flex;
  }
  .header-actions {
    gap: 18px;
  }
}

/* ---------- Menu ---------- */
.site-nav__head,
.site-nav__contact {
  display: none;
}
.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu__link {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  border: 0;
  background: none;
  color: var(--c-ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: left;
}
.nav-menu__link:hover,
.nav-menu__link.is-active {
  color: var(--c-primary);
}
.nav-sub {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-sub a {
  display: block;
  color: var(--c-text);
}
.nav-sub a:hover,
.nav-sub a.is-active {
  color: var(--c-primary);
}

/* Di động: menu trượt từ trái */
@media (max-width: 1023.98px) {
  .site-nav {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 120;
    width: min(86vw, 360px);
    background: #fff;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-104%);
    visibility: hidden;
    transition: transform 0.28s var(--ease), visibility 0s linear 0.28s;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
  }
  .site-nav.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.28s var(--ease), visibility 0s;
  }
  body.nav-open .site-header {
    z-index: 130;
  }
  .site-nav .container {
    padding: 0;
  }
  .site-nav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--c-line);
    background: var(--c-primary-50);
  }
  .site-nav__title {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--c-ink);
  }
  .site-nav__close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    display: grid;
    place-items: center;
    color: var(--c-ink);
  }
  .nav-menu__item {
    border-bottom: 1px solid var(--c-line);
  }
  .nav-menu__link {
    padding: 14px 18px;
    justify-content: space-between;
  }
  .nav-sub-toggle .icon {
    transition: transform 0.2s;
  }
  .nav-sub-toggle[aria-expanded='true'] .icon {
    transform: rotate(180deg);
  }
  .nav-sub {
    display: none;
    padding: 0 0 10px;
    background: var(--c-bg);
  }
  .has-sub.is-open > .nav-sub {
    display: block;
  }
  .nav-sub a {
    padding: 9px 18px 9px 30px;
    font-size: 0.95rem;
  }
  .site-nav__contact {
    display: grid;
    gap: 10px;
    padding: 18px 16px 28px;
    margin-top: auto;
  }
  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(35, 20, 27, 0.45);
  }
  body.nav-open {
    overflow: hidden;
  }
}

/* Máy tính: thanh menu ngang + menu con thả xuống */
@media (min-width: 1024px) {
  .site-nav {
    border-top: 1px solid var(--c-line);
  }
  .nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }
  .nav-menu__item {
    position: relative;
  }
  .nav-menu__link {
    padding: 12px 14px;
    font-size: 0.93rem;
    position: relative;
    white-space: nowrap;
  }
  .nav-menu__link::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 6px;
    height: 2px;
    border-radius: 2px;
    background: var(--c-primary);
    transform: scaleX(0);
    transition: transform 0.2s var(--ease);
  }
  .nav-menu__link:hover::after,
  .nav-menu__link.is-active::after {
    transform: scaleX(1);
  }
  .nav-sub {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
    z-index: 60;
  }
  .has-sub:not(.is-dismissed):hover > .nav-sub,
  .has-sub.is-open > .nav-sub {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .nav-sub a {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.92rem;
  }
  .nav-sub a:hover {
    background: var(--c-primary-50);
  }
  .nav-backdrop {
    display: none !important;
  }
}

/* ---------- Đường dẫn (breadcrumb) ---------- */
.breadcrumbs {
  padding-block: 14px 0;
  font-size: 0.85rem;
  color: var(--c-muted);
}
.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.breadcrumbs li + li::before {
  content: '/';
  color: #c3b4b9;
  margin-right: 2px;
}
.breadcrumbs a {
  color: var(--c-muted);
}
.breadcrumbs a:hover {
  color: var(--c-primary);
}
.breadcrumbs [aria-current] {
  color: var(--c-ink);
  font-weight: 500;
}

/* ---------- Tiêu đề khối ---------- */
.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 28px;
}
.section-head--left {
  text-align: left;
  margin-left: 0;
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 24px;
}
.section-head--left > :not(.section-head__link) {
  grid-column: 1;
}
.section-head--left .section-head__link {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: end;
  white-space: nowrap;
}
.section-head--left .section-head__title {
  margin-bottom: 0;
}
.section-head__eyebrow {
  margin: 0 0 2px;
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--c-primary);
  line-height: 1.2;
}
.section-head__title {
  margin-bottom: 8px;
}
.section-head:not(.section-head--left) .section-head__title::after {
  content: '';
  display: block;
  width: 64px;
  height: 14px;
  margin: 10px auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='14' viewBox='0 0 64 14' fill='none'%3E%3Cpath d='M2 7h20M42 7h20' stroke='%23e4b7c4' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M32 1.5c1.6 2.6 1.6 3.6 0 5.5-1.6-1.9-1.6-2.9 0-5.5zM32 12.5c-1.6-2.6-1.6-3.6 0-5.5 1.6 1.9 1.6 2.9 0 5.5zM26.5 7c2.6-1.6 3.6-1.6 5.5 0-1.9 1.6-2.9 1.6-5.5 0zM37.5 7c-2.6 1.6-3.6 1.6-5.5 0 1.9-1.6 2.9-1.6 5.5 0z' fill='%23b83a5e'/%3E%3C/svg%3E")
    no-repeat center;
}
.section-head__subtitle {
  margin: 0;
  color: var(--c-muted);
}
.section-head__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  margin-top: 10px;
}
.section-head--left .section-head__link {
  margin-top: 0;
}

/* ---------- Lưới sản phẩm & thẻ sản phẩm ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}
@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
  }
}
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--c-primary-100);
}
.product-card__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--c-blush);
}
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.product-card:hover .product-card__media img {
  transform: scale(1.05);
}
.product-card__badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 12px 12px 14px;
}
@media (min-width: 768px) {
  .product-card__body {
    padding: 14px 16px 16px;
  }
}
.product-card__title {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}
.product-card__title a {
  color: var(--c-ink);
}
.product-card__title a:hover {
  color: var(--c-primary);
}
.product-card__title a::before {
  /* cả thẻ bấm được (trừ nút) */
  content: '';
  position: absolute;
  inset: 0 0 64px 0;
}
.product-card__meta {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--c-muted);
}
.product-card__form {
  margin-top: auto;
  padding-top: 12px;
  position: relative;
  z-index: 1;
}
.price-block {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
}
.price {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--c-primary);
}
.price-old {
  font-size: 0.85rem;
  color: var(--c-muted);
}

/* ---------- Phân trang ---------- */
.pagination {
  margin-top: 36px;
}
.pagination ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.pagination__link {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--c-line-strong);
  background: #fff;
  color: var(--c-ink);
  font-weight: 600;
}
.pagination__link:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}
.pagination__link.is-current {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}
.pagination__gap {
  display: grid;
  place-items: center;
  min-width: 24px;
  color: var(--c-muted);
}

/* ---------- Trạng thái trống & lỗi ---------- */
.empty-state {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  padding: 40px 16px;
}
.empty-state__icon {
  display: inline-grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--c-primary-50);
  color: var(--c-primary);
}
.empty-state__title {
  font-size: 1.5rem;
}
.empty-state__text {
  color: var(--c-muted);
}
.error-page__code {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--c-primary);
  line-height: 1;
}
.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}

/* ---------- Chân trang ---------- */
.site-footer {
  margin-top: 40px;
  background: #2a1d22;
  color: #e9dde1;
}
.footer-promises {
  background: var(--c-primary-50);
  color: var(--c-ink);
  border-top: 1px solid var(--c-primary-100);
}
.footer-promises__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-block: 22px;
}
@media (min-width: 1024px) {
  .footer-promises__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    padding-block: 26px;
  }
}
.promise {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--c-primary);
}
.promise div {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.promise strong {
  color: var(--c-ink);
  font-size: 0.92rem;
}
.promise span {
  color: var(--c-muted);
  font-size: 0.8rem;
}
.footer-grid {
  display: grid;
  gap: 28px;
  padding-block: 40px 32px;
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
  }
}
.logo--footer .logo__name {
  color: #fff;
}
.logo--footer .logo__img {
  background: #fff;
  border-radius: 8px;
  padding: 4px 6px;
}
.logo--footer .logo__tagline {
  color: #bca9b0;
}
.footer-about {
  margin: 14px 0;
  color: #cbbcc1;
  font-size: 0.92rem;
}
.footer-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 0.92rem;
}
.footer-contact li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.footer-contact .icon {
  color: #f2a7bd;
  margin-top: 3px;
}
.site-footer a {
  color: #f3e8eb;
}
.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}
.site-footer :focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.footer-title {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 14px;
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
}
.footer-links a {
  color: #cbbcc1;
}
.footer-social {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.social-btn {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}
.social-btn:hover {
  background: var(--c-primary);
  text-decoration: none !important;
}
.social-btn--zalo:hover {
  background: var(--c-zalo);
}
.footer-note {
  font-size: 0.85rem;
  color: #bca9b0;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-block: 16px 150px;
  font-size: 0.82rem;
  color: #a8959c;
  text-align: center;
}
@media (min-width: 768px) {
  .footer-bottom {
    padding-bottom: 18px;
  }
}
.footer-legal,
.footer-copy {
  margin: 0 0 4px;
}
.footer-legal {
  color: #c4b3b9;
}
.footer-legal--badge img {
  display: inline-block;
  height: 48px;
  width: auto;
  margin: 6px 0;
}

/* ---------- Nút liên hệ nổi ---------- */
.floating-contact {
  position: fixed;
  right: 12px;
  bottom: 16px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fc-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s var(--ease);
}
.fc-btn:hover {
  transform: scale(1.08);
  color: #fff;
}
.fc-btn--zalo {
  background: var(--c-zalo);
}
.fc-btn__zalo {
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.fc-btn--messenger {
  background: linear-gradient(135deg, #00b2ff, #a033ff 60%, #ff5c87);
}
.fc-btn--phone {
  background: var(--c-primary);
}
.fc-btn--phone::before,
.fc-btn--zalo::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  animation: pulse 2.4s ease-out infinite;
}
.fc-btn--phone::before {
  color: var(--c-primary);
}
.fc-btn--zalo::before {
  color: var(--c-zalo);
  animation-delay: 1.2s;
}
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

/* ---------- Thông báo nổi (toast) ---------- */
.toast-region {
  position: fixed;
  z-index: 300;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  width: min(94vw, 420px);
  display: grid;
  gap: 10px;
  pointer-events: none;
}
@media (min-width: 768px) {
  .toast-region {
    left: auto;
    right: 20px;
    top: 20px;
    transform: none;
  }
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--c-line);
  border-left: 4px solid var(--c-success);
  box-shadow: var(--shadow-lg);
  font-size: 0.93rem;
  animation: toast-in 0.3s var(--ease);
}
.toast--error {
  border-left-color: var(--c-danger);
}
.toast__img {
  width: 48px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.toast__body {
  flex: 1;
  min-width: 0;
}
.toast__title {
  font-weight: 600;
  color: var(--c-ink);
}
.toast__action {
  font-weight: 600;
  white-space: nowrap;
}
.toast__close {
  border: 0;
  background: none;
  color: var(--c-muted);
  padding: 4px;
  display: grid;
}
.toast.is-leaving {
  animation: toast-out 0.25s var(--ease) forwards;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* ---------- Nội dung bài viết (markdown) ---------- */
.prose {
  color: var(--c-text);
  font-size: 1.02rem;
  line-height: 1.75;
}
.prose > :first-child {
  margin-top: 0;
}
.prose h2 {
  font-size: 1.5rem;
  margin: 1.8em 0 0.6em;
}
.prose h3 {
  font-size: 1.2rem;
  margin: 1.5em 0 0.5em;
}
.prose h4 {
  font-family: var(--font-sans);
  font-size: 1.02rem;
  font-weight: 700;
  margin: 1.4em 0 0.4em;
}
.prose ul,
.prose ol {
  padding-left: 1.4em;
  margin: 0 0 1.1em;
}
.prose li + li {
  margin-top: 0.35em;
}
.prose li::marker {
  color: var(--c-primary);
}
.prose blockquote {
  margin: 1.4em 0;
  padding: 14px 20px;
  border-left: 4px solid var(--c-primary-200);
  background: var(--c-primary-50);
  border-radius: 0 12px 12px 0;
  color: var(--c-ink);
  font-style: italic;
}
.prose blockquote p {
  margin: 0;
}
.prose img {
  border-radius: var(--radius);
  margin: 1.4em auto;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--c-line);
  margin: 2em 0;
}
.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--c-primary-200);
}
.prose strong {
  color: var(--c-ink);
}

/* ---------- Ít chuyển động (người dùng chọn) ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- In ---------- */
@media print {
  .announcement,
  .site-header,
  .site-footer,
  .floating-contact,
  .toast-region,
  .breadcrumbs {
    display: none !important;
  }
  body {
    background: #fff;
  }
}
