/* ============================================
   ADVANCED HEALING — Reusable Components
   Buttons · Cards · Navigation · Cart · Modals
   ============================================ */

/* ===========================================
   BUTTONS
   =========================================== */

/* --- Base Button --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-full);
  font-weight: var(--weight-medium);
  font-size: var(--text-base);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-smooth);
  border: none;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  letter-spacing: var(--tracking-wide);
  line-height: 1;
}

/* Hover shimmer pseudo-element */
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 70%
  );
  transition: left 0.5s var(--ease-smooth);
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  text-decoration: none;
}

/* --- Primary Button (Gold CTA) --- */
.btn-primary {
  background: var(--gradient-cta);
  color: #ffffff;
  font-weight: var(--weight-semibold);
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow-gold);
  transform: translateY(-2px);
}

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

/* --- Secondary Button (Outlined) --- */
.btn-secondary {
  background: transparent;
  border: var(--border-accent);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(201, 168, 76, 0.08);
  border-color: var(--gold);
}

/* --- Emerald Button --- */
.btn-emerald {
  background: var(--emerald);
  color: #ffffff;
  font-weight: var(--weight-semibold);
}

.btn-emerald:hover {
  box-shadow: var(--shadow-glow-emerald);
  transform: translateY(-2px);
}

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

/* --- Large Button --- */
.btn-lg {
  padding: var(--space-4) var(--space-10);
  font-size: var(--text-lg);
}

/* --- Icon Button (Square) --- */
.btn-icon {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}


/* ===========================================
   PRODUCT CARDS
   =========================================== */
.product-card {
  background: #ffffff;
  border: 1px solid #e8e0d8;
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform var(--duration-base) var(--ease-smooth),
              box-shadow var(--duration-base) var(--ease-smooth),
              border-color var(--duration-base) var(--ease-smooth),
              background var(--duration-base) var(--ease-smooth);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(201, 168, 76, 0.35);
  background: #ffffff;
}

/* Image container */
.product-card__image {
  aspect-ratio: 1;
  overflow: hidden;
  background: #f3ede4;
  position: relative;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.6s var(--ease-smooth);
}

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

/* Card body */
.product-card__body {
  padding: var(--space-6);
}

/* Category label */
.product-card__category {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--emerald);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
  display: block;
}

/* Title */
.product-card__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

/* Price */
.product-card__price {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--gold);
  margin-bottom: var(--space-2);
}

/* Description */
.product-card__description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

/* Actions row */
.product-card__actions {
  display: flex;
  gap: var(--space-3);
}


/* ===========================================
   GLASS CARD
   =========================================== */
.glass-card {
  background: #ffffff;
  border: 1px solid #e8e0d8;
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: transform var(--duration-base) var(--ease-smooth),
              border-color var(--duration-base) var(--ease-smooth),
              box-shadow var(--duration-base) var(--ease-smooth);
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 168, 76, 0.25);
  box-shadow: var(--shadow-md);
}


/* ===========================================
   BADGES
   =========================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  line-height: 1;
}

.badge-gold {
  background: var(--gold);
  color: #ffffff;
}

.badge-emerald {
  background: var(--emerald);
  color: #ffffff;
}

.badge-outline {
  background: transparent;
  border: var(--border-accent);
  color: var(--gold);
}


/* ===========================================
   NAVIGATION
   =========================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-sticky);
  padding: var(--space-4) 0;
  transition: background var(--duration-base) var(--ease-smooth),
              border-color var(--duration-base) var(--ease-smooth),
              box-shadow var(--duration-base) var(--ease-smooth);
}

/* Scrolled state — white with subtle shadow */
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid #e8e0d8;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
}

/* Inner container */
.navbar__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.navbar__logo img {
  height: 50px;
  width: auto;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), filter 0.4s ease;
}

.navbar__logo:hover img {
  transform: scale(1.08);
  filter: drop-shadow(0 0 15px rgba(201, 168, 76, 0.3));
  animation: logoPulse 1.5s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1.08); }
  50% { transform: scale(1.12); }
}

.navbar__logo {
  text-decoration: none;
}

/* Nav links */
.navbar__links {
  display: flex;
  gap: var(--space-8);
  list-style: none;
  align-items: center;
}

.navbar__links a {
  color: var(--text-secondary);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-smooth);
  font-size: var(--text-sm);
  position: relative;
}

.navbar__links a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.navbar__links a.active {
  color: var(--gold);
}

/* Active indicator underline */
.navbar__links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-gold);
  border-radius: var(--radius-full);
}

/* Cart button */
.navbar__cart {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: transparent;
  border: var(--border-subtle);
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--duration-base) var(--ease-smooth),
              border-color var(--duration-base) var(--ease-smooth);
}

.navbar__cart:hover {
  background: rgba(201, 168, 76, 0.08);
  border-color: var(--gold);
}

/* Cart count badge */
.navbar__cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--gold);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: var(--weight-bold);
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Mobile hamburger toggle — hidden on desktop */
.navbar__mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: transparent;
  border: var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--duration-base) var(--ease-smooth);
}

.navbar__mobile-toggle:hover {
  background: rgba(201, 168, 76, 0.08);
}


/* ===========================================
   CART SIDEBAR
   =========================================== */

/* Overlay */
.cart-sidebar__overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  z-index: calc(var(--z-modal) - 1);
  transition: opacity var(--duration-base) var(--ease-smooth);
}

