:root {
  --primary: #415e34;
  --primary-hover: #334b29;
  --primary-soft: rgba(65, 94, 52, 0.08);
  --primary-glow: rgba(65, 94, 52, 0.28);
  --gold: #c5a059;
  --gold-deep: #a8823c;
  --gold-soft: #f5eddc;
  --ink: #23271f;
  --ink-muted: #676b5f;
  --paper: #faf8f2;
  --paper-deep: #f2eee2;
  --card: #ffffff;
  --line: #e6e1d3;
  --radius: 18px;
  --shadow-sm: 0 4px 14px rgba(35, 39, 31, 0.06);
  --shadow: 0 12px 32px rgba(35, 39, 31, 0.10);
  --shadow-lg: 0 26px 60px rgba(35, 39, 31, 0.22);
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Montserrat', system-ui, -apple-system, sans-serif;
  --font-script: 'Great Vibes', 'Playfair Display', cursive;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: min(1080px, calc(100% - 32px)); margin-inline: auto; }
.center { text-align: center; }

/* ═══════════════════════════════════════════════
   NÚT, NHÃN, TIÊU ĐỀ DÙNG CHUNG
   ═══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #37512b 0%, #4f7240 100%);
  color: #fff;
  border: 1px solid rgba(197, 160, 89, 0.45);
  box-shadow: 0 10px 24px var(--primary-glow);
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -70%;
  width: 50%;
  height: 220%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0) 100%);
  transform: rotate(26deg);
  pointer-events: none;
  animation: btnShimmer 3.2s ease-in-out infinite;
}

@keyframes btnShimmer {
  0%, 65% { left: -70%; }
  100% { left: 170%; }
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(55, 81, 43, 0.38);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.btn:active { transform: translateY(1px) scale(0.98); }
.btn-arrow { width: 18px; height: 18px; transition: transform 0.2s ease; }
.btn:hover .btn-arrow { transform: translateX(4px); }
.btn-icon { flex: none; width: 24px; height: 24px; border-radius: 6px; }

/* Nhóm nút liên hệ Zalo, TikTok (Facebook khi có) ở đầu trang: thu nhỏ gọn trên điện thoại để đủ 1 hàng ngang */
.social {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.social .btn {
  min-height: 40px;
  padding: 0 11px;
  gap: 6px;
  font-size: 13px;
  white-space: nowrap;
}

.social .btn-icon {
  width: 20px;
  height: 20px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.pill-price {
  background: linear-gradient(135deg, #415e34 0%, #527542 100%);
  border-color: rgba(197, 160, 89, 0.55);
  color: #fff;
  box-shadow: 0 6px 16px var(--primary-glow);
}

.section { padding: 64px 0; }

.section-head {
  max-width: 640px;
  margin: 0 auto 28px;
  text-align: center;
}

.eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section-title {
  margin-top: 8px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(26px, 6.6vw, 38px);
  font-weight: 700;
  line-height: 1.25;
}

/* Chữ nhấn kiểu viết tay trong tiêu đề */
.script {
  padding: 0 0.04em;
  color: var(--gold-deep);
  font-family: var(--font-script);
  font-size: 1.38em;
  font-weight: 400;
  line-height: 1;
}

.orn {
  width: 120px;
  height: 14px;
  margin: 12px auto 0;
  color: var(--gold);
}

.section-desc {
  margin-top: 10px;
  color: var(--ink-muted);
  font-size: 14px;
}

/* ═══════════════════════════════════════════════
   MÀN HÌNH ĐẦU: NỀN ẢNH GHÉP, TÊN SHOP, NÚT LIÊN HỆ, 2 KHUNG ĐIỆN THOẠI
   Phần này cũng là ảnh xem trước khi gửi link qua Zalo (thumbs.ps1 chụp khổ 1200x630).
   ═══════════════════════════════════════════════ */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 30px 0;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, rgba(0, 0, 0, 0.4) 80%, transparent 96%);
  mask-image: linear-gradient(180deg, #000 0%, #000 55%, rgba(0, 0, 0, 0.4) 80%, transparent 96%);
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero-wall {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 170%;
  transform: translate(-50%, -50%) rotate(-9deg);
  opacity: 0.55;
}

.hero-wall img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

.hero-wall .wide-only { display: none; }

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(250, 248, 242, 0) 35%, rgba(250, 248, 242, 0.6) 60%, rgba(250, 248, 242, 0.95) 85%, var(--paper) 100%),
    radial-gradient(130% 62% at 50% 26%, rgba(250, 248, 242, 0.97) 0%, rgba(250, 248, 242, 0.9) 55%, rgba(250, 248, 242, 0.62) 100%);
}

.hero-text { text-align: center; }

.brand-mark {
  width: 60px;
  height: 60px;
  margin: 0 auto 10px;
  filter: drop-shadow(0 4px 10px rgba(65, 94, 52, 0.15));
  animation: brandPulse 3.5s ease-in-out infinite alternate;
}

@keyframes brandPulse {
  0% { transform: scale(1); filter: drop-shadow(0 4px 10px rgba(65, 94, 52, 0.15)); }
  100% { transform: scale(1.06); filter: drop-shadow(0 6px 20px rgba(197, 160, 89, 0.5)); }
}

.hero-title {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(27px, 8vw, 42px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-script {
  margin-top: 4px;
  color: var(--gold-deep);
  font-family: var(--font-script);
  font-size: clamp(38px, 11vw, 60px);
  line-height: 1.15;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.hero-cta .btn-primary { min-width: 240px; }

/* Hai khung điện thoại chỉ hiện trên máy tính (nằm bên phải tên shop). Điện thoại xếp dọc thì hàng mẫu
   ngay bên dưới đã có khung điện thoại, hiện thêm ở đây là lặp (TLNV DM-2). */
.hero-phones { display: none; }

/* Khung điện thoại, dùng ở màn hình đầu và hàng mẫu trên máy tính */
.phone {
  position: relative;
  display: block;
  padding: 7px;
  border-radius: 30px;
  background: linear-gradient(145deg, #30332c 0%, #121410 100%);
  box-shadow: var(--shadow-lg), inset 0 0 0 1.5px rgba(255, 255, 255, 0.1);
}

.hero-phones .phone {
  position: absolute;
  top: 0;
  width: 52%;
}

/* Tai thỏ của điện thoại */
.phone::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 50%;
  z-index: 2;
  width: 30%;
  height: 12px;
  border-radius: 999px;
  background: #111;
  transform: translateX(-50%);
}

.phone-screen {
  display: block;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  border-radius: 23px;
  background: #ece8dc;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s ease;
}

.phone:hover .phone-screen img { transform: scale(1.04); }

.phone-tag {
  position: absolute;
  bottom: -14px;
  left: 50%;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transform: translateX(-50%);
}

.phone-0 {
  top: 28px;
  right: 2%;
  z-index: 2;
  transform: rotate(6deg);
  animation: floatFront 6s ease-in-out infinite;
}

.phone-1 {
  left: 2%;
  z-index: 1;
  transform: rotate(-7deg);
  animation: floatBack 7s ease-in-out infinite;
}

@keyframes floatFront {
  0%, 100% { transform: rotate(6deg) translateY(0); }
  50% { transform: rotate(6deg) translateY(-10px); }
}

@keyframes floatBack {
  0%, 100% { transform: rotate(-7deg) translateY(0); }
  50% { transform: rotate(-7deg) translateY(-8px); }
}

@media (min-width: 900px) {
  .hero {
    display: flex;
    align-items: center;
    min-height: auto;
    padding: 16px 0 0;
  }

  .hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    align-items: center;
    gap: 32px;
  }

  .hero-wall {
    left: 60%;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: 130%;
  }

  .hero-wall .wide-only { display: block; }

  .hero-bg::after {
    background:
      linear-gradient(180deg, rgba(250, 248, 242, 0) 40%, rgba(250, 248, 242, 0.65) 65%, rgba(250, 248, 242, 0.96) 85%, var(--paper) 100%),
      linear-gradient(90deg, rgba(250, 248, 242, 0.97) 0%, rgba(250, 248, 242, 0.93) 44%, rgba(250, 248, 242, 0.6) 70%, rgba(250, 248, 242, 0.38) 100%);
  }

  .hero-text { text-align: left; }
  .brand-mark { width: 52px; height: 52px; margin: 0 0 8px; }
  .hero-title { font-size: clamp(24px, 3.2vw, 36px); }
  .hero-script { font-size: clamp(34px, 4.5vw, 48px); margin-top: 2px; }

  .hero-cta {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 16px;
    gap: 10px;
  }

  .hero-cta .btn-primary { min-width: 0; }
  .hero-cta .social { justify-content: flex-start; }
  .social { gap: 8px; }
  .social .btn {
    min-height: 44px;
    padding: 0 20px;
    gap: 8px;
    font-size: 14px;
  }
  .social .btn-icon {
    width: 22px;
    height: 22px;
  }

  /* Ô lưới có lề tự động thì co theo nội dung; khung chỉ chứa phần tử absolute nên phải đặt rộng cố định. */
  .hero-phones {
    position: relative;
    display: block;
    width: 100%;
    max-width: 380px;
    height: 380px;
    margin: 0 auto;
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .hero-phones .phone {
    width: 50%;
    padding: 8px;
    border-radius: 32px;
  }

  .hero-phones .phone-screen { border-radius: 24px; }
  .phone-0 { top: 28px; }
  .phone-1 { top: 0; }
}

/* ═══════════════════════════════════════════════
   MẪU THIỆP: HÀNG MẪU TRONG KHUNG ĐIỆN THOẠI, chạy hết bề ngang (app.js cho tự trượt, kéo, vuốt, nối vòng).
   Điện thoại thấy khoảng 2 mẫu, máy tính 5–7 mẫu.
   ═══════════════════════════════════════════════ */
/* Điện thoại: khoảng cách trên gọn để mở trang ra là thấy hàng mẫu trong màn hình đầu tiên. */
.featured {
  padding: 24px 0 48px;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper) 28%, #ffffff 58%, #ffffff 82%, var(--paper) 100%);
}

@media (min-width: 900px) {
  .featured { padding: 4px 0 36px; }
  .rail { margin: 0 0 18px; }
}

.featured .section-head { margin-bottom: 6px; }
.featured .section-desc { margin-top: 0; }
.only-desktop { display: none; }

.rail {
  position: relative;
  margin: 4px 0 22px;
}

/* Hai mép mờ dần cho hàng mẫu không bị cắt cụt */
.rail::before,
.rail::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 18px;
  pointer-events: none;
}

.rail::before { left: 0; background: linear-gradient(90deg, #fff 15%, rgba(255, 255, 255, 0)); }
.rail::after { right: 0; background: linear-gradient(270deg, #fff 15%, rgba(255, 255, 255, 0)); }

/* Kéo bằng chuột hoặc vuốt ngang (app.js); vuốt dọc trên màn hình cảm ứng vẫn cuộn trang. */
.rail-viewport {
  overflow: hidden;
  padding: 14px 0 22px;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.rail.dragging .rail-viewport { cursor: grabbing; }
.rail.dragging .rail-item { transform: none; }
.rail-viewport img { -webkit-user-drag: none; }

.rail-track {
  display: flex;
  gap: 14px;
  padding-left: 16px;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.rail-item {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  width: 42vw;
  max-width: 250px;
  transition: transform 0.3s ease;
}

@media (hover: hover) {
  .rail-item:hover { transform: translateY(-6px); }
}

.rail-item .phone {
  width: 100%;
  padding: 6px;
  border-radius: 24px;
  box-shadow: 0 14px 30px rgba(35, 39, 31, 0.18), inset 0 0 0 1.5px rgba(255, 255, 255, 0.1);
}

.rail-item .phone::before {
  top: 10px;
  height: 9px;
}

.rail-item .phone-screen { border-radius: 19px; }

.rail-hot,
.hot {
  background: linear-gradient(135deg, #b4863a 0%, #d2ad5e 100%);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.rail-hot {
  position: absolute;
  top: 16px;
  left: -5px;
  z-index: 3;
  padding: 2px 9px 2px 8px;
  border-radius: 0 999px 999px 0;
  font-size: 10.5px;
  line-height: 1.4;
}

.rail-name {
  max-width: 100%;
  margin-top: 12px;
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 12px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-name b {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-weight: 700;
}

.rail-btn {
  position: absolute;
  top: calc(50% - 16px);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateY(-50%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, box-shadow 0.25s ease;
}

.rail-btn.prev { left: 6px; }
.rail-btn.next { right: 6px; }

.rail-btn:hover {
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  transform: translateY(-50%) scale(1.08);
}

.rail-btn:active { transform: translateY(-50%) scale(0.92); }

@media (min-width: 900px) {
  .only-mobile { display: none; }
  .only-desktop { display: inline; }

  .rail { margin: 4px 0 26px; }
  .rail::before, .rail::after { width: 90px; }
  .rail-viewport { padding: 16px 0 26px; }

  .rail-track {
    gap: 28px;
    padding-left: 40px;
  }

  .rail-item { width: clamp(210px, 12.5vw, 250px); }

  .rail-item .phone {
    padding: 8px;
    border-radius: 32px;
    box-shadow: 0 16px 34px rgba(35, 39, 31, 0.18), inset 0 0 0 1.5px rgba(255, 255, 255, 0.1);
  }

  .rail-item .phone::before {
    top: 13px;
    height: 12px;
  }

  .rail-item .phone-screen { border-radius: 25px; }

  .rail-hot {
    top: 22px;
    left: -6px;
    padding: 3px 11px 3px 9px;
    font-size: 11.5px;
  }

  .rail-name {
    margin-top: 14px;
    font-size: 13.5px;
  }

  .rail-name b { font-size: 15px; }

  .rail-btn {
    top: calc(50% - 18px);
    width: 42px;
    height: 42px;
  }

  .rail-btn.prev { left: 22px; }
  .rail-btn.next { right: 22px; }
}

/* ═══════════════════════════════════════════════
   TRANG TẤT CẢ MẪU (/mau-thiep/)
   ═══════════════════════════════════════════════ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 248, 242, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.topbar-mark { flex: none; width: 34px; height: 34px; }
.topbar .pill-price { padding: 5px 12px; font-size: 12px; }

.all { padding: 24px 0 48px; }

.all-head {
  margin-bottom: 24px;
  text-align: center;
}

.all-head .social { margin-top: 16px; }

.back-link {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.back-link:hover {
  background: var(--primary);
  color: #fff;
}

.all-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 6.4vw, 34px);
  font-weight: 700;
  line-height: 1.25;
}

.all-sub {
  margin-top: 10px;
  color: var(--ink-muted);
  font-size: 14px;
  text-wrap: pretty;   /* đừng để chữ cuối ("nhé.") rơi trơ một mình xuống dòng */
}

.group-title {
  margin: 24px 0 14px;
  padding: 10px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 12px;
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 18px;
  }
}

@media (min-width: 960px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.25s ease;
}

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

.thumb {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease;
}

.item:hover .thumb { box-shadow: var(--shadow); }

.thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hot {
  position: absolute;
  top: 10px;
  left: -1px;
  padding: 3px 11px 3px 9px;
  border-radius: 0 999px 999px 0;
  font-size: 11.5px;
  line-height: 1.4;
}

.item-name {
  margin-top: 10px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 7px 18px;
  border: 1px solid rgba(65, 94, 52, 0.45);
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-size: 13.5px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.item:hover .view {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* ═══════════════════════════════════════════════
   CHÂN TRANG, NÚT ZALO NỔI
   ═══════════════════════════════════════════════ */
.footer {
  padding: 18px 16px 20px;
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
  text-align: center;
}

.footer .footer-logo-link {
  display: inline-block;
  margin-bottom: 6px;
  transition: opacity 0.2s ease;
}

.footer .footer-logo-link:hover {
  opacity: 0.85;
}

.footer .footer-logo {
  display: block;
  margin: 0 auto;
  max-width: 175px;
  height: auto;
}

.footer-link {
  display: inline-block;
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.float-zalo {
  position: fixed;
  left: 16px;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 50;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 104, 255, 0.4);
  animation: pulseZalo 2.5s infinite;
  transition: transform 0.2s ease;
}

.float-zalo:hover { transform: scale(1.08); }
.float-zalo svg { width: 100%; height: 100%; }

@keyframes pulseZalo {
  0% { box-shadow: 0 0 0 0 rgba(0, 104, 255, 0.6); }
  70% { box-shadow: 0 0 0 14px rgba(0, 104, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 104, 255, 0); }
}

.float-music {
  position: fixed;
  right: 18px;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 50;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: var(--navy, #1e2d24);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  opacity: 0.9;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
}
.float-music:hover { transform: scale(1.08); opacity: 1; }
.float-music svg { width: 22px; height: 22px; }
.float-music:not(.playing) {
  animation: pulseMusic 2.4s ease-out infinite;
}
@keyframes pulseMusic {
  0% { box-shadow: 0 0 0 0 rgba(46, 71, 50, 0.7); }
  70% { box-shadow: 0 0 0 14px rgba(46, 71, 50, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 71, 50, 0); }
}
.float-music.playing {
  opacity: 1;
  background: #2e4732;
  animation: none;
}
.float-music.playing svg {
  animation: spinMusic 4s linear infinite;
}
@keyframes spinMusic {
  to { transform: rotate(360deg); }
}

@media (max-height: 400px) {
  .float-zalo, .float-music { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .phone-0, .phone-1, .float-zalo { animation: none; }
  .rail-track { transition: none; }
}
