/* ==========================================================================
   LAM Coffee — hệ thống giao diện
   Dịch từ bản thiết kế "LAM Website.dc.html" (design/)
   ========================================================================== */

:root {
  --navy: #1D2E6E;
  --navy-deep: #28407e;
  --navy-line: #3d5494;
  --paper: #F6F7FA;
  --white: #FFFFFF;
  --line: #DDE4F0;
  --line-strong: #C6CFE2;
  --ink-muted: #43507E;
  --ink-soft: #7B8AB8;
  --blue-100: #C9D6EE;
  --blue-050: #DCE4F2;
  --panel: #EDF0F7;
  --on-navy-soft: #AEBFE3;
  --gold: #B08D3F;

  --display: 'Playfair Display', Georgia, serif;
  --body: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: 64px;
  --shell: 1440px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
}

img { max-width: 100%; }

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--ink-soft); }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

input, select { font: inherit; color: inherit; }

h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0; }

:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.shell { max-width: var(--shell); margin: 0 auto; }

/* --------------------------------------------------------------------------
   Thanh thông báo + header
   -------------------------------------------------------------------------- */

.announce {
  background: var(--navy);
  color: var(--paper);
  text-align: center;
  font-size: 12px;
  letter-spacing: 2px;
  padding: 10px 16px;
}

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-header__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 22px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 6px;
  line-height: 1;
}

.wordmark:hover { color: var(--navy); }

.site-nav {
  display: flex;
  gap: 36px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 1px;
}

.site-nav a { padding-bottom: 2px; border-bottom: 2px solid transparent; }
.site-nav a[aria-current='page'] { border-bottom-color: var(--navy); }

.site-actions {
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 13px;
}

.cart-link {
  border: 1px solid var(--navy);
  padding: 8px 16px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.cart-link:hover { background: var(--navy); color: var(--paper); }

.nav-toggle { display: none; font-size: 20px; line-height: 1; padding: 4px 6px; }

.header-search { display: flex; align-items: center; gap: 8px; }

.header-search input {
  width: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: width .25s ease, padding .25s ease;
}

.header-search.is-open input {
  width: 160px;
  padding: 4px 2px;
  border-bottom-color: var(--navy);
}

/* Ngăn kéo điều hướng cho mobile */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}

.nav-drawer[open] { display: block; }

.nav-drawer__scrim { position: absolute; inset: 0; background: rgba(29, 46, 110, .45); }

.nav-drawer__panel {
  position: absolute;
  inset: 0 30% 0 0;
  min-width: 260px;
  background: var(--paper);
  padding: 24px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 0 60px rgba(0, 0, 0, .3);
}

.nav-drawer__panel a {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
  letter-spacing: 1px;
}

.nav-drawer__close { align-self: flex-end; font-size: 22px; margin-bottom: 8px; }

/* --------------------------------------------------------------------------
   Thành phần dùng chung
   -------------------------------------------------------------------------- */

.eyebrow {
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.eyebrow--on-navy { color: var(--on-navy-soft); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 2px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: var(--paper);
  text-align: center;
  min-height: 48px;
  transition: background .15s ease, color .15s ease;
}

.btn:hover { background: var(--navy-deep); color: var(--paper); }

.btn--ghost { background: transparent; color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: var(--paper); }

.btn--block { width: 100%; }

.btn[disabled] { opacity: .5; cursor: not-allowed; }

.link-underline {
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 2px;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  width: fit-content;
}

.section { padding: 72px var(--gutter); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

.section-head h2 { font-size: 36px; }

/* Thẻ sản phẩm */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color .15s ease, transform .15s ease;
}

.card:hover { border-color: var(--navy); }

.card__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--navy);
  color: var(--paper);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 5px 10px;
  z-index: 1;
}

