/* ==========================================================================
   E-MAGAZINE: TRĂM NĂM CÀ PHÊ KHE SANH (1926 - 2026)
   Thiết kế tạp chí cao cấp, typographic chuẩn xác, 100% offline & siêu mượt
   ========================================================================== */

/* Nạp font cục bộ (offline) */
@import url('./fonts.css?v=20261009_1');
@import url('./aos.css?v=20261009_1');

:root {
  /* Bảng màu chính - Đồng nhất với màu nền bản thiết kế */
  --bg-page: #ac997f;
  --bg-page-soft: #b6a48c;
  --bg-paper: #FAF7F0;
  --bg-paper-warm: #F4EFE6;
  --bg-dark: #1e130a;
  
  /* Màu chữ - Tương phản cao, êm mắt */
  --text-primary: #23160c;
  --text-secondary: #524033;
  --text-muted: #786657;
  --text-gold: #c27d2c;
  --text-white: #ffffff;
  
  /* Điểm nhấn */
  --accent-coffee: #6f3b19;
  --accent-coffee-dark: #4d260e;
  --accent-red-badge: #ab271d;
  --accent-gold: #c27d2c;
  --accent-gold-light: #f7e6cd;
  --accent-green: #2d6342;

  /* Font chữ chất lượng cao */
  --font-body: 'Merriweather', 'Lora', Georgia, serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-ui: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Đổ bóng tự nhiên */
  --shadow-paper: 0 16px 45px -10px rgba(35, 22, 12, 0.16), 0 4px 14px rgba(35, 22, 12, 0.06);
  --shadow-photo: 0 18px 40px -10px rgba(25, 14, 7, 0.22);
  --shadow-lg: 0 25px 60px -15px rgba(20, 10, 5, 0.35);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* RESET & BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

picture {
  display: block;
  width: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-page);
  color: var(--text-primary);
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  line-height: 2.1;
  background-color: var(--bg-page);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* THANH TIẾN TRÌNH ĐỌC */
#reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, #d35400, #c0392b, #8e44ad);
  z-index: 99999;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(211, 84, 0, 0.6);
}

/* THANH ĐIỀU HƯỚNG TẠP CHÍ TINH TẾ (NAVBAR) */
.emag-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(30, 19, 10, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 1000;
  padding: 0.65rem 2rem;
  transition: var(--transition);
}

.emag-nav.nav-scrolled {
  padding: 0.5rem 2rem;
  background: rgba(22, 13, 6, 0.95);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.nav-container {
  max-width: 1250px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* NHÓM TRÁI: eMag + Brand */
.nav-left-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-white);
  flex-shrink: 0;
}

/* CHỮ eMAG */
.nav-emag-label {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  text-transform: uppercase;
  font-style: italic;
  text-shadow: 0 1px 6px rgba(194, 125, 44, 0.35);
  white-space: nowrap;
  border-right: 1px solid rgba(194, 125, 44, 0.4);
  padding-right: 1rem;
}


.brand-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  white-space: nowrap;
}

.brand-sub {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent-gold-light);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: block;
}

/* KHỐI MENU ĐIỀU HƯỚNG */
.nav-right-wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-self: end;
}


.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: var(--transition);
  padding: 6px 0;
  white-space: nowrap;
  position: relative;
  display: inline-block;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gold);
  transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* NÚT CTA ĐẶT SÁCH TRÊN NAVBAR - CỐ ĐỊNH KÍCH THƯỚC, KHÔNG BAO GIỜ BỊ CO DÃN */
.nav-cta-btn {
  font-family: var(--font-ui) !important;
  background: linear-gradient(135deg, #c0392b, #962d22);
  color: #fff !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  height: 38px !important;
  line-height: 38px !important;
  padding: 0 1.25rem !important;
  border-radius: var(--radius-pill) !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-shadow: 0 4px 15px rgba(192, 57, 43, 0.4) !important;
  transition: var(--transition) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  align-self: center !important;
}

.nav-cta-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #d35400, #a93226);
  box-shadow: 0 6px 20px rgba(192, 57, 43, 0.6) !important;
}

.cta-txt-short {
  display: none;
}

