/* =============================================================
   Emperor Herbal Child — Main Design System
   Ported from airtang-style static prototype
   ============================================================= */

/* ─── Custom Properties ───────────────────────────────────── */
:root {
  --eh-black:      #0d0d0d;
  --eh-white:      #fafaf8;
  --eh-cream:      #f5f0e8;
  --eh-gold:       #c8a96e;
  --eh-gold-light: #e8d5aa;
  --eh-gray-100:   #f4f4f2;
  --eh-gray-200:   #e8e8e4;
  --eh-gray-400:   #9a9a94;
  --eh-gray-600:   #5a5a54;

  --eh-radius-sm:  8px;
  --eh-radius-md:  16px;
  --eh-radius-lg:  24px;
  --eh-radius-xl:  40px;

  --eh-shadow-sm:  0 2px 8px rgba(0,0,0,.06);
  --eh-shadow-md:  0 8px 24px rgba(0,0,0,.10);
  --eh-shadow-lg:  0 20px 60px rgba(0,0,0,.15);

  --eh-transition: .25s cubic-bezier(.4,0,.2,1);
}

/* ─── Base Overrides ─────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', var(--wp--preset--font-family--inter, system-ui, sans-serif);
  background-color: var(--eh-white);
  color: var(--eh-black);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Remove TT4 default margins that conflict with full-width sections */
.wp-site-blocks > * { margin-block-start: 0 !important; margin-block-end: 0 !important; }

/* ─── EH Buttons ─────────────────────────────────────────── */
.eh-btn,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--eh-radius-xl);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .01em;
  transition: var(--eh-transition);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

.eh-btn--primary,
.wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background: var(--eh-black);
  color: var(--eh-white) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
  border: none;
}
.eh-btn--primary:hover,
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  background: var(--eh-gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(200,169,110,.35);
}

.eh-btn--ghost,
.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  color: var(--eh-black) !important;
  border: 2px solid var(--eh-gray-200) !important;
  box-shadow: none;
}
.eh-btn--ghost:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  border-color: var(--eh-black) !important;
  background: var(--eh-black);
  color: var(--eh-white) !important;
}

.eh-btn--full { width: 100%; }

/* ─── Promotional Top Bar ────────────────────────────────── */
.eh-topbar {
  background: var(--eh-black);
  color: var(--eh-white);
  text-align: center;
  padding: 10px 48px 10px 16px;
  font-size: .82rem;
  letter-spacing: .04em;
  position: relative;
}
.eh-topbar__close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,.6);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color var(--eh-transition);
}
.eh-topbar__close:hover { color: var(--eh-white); }
.eh-topbar.hidden { display: none; }

/* ─── Header: Float Cart Trigger ────────────────────────── */
.eh-cart-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 150;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--eh-black);
  color: var(--eh-white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--eh-shadow-lg);
  transition: background var(--eh-transition), transform var(--eh-transition);
}
.eh-cart-trigger:hover { background: var(--eh-gold); transform: scale(1.08); }

.eh-cart-count {
  position: absolute;
  top: 2px; right: 2px;
  background: var(--eh-gold);
  color: var(--eh-white);
  font-size: .65rem;
  font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  display: none;
  align-items: center;
  justify-content: center;
}
.eh-cart-count.visible { display: flex; }

/* Also style WC cart link in navigation */
.wc-block-mini-cart__button,
a.cart-contents {
  position: relative;
}

/* ─── Side-Cart Drawer ───────────────────────────────────── */
.eh-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--eh-transition);
}
.eh-cart-overlay.is-open { opacity: 1; pointer-events: all; }

.eh-cart-drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(420px, 100vw);
  height: 100%;
  background: var(--eh-white);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--eh-shadow-lg);
}
.eh-cart-drawer.is-open { transform: translateX(0); }

.eh-cart-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--eh-gray-200);
  flex-shrink: 0;
}
.eh-cart-drawer__header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}
.eh-cart-drawer__close {
  background: none;
  border: none;
  cursor: pointer;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--eh-black);
  transition: background var(--eh-transition);
}
.eh-cart-drawer__close:hover { background: var(--eh-gray-100); }

