/* ===================================================
   Sách Tây Bắc – Premium Design System & Main Styles
   =================================================== */

:root {
  --bg: #f4f7f0;
  --surface: #ffffff;
  --surface-alt: #ebf0e6;
  --ink: #111a2e;
  --ink-secondary: #47536b;
  --muted: #6b778d;
  --line: #dbe3d3;
  --brand: #1a3668;
  --brand-light: #2b5299;
  --brand-glow: rgba(26, 54, 104, 0.15);
  --moss: #2f6b3f;
  --moss-light: #448c58;
  --rice: #e09e1f;
  --rice-light: #fbe094;
  --red: #c9382b;
  --sky1: #fbe7be;
  --sky2: #f2ebd9;
  --m1: #c3cfb8;
  --m2: #9bb19a;
  --m3: #6a8d70;
  --m4: #456d50;
  --fog: .75;
  --shadow-sm: 0 4px 12px rgba(18, 30, 56, 0.06);
  --shadow: 0 16px 36px -12px rgba(26, 54, 104, 0.16);
  --shadow-lg: 0 24px 48px -12px rgba(26, 54, 104, 0.22);
  --bro: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='16'%3E%3Cpath d='M16 0l8 8-8 8-8-8z' fill='%23c9382b'/%3E%3Cpath d='M16 4l4 4-4 4-4-4z' fill='%23e09e1f'/%3E%3Cpath d='M0 0h4v16H0zM28 0h4v16h-4z' fill='%231a3668'/%3E%3C/svg%3E");
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  box-sizing: border-box;
}

[data-theme="dark"] {
  --bg: #0a0f1d;
  --surface: #121a2d;
  --surface-alt: #1a253e;
  --ink: #f0f4fc;
  --ink-secondary: #b0c0db;
  --muted: #7d8ea8;
  --line: #1f2c47;
  --brand: #6b9cf2;
  --brand-light: #8cb4fa;
  --brand-glow: rgba(107, 156, 242, 0.25);
  --moss: #4eb56c;
  --moss-light: #6ec788;
  --rice: #f0b538;
  --rice-light: #4d3810;
  --red: #e05345;
  --sky1: #101a33;
  --sky2: #242c4c;
  --m1: #2a3454;
  --m2: #202b48;
  --m3: #18233e;
  --m4: #13242c;
  --fog: .18;
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 24px 48px -10px rgba(0, 0, 0, 0.8);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15.5px/1.65 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  transition: background .3s ease, color .3s ease;
}

h1, h2, h3, h4 {
  font-family: 'Noto Serif', Georgia, serif;
  line-height: 1.25;
  margin: 0;
  color: var(--ink);
}

button, input, select, textarea {
  font-family: inherit;
}

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

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--rice);
  outline-offset: 3px;
}

.wrap {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===================================================
   Top Announcement Bar
   =================================================== */
.top-bar {
  background: var(--brand);
  color: #ffffff;
  font-size: 13px;
  padding: 8px 0;
  position: relative;
  z-index: 40;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.top-promo {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  white-space: nowrap;
}

.pulse-badge {
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  letter-spacing: .05em;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: .85; }
}

.top-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: none;
}

.hotline-badge {
  font-weight: 500;
  opacity: .92;
}

.hotline-badge strong {
  color: var(--rice-light);
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  transition: .2s;
}

.theme-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ===================================================
   Header & Navigation
   =================================================== */
header {
  position: sticky;
  top: 0;
  z-index: 35;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: .3s;
}

.bar {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 74px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex: none;
}

.logo-icon svg {
  width: 40px;
  height: 40px;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
  transition: transform .3s;
}

.logo:hover .logo-icon svg {
  transform: rotate(-5deg) scale(1.05);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font: 900 20px/1.1 'Noto Serif', serif;
  color: var(--ink);
  letter-spacing: .02em;
}

.brand-tagline {
  font-size: 11px;
  font-weight: 600;
  color: var(--moss);
  letter-spacing: .08em;
  text-transform: uppercase;
}

