/* ============================================
   HUTA BEAUTY — Design System
   Botanical Luxury • Editorial Refined
   ============================================ */

:root {
  /* Palette — xanh dược liệu + vàng nâu sang trọng */
  --green-900: #1b4332;
  --green-700: #2e7d32;   /* brand chủ đạo */
  --green-500: #52b788;
  --green-100: #d8f3dc;
  --green-50:  #f0f7f1;

  --gold-600:  #c8a96a;   /* accent vàng nâu */
  --gold-400:  #e2c794;
  --gold-100:  #f6ecd6;

  --ink-900:   #1a1a1a;
  --ink-700:   #3a3a3a;
  --ink-500:   #6b6b6b;
  --ink-300:   #b8b8b8;
  --ink-100:   #ececec;
  --ink-50:    #f7f7f5;

  --cream:     #faf7f2;   /* nền chính, ấm hơn trắng */
  --paper:     #ffffff;

  --danger:    #c0392b;
  --success:   #2e7d32;

  /* Typography */
  --font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-body:    'Manrope', 'Be Vietnam Pro', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-24: 6rem;
  --sp-32: 8rem;

  /* Radius */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 16px;
  --r-full: 9999px;

  /* Shadows — mềm như paper */
  --sh-sm: 0 1px 2px rgba(27, 67, 50, 0.04);
  --sh-md: 0 8px 24px rgba(27, 67, 50, 0.08);
  --sh-lg: 0 24px 48px -12px rgba(27, 67, 50, 0.15);

  /* Layout */
  --container: 1280px;
  --container-narrow: 960px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ============================================
   Reset & base
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-900);
  background: var(--cream);
  font-weight: 400;
  /* Subtle grain texture cho cảm giác paper */
  background-image:
    radial-gradient(circle at 20% 30%, rgba(46, 125, 50, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(200, 169, 106, 0.04) 0%, transparent 50%);
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green-900); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--green-900);
}
h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 400; }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 400; }
h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h4 { font-size: 1.25rem; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-600);
}

.lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ink-700);
  max-width: 60ch;
}

/* ============================================
   Layout primitives
   ============================================ */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-6); }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--sp-6); }

.section { padding: var(--sp-24) 0; }
.section-sm { padding: var(--sp-16) 0; }

.divider-leaf {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: var(--sp-8) 0;
}
.divider-leaf::before, .divider-leaf::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
}
.divider-leaf svg { color: var(--gold-600); width: 24px; height: 24px; }

/* ============================================
   Header / Navigation
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(46, 125, 50, 0.08);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) 0;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--green-900);
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 0.4em;
}
.logo .mark {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--gold-600);
  border-radius: 50%;
  transform: translateY(-2px);
}
.nav-links {
  display: flex;
  list-style: none;
  gap: var(--sp-8);
  align-items: center;
}
.nav-links a {
  color: var(--ink-700);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  padding: var(--sp-2) 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--gold-600);
  transition: all 0.3s var(--ease-out);
  transform: translateX(-50%);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--green-900); }

.nav-actions { display: flex; align-items: center; gap: var(--sp-4); }
.lang-switch {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: 0.8rem;
  color: var(--ink-500);
}
.lang-switch a {
  padding: var(--sp-1) var(--sp-2);
  color: var(--ink-500);
}
.lang-switch a.active {
  color: var(--green-900);
  font-weight: 600;
}

.cart-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  color: var(--green-900);
  position: relative;
}
.cart-count {
  background: var(--gold-600);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-toggle { display: none; }

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--cream);
    flex-direction: column;
    padding: var(--sp-8);
    gap: var(--sp-6);
    transform: translateX(100%);
    transition: transform 0.3s var(--ease-out);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: var(--sp-2);
  }
  .nav-toggle span {
    width: 22px;
    height: 1.5px;
    background: var(--green-900);
  }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-8);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--r-full);
  transition: all 0.25s var(--ease-out);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--green-900);
  color: var(--cream);
}
.btn-primary:hover {
  background: var(--green-700);
  color: var(--cream);
  transform: translateY(-1px);
  box-shadow: var(--sh-md);
}
.btn-outline {
  background: transparent;
  color: var(--green-900);
  border-color: var(--green-900);
}
.btn-outline:hover {
  background: var(--green-900);
  color: var(--cream);
}
.btn-gold {
  background: var(--gold-600);
  color: white;
}
.btn-gold:hover { background: #b89758; }
.btn-ghost {
  background: transparent;
  color: var(--ink-700);
}
.btn-ghost:hover { color: var(--green-900); }

.btn-lg { padding: var(--sp-4) var(--sp-12); font-size: 1rem; }
.btn-sm { padding: var(--sp-2) var(--sp-4); font-size: 0.8rem; }
.btn-block { width: 100%; }

/* ============================================
   Hero — magazine asymmetric
   ============================================ */