/* NÚT TOGGLE MENU (HAMBURGER CHO TABLET VÀ MOBILE) */
.nav-toggle-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
}

/* HERO SECTION (BANNER ĐẦU TRANG) */
.hero-section {
  padding-top: 80px;
  background-color: var(--bg-page);
  position: relative;
}

.hero-banner-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
}

.hero-banner-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}

/* METADATA BAR DƯỚI HERO */
.hero-meta-strip {
  max-width: 950px;
  margin: -25px auto 3rem;
  position: relative;
  z-index: 10;
  padding: 0 1.5rem;
}

.meta-pill-box {
  background: #ffffff;
  border-radius: var(--radius-pill);
  padding: 0.85rem 2.25rem;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: var(--shadow-paper);
  border: 1px solid rgba(111, 59, 25, 0.12);
}

.meta-pill-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
}

.meta-icon {
  font-size: 1.25rem;
}

.meta-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.meta-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.meta-sep {
  width: 1px;
  height: 28px;
  background: #e8ded2;
}

/* MAIN EDITORIAL COLUMN */
.article-stream {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

/* CHƯƠNG BẢNG TIÊU ĐỀ (SUBTITLE BANNERS) */
.chapter-banner-wrap {
  width: 100%;
  margin: 4.5rem 0 2rem;
  text-align: center;
}

.chapter-title-img {
  width: 100%;
  max-width: 1100px;
  height: auto;
  display: block;
  margin: 0 auto;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* KHUNG GIẤY ĐỌC BÁO (EDITORIAL PAPER CARD) */
.reading-sheet {
  max-width: 860px;
  margin: 0 auto 3.5rem;
  background-color: var(--bg-paper);
  border-radius: var(--radius-lg);
  padding: 4.5rem 4.5rem 4rem;
  box-shadow: var(--shadow-paper);
  position: relative;
}

.reading-sheet p {
  font-size: 1.18rem;
  line-height: 1.88;
  color: var(--text-primary);
  margin-bottom: 1.8rem;
  text-align: left;
  letter-spacing: 0;
}

.reading-sheet p:last-child {
  margin-bottom: 0;
}

.reading-sheet strong {
  color: var(--accent-coffee);
  font-weight: 700;
}

/* CHỮ ĐẦU DÒNG (DROP CAP) */
.drop-cap::first-letter {
  font-family: var(--font-heading);
  float: left;
  font-size: 4.2rem;
  line-height: 0.8;
  padding-top: 4px;
  padding-right: 14px;
  padding-bottom: 2px;
  color: var(--accent-coffee);
  font-weight: 700;
}

/* TRÍCH DẪN NGHỆ THUẬT (PULL QUOTE) */
.literary-quote {
  margin: 2.75rem auto;
  padding: 1.75rem 2.5rem;
  text-align: center;
  position: relative;
  background: linear-gradient(180deg, rgba(244, 239, 230, 0.6) 0%, rgba(244, 239, 230, 0.95) 100%);
  border-radius: var(--radius-md);
  border-top: 2px solid var(--accent-gold);
  border-bottom: 2px solid var(--accent-gold);
}

.quote-ornament {
  font-size: 1.1rem;
  color: var(--accent-gold);
  letter-spacing: 0.5em;
  margin-bottom: 0.6rem;
  display: block;
}

.quote-phrase {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-style: italic;
  font-weight: 600;
  line-height: 1.7;
  color: var(--accent-coffee-dark);
}

/* KHUNG ẢNH NỘI DUNG (INFOGRAPHICS & PHOTOS) */
.feature-media-box {
  max-width: 860px;
  margin: 3rem auto;
  text-align: center;
}

.feature-media-img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-photo);
  transition: transform 0.4s ease;
  cursor: zoom-in;
}

.feature-media-img:hover {
  transform: translateY(-3px);
}

.media-caption {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 10px;
  font-style: italic;
}

/* GÓC NHÌN CHIẾN LƯỢC */
.strategic-box {
  background: #23160c;
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 3rem 3.5rem;
  margin: 3.5rem auto;
  max-width: 860px;
  box-shadow: var(--shadow-lg);
  position: relative;
  border-left: 6px solid var(--accent-gold);
}