nav {
  display: flex;
  gap: 4px;
  margin-left: 10px;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  color: var(--ink-secondary);
  font-weight: 600;
  font-size: 14.5px;
  transition: .2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand);
  background: var(--surface-alt);
}

/* Search Box */
.search-box {
  flex: 1;
  max-width: 380px;
  margin-left: auto;
  position: relative;
}

.search {
  position: relative;
  display: block;
}

.search input {
  width: 100%;
  height: 44px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0 38px 0 42px;
  font-size: 14.5px;
  font-weight: 500;
  transition: .25s;
  box-shadow: var(--shadow-sm);
}

.search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
  outline: none;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 13px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  top: 11px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--line);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.quick-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 11.5px;
}

.quick-tag-label {
  color: var(--muted);
}

.quick-tag {
  color: var(--ink-secondary);
  background: var(--surface-alt);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  transition: .2s;
}

.quick-tag:hover {
  background: var(--brand);
  color: #ffffff;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  transition: .25s;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

.icon-btn:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: var(--shadow);
}

.icon-btn svg {
  width: 21px;
  height: 21px;
}

.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 5px;
  box-shadow: 0 2px 6px rgba(201, 56, 43, 0.4);
}

.bump { animation: bump .4s; }
@keyframes bump { 40% { transform: scale(1.4) rotate(-10deg); } }

.login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1.5px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  transition: .25s;
  box-shadow: var(--shadow-sm);
}

.login-btn:hover {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.login-btn svg {
  width: 17px;
  height: 17px;
}

/* ===================================================
   Hero Section
   =================================================== */
.hero {
  position: relative;
  height: clamp(620px, 86vh, 740px);
  overflow: hidden;
  background: linear-gradient(var(--sky1), var(--sky2) 64%, var(--bg));
}

.hero-wrap {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero .txt {
  position: relative;
  z-index: 10;
  max-width: 580px;
  padding-bottom: 40px;
}

.hero-tagline-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .hero-tagline-badge {
  background: rgba(18, 26, 45, 0.7);
  border-color: var(--line);
}

.hero h1 {
  font-size: clamp(40px, 5.8vw, 68px);
  font-weight: 900;
  letter-spacing: -.03em;
  margin-bottom: 16px;
  line-height: 1.15;
}

.highlight-text {
  background: linear-gradient(135deg, var(--brand), var(--moss));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .highlight-text {
  background: linear-gradient(135deg, #a5c4ff, #8ae0a2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 17.5px;
  color: var(--ink-secondary);
  margin: 0 0 28px;
  max-width: 480px;
  line-height: 1.6;
}

.cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 15px;
  transition: all .25s ease;
  cursor: pointer;
}

.btn.primary {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 12px 24px -8px var(--brand);
}

.btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px -8px var(--brand);
  filter: brightness(1.08);
}

.btn.ghost {
  border: 1.5px solid var(--ink);
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  color: var(--ink);
}

.btn.ghost:hover {
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-2px);
}

/* Hero Stats Bar */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  max-width: fit-content;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .hero-stats {
  background: rgba(18, 26, 45, 0.6);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-item strong {
  font-size: 17px;
  font-weight: 800;
  color: var(--brand);
}

.stat-item span {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}

.stat-divider {
  width: 1px;
  height: 28px;
  background: var(--line);
}

/* Celestial Physics: Sun & Crescent Moon */
.sun {
  position: absolute;
  z-index: 1;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  right: 30%;
  top: 12%;
  background: radial-gradient(circle, #fff0bc, var(--rice) 58%, transparent 74%);
  filter: blur(1px);
  transform: translateY(0);
  opacity: 1;
  transition: transform 1.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s ease;
  pointer-events: none;
}

.moon {
  position: absolute;
  z-index: 1;
  width: 130px;
  height: 130px;
  right: 32%;
  top: 13%;
  transform: translateY(220px);
  opacity: 0;
  transition: transform 1.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.9s ease;
  pointer-events: none;
}

.crescent-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 16px rgba(255, 248, 220, 0.75)) drop-shadow(0 0 35px rgba(142, 197, 252, 0.5));
  transform: rotate(-25deg);
  animation: float-moon 6s ease-in-out infinite alternate;
}

@keyframes float-moon {
  from { transform: rotate(-25deg) translateY(0); }
  to { transform: rotate(-20deg) translateY(-8px); }
}

.moon-aura {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(226, 236, 251, 0.25), transparent 70%);
  filter: blur(14px);
  pointer-events: none;
}