.card__media {
  padding: 24px 24px 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.card__media img {
  display: block;
  width: auto;
  height: 100%;
  max-width: 82%;
  object-fit: contain;
  object-position: bottom;
}

.card__body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card__tag { font-weight: 500; font-size: 12px; letter-spacing: 2px; color: var(--ink-soft); }
.card__name { font-family: var(--display); font-weight: 600; font-size: 19px; }
.card__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 6px;
}
.card__price { font-weight: 500; font-size: 15px; }

.card__add {
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 1px;
  border: 1px solid var(--navy);
  padding: 8px 14px;
  white-space: nowrap;
  min-height: 36px;
}

.card__add:hover { background: var(--navy); color: var(--paper); }

/* Ô chọn (trọng lượng, độ xay, bộ lọc dạng chip) */
.chips { display: flex; gap: 10px; flex-wrap: wrap; }

.chip {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 12px 22px;
  font-weight: 500;
  font-size: 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.chip:hover { border-color: var(--navy); }
.chip[aria-pressed='true'] { background: var(--navy); border-color: var(--navy); color: var(--paper); }

/* Bộ đếm số lượng */
.stepper {
  border: 1px solid var(--line);
  background: var(--white);
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  font-size: 16px;
}

.stepper button { padding: 14px 18px; min-height: 44px; }
.stepper button:first-child { border-right: 1px solid var(--line); }
.stepper button:last-child { border-left: 1px solid var(--line); }
.stepper output { padding: 14px 22px; min-width: 56px; text-align: center; }

.stepper--sm button { padding: 9px 13px; min-height: 38px; }
.stepper--sm output { padding: 9px 16px; min-width: 44px; font-size: 14px; }

/* Ô nhập liệu */
.field { display: flex; flex-direction: column; gap: 6px; }
.field--wide { grid-column: 1 / -1; }

.field input, .field select {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 14px 16px;
  min-height: 48px;
  width: 100%;
}

.field input::placeholder { color: var(--ink-soft); }
.field input:focus, .field select:focus { outline: none; border-color: var(--navy); }
.field.is-invalid input, .field.is-invalid select { border-color: #A32F35; }

.field__error { font-size: 12px; color: #A32F35; min-height: 0; }
.field:not(.is-invalid) .field__error { display: none; }

/* Lựa chọn dạng thẻ (vận chuyển, thanh toán) */
.option-list { display: flex; flex-direction: column; gap: 10px; }

.option {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--ink-muted);
  cursor: pointer;
  min-height: 56px;
}

.option:hover { border-color: var(--ink-soft); }

.option input { position: absolute; opacity: 0; pointer-events: none; }

.option__mark {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1px solid var(--ink-soft); flex: 0 0 auto;
}

.option__label { display: flex; align-items: center; gap: 12px; }

.option:has(input:checked) {
  border: 2px solid var(--navy);
  color: var(--navy);
  font-weight: 500;
  padding: 15px 17px;
}

.option:has(input:checked) .option__mark {
  border-color: var(--navy);
  background: var(--navy);
  box-shadow: inset 0 0 0 3px var(--white);
}

.option:has(input:focus-visible) { outline: 2px solid var(--navy); outline-offset: 2px; }

/* Hộp kiểm bộ lọc */
.check {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  color: var(--ink-muted);
  cursor: pointer;
  min-height: 32px;
}

.check input { position: absolute; opacity: 0; pointer-events: none; }

.check__box {
  width: 16px; height: 16px; flex: 0 0 auto;
  border: 1px solid var(--navy);
  display: inline-flex; align-items: center; justify-content: center;
}

.check input:checked + .check__box { background: var(--navy); }
.check input:checked + .check__box::after { content: '✓'; color: var(--paper); font-size: 11px; line-height: 1; }
.check input:focus-visible + .check__box { outline: 2px solid var(--navy); outline-offset: 2px; }

/* Ảnh minh hoạ tạm — chỗ chờ ảnh thật, giữ nguyên chú thích của bản thiết kế */
.plate {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 16px;
  background-color: var(--blue-050);
  background-image: repeating-linear-gradient(
    to bottom, transparent 0 44px, var(--line-strong) 44px 45px
  );
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.plate--navy {
  background-color: var(--navy-deep);
  background-image: repeating-linear-gradient(
    to bottom, transparent 0 56px, var(--navy-line) 56px 57px
  );
  color: var(--blue-100);
}

.plate--sm { font-size: 10px; padding: 6px; }

/* Lớp .plate đặt display nên phải trả lại quyền cho thuộc tính hidden */
[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px var(--gutter);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  max-width: var(--shell);
  margin: 0 auto;
}

.site-footer__brand { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: 5px; }

.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-muted);
}

.site-footer__col strong { color: var(--navy); font-weight: 600; }

.site-footer--slim {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 32px var(--gutter);
  font-size: 13px;
  color: var(--ink-muted);
}

.site-footer--slim .site-footer__brand { font-size: 20px; letter-spacing: 4px; }

/* --------------------------------------------------------------------------
   01 · Trang chủ
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 620px;
  max-width: var(--shell);
  margin: 0 auto;
}

.hero__copy {
  padding: 96px var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}

.hero__title { font-size: 64px; line-height: 1.15; text-wrap: pretty; }

.hero__lede {
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  margin: 0;
  max-width: 480px;
  color: var(--ink-muted);
}

.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }

.hero__media {
  background: var(--blue-100);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 48px 48px 0;
}

.hero__media img {
  width: 78%;
  display: block;
  filter: drop-shadow(0 -12px 48px rgba(29, 46, 110, .25));
}

.promises {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  max-width: var(--shell);
  margin: 0 auto;
}

.promise {
  padding: 28px var(--gutter);
  border-right: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-muted);
}

.promise:last-child { border-right: 0; }
.promise strong { display: block; font-weight: 600; font-size: 15px; color: var(--navy); margin-bottom: 4px; }

.story-band {
  background: var(--navy);
  color: var(--paper);
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: var(--shell);
  margin: 0 auto;
}

.story-band__copy {
  padding: 80px var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
}

.story-band__copy h2 { font-size: 40px; line-height: 1.25; }

.story-band__copy p {
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
  color: var(--blue-100);
  max-width: 460px;
}

.story-band__copy a { color: var(--paper); }
.story-band__copy a:hover { color: var(--blue-100); }

/* --------------------------------------------------------------------------
   02 · Danh mục
   -------------------------------------------------------------------------- */

.page-head {
  padding: 56px var(--gutter) 24px;
  border-bottom: 1px solid var(--line);
  max-width: var(--shell);
  margin: 0 auto;
}

.breadcrumb { font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; }
.breadcrumb a { color: var(--ink-soft); }

.page-head h1 { font-size: 48px; margin-bottom: 12px; }

.page-head p {
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0 0 28px;
  max-width: 640px;
}

.catalog {
  display: grid;
  grid-template-columns: 280px 1fr;
  max-width: var(--shell);
  margin: 0 auto;
}

.filters {
  padding: 40px 32px 64px var(--gutter);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-content: start;
}

.filters__body {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.filters__group > h2, .filters__group > legend {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 14px;
  padding: 0;
  font-family: var(--body);
}

.filters fieldset { border: 0; margin: 0; padding: 0; }

.filters .chip { padding: 9px 16px; font-size: 13px; min-height: 40px; }

.filters__list { display: flex; flex-direction: column; gap: 10px; }

.filters__reset {
  font-size: 13px;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--line-strong);
  width: fit-content;
  padding-bottom: 2px;
}

.filters__toggle { display: none; }

.catalog__main { padding: 40px var(--gutter) 64px 40px; }

.catalog__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  font-size: 14px;
  color: var(--ink-muted);
}