.strategic-badge {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 0.75rem;
  display: block;
}

.strategic-title {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  margin-bottom: 1.25rem;
  color: #fff;
}

.strategic-text {
  font-size: 1.2rem;
  line-height: 2;
  color: #eeddd0;
  font-style: italic;
}

.strategic-text strong {
  color: #ffd8a8;
}

/* BANNER GIỚI THIỆU SÁCH (ẢNH 9) */
.book-intro-wrap {
  max-width: 1100px;
  margin: 5rem auto 3.5rem;
  text-align: center;
}

.book-intro-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: block;
  cursor: zoom-in;
}

/* KHUNG FORM ĐẶT SÁCH TRỰC TUYẾN */
.order-card {
  max-width: 860px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(111, 59, 25, 0.15);
  overflow: hidden;
  scroll-margin-top: 80px;
}

.order-header-bar {
  background: linear-gradient(135deg, #2a180d, #1c0e06);
  padding: 2.75rem 3rem 2.25rem;
  text-align: center;
  color: #fff;
}

.order-tagline {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f39c12;
  margin-bottom: 0.5rem;
  display: block;
}

.order-headline {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.6rem;
}

.order-desc {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: #dfcebf;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.order-body {
  padding: 3rem 3.5rem;
}

/* CÁC TRƯỜNG DỮ LIỆU FORM */
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.field-col-full {
  grid-column: 1 / -1;
}

.field-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.field-label .req {
  color: var(--accent-red-badge);
}

.field-input {
  width: 100%;
  font-family: var(--font-ui);
  font-size: 1rem;
  padding: 0.85rem 1.15rem;
  border: 1.5px solid #dcd1c4;
  border-radius: var(--radius-sm);
  background: #faf7f2;
  color: var(--text-primary);
  transition: var(--transition);
}

.field-input:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent-coffee);
  box-shadow: 0 0 0 3px rgba(111, 59, 25, 0.15);
}

textarea.field-input {
  resize: vertical;
  min-height: 85px;
}

/* BỘ TĂNG GIẢM SỐ LƯỢNG */
.stepper-box {
  display: flex;
  align-items: center;
  border: 1.5px solid #dcd1c4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
  width: 160px;
}

.stepper-btn {
  width: 45px;
  height: 45px;
  background: #f4eee6;
  border: none;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-coffee);
  cursor: pointer;
  transition: var(--transition);
}

.stepper-btn:hover {
  background: var(--accent-coffee);
  color: #fff;
}