/* Night Stars Sky */
.night-stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: 
    radial-gradient(1.5px 1.5px at 15% 20%, #ffffff 100%, transparent),
    radial-gradient(2px 2px at 28% 12%, #fff9e6 100%, transparent),
    radial-gradient(1.5px 1.5px at 45% 25%, #ffffff 100%, transparent),
    radial-gradient(2.5px 2.5px at 60% 15%, #ffd782 100%, transparent),
    radial-gradient(1.5px 1.5px at 75% 22%, #ffffff 100%, transparent),
    radial-gradient(2px 2px at 85% 10%, #e2ecfb 100%, transparent),
    radial-gradient(1.5px 1.5px at 92% 28%, #ffffff 100%, transparent),
    radial-gradient(1.5px 1.5px at 38% 35%, #ffffff 100%, transparent),
    radial-gradient(2px 2px at 68% 32%, #ffffff 100%, transparent);
  background-size: 100% 100%;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}

/* Dark Mode Celestial Trigger */
[data-theme="dark"] .sun {
  transform: translateY(220px);
  opacity: 0;
}

[data-theme="dark"] .moon {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 0.2s;
}

[data-theme="dark"] .night-stars {
  opacity: 0.85;
  transition-delay: 0.3s;
}

.ly {
  position: absolute;
  left: -4%;
  width: 108%;
  bottom: 0;
  z-index: 2;
  will-change: transform;
}

.ly svg {
  display: block;
  width: 100%;
  height: auto;
}

.m1 { fill: var(--m1); }
.m2 { fill: var(--m2); }
.m3 { fill: var(--m3); }

#ter {
  position: absolute;
  left: -2%;
  width: 104%;
  bottom: 0;
  height: 190px;
  z-index: 4;
}

#ter path { transition: transform .6s; }

[data-theme="dark"] #ter { filter: brightness(.5) saturate(.8); }

.fog {
  position: absolute;
  z-index: 3;
  width: 70%;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.85), transparent 70%);
  opacity: var(--fog);
  filter: blur(16px);
  animation: drift 22s ease-in-out infinite alternate;
}

.fog.a { left: -10%; bottom: 160px; }
.fog.b { right: -12%; bottom: 240px; animation-duration: 28s; animation-direction: alternate-reverse; }

@keyframes drift { to { transform: translateX(110px); } }

/* Floating Hero Books */
.hbooks {
  position: absolute;
  z-index: 8;
  right: 5%;
  bottom: 80px;
  display: flex;
}

.hbooks .hc {
  width: 168px;
  margin-left: -32px;
  transition: all .35s cubic-bezier(0.2, 0.8, 0.2, 1);
  filter: drop-shadow(0 20px 24px rgba(0, 0, 0, 0.35));
  perspective: 800px;
}

.hbooks .hc:nth-child(1) { transform: rotate(-8deg) translateY(18px); }
.hbooks .hc:nth-child(3) { transform: rotate(8deg) translateY(18px); }

.hbooks .hc:hover {
  transform: translateY(-20px) rotate(0) scale(1.08);
  z-index: 10;
}

.bro {
  height: 18px;
  background: var(--bro) repeat-x;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* ===================================================
   Sections Layout & Badges
   =================================================== */
section {
  padding: 80px 0 30px;
}

.section-banner {
  margin-bottom: 32px;
}

.section-banner.center {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px;
}

.section-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  margin-bottom: 10px;
}

.head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.head h2 {
  font-size: clamp(28px, 3.8vw, 42px);
  font-weight: 900;
  letter-spacing: -.02em;
}

.head p {
  color: var(--muted);
  margin: 6px 0 0;
  font-size: 15px;
}

.sort-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
}

.sort {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: .2s;
}

.sort:focus {
  border-color: var(--brand);
  outline: none;
}

/* Category Chips */
.chips-container {
  margin-bottom: 32px;
}

.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1.5px solid var(--line);
  color: var(--ink-secondary);
  font-weight: 600;
  font-size: 14.5px;
  transition: all .25s ease;
  box-shadow: var(--shadow-sm);
}

.chip:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-2px);
}

.chip.on {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
  box-shadow: 0 8px 20px -6px var(--brand);
}

/* ===================================================
   Book Grid & Cards
   =================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--line);
  padding: 18px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all .35s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
}

.cover {
  aspect-ratio: 3 / 4.2;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18), inset 6px 0 12px rgba(0, 0, 0, 0.4);
  background-size: cover;
  background-position: center;
  transition: transform .3s;
}

.card:hover .cover {
  transform: scale(1.02);
}

/* Realistic Book Spine & Ribbon */
.cover u {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 10px;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.5), transparent);
  pointer-events: none;
}

