/* ============================================================
   Trà Dưỡng Nhan Việt — Landing Page Styles
   Mobile-first. Breakpoint desktop: 900px
   ============================================================ */

:root {
  --color-red: #B91C1C;
  --color-red-dark: #7F1010;
  --color-gold: #D4AF37;
  --color-gold-light: #F1DFA0;
  --color-cream: #FFF8EC;
  --color-cream-dark: #F7EEDB;
  --color-text: #2A1D14;
  --color-text-muted: #7A6A5A;
  --color-error: #C0392B;
  --shadow-soft: 0 8px 24px rgba(122, 40, 20, 0.12);
  --radius-lg: 18px;
  --radius-md: 12px;
  --font-heading: 'Playfair Display', 'Be Vietnam Pro', serif;
  --font-body: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background: var(--color-cream);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font-family: inherit;
}

/* ================= LAYOUT ================= */

.page {
  padding-bottom: 96px; /* room for sticky CTA on mobile */
}

@media (min-width: 900px) {
  .page {
    padding-bottom: 0;
  }
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.section-title {
  font-family: var(--font-heading);
  color: var(--color-red-dark);
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  margin: 0 0 20px;
}

/* ================= HERO ================= */

.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1984 / 550; /* crop cứng: chỉ giữ ~60% trên của ảnh gốc (1984x913) —
                                cắt bớt khoảng bokeh trống + mặt bàn gỗ phía dưới */
  overflow: hidden; /* phần ảnh vượt ra ngoài tỉ lệ trên bị ẩn hẳn, không đẩy layout */
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center; /* neo theo mép trên ảnh gốc — giữ cờ + vùng chữ, cắt bỏ phần dưới thừa */
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* hero giờ đã thấp/gọn nhờ aspect-ratio nên canh giữa theo chiều dọc trực tiếp */
  padding: 0 9%;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: var(--color-gold);
  color: var(--color-red-dark);
  font-weight: 700;
  font-size: clamp(0.5rem, 1.9vw, 0.95rem);
  letter-spacing: 0.03em;
  padding: clamp(3px, 0.9vw, 9px) clamp(10px, 2vw, 20px);
  border-radius: 999px;
  margin-bottom: clamp(2px, 0.7vw, 10px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
  white-space: nowrap;
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-red-dark);
  margin: 0 0 clamp(2px, 0.6vw, 10px);
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.6), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.hero-tagline {
  font-size: clamp(0.5rem, 2vw, 1.15rem);
  font-weight: 600;
  line-height: 1.3;
  color: rgba(127, 16, 16, 0.85); /* --color-red-dark ở opacity ~85% */
  margin: 0 0 clamp(3px, 1vw, 16px);
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.5);
}

.hero-overlay .cta-btn {
  display: inline-block;
  width: auto;
  padding: clamp(4px, 1.6vw, 16px) clamp(12px, 3.4vw, 32px);
  font-size: clamp(0.55rem, 2vw, 1.15rem);
  border-radius: clamp(4px, 0.8vw, 12px);
  box-shadow: 0 8px 22px rgba(212, 175, 55, 0.55);
}

/* ================= GALLERY ================= */

.gallery {
  max-width: 520px;
  margin: 32px auto 0;
  padding: 0 16px;
}

.gallery-main {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  background: #fff;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.gallery-main::-webkit-scrollbar {
  display: none;
}

.gallery-track {
  display: flex;
}

.gallery-slide {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  scroll-snap-align: start;
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
}

.thumb {
  flex: 0 0 auto;
  width: 68px;
  height: 68px;
  padding: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid transparent;
  background: #fff;
  cursor: pointer;
  opacity: 0.7;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb.active,
.thumb:hover {
  border-color: var(--color-gold);
  opacity: 1;
}

@media (min-width: 900px) {
  .gallery {
    max-width: 1100px;
  }
  .gallery-main {
    overflow: visible;
    scroll-snap-type: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }
  .gallery-track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
  .gallery-slide {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
  }
  .gallery-thumbs {
    display: none;
  }
}

/* ================= BENEFITS ================= */

.benefits {
  padding: 36px 0 8px;
  text-align: center;
}

.benefits-text {
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto 24px;
}

.benefit-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.benefit-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  min-width: 90px;
}

.benefit-emoji {
  font-size: 2rem;
}

/* ================= PRICING ================= */

.pricing {
  padding: 12px 0 40px;
}

.pricing-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 2px solid var(--color-gold-light);
  border-radius: var(--radius-lg);
  padding: 28px 20px 24px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  position: relative;
}