.select-wrap {
  border: 1px solid var(--line);
  background: var(--white);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
}

.select-wrap select {
  border: 0;
  background: transparent;
  padding: 12px 0;
  min-height: 44px;
}

.select-wrap select:focus { outline: none; }

.empty-state {
  border: 1px dashed var(--line-strong);
  padding: 56px 32px;
  text-align: center;
  color: var(--ink-muted);
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

/* --------------------------------------------------------------------------
   03 · Chi tiết sản phẩm
   -------------------------------------------------------------------------- */

.pdp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: var(--shell);
  margin: 0 auto;
}

.pdp__gallery { padding: 48px 48px 64px var(--gutter); }

.pdp__stage {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 56px;
  aspect-ratio: 4 / 3;
}

.pdp__stage img {
  display: block;
  width: auto;
  height: 100%;
  max-width: 70%;
  object-fit: contain;
}

.pdp__thumbs { display: flex; gap: 12px; margin-top: 16px; }

.pdp__thumb {
  width: 88px;
  height: 88px;
  border: 1px solid var(--line);
  background: var(--blue-050);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.pdp__thumb img { width: 60%; object-fit: contain; }
.pdp__thumb[aria-pressed='true'] { border: 2px solid var(--navy); }

.pdp__info {
  padding: 56px var(--gutter) 64px 48px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.pdp__eyebrow { font-size: 13px; color: var(--ink-soft); }
.pdp__title { font-size: 44px; line-height: 1.15; }

.pdp__rating {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 14px;
  color: var(--ink-muted);
}

.pdp__rating .stars { color: var(--gold); letter-spacing: 2px; }

.pdp__price { font-weight: 600; font-size: 28px; }
.pdp__price small { font-weight: 300; font-size: 15px; color: var(--ink-soft); }

.pdp__lede { font-weight: 300; font-size: 15px; line-height: 1.7; margin: 0; color: var(--ink-muted); }

.pdp__group-label {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.pdp__buy { display: flex; gap: 14px; margin-top: 6px; }
.pdp__buy .btn { flex: 1; }

.pdp__assurances {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-muted);
}

.accordion { border-top: 1px solid var(--line); margin-top: 8px; }

.accordion__item { border-bottom: 1px solid var(--line); }

.accordion__trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
  text-align: left;
}

.accordion__panel {
  padding: 0 0 18px;
  font-weight: 300;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-muted);
}