.cover small {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .92;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.cover b {
  font: 900 17px/1.3 'Noto Serif', serif;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #e63946, #c1121f);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 10px rgba(193, 18, 31, 0.4);
  z-index: 5;
}

.tag.sold-out {
  background: #495057;
  box-shadow: none;
}

.card h3 {
  font: 700 16.5px/1.35 'Noto Serif', serif;
  margin: 14px 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 44px;
}

.card .by {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.card .stars {
  color: #f59e0b;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}

.card .stars small {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}

.card .buy {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.card .price {
  display: flex;
  flex-direction: column;
  font-weight: 800;
  font-size: 17px;
  color: var(--red);
}

.card .price s {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
}

.card .add {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 600;
  transition: all .25s;
  box-shadow: 0 6px 14px -4px var(--brand);
}

.card .add:hover:not(:disabled) {
  transform: scale(1.12);
  filter: brightness(1.15);
}

.card .add:disabled {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

.page-btn {
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1.5px solid var(--line);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  transition: .2s;
  box-shadow: var(--shadow-sm);
}

.page-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.page-btn.on {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

/* ===================================================
   Destinations Section
   =================================================== */
.dest-section {
  background: var(--surface-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dests {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.dest {
  background: var(--g, linear-gradient(145deg, #1f3a6e, #2f6b3f));
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  color: #ffffff;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 200px;
  position: relative;
  overflow: hidden;
  transition: all .35s ease;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.dest:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.dest h3 {
  font: 900 24px 'Noto Serif', serif;
  color: #ffffff;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.dest p {
  font-size: 14.5px;
  opacity: .92;
  margin: 0 0 16px;
  line-height: 1.5;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.dest span {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--rice-light);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ===================================================
   Perks / Commitments Section
   =================================================== */
.perks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.perk {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--line);
  padding: 28px 22px;
  transition: all .3s ease;
  box-shadow: var(--shadow-sm);
}

.perk:hover {
  transform: translateY(-6px);
  border-color: var(--brand);
  box-shadow: var(--shadow);
}

.perk-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--surface-alt);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  transition: all .3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.perk:hover .perk-icon {
  background: var(--brand);
  color: #ffffff;
  transform: translateY(-2px) scale(1.05);
}

.perk-icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
}

.perk h3 {
  font: 700 18px 'Noto Serif', serif;
  margin-bottom: 8px;
}

.perk p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  line-height: 1.55;
}

/* ===================================================
   Reviews Section
   =================================================== */
.reviews-section {
  background: var(--bg);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.review-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--line);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.review-card .stars {
  color: #f59e0b;
  font-size: 18px;
  margin-bottom: 12px;
}

.review-text {
  font-style: italic;
  font-size: 15px;
  color: var(--ink-secondary);
  line-height: 1.6;
  margin: 0 0 20px;
}

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

.reviewer-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--brand);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
}

.reviewer-info {
  display: flex;
  flex-direction: column;
}

.reviewer-info strong {
  font-size: 14.5px;
  color: var(--ink);
}

.reviewer-info span {
  font-size: 12px;
  color: var(--muted);
}

/* ===================================================
   Newsletter Section
   =================================================== */
.newsletter-section {
  padding-bottom: 80px;
}

.news {
  background: linear-gradient(135deg, var(--brand), #1a4b41);
  border-radius: var(--radius-lg);
  padding: 48px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.news::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(224, 158, 31, 0.2), transparent 70%);
  pointer-events: none;
}

.news-content {
  max-width: 520px;
}

.news-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--rice);
  color: #1a233a;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .05em;
  margin-bottom: 12px;
}

.news h2 {
  font: 900 32px 'Noto Serif', serif;
  color: #ffffff;
  margin-bottom: 10px;
}

.news p {
  font-size: 15.5px;
  opacity: .9;
  margin: 0;
  line-height: 1.6;
}

.news form {
  display: flex;
  gap: 10px;
  flex: 1;
  max-width: 420px;
  min-width: 280px;
}

.input-group {
  position: relative;
  flex: 1;
}

.input-group svg {
  position: absolute;
  left: 14px;
  top: 15px;
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.input-group input {
  width: 100%;
  height: 48px;
  border-radius: var(--radius-md);
  border: 0;
  background: #ffffff;
  color: #1a233a;
  padding: 0 16px 0 42px;
  font-size: 14.5px;
}

.news .btn.primary {
  background: var(--rice);
  color: #1a233a;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(224, 158, 31, 0.35);
  height: 48px;
}

.news .btn.primary:hover {
  filter: brightness(1.1);
}

/* ===================================================
   Footer
   =================================================== */
footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.footer-wrap {
  padding-top: 60px;
  padding-bottom: 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-col h4 {
  font: 700 16px 'Noto Serif', serif;
  margin-bottom: 18px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--ink-secondary);
}

.footer-col a:hover {
  color: var(--brand);
}

.footer-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 14px;
}

.payment-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.pay-badge {
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--surface-alt);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-secondary);
  border: 1px solid var(--line);
}

.freeship-note {
  font-size: 13px;
  font-weight: 600;
  color: var(--moss);
  margin: 0;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* ===================================================
   Cart Drawer
   =================================================== */
.veil {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}

.veil.on {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100vw);
  background: var(--surface);
  z-index: 100;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.drawer.on {
  transform: translateX(0);
}

.dh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.drawer-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-title h2 {
  font: 700 20px 'Noto Serif', serif;
}

.ship {
  padding: 14px 24px;
  background: var(--surface-alt);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.track {
  height: 6px;
  background: var(--line);
  border-radius: 99px;
  margin-top: 8px;
  overflow: hidden;
}

.track i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(to right, var(--brand), var(--moss));
  border-radius: 99px;
  transition: width .3s;
}

.items {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ci {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.ci-cover {
  width: 54px;
  aspect-ratio: 3/4;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  flex: none;
}

.ci-info {
  flex: 1;
}

.ci-title {
  font-weight: 700;
  font-size: 14.5px;
  margin-bottom: 4px;
  line-height: 1.3;
}

.ci-price {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--red);
}

.ci-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-alt);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
}

.ci-qty button {
  width: 22px;
  height: 22px;
  font-weight: 700;
  font-size: 14px;
}

.drawer-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.total #sum {
  font-size: 22px;
  font-weight: 900;
  color: var(--red);
}

.checkout-btn {
  width: 100%;
  padding: 16px;
  font-size: 16px;
}

.checkout-guarantee {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0 0;
}

/* ===================================================
   Book Modal
   =================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  padding: 36px;
  position: relative;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-alt);
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  transition: .2s;
}

.modal-close:hover {
  background: var(--red);
  color: #fff;
}

.modal-cover {
  height: 220px;
  margin-bottom: 20px;
}

.modal-title {
  font: 900 24px 'Noto Serif', serif;
  margin-bottom: 6px;
}

.modal-author {
  font-size: 14.5px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 14px;
}

.modal-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.modal-tag {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  font-size: 12px;
  font-weight: 600;
}

.stock-badge {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
}

.stock-badge.in { background: #dcfce7; color: #166534; }
.stock-badge.out { background: #fee2e2; color: #991b1b; }

.modal-price {
  font-size: 26px;
  font-weight: 900;
  color: var(--red);
  margin-bottom: 4px;
}

.modal-orig {
  font-size: 14px;
  color: var(--muted);
  text-decoration: line-through;
  margin-bottom: 16px;
}

.modal-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-secondary);
  margin-bottom: 24px;
  white-space: pre-line;
}

.modal-related {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.modal-related h3 {
  font: 700 18px 'Noto Serif', serif;
  margin-bottom: 14px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
}

.related-card {
  cursor: pointer;
  transition: transform .2s;
}

.related-card:hover {
  transform: translateY(-4px);
}

.related-cover {
  aspect-ratio: 3/4;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  align-items: flex-end;
  color: #fff;
}

.related-title {
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* ===================================================
   Floating Live Chat Widget
   =================================================== */
#chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 80;
}

.chat-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: #ffffff;
  font-weight: 700;
  font-size: 14.5px;
  box-shadow: 0 10px 25px -5px var(--brand);
  transition: all .3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.chat-toggle:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 14px 30px -5px var(--brand);
  filter: brightness(1.1);
}