.pricing-card--featured {
  border: 3px solid var(--color-gold);
  box-shadow: 0 12px 32px rgba(212, 175, 55, 0.35);
}

.pricing-card-badge {
  display: inline-block;
  align-self: center;
  background: var(--color-red);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.pricing-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin: 0 0 10px;
  color: var(--color-red-dark);
}

.pricing-card-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-red);
  margin: 0 0 6px;
}

.pricing-card-note {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin: 0 0 20px;
}

.pricing-card-btn {
  margin-top: auto;
}

@media (min-width: 900px) {
  .pricing-cards {
    flex-direction: row;
    align-items: stretch;
    gap: 24px;
  }
  .pricing-card {
    flex: 1 1 0;
  }
  .pricing-card--featured {
    margin-top: -12px;
    margin-bottom: -12px;
    padding-top: 40px;
    padding-bottom: 36px;
  }
  .pricing-card-btn {
    margin-left: auto;
    margin-right: auto;
  }
}

/* ================= TRUST / CAM KẾT ================= */

.trust {
  background: var(--color-cream-dark);
  padding: 36px 0;
}

.trust-badges {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 800px;
  margin: 0 auto;
}

.trust-badge {
  background: #fff;
  border: 1px solid var(--color-gold-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-weight: 600;
  text-align: center;
}

@media (min-width: 900px) {
  .trust-badges {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .trust-badge {
    flex: 1 1 220px;
  }
}

/* ================= FINAL CTA ================= */

.final-cta {
  background: linear-gradient(135deg, var(--color-red) 0%, var(--color-red-dark) 100%);
  padding: 40px 0;
  text-align: center;
}

.final-cta .container {
  max-width: 480px;
}

/* ================= CTA BUTTON ================= */

.cta-btn {
  display: block;
  width: 100%;
  padding: 16px 24px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--color-red) 0%, var(--color-red-dark) 100%);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(185, 28, 28, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(185, 28, 28, 0.42);
}

.cta-btn:active {
  transform: translateY(0);
}

.cta-btn--gold {
  background: var(--color-gold);
  color: var(--color-red-dark);
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.45);
}

.cta-btn--gold:hover {
  box-shadow: 0 10px 22px rgba(212, 175, 55, 0.55);
}

.cta-btn--lg {
  font-size: 1.2rem;
  padding: 18px 24px;
}

@media (min-width: 900px) {
  .cta-btn {
    width: auto;
    min-width: 260px;
  }
  .final-cta .cta-btn {
    margin: 0 auto;
  }
}

/* Sticky mobile CTA bar */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 248, 236, 0.96);
  backdrop-filter: blur(4px);
  border-top: 1px solid var(--color-gold-light);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

@media (min-width: 900px) {
  .sticky-cta {
    display: none !important;
  }
}

/* ================= MODAL ================= */
.modal-overlay[hidden] {
  display: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(42, 29, 20, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }
}

.modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--color-cream);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 28px 22px 24px;
  box-shadow: var(--shadow-soft);
  border-top: 3px solid var(--color-gold);
}

@media (min-width: 640px) {
  .modal {
    border-radius: var(--radius-lg);
    border-top: 3px solid var(--color-gold);
  }
}

.modal-title {
  font-family: var(--font-heading);
  color: var(--color-red-dark);
  font-size: 1.4rem;
  margin: 0 0 18px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: none;
  background: var(--color-cream-dark);
  color: var(--color-text);
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  background: var(--color-gold-light);
}

/* ================= FORM ================= */

.field {
  margin-bottom: 16px;
}

.field-row {
  display: flex;
  gap: 12px;
}

.field-qty {
  flex: 0 0 100px;
}

.field-grow {
  flex: 1 1 auto;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 6px;
}

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

.field .optional {
  color: var(--color-text-muted);
  font-weight: 400;
  font-size: 0.85rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 12px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text);
  background: #fff;
  border: 1.5px solid #E4D4B8;
  border-radius: var(--radius-md);
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

.field input.invalid,
.field textarea.invalid,
.field select.invalid {
  border-color: var(--color-error);
}

.field-error {
  color: var(--color-error);
  font-size: 0.82rem;
  margin: 6px 0 0;
  min-height: 1em;
}

.form-error {
  background: #FBEAE8;
  border: 1px solid var(--color-error);
  color: var(--color-error);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.submit-btn {
  margin-top: 6px;
}

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

/* ================= SUCCESS MODAL ================= */

.success-modal {
  text-align: center;
  padding-top: 32px;
}

.success-icon {
  font-size: 2.6rem;
  margin: 0 0 8px;
}

.success-text {
  color: var(--color-text-muted);
  margin: 0 0 22px;
}