.accordion__panel[hidden] { display: none; }

.card--compact .card__body { padding: 16px 20px 20px; }
.card--compact .card__media { padding: 24px 24px 0; }
.card--compact .card__media img { max-width: 76%; }

.card--compact .card__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.card--compact .card__name { font-size: 16px; }
.card--compact .card__price { font-size: 13px; color: var(--ink-muted); }

/* --------------------------------------------------------------------------
   04 · Giỏ hàng & thanh toán
   -------------------------------------------------------------------------- */

.checkout-steps {
  display: flex;
  gap: 32px;
  align-items: center;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--ink-soft);
  flex-wrap: wrap;
}

.checkout-steps .is-done { color: var(--navy); font-weight: 600; }

.checkout {
  display: grid;
  grid-template-columns: 1fr 480px;
  max-width: var(--shell);
  margin: 0 auto;
  align-items: start;
}

.checkout__main {
  padding: 48px 48px 64px var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.checkout__main h2 { font-size: 28px; margin-bottom: 20px; }
.checkout__note { font-weight: 300; font-size: 14px; color: var(--ink-muted); margin: -12px 0 20px; }

.line-item {
  display: flex;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.line-item__media {
  width: 84px;
  height: 100px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
}

.line-item__media img { display: block; width: auto; height: 100%; max-width: 74%; object-fit: contain; }

.line-item__info { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.line-item__name { font-family: var(--display); font-weight: 600; font-size: 17px; }
.line-item__variant { font-size: 13px; color: var(--ink-soft); }
.line-item__total { font-weight: 600; font-size: 16px; width: 110px; text-align: right; }
.line-item__remove { color: var(--ink-soft); font-size: 15px; padding: 8px; }
.line-item__remove:hover { color: var(--navy); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.summary {
  background: var(--panel);
  border-left: 1px solid var(--line);
  padding: 48px 48px 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 96px;
}

.summary h2 { font-size: 22px; margin-bottom: 8px; }

.summary__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  color: var(--ink-muted);
}

.summary__row--total {
  border-top: 1px solid var(--line-strong);
  padding-top: 16px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 20px;
  color: var(--navy);
}

.summary__promo { display: flex; gap: 10px; }

.summary__promo input {
  flex: 1;
  border: 1px solid var(--line-strong);
  background: var(--white);
  padding: 12px 14px;
  min-height: 46px;
  min-width: 0;
}

.summary__promo button {
  border: 1px solid var(--navy);
  padding: 12px 18px;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 1px;
}

.summary__promo button:hover { background: var(--navy); color: var(--paper); }

.summary__msg { font-size: 12px; color: var(--ink-muted); }
.summary__msg.is-error { color: #A32F35; }
.summary__msg.is-ok { color: #2C6B4F; }

.summary__fineprint {
  font-weight: 300;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-muted);
  text-align: center;
}

/* --------------------------------------------------------------------------
   05 · Xác nhận & theo dõi đơn
   -------------------------------------------------------------------------- */

.confirm {
  max-width: 880px;
  margin: 0 auto;
  padding: 72px var(--gutter) 96px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.confirm__head {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.confirm__tick {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.confirm__head h1 { font-size: 42px; }

.confirm__head p {
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
  color: var(--ink-muted);
  max-width: 560px;
}

.panel { background: var(--white); border: 1px solid var(--line); padding: 40px 48px; }

.panel__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 36px;
}

.panel__head h2 { font-size: 24px; }

.tracking {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  text-align: center;
}

.tracking__step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.tracking__line {
  position: absolute;
  top: 11px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--line);
}

.tracking__step:last-child .tracking__line { display: none; }
.tracking__step.is-done .tracking__line { background: var(--navy); }

.tracking__dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--line);
  color: var(--paper);
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.tracking__step.is-done .tracking__dot { background: var(--navy); border-color: var(--navy); }
.tracking__step.is-current .tracking__dot { border-color: var(--navy); color: var(--navy); }

.tracking__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
}

.tracking__label { font-weight: 600; font-size: 13px; color: var(--ink-soft); }
.tracking__step.is-done .tracking__label,
.tracking__step.is-current .tracking__label { color: var(--navy); }

.tracking__date { font-weight: 300; font-size: 12px; color: var(--ink-soft); }

.notice {
  margin-top: 36px;
  background: var(--panel);
  padding: 18px 22px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-muted);
}

.confirm__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.confirm__cards .panel { padding: 32px 36px; }
.confirm__cards h3 { font-size: 19px; margin-bottom: 18px; }

.kv { display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--ink-muted); }
.kv__row { display: flex; justify-content: space-between; gap: 16px; }
.kv__row--total { border-top: 1px solid var(--line); padding-top: 12px; font-weight: 600; color: var(--navy); }

.address { font-size: 14px; line-height: 1.8; color: var(--ink-muted); }
.address strong { color: var(--navy); font-weight: 500; }

.confirm__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   06 · Câu chuyện thương hiệu
   -------------------------------------------------------------------------- */

.story-hero {
  background: var(--navy);
  color: var(--paper);
  text-align: center;
  padding: 110px var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.story-hero h1 { font-size: 60px; line-height: 1.2; max-width: 860px; }

.story-hero p {
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  margin: 0;
  color: var(--blue-100);
  max-width: 600px;
}

.chapter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
  max-width: var(--shell);
  margin: 0 auto;
}

.chapter--flip .chapter__copy { order: -1; }

.chapter__copy {
  padding: 96px 80px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
}

.chapter__copy h2 { font-size: 36px; line-height: 1.3; }

.chapter__copy p {
  font-weight: 300;
  font-size: 16px;
  line-height: 1.8;
  margin: 0;
  color: var(--ink-muted);
}

.chapter__media { min-height: 480px; }

.story-close {
  padding: 96px var(--gutter);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: var(--shell);
  margin: 0 auto;
}

.story-close h2 { font-size: 36px; }

.story-close p {
  font-weight: 300;
  font-size: 16px;
  line-height: 1.8;
  margin: 0;
  color: var(--ink-muted);
  max-width: 620px;
}

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 24px);
  background: var(--navy);
  color: var(--paper);
  padding: 14px 24px;
  font-size: 14px;
  letter-spacing: 1px;
  box-shadow: 0 12px 40px rgba(29, 46, 110, .35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 80;
  max-width: calc(100vw - 32px);
  text-align: center;
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Thanh hành động dính đáy — chỉ hiện trên mobile */
.sticky-bar { display: none; }

/* --------------------------------------------------------------------------
   Đáp ứng — tablet
   -------------------------------------------------------------------------- */

@media (max-width: 1200px) {
  :root { --gutter: 40px; }

  .hero__title { font-size: 52px; }
  .story-hero h1 { font-size: 46px; }
  .chapter__copy { padding: 72px 48px; }
  .checkout { grid-template-columns: 1fr 380px; }
  .summary { padding: 40px 32px 48px; }
}

@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .catalog { grid-template-columns: 240px 1fr; }
  .catalog__main { padding: 32px var(--gutter) 56px 32px; }
  .pdp { grid-template-columns: 1fr; }
  .pdp__gallery { padding: 32px var(--gutter) 0; }
  .pdp__info { padding: 32px var(--gutter) 56px; }
  .checkout { grid-template-columns: 1fr; }

  .checkout__main { padding: 40px var(--gutter) 32px; }

  .summary {
    position: static;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 40px var(--gutter) 64px;
  }

  .site-nav { gap: 24px; }
}