.eh-cart-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}
.eh-cart-drawer__footer {
  padding: 20px 24px;
  border-top: 1px solid var(--eh-gray-200);
  flex-shrink: 0;
}
.eh-cart-drawer__note {
  text-align: center;
  font-size: .78rem;
  color: var(--eh-gray-400);
  margin-top: 12px;
  margin-bottom: 0;
}

/* ─── Section Utilities ──────────────────────────────────── */
.eh-section { padding: 96px 0; }
.eh-container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

.eh-section-tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--eh-gold);
  margin-bottom: 12px;
}
.eh-section-header {
  text-align: center;
  margin-bottom: 60px;
}
.eh-section-header h2 { margin-bottom: 16px; }

/* ─── Hero Pattern ───────────────────────────────────────── */
.eh-hero {
  position: relative;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--eh-cream);
}
.eh-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 80% 50%, rgba(200,169,110,.15) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 10% 80%, rgba(200,169,110,.08) 0%, transparent 50%);
  pointer-events: none;
}
.eh-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding-block: 80px;
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
  width: 100%;
}
.eh-hero__badge {
  display: inline-block;
  background: var(--eh-gold);
  color: var(--eh-white);
  padding: 6px 16px;
  border-radius: var(--eh-radius-xl);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.eh-hero__title { margin-bottom: 20px; }
.eh-hero__title em { font-style: normal; color: var(--eh-gold); }
.eh-hero__desc {
  font-size: 1.05rem;
  color: var(--eh-gray-600);
  margin-bottom: 36px;
  line-height: 1.7;
}
.eh-hero__cta {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.eh-hero__stats {
  display: flex;
  align-items: center;
  gap: 24px;
}
.eh-stat { display: flex; flex-direction: column; }
.eh-stat strong { font-size: 1.4rem; font-weight: 700; }
.eh-stat span { font-size: .82rem; color: var(--eh-gray-400); }
.eh-stat-divider { width: 1px; height: 36px; background: var(--eh-gray-200); }

/* Hero visual */
.eh-hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.eh-showcase {
  position: relative;
  width: 380px; height: 380px;
  display: flex; align-items: center; justify-content: center;
}
.eh-showcase__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(200,169,110,.4);
  animation: ehRotate 20s linear infinite;
}
.eh-showcase__ring--outer { width: 100%; height: 100%; }
.eh-showcase__ring--inner { width: 75%; height: 75%; animation-direction: reverse; animation-duration: 14s; }
.eh-showcase__orb {
  width: 200px; height: 200px;
  background: linear-gradient(135deg, var(--eh-gold-light), var(--eh-gold));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 20px 60px rgba(200,169,110,.4);
  animation: ehFloat 4s ease-in-out infinite;
  font-size: 3.5rem;
}
.eh-floating-pill {
  position: absolute;
  background: var(--eh-white);
  padding: 8px 16px;
  border-radius: var(--eh-radius-xl);
  font-size: .8rem;
  font-weight: 600;
  box-shadow: var(--eh-shadow-md);
  white-space: nowrap;
  animation: ehFloat 3s ease-in-out infinite;
}
.eh-floating-pill--1 { top: 18%; left: -8%; }
.eh-floating-pill--2 { top: 48%; right: -8%; animation-delay: .7s; }
.eh-floating-pill--3 { bottom: 18%; left: -2%; animation-delay: 1.4s; }

@keyframes ehRotate { to { transform: rotate(360deg); } }
@keyframes ehFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ─── Trust Strip ────────────────────────────────────────── */
.eh-trust-strip {
  background: var(--eh-black);
  color: var(--eh-white);
  padding: 32px 0;
}
.eh-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}
.eh-trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .9rem;
  font-weight: 500;
}
.eh-trust-item svg { color: var(--eh-gold); flex-shrink: 0; }

/* ─── Feature Cards ──────────────────────────────────────── */
.eh-features { background: var(--eh-white); }
.eh-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.eh-feature-card {
  background: var(--eh-gray-100);
  border-radius: var(--eh-radius-lg);
  padding: 36px 28px;
  transition: transform var(--eh-transition), box-shadow var(--eh-transition);
}
.eh-feature-card:hover { transform: translateY(-6px); box-shadow: var(--eh-shadow-md); }
.eh-feature-card--dark { background: var(--eh-black); color: var(--eh-white); }
.eh-feature-card__icon { font-size: 2rem; margin-bottom: 16px; display: block; color: var(--eh-gold); }
.eh-feature-card h3 { margin-bottom: 10px; }
.eh-feature-card p { font-size: .9rem; line-height: 1.7; color: var(--eh-gray-600); margin: 0; }
.eh-feature-card--dark p { color: rgba(255,255,255,.65); }