.hero {
  position: relative;
  padding: var(--sp-16) 0 var(--sp-24);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--sp-16);
  align-items: center;
}
.hero-content { position: relative; z-index: 2; }
.hero h1 {
  margin: var(--sp-4) 0 var(--sp-6);
}
.hero h1 em {
  font-style: italic;
  color: var(--gold-600);
  font-weight: 300;
}
.hero-cta {
  display: flex;
  gap: var(--sp-4);
  margin-top: var(--sp-8);
  flex-wrap: wrap;
}
.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--green-100) 0%, var(--gold-100) 100%);
  box-shadow: var(--sh-lg);
}
.hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.4), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(46, 125, 50, 0.15), transparent 60%);
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-badge {
  position: absolute;
  top: var(--sp-6);
  right: var(--sp-6);
  background: var(--cream);
  padding: var(--sp-4) var(--sp-6);
  border-radius: var(--r-full);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--green-900);
  box-shadow: var(--sh-md);
  z-index: 3;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--sp-12); }
}

/* ============================================
   Product cards
   ============================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-8);
}
.product-card {
  background: var(--paper);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: all 0.3s var(--ease-out);
  border: 1px solid var(--ink-100);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
  border-color: var(--gold-400);
}
.product-card-img {
  aspect-ratio: 1;
  background: var(--green-50);
  overflow: hidden;
  position: relative;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.product-card:hover .product-card-img img { transform: scale(1.06); }
.product-card-img.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--green-700);
  font-style: italic;
}
.product-card-body {
  padding: var(--sp-6);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.product-card-body .category {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-600);
  font-weight: 500;
}
.product-card-body h3 {
  font-size: 1.4rem;
  margin: var(--sp-1) 0;
}
.product-card-body .desc {
  font-size: 0.875rem;
  color: var(--ink-500);
  line-height: 1.55;
  flex: 1;
}
.product-card-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--ink-100);
}
.price-current {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--green-900);
  font-weight: 500;
}
.price-compare {
  font-size: 0.85rem;
  color: var(--ink-300);
  text-decoration: line-through;
}

/* ============================================
   Forms
   ============================================ */
.form-group { margin-bottom: var(--sp-5); }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-700);
  margin-bottom: var(--sp-2);
  letter-spacing: 0.02em;
}
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-sm);
  background: var(--paper);
  color: var(--ink-900);
  transition: all 0.2s;
  font-size: 0.95rem;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-error { color: var(--danger); font-size: 0.8rem; margin-top: var(--sp-1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--green-900);
  color: var(--cream);
  padding: var(--sp-16) 0 var(--sp-6);
  margin-top: var(--sp-24);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-12);
  margin-bottom: var(--sp-12);
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
}
.footer h4 {
  color: var(--gold-400);
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
  font-weight: 600;
}
.footer ul { list-style: none; }
.footer ul li { margin-bottom: var(--sp-2); }
.footer a {
  color: rgba(250, 247, 242, 0.7);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer a:hover { color: var(--gold-400); }
.footer-brand p {
  margin-top: var(--sp-3);
  color: rgba(250, 247, 242, 0.6);
  line-height: 1.6;
  max-width: 30ch;
}
.footer-bottom {
  border-top: 1px solid rgba(250, 247, 242, 0.1);
  padding-top: var(--sp-6);
  font-size: 0.8rem;
  color: rgba(250, 247, 242, 0.5);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

/* ============================================
   Utility
   ============================================ */
.text-center { text-align: center; }
.text-gold { color: var(--gold-600); }
.text-green { color: var(--green-700); }
.muted { color: var(--ink-500); }
.skeleton {
  background: linear-gradient(90deg, var(--ink-100) 25%, var(--ink-50) 50%, var(--ink-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Reveal on load */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out) forwards;
}
.fade-up.delay-1 { animation-delay: 0.1s; }
.fade-up.delay-2 { animation-delay: 0.2s; }
.fade-up.delay-3 { animation-delay: 0.3s; }
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Toast */
.toast {
  position: fixed;
  bottom: var(--sp-8);
  right: var(--sp-8);
  background: var(--green-900);
  color: var(--cream);
  padding: var(--sp-4) var(--sp-6);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  z-index: 1000;
  font-size: 0.9rem;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s var(--ease-out);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: var(--danger); }