/* --------------------------------------------------------------------------
   Đáp ứng — mobile (bám theo các khung M1–M5 của bản thiết kế)
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
  :root { --gutter: 20px; }

  body { font-size: 14px; }

  .announce { font-size: 10px; letter-spacing: 1px; padding: 8px 12px; }

  .site-header__inner { padding: 16px var(--gutter); gap: 12px; }
  .wordmark { font-size: 22px; letter-spacing: 5px; }
  .nav-toggle { display: block; }
  .site-nav { display: none; }
  .site-actions { gap: 12px; }
  .site-actions .header-search { display: none; }
  .site-actions .account-link { display: none; }
  .cart-link { font-size: 12px; padding: 6px 10px; }

  .section { padding: 36px var(--gutter) 40px; }
  .section-head { margin-bottom: 20px; }
  .section-head h2 { font-size: 24px; }
  .section-head .link-underline { font-size: 11px; letter-spacing: 1px; }

  .hero { grid-template-columns: 1fr; min-height: 0; }

  .hero__copy {
    padding: 40px var(--gutter) 0;
    text-align: center;
    align-items: center;
    gap: 16px;
  }

  .hero__title { font-size: 34px; line-height: 1.2; }
  .hero__lede { font-size: 14px; }
  .hero__actions { justify-content: center; margin-top: 4px; }
  .hero__media { margin-top: 28px; padding: 32px 32px 0; }
  .hero__media img { width: 64%; max-width: 260px; }

  .promises { grid-template-columns: 1fr; }
  .promise { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px var(--gutter); }
  .promise:last-child { border-bottom: 0; }

  .story-band { grid-template-columns: 1fr; }

  .story-band__copy {
    padding: 44px var(--gutter);
    text-align: center;
    align-items: center;
    gap: 14px;
  }

  .story-band__copy h2 { font-size: 26px; }
  .story-band__media { display: none; }

  .product-grid, .product-grid--3 { grid-template-columns: 1fr 1fr; gap: 14px; }

  .card__media { padding: 16px 16px 0; }
  .card__media img { max-width: 84%; }
  .card__body { padding: 12px 14px 16px; gap: 4px; }
  .card__tag { font-size: 9px; letter-spacing: 1px; }
  .card__name { font-size: 14px; }
  .card__foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .card__price { font-size: 13px; color: var(--ink-muted); }
  .card__add { text-align: center; font-size: 11px; padding: 9px 10px; }
  .card__badge { top: 8px; left: 8px; font-size: 9px; padding: 4px 7px; }

  .page-head { padding: 28px var(--gutter) 16px; border-bottom: 0; }
  .page-head h1 { font-size: 30px; margin-bottom: 6px; }
  .page-head p { font-size: 13px; margin-bottom: 16px; }
  .breadcrumb { display: none; }

  .catalog { grid-template-columns: 1fr; }

  .filters {
    padding: 0 var(--gutter) 20px;
    border-right: 0;
    gap: 20px;
  }

  .filters__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--line);
    padding: 11px 14px;
    font-size: 12px;
    color: var(--ink-muted);
    width: 100%;
    min-height: 42px;
  }

  .filters__body { display: none; flex-direction: column; gap: 20px; padding-top: 4px; }
  .filters.is-open .filters__body { display: flex; }

  .catalog__main { padding: 4px var(--gutter) 32px; }

  .catalog__bar { font-size: 12px; margin-bottom: 16px; }
  .select-wrap { padding: 0 12px; }
  .select-wrap select { padding: 9px 0; min-height: 40px; font-size: 12px; }

  .pdp__gallery { padding: 0; }
  .pdp__stage { padding: 36px; aspect-ratio: 1 / 1; }
  .pdp__stage img { max-width: 62%; }

  .pdp__thumbs { justify-content: center; gap: 8px; margin-top: 12px; padding: 0 var(--gutter); }
  .pdp__thumb { width: 64px; height: 64px; }

  .pdp__info { padding: 12px var(--gutter) 24px; gap: 14px; }
  .pdp__title { font-size: 28px; line-height: 1.2; }
  .pdp__price { font-size: 22px; }
  .pdp__lede { font-size: 13px; }
  .pdp__group-label { font-size: 11px; margin-bottom: 8px; }
  .chip { padding: 11px 16px; font-size: 12px; }
  .pdp__assurances { gap: 12px; font-size: 12px; }
  .accordion__trigger { font-size: 12px; padding: 14px 0; }
  .pdp__buy { display: none; }

  .checkout-steps { gap: 8px; font-size: 11px; }

  .checkout__main { padding: 20px var(--gutter) 0; gap: 24px; }
  .checkout__main h2 { font-size: 20px; margin-bottom: 12px; }
  .checkout__note { font-size: 12px; margin: -8px 0 14px; }

  .line-item {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) auto;
    gap: 10px 12px;
    padding: 14px 0;
  }

  .line-item__media { width: 60px; height: 74px; grid-area: 1 / 1 / 3 / 2; }
  .line-item__info { grid-area: 1 / 2 / 2 / 3; }
  .line-item .stepper { grid-area: 2 / 2 / 3 / 3; justify-self: start; }
  .line-item__total { grid-area: 1 / 3 / 2 / 4; font-size: 13px; width: auto; }
  .line-item__remove { grid-area: 2 / 3 / 3 / 4; justify-self: end; }
  .line-item__name { font-size: 14px; }
  .line-item__variant { font-size: 11px; }

  .checkout-steps {
    order: 3;
    width: 100%;
    font-size: 10px;
    gap: 6px;
    border-top: 1px solid var(--line);
    padding-top: 10px;
    margin-top: 2px;
  }

  .site-header__inner { flex-wrap: wrap; }
  .hide-mobile { display: none; }

  .form-grid { grid-template-columns: 1fr; gap: 10px; }
  .field input, .field select { padding: 13px 14px; font-size: 13px; }

  .option { padding: 13px 14px; font-size: 12px; min-height: 48px; }
  .option:has(input:checked) { padding: 12px 13px; }

  .summary { padding: 24px var(--gutter) 32px; gap: 10px; }
  .summary h2 { font-size: 18px; }
  .summary__row { font-size: 13px; }
  .summary__row--total { font-size: 17px; }
  .summary .btn { display: none; }
  .summary__fineprint { display: none; }

  .confirm { padding: 36px var(--gutter) 40px; gap: 24px; }
  .confirm__tick { width: 52px; height: 52px; font-size: 22px; }
  .confirm__head h1 { font-size: 26px; line-height: 1.25; }
  .confirm__head p { font-size: 13px; }

  .panel { padding: 22px 20px; }
  .panel__head { margin-bottom: 20px; }
  .panel__head h2 { font-size: 17px; }
  .panel__head span { font-size: 11px; }

  .tracking { grid-template-columns: 1fr; text-align: left; }

  .tracking__step {
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 16px;
  }

  .tracking__dot { width: 20px; height: 20px; font-size: 10px; flex: 0 0 auto; }

  .tracking__line {
    position: absolute;
    top: 20px;
    left: 9px;
    width: 2px;
    height: 100%;
  }

  .tracking__text { align-items: flex-start; padding: 0; gap: 2px; }

  .notice { margin-top: 8px; padding: 12px 14px; font-size: 12px; }

  .confirm__cards { grid-template-columns: 1fr; gap: 16px; }
  .confirm__cards .panel { padding: 20px; }
  .confirm__cards h3 { font-size: 15px; margin-bottom: 12px; }
  .kv { font-size: 12px; gap: 8px; }
  .confirm__actions { flex-direction: column; }
  .confirm__actions .btn { width: 100%; }

  .story-hero { padding: 56px var(--gutter); gap: 14px; }
  .story-hero h1 { font-size: 30px; }
  .story-hero p { font-size: 14px; }

  .chapter { grid-template-columns: 1fr; }
  .chapter--flip .chapter__copy { order: 0; }
  .chapter__copy { padding: 36px var(--gutter); gap: 14px; }
  .chapter__copy h2 { font-size: 24px; }
  .chapter__copy p { font-size: 14px; }
  .chapter__media { min-height: 220px; }

  .story-close { padding: 40px var(--gutter); gap: 16px; }
  .story-close h2 { font-size: 24px; }
  .story-close p { font-size: 14px; }

  .site-footer {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 32px var(--gutter);
  }

  .site-footer__brand { grid-column: 1 / -1; font-size: 18px; }
  .site-footer--slim { padding: 24px var(--gutter); font-size: 11px; }
  .site-footer--slim .site-footer__brand { grid-column: auto; font-size: 16px; }

  /* Thanh mua hàng dính đáy (M3, M4) */
  .sticky-bar {
    position: sticky;
    bottom: 0;
    background: var(--paper);
    border-top: 1px solid var(--line);
    padding: 14px var(--gutter);
    display: flex;
    gap: 10px;
    z-index: 30;
  }

  .sticky-bar .btn {
    flex: 1;
    font-size: 11px;
    letter-spacing: .5px;
    padding: 12px 10px;
    gap: 4px;
    white-space: nowrap;
  }
  .sticky-bar .stepper button { padding: 12px 14px; }
  .sticky-bar .stepper output { padding: 12px 16px; min-width: 44px; }

  .toast { bottom: 88px; }
}

@media (max-width: 380px) {
  .product-grid, .product-grid--3 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .sticky-bar, .toast, .confirm__actions { display: none; }
  body { background: #fff; }
}
