/* ============ Premium Ecommerce – Design Tokens ============
 * Fresh + premium: families, corporate, high-end gift.
 * Primary: mature fresh green. Trust: header/footer/hover. Gold: badges & CTAs only.
 */
:root {
  --color-primary: #4dcf6e;
  --color-trust: #1e7233;
  --color-accent-gold: #C9A227;
  --color-surface: #ffffff;
  --color-bg-page: #F7FAF8;
  --color-text: #1f2937;
  --color-text-muted: #6b7280;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 20px 50px rgba(0, 0, 0, 0.12);
  --radius-card: 1rem;
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ Base ============ */
* {
  font-family: 'Quicksand', sans-serif;
}

body {
  box-sizing: border-box;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

/* ============ Typography ============ */
.font-display {
  font-family: 'Playfair Display', serif;
  letter-spacing: 0.02em;
}

.text-balance {
  text-wrap: balance;
}

/* ============ Layout & Background ============ */
.gradient-bg {
  background: var(--color-trust);
}
.gradient-bg:hover {
  background: #165a3a;
}

/* Hero – subtle fresh gradient (#2E9E66 → #6EDC9F), natural & juicy */
.hero-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #2E9E66 0%, #3DB374 35%, #5DCF8E 70%, #6EDC9F 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 40px rgba(46, 158, 102, 0.2);
}
.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 70% 50% at 25% 75%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 80% 25%, rgba(255, 255, 255, 0.06) 0%, transparent 45%);
  pointer-events: none;
}
.pattern-bg {
  background-color: var(--color-bg-page);
}

/* ============ Hero / Campaign CTA – champagne gold (restrained premium) ============ */
.btn-cta-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--color-accent-gold) 0%, #b8921f 100%);
  box-shadow: 0 4px 16px rgba(201, 162, 39, 0.35);
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), background var(--transition-smooth);
}

.btn-cta-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(201, 162, 39, 0.45);
  background: linear-gradient(135deg, #d4ad2a 0%, var(--color-accent-gold) 100%);
}

/* ============ Product card – premium hover ============ */
.card-hover {
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(46, 158, 102, 0.15);
}

.card-hover .card-img-wrap {
  overflow: hidden;
}

.card-hover .card-img-wrap img {
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover .card-img-wrap img {
  transform: scale(1.08);
}

.card-hover .btn-add {
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

.card-hover .btn-buy-now {
  transition: background var(--transition-smooth), transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.card-hover:hover .btn-buy-now {
  background: var(--color-trust) !important;
  box-shadow: 0 4px 16px rgba(30, 107, 69, 0.35);
}

/* Price strikethrough when sale */
.price-original {
  text-decoration: line-through;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.price-current {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1.125rem;
}

.price-sale {
  color: var(--color-trust);
  font-weight: 700;
}

/* ============ Category buttons – trust green when active ============ */
.category-btn.active,
.category-btn.active:hover {
  background: var(--color-trust) !important;
  color: #fff;
}

/* ============ Badges & highlights – champagne gold only ============ */
.badge-premium,
#cart-badge {
  background-color: var(--color-accent-gold) !important;
}
.toast-bg {
  background: var(--color-trust) !important;
}
.btn-primary {
  background-color: var(--color-trust) !important;
  transition: background-color var(--transition-smooth), box-shadow var(--transition-smooth);
}
.btn-primary:hover {
  background-color: #165a3a !important;
  box-shadow: 0 4px 14px rgba(30, 107, 69, 0.35);
}
.link-primary {
  color: var(--color-primary);
}
.link-primary:hover {
  color: var(--color-trust);
}

/* Nút phụ (Trang chủ, Quay lại) – style nhẹ, không tranh CTA */
.btn-secondary,
.link-back {
  color: var(--color-text-muted);
  font-weight: 500;
  transition: color var(--transition-smooth);
}
.btn-secondary:hover,
.link-back:hover {
  color: var(--color-trust);
}

/* ============ Loading overlay & spinner ============ */
#page-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
#page-loading.is-active {
  opacity: 1;
  visibility: visible;
}
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--color-bg-page);
  border-top-color: var(--color-trust);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============ Animations ============ */
.fade-in {
  animation: fadeIn 0.5s ease-out;
}

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

.slide-in {
  animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.pulse-badge {
  animation: pulse 2s infinite;
}

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

.toast {
  animation: toastIn 0.3s ease-out;
}

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

/* ============ Testimonials / Social proof ============ */
.review-card {
  transition: box-shadow var(--transition-smooth);
}

.review-card:hover {
  box-shadow: var(--shadow-card-hover);
}