.stepper-val {
  width: 70px;
  height: 45px;
  border: none;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stepper-val:focus {
  outline: none;
}

/* TÙY CHỌN THANH TOÁN */
.pay-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

.pay-card {
  border: 1.5px solid #dcd1c4;
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem;
  background: #faf7f2;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: var(--transition);
}

.pay-card:hover {
  background: #fff;
  border-color: var(--accent-coffee);
}

.pay-card.active {
  background: #fffdf9;
  border-color: var(--accent-coffee);
  box-shadow: 0 0 0 2px var(--accent-coffee);
}

.pay-card input[type="radio"] {
  margin-top: 4px;
  accent-color: var(--accent-coffee);
}

.pay-title {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pay-sub {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 3px;
}

/* BẢNG TÍNH TIỀN TẠM TÍNH */
.calc-summary-card {
  background: var(--bg-paper-warm);
  border-radius: var(--radius-md);
  padding: 1.75rem 2rem;
  margin: 1.75rem 0;
  border: 1px dashed var(--accent-coffee);
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.calc-row.total-line {
  border-top: 1.5px solid #d6c6b4;
  padding-top: 0.85rem;
  margin-top: 0.85rem;
  margin-bottom: 0;
}

.calc-total-label {
  font-family: var(--font-ui);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-coffee);
}

.calc-total-amount {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--accent-red-badge);
  white-space: nowrap;
}

.freeship-hint {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: 8px;
  line-height: 1.5;
  display: block;
}

/* NÚT ĐẶT HÀNG */
.btn-order-submit {
  width: 100%;
  background: linear-gradient(135deg, #c0392b, #8b1d14);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 1.25rem 2rem;
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(192, 57, 43, 0.35);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btn-order-submit:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #d35400, #a93226);
  box-shadow: 0 14px 30px rgba(192, 57, 43, 0.5);
}

.btn-order-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* THANH HOTLINE TRỰC TIẾP */
.direct-hotline-strip {
  background: #f7f2ea;
  border-radius: var(--radius-md);
  padding: 1.25rem 2rem;
  margin-top: 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e2d6c6;
}

.hotline-txt-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hotline-ico {
  font-size: 1.8rem;
}

.hotline-txt-main {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.hotline-txt-sub {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hotline-btn-group {
  display: flex;
  gap: 10px;
}

.hotline-act-btn {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  color: #fff;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-hotline-phone {
  background: var(--accent-green);
}
.btn-hotline-phone:hover {
  background: #1e452e;
}

.btn-hotline-zalo {
  background: #0068ff;
}
.btn-hotline-zalo:hover {
  background: #0050c8;
}

/* FOOTER */
.emag-foot {
  background: #180f07;
  color: #a6988b;
  padding: 4rem 1.5rem 2.5rem;
  margin-top: 5rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.foot-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.foot-text {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  max-width: 650px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.foot-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.foot-links a {
  color: #d1c3b4;
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  transition: var(--transition);
}

.foot-links a:hover {
  color: #f39c12;
}

.foot-copy {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: #6b5c4f;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1.75rem;
}

/* NÚT ĐẶT SÁCH NỔI (STICKY CTA) */
.sticky-buy-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: linear-gradient(135deg, #d35400, #b03a2e);
  color: #fff;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 30px rgba(176, 58, 46, 0.5);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 998;
  transition: var(--transition);
}

.sticky-buy-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 35px rgba(176, 58, 46, 0.65);
}

/* NÚT BACK TO TOP */
.btn-back-top {
  position: fixed;
  bottom: 85px;
  right: 30px;
  width: 42px;
  height: 42px;
  background: rgba(30, 19, 10, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.1rem;
  z-index: 997;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.btn-back-top.visible {
  opacity: 1;
  visibility: visible;
}

.btn-back-top:hover {
  background: var(--accent-coffee);
  transform: translateY(-2px);
}

/* MODAL THÀNH CÔNG */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(14, 8, 4, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-sheet {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  padding: 2.75rem 2.5rem;
  text-align: center;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  transform: scale(0.95);
  transition: var(--transition);
}

.modal-backdrop.active .modal-sheet {
  transform: scale(1);
}

.modal-close-x {
  position: absolute;
  top: 18px;
  right: 18px;
  background: #f0e9df;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close-x:hover {
  background: #e2d7c7;
}

.modal-check-icon {
  width: 72px;
  height: 72px;
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.25rem;
}

.modal-head {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--accent-coffee);
  margin-bottom: 0.5rem;
}

.modal-subhead {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.modal-info-list {
  background: #f7f2ea;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

.modal-info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.modal-info-row:last-child {
  margin-bottom: 0;
  font-weight: 700;
  color: var(--accent-red-badge);
  border-top: 1px dashed #d0c0af;
  padding-top: 0.5rem;
}

.modal-btn-ok {
  background: var(--accent-coffee);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.85rem 2.5rem;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.modal-btn-ok:hover {
  background: var(--accent-coffee-dark);
}

/* LIGHTBOX */
.lightbox-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.lightbox-wrap.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content-img {
  max-width: 92vw;
  max-height: 90vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  object-fit: contain;
}

.lightbox-x-btn {
  position: absolute;
  top: 25px;
  right: 35px;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
}

/* TOAST */
.toast-bar {
  position: fixed;
  top: 25px;
  right: 25px;
  background: rgba(30, 19, 10, 0.95);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent-gold);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  z-index: 100002;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(130%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-bar.active {
  transform: translateX(0);
}

/* ==========================================================================
   TABLET & MOBILE RESPONSIVE (TỐI ƯU TOÀN DIỆN CHO TABLET & ĐIỆN THOẠI)
   ========================================================================== */

/* TABLET (MÀN HÌNH TỪ 1024px TRỞ XUỐNG) */
@media (max-width: 1024px) {
  .emag-nav {
    padding: 0.6rem 1.5rem;
  }

  .nav-container {
    position: static;
    display: flex;
    justify-content: space-between;
  }

  .nav-emag-label {
    display: inline-block;
    font-size: 1.15rem;
    padding-right: 0.75rem;
  }

  .nav-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    order: 3;
  }

  .nav-cta-btn {
    order: 2;
    font-size: 0.82rem !important;
    padding: 0 1rem !important;
    height: 36px !important;
    line-height: 36px !important;
  }

  /* Menu chuyển thành Drawer / Dropdown mượt mà */
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(22, 13, 6, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem 2rem;
    gap: 1.25rem;
    border-bottom: 2px solid var(--accent-gold);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 9999;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-link {
    font-size: 1.05rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  /* METADATA STRIP TRÊN TABLET */
  .hero-meta-strip {
    margin-top: 1rem;
    padding: 0 1.25rem;
  }

  .meta-pill-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
    border-radius: var(--radius-md);
    padding: 1.25rem 1.75rem;
  }

  .meta-sep {
    display: none;
  }

  /* BÀI VIẾT TRÊN TABLET */
  .reading-sheet {
    padding: 3rem 2.5rem;
  }

  .reading-sheet p {
    font-size: 1.15rem;
    line-height: 1.85;
    margin-bottom: 1.6rem;
  }

  .strategic-box {
    padding: 2.5rem 2.5rem;
  }
}

/* ĐIỆN THOẠI DI ĐỘNG (DƯỚI 768px) */
@media (max-width: 768px) {
  .cta-txt-long {
    display: none;
  }
  .cta-txt-short {
    display: inline;
  }

  .emag-nav {
    padding: 0.45rem 0.85rem;
  }

  .nav-left-wrap {
    gap: 0.55rem;
  }

  .nav-emag-label {
    font-size: 1.05rem;
    padding-right: 0.55rem;
    letter-spacing: 0.08em;
  }

  .nav-right-wrap {
    gap: 0.5rem;
  }

  .nav-brand {
    gap: 6px;
  }

  .brand-icon {
    font-size: 1.1rem;
  }

  .brand-sub {
    display: none;
  }

  .brand-title {
    font-size: 0.92rem;
  }

  .nav-cta-btn {
    font-size: 0.76rem !important;
    padding: 0 0.75rem !important;
    height: 33px !important;
    line-height: 33px !important;
    gap: 4px !important;
  }

  .nav-toggle-btn {
    font-size: 1.4rem;
    padding: 2px 4px;
    line-height: 1;
  }

  .hero-section {
    padding-top: 58px;
  }

  .hero-banner-container {
    padding: 0.5rem 0.5rem 0;
  }

  .hero-banner-img {
    border-radius: var(--radius-sm);
  }

  .hero-meta-strip {
    margin-top: 0.75rem;
    padding: 0 0.5rem;
    margin-bottom: 2rem;
  }

  .meta-pill-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem 0.75rem;
    padding: 1rem 1rem;
    border-radius: var(--radius-md);
  }

  .meta-pill-item {
    gap: 8px;
    align-items: flex-start;
  }

  .meta-icon {
    font-size: 1.1rem;
    margin-top: 2px;
  }

  .meta-label {
    font-size: 0.65rem;
    letter-spacing: 0.02em;
    line-height: 1.2;
    margin-bottom: 2px;
  }

  .meta-value {
    font-size: 0.85rem;
    line-height: 1.3;
  }

  .chapter-banner-wrap {
    margin: 2.75rem 0 1.5rem;
    padding: 0 0.25rem;
  }

  .chapter-title-img {
    max-width: 100%;
    margin: 0 auto;
    border-radius: var(--radius-sm);
  }

  .reading-sheet {
    padding: 2.25rem 1.5rem;
    border-radius: var(--radius-md);
    margin: 0 auto 2.25rem;
  }

  .reading-sheet p {
    font-size: 1.08rem;
    line-height: 1.8;
    margin-bottom: 1.4rem;
  }

  .drop-cap::first-letter {
    font-size: 3.6rem;
    padding-right: 10px;
  }

  .literary-quote {
    padding: 1.35rem 1.15rem;
    margin: 2rem 0;
  }

  .quote-phrase {
    font-size: 1.18rem;
    line-height: 1.6;
  }

  .strategic-box {
    padding: 2rem 1.5rem;
    margin: 2.5rem auto;
    border-radius: var(--radius-md);
  }

  .strategic-title {
    font-size: 1.35rem;
  }

  .strategic-text {
    font-size: 1.08rem;
    line-height: 1.75;
  }

  .book-intro-wrap {
    margin: 3.5rem auto 2.5rem;
    padding: 0 0.5rem;
    max-width: 500px;
  }

  .book-intro-img {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
  }

  .order-card {
    border-radius: var(--radius-md);
  }

  .order-header-bar {
    padding: 2rem 1.5rem;
  }

  .order-headline {
    font-size: 1.6rem;
  }

  .order-body {
    padding: 2rem 1.25rem;
  }

  .field-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .field-input {
    font-size: 16px; /* Chống auto-zoom trên iOS Safari */
    padding: 0.8rem 1rem;
  }

  .stepper-box {
    margin: 0 auto;
  }

  .pay-options-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .calc-summary-card {
    padding: 1.25rem 1rem;
    margin: 1.25rem 0;
  }

  .calc-row.total-line {
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
  }

  .calc-total-label {
    font-size: 1.02rem;
  }

  .calc-total-amount {
    font-size: 1.6rem;
  }

  .direct-hotline-strip {
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
    padding: 1.25rem 1rem;
  }

  .hotline-txt-group {
    flex-direction: column;
  }

  .hotline-btn-group {
    width: 100%;
    justify-content: center;
  }

  .sticky-buy-btn {
    bottom: 15px;
    right: 15px;
    padding: 0.65rem 1.15rem;
    font-size: 0.85rem;
  }

  .btn-back-top {
    bottom: 68px;
    right: 18px;
  }
}

/* MÀN HÌNH ĐIỆN THOẠI NHỎ (DƯỚI 480px) */
@media (max-width: 480px) {
  .emag-nav {
    padding: 0.45rem 0.65rem;
  }

  .nav-left-wrap {
    gap: 0.45rem;
  }

  .nav-emag-label {
    font-size: 0.95rem;
    padding-right: 0.45rem;
    letter-spacing: 0.06em;
  }

  .brand-title {
    font-size: 0.88rem;
  }

  .nav-cta-btn {
    font-size: 0.74rem !important;
    padding: 0 0.6rem !important;
    height: 32px !important;
    line-height: 32px !important;
  }
}

@media (max-width: 360px) {
  .nav-left-wrap {
    gap: 0.35rem;
  }

  .nav-emag-label {
    font-size: 0.85rem;
    padding-right: 0.35rem;
  }

  .brand-title {
    font-size: 0.8rem;
  }

  .nav-cta-btn {
    font-size: 0.7rem !important;
    padding: 0 0.45rem !important;
  }
}

  .reading-sheet {
    padding: 1.85rem 1.15rem;
  }

  .reading-sheet p {
    font-size: 1.02rem;
    line-height: 1.78;
    margin-bottom: 1.3rem;
  }

  .drop-cap::first-letter {
    font-size: 3.2rem;
    padding-right: 8px;
  }

  .quote-phrase {
    font-size: 1.1rem;
  }

  .strategic-box {
    padding: 1.5rem 1.15rem;
  }

  .strategic-title {
    font-size: 1.25rem;
  }

  .strategic-text {
    font-size: 1rem;
    line-height: 1.7;
  }

  .order-headline {
    font-size: 1.4rem;
  }

  .order-body {
    padding: 1.75rem 1.15rem;
  }

  .meta-pill-box {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 0.65rem;
    padding: 1rem 0.85rem;
  }

  .meta-pill-item {
    gap: 6px;
  }

  .meta-label {
    font-size: 0.62rem;
  }

  .meta-value {
    font-size: 0.82rem;
  }
}