/* ─── Bundle Cards ───────────────────────────────────────── */
.eh-bundles { background: var(--eh-white); }
.eh-bundles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: start;
}
.eh-bundle-card {
  border: 2px solid var(--eh-gray-200);
  border-radius: var(--eh-radius-lg);
  padding: 36px 28px;
  position: relative;
  transition: border-color var(--eh-transition), transform var(--eh-transition), box-shadow var(--eh-transition);
}
.eh-bundle-card:hover {
  border-color: var(--eh-gold);
  transform: translateY(-6px);
  box-shadow: var(--eh-shadow-md);
}
.eh-bundle-card--featured {
  border-color: var(--eh-gold);
  background: var(--eh-black);
  color: var(--eh-white);
}
.eh-bundle-card--featured:hover { box-shadow: 0 20px 60px rgba(200,169,110,.3); }

.eh-bundle-badge {
  display: inline-block;
  background: var(--eh-gold-light);
  color: var(--eh-black);
  font-size: .72rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--eh-radius-xl);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.eh-bundle-badge--gold { background: var(--eh-gold); color: var(--eh-white); }
.eh-bundle-card h3 { margin-bottom: 8px; }
.eh-bundle-desc { font-size: .88rem; color: var(--eh-gray-400); margin-bottom: 20px; }
.eh-bundle-card--featured .eh-bundle-desc { color: rgba(255,255,255,.6); }
.eh-bundle-items { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.eh-bundle-items li { font-size: .88rem; color: var(--eh-gray-600); }
.eh-bundle-card--featured .eh-bundle-items li { color: rgba(255,255,255,.75); }

.eh-bundle-price { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.eh-price-old { font-size: .9rem; color: var(--eh-gray-400); text-decoration: line-through; }
.eh-price-new { font-size: 1.6rem; font-weight: 700; }
.eh-bundle-card--featured .eh-price-old { color: rgba(255,255,255,.4); }
.eh-price-save {
  background: rgba(200,169,110,.15);
  color: var(--eh-gold);
  font-size: .78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--eh-radius-xl);
}
.eh-bundle-card--featured .eh-price-save { background: rgba(200,169,110,.25); }

/* ─── Variants Showcase ──────────────────────────────────── */
.eh-variants { background: var(--eh-black); color: var(--eh-white); padding: 80px 0; }
.eh-variants-track {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 40px;
}
.eh-variant-pill {
  padding: 12px 24px;
  border-radius: var(--eh-radius-xl);
  font-size: .88rem;
  font-weight: 600;
  background: var(--pill-color, var(--eh-gold-light));
  color: var(--eh-black);
  cursor: pointer;
  transition: transform var(--eh-transition), box-shadow var(--eh-transition);
}
.eh-variant-pill:hover { transform: translateY(-4px) scale(1.04); box-shadow: 0 10px 24px rgba(0,0,0,.3); }

/* ─── Review Cards ───────────────────────────────────────── */
.eh-reviews { background: var(--eh-cream); }
.eh-reviews-summary {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
}
.eh-rating-big { font-size: 3.5rem; font-weight: 800; line-height: 1; }
.eh-stars-big { font-size: 1.4rem; color: var(--eh-gold); margin-bottom: 4px; }
.eh-reviews-summary p { font-size: .9rem; color: var(--eh-gray-400); margin: 0; }
.eh-reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.eh-review-card {
  background: var(--eh-white);
  border-radius: var(--eh-radius-lg);
  padding: 28px;
  box-shadow: var(--eh-shadow-sm);
  transition: transform var(--eh-transition), box-shadow var(--eh-transition);
}
.eh-review-card:hover { transform: translateY(-4px); box-shadow: var(--eh-shadow-md); }
.eh-review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.eh-review-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--eh-white);
  flex-shrink: 0;
}
.eh-review-avatar-bg1 { background: #c8a96e; }
.eh-review-avatar-bg2 { background: #7986cb; }
.eh-review-avatar-bg3 { background: #4db6ac; }
.eh-review-avatar-bg4 { background: #f06292; }
.eh-review-avatar-bg5 { background: #aed581; }
.eh-review-avatar-bg6 { background: #ff8a65; }
.eh-review-meta strong { display: block; font-size: .95rem; }
.eh-review-meta span { font-size: .8rem; color: var(--eh-gray-400); }
.eh-review-stars { color: var(--eh-gold); font-size: .9rem; margin-bottom: 10px; }
.eh-review-text { font-size: .88rem; line-height: 1.7; color: var(--eh-gray-600); margin: 0; }

/* ─── FAQ ────────────────────────────────────────────────── */
.eh-faq { background: var(--eh-white); }
.eh-faq-list { max-width: 720px; margin-inline: auto; display: flex; flex-direction: column; gap: 12px; }
.eh-faq-item {
  border: 1px solid var(--eh-gray-200);
  border-radius: var(--eh-radius-md);
  overflow: hidden;
  transition: border-color var(--eh-transition);
}
.eh-faq-item.is-open { border-color: var(--eh-gold); }
.eh-faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  font-size: .95rem;
  font-weight: 600;
  text-align: left;
  background: none;
  color: var(--eh-black);
  border: none;
  cursor: pointer;
  transition: background var(--eh-transition);
  gap: 16px;
}
.eh-faq-question:hover,
.eh-faq-item.is-open .eh-faq-question { background: var(--eh-gray-100); }
.eh-faq-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--eh-gray-200);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: .9rem;
  transition: background var(--eh-transition), border-color var(--eh-transition), transform var(--eh-transition);
}
.eh-faq-item.is-open .eh-faq-icon { background: var(--eh-gold); border-color: var(--eh-gold); color: var(--eh-white); transform: rotate(45deg); }
.eh-faq-answer { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.eh-faq-item.is-open .eh-faq-answer { max-height: 300px; }
.eh-faq-answer-inner { padding: 0 24px 20px; font-size: .9rem; line-height: 1.75; color: var(--eh-gray-600); }

/* ─── Newsletter ─────────────────────────────────────────── */
.eh-newsletter {
  background: var(--eh-black);
  color: var(--eh-white);
  padding: 80px 0;
}
.eh-newsletter__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}
.eh-newsletter__title { margin-bottom: 12px; }
.eh-newsletter__desc { color: rgba(255,255,255,.6); font-size: .95rem; margin: 0; }
.eh-newsletter__form { display: flex; gap: 12px; }
.eh-newsletter__input {
  flex: 1;
  padding: 14px 20px;
  border-radius: var(--eh-radius-xl);
  border: 1.5px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08);
  color: var(--eh-white);
  font-size: .9rem;
  font-family: inherit;
  transition: border-color var(--eh-transition);
  outline: none;
}
.eh-newsletter__input::placeholder { color: rgba(255,255,255,.35); }
.eh-newsletter__input:focus { border-color: var(--eh-gold); }

/* ─── Fade-In Animation ──────────────────────────────────── */
.eh-fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.eh-fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── TT4 Alignment Fixes ────────────────────────────────── */
.wp-block-group.alignfull,
.wp-block-cover.alignfull {
  width: 100%;
  max-width: none;
}
.wp-block-group.alignwide,
.wp-block-cover.alignwide {
  max-width: var(--wp--style--global--wide-size, 1200px);
}

/* Remove default TT4 padding from full-width groups */
.wp-block-group.alignfull > .wp-block-group__inner-container {
  max-width: var(--wp--style--global--wide-size, 1200px);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .eh-features-grid { grid-template-columns: repeat(2, 1fr); }
  .eh-reviews-grid  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .eh-section { padding: 64px 0; }
  .eh-trust-grid { grid-template-columns: repeat(2, 1fr); }
  .eh-hero__inner { grid-template-columns: 1fr; }
  .eh-hero__visual { display: none; }
  .eh-hero__cta { flex-wrap: wrap; }
  .eh-features-grid { grid-template-columns: 1fr; }
  .eh-bundles-grid { grid-template-columns: 1fr; }
  .eh-reviews-grid { grid-template-columns: 1fr; }
  .eh-newsletter__inner { grid-template-columns: 1fr; gap: 32px; }
  .eh-newsletter__form { flex-direction: column; }
}

@media (max-width: 480px) {
  .eh-trust-grid { grid-template-columns: 1fr; }
}