.cart-sidebar__overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Sidebar panel */
.cart-sidebar {
  position: fixed;
  right: 0;
  top: 0;
  height: 100vh;
  height: 100dvh;
  width: 420px;
  max-width: 90vw;
  z-index: var(--z-modal);
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: var(--glass-blur-strong);
  backdrop-filter: var(--glass-blur-strong);
  border-left: 1px solid #e8e0d8;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease-smooth);
  will-change: transform;
}

.cart-sidebar.open {
  transform: translateX(0);
}

/* Header */
.cart-sidebar__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-6);
  border-bottom: var(--border-subtle);
  flex-shrink: 0;
}

.cart-sidebar__header h3 {
  font-size: var(--text-xl);
}

.cart-sidebar__close {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: var(--border-subtle);
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--duration-base) var(--ease-smooth);
}

.cart-sidebar__close:hover {
  background: rgba(201, 168, 76, 0.08);
}

/* Items list */
.cart-sidebar__items {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6);
}

/* Individual cart item */
.cart-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: var(--border-subtle);
  align-items: flex-start;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item__image {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: #f3ede4;
}

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

.cart-item__details {
  flex: 1;
  min-width: 0;
}

.cart-item__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item__price {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--gold);
  margin-bottom: var(--space-2);
}

/* Quantity controls */
.cart-item__quantity {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.cart-item__qty-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: var(--border-subtle);
  color: var(--text-primary);
  cursor: pointer;
  font-size: var(--text-sm);
  transition: background var(--duration-fast) var(--ease-smooth),
              border-color var(--duration-fast) var(--ease-smooth);
}

.cart-item__qty-btn:hover {
  background: rgba(201, 168, 76, 0.1);
  border-color: var(--gold);
}

.cart-item__qty-value {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  min-width: 24px;
  text-align: center;
}

/* Remove button */
.cart-item__remove {
  color: var(--text-tertiary);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-smooth);
  background: none;
  border: none;
  font-size: var(--text-sm);
  padding: var(--space-1);
}

.cart-item__remove:hover {
  color: #ef4444;
}

/* Footer */
.cart-sidebar__footer {
  padding: var(--space-6);
  border-top: var(--border-subtle);
  flex-shrink: 0;
}

.cart-sidebar__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.cart-sidebar__total-label {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
}

.cart-sidebar__total-price {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--gold);
}

/* Empty cart state */
.cart-sidebar__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) var(--space-6);
  text-align: center;
  color: var(--text-tertiary);
}

.cart-sidebar__empty-icon {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-4);
  opacity: 0.3;
}

.cart-sidebar__empty-text {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}


/* ===========================================
   MODAL
   =========================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-smooth);
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

/* Modal backdrop */
.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
}

/* Modal content */
.modal__content {
  position: relative;
  background: #ffffff;
  border: 1px solid #e8e0d8;
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  opacity: 0;
  transition: transform var(--duration-base) var(--ease-spring),
              opacity var(--duration-base) var(--ease-smooth);
}
[data-theme="dark"] .modal__content {
  background: #1a1726;
  border-color: rgba(255,255,255,0.08);
}

.modal.open .modal__content {
  transform: scale(1);
  opacity: 1;
}

.modal__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: var(--border-subtle);
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--duration-base) var(--ease-smooth);
}

.modal__close:hover {
  background: rgba(201, 168, 76, 0.08);
}


/* ===========================================
   SECTION HEADER
   =========================================== */
.section-header {
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-16);
}

.section-header__label {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--emerald);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-4);
  display: block;
}

.section-header__title {
  font-size: var(--text-4xl);
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  line-height: var(--leading-tight);
}

.section-header__subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}


/* ===========================================
   NUTRIENT COUNTER
   =========================================== */
.nutrient-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
}

.nutrient-counter__number {
  font-size: var(--text-5xl);
  font-weight: var(--weight-extrabold);
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  line-height: 1;
}

.nutrient-counter__label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}


/* ===========================================
   TESTIMONIAL CARD
   =========================================== */
.testimonial-card {
  background: #ffffff;
  border: 1px solid #e8e0d8;
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  position: relative;
  transition: transform var(--duration-base) var(--ease-smooth),
              border-color var(--duration-base) var(--ease-smooth);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 168, 76, 0.25);
}

/* Decorative opening quote */
.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: var(--space-4);
  left: var(--space-6);
  font-size: var(--text-6xl);
  color: var(--gold);
  opacity: 0.2;
  font-family: Georgia, serif;
  line-height: 1;
  pointer-events: none;
}

/* Quote text */
.testimonial-card__text {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  font-style: italic;
  margin-bottom: var(--space-6);
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

/* Author section */
.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.testimonial-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid rgba(201, 168, 76, 0.25);
}

.testimonial-card__name {
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  font-size: var(--text-base);
}

.testimonial-card__title {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}


/* ===========================================
   STAR RATING
   =========================================== */
.star-rating {
  display: flex;
  gap: var(--space-1);
  color: var(--gold);
}

.star-rating svg,
.star-rating i {
  width: 18px;
  height: 18px;
}


/* ===========================================
   PHONE CTA
   =========================================== */
.phone-cta {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.phone-cta__icon {
  font-size: var(--text-3xl);
  color: var(--gold);
  margin-bottom: var(--space-2);
}

.phone-cta__number {
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-decoration: none;
  transition: filter var(--duration-base) var(--ease-smooth);
  display: inline-block;
}

.phone-cta__number:hover {
  filter: brightness(1.2);
  text-decoration: none;
}

.phone-cta__label {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wide);
}