.chat-toggle svg {
  width: 20px;
  height: 20px;
}

.chat-online-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.4);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.chat-badge {
  background: var(--red);
  color: #fff;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
}

.chat-box {
  position: absolute;
  bottom: 60px;
  right: 0;
  width: min(380px, 90vw);
  height: 520px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1.5px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp .3s ease;
}

.chat-box[hidden] {
  display: none;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.chat-header {
  background: var(--brand);
  color: #ffffff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--brand);
  font-weight: 900;
  font-size: 12px;
  display: grid;
  place-items: center;
}

.chat-title {
  font-weight: 700;
  font-size: 14.5px;
  display: block;
}

.chat-status {
  font-size: 11.5px;
  opacity: .88;
  display: flex;
  align-items: center;
  gap: 5px;
}

.chat-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
}

.chat-close-btn {
  color: #ffffff;
  font-size: 16px;
  opacity: .8;
  transition: .2s;
}

.chat-close-btn:hover {
  opacity: 1;
}

.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg);
}

.chat-msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}

.chat-msg.user {
  background: var(--brand);
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-msg.admin {
  background: var(--surface);
  color: var(--ink);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.chat-quick-replies {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 12px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.quick-reply-btn {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  white-space: nowrap;
  transition: .2s;
}

.quick-reply-btn:hover {
  background: var(--brand);
  color: #fff;
}

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.chat-input-row input {
  flex: 1;
  height: 38px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  padding: 0 14px;
  font-size: 14px;
}

.chat-input-row input:focus {
  border-color: var(--brand);
  outline: none;
}

.chat-input-row .btn {
  padding: 0 16px;
  height: 38px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
}

/* ===================================================
   Back To Top & Toast
   =================================================== */
.back-to-top {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--line);
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: all .3s;
  z-index: 70;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--brand);
  color: #ffffff;
  transform: translateY(-3px);
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #111a2e;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: all .3s;
  z-index: 150;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===================================================
   Responsive Design
   =================================================== */
@media (max-width: 992px) {
  nav { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hbooks { display: none; }
  .hero { height: auto; padding: 40px 0 100px; }
  .hero .txt { max-width: 100%; text-align: center; }
  .hero-stats { margin: 0 auto; }
  .cta { justify-content: center; }
}

@media (max-width: 768px) {
  .top-links .hotline-badge { display: none; }
  .search-box { max-width: 100%; margin: 8px 0 0; order: 3; flex-basis: 100%; }
  .bar { flex-wrap: wrap; height: auto; padding: 12px 0; }
  .login-btn span { display: none; }
  .login-btn { padding: 0; width: 44px; height: 44px; border-radius: 50%; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .news { padding: 30px 20px; }
  .news form { max-width: 100%; flex-direction: column; }
  .chat-toggle-text { display: none; }
  .chat-toggle { padding: 12px; border-radius: 50%; width: 48px; height: 48px; justify-content: center; }
}
