/* ============================================
   EMERALD DESIGN SYSTEM 2.0
   โทนสีเขียวมรกต — Mobile First
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Noto+Sans+Thai:wght@400;500;600;700;800;900&display=swap');

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root,
.theme-emerald {
  /* Primary Palette */
  --em-primary: #00875A;
  --em-primary-dark: #006644;
  --em-primary-light: #36B37E;
  --em-primary-lighter: #e3fcef;
  --em-primary-bg: rgba(0, 135, 90, 0.06);

  /* Secondary */
  --em-secondary: #00CBA1;
  --em-secondary-light: #79f2c0;
  --em-secondary-bg: rgba(0, 203, 161, 0.08);

  /* Tertiary */
  --em-tertiary: #00ECFE;
  --em-tertiary-light: #b3f5ff;

  /* Neutral */
  --em-neutral: #F8F9FA;
  --em-white: #FFFFFF;
  --em-gray-50: #F8F9FA;
  --em-gray-100: #F1F3F5;
  --em-gray-200: #E9ECEF;
  --em-gray-300: #DEE2E6;
  --em-gray-400: #ADB5BD;
  --em-gray-500: #868E96;
  --em-gray-600: #495057;
  --em-gray-700: #343A40;
  --em-gray-800: #212529;
  --em-gray-900: #0F1419;

  /* Semantic */
  --em-success: #00875A;
  --em-warning: #FF8B00;
  --em-danger: #DE350B;
  --em-info: #0065FF;

  /* Shadows */
  --em-shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --em-shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --em-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --em-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --em-shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);

  /* Radius */
  --em-radius-sm: 0.5rem;
  --em-radius: 0.75rem;
  --em-radius-lg: 1rem;
  --em-radius-xl: 1.25rem;
  --em-radius-full: 9999px;

  /* Override old theme variables */
  --bg-deep: var(--em-neutral);
  --bg-dark: var(--em-gray-100);
  --bg-card: var(--em-white);
  --bg-elevated: var(--em-white);
  --bg-glass: rgba(255,255,255,0.96);
  --accent-cyan: var(--em-primary);
  --accent-cyan-dim: var(--em-primary-bg);
  --header-bg: var(--em-white);
  --header-bg-glass: rgba(255,255,255,0.97);
  --price-color: var(--em-primary);
  --text-primary: var(--em-gray-800);
  --text-secondary: var(--em-gray-600);
  --text-muted: var(--em-gray-500);
}

/* ============================================
   BASE BODY
   ============================================ */
body.theme-emerald {
  font-family: 'Inter', 'Noto Sans Thai', system-ui, -apple-system, sans-serif;
  background: var(--em-neutral);
  color: var(--em-gray-800);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   HEADER — White, Clean
   ============================================ */
.theme-emerald .header {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--em-gray-200);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.theme-emerald .header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.625rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.theme-emerald .logo {
  color: var(--em-gray-800);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.theme-emerald .logo:hover {
  color: var(--em-primary);
}

.theme-emerald .logo-icon {
  background: var(--em-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,135,90,0.25);
  border-radius: 0.5rem;
  font-size: 1rem;
}

/* Nav Links */
.theme-emerald .nav-link {
  color: var(--em-gray-600);
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--em-radius-full);
  transition: all 0.2s;
}

.theme-emerald .nav-link:hover {
  color: var(--em-primary);
  background: var(--em-primary-lighter);
}

.theme-emerald .nav-link.active {
  color: var(--em-primary);
  background: var(--em-primary-lighter);
  font-weight: 600;
}

/* Promo link (was orange, now emerald) */
.theme-emerald .nav-link[style*="color:#ff6b00"],
.theme-emerald .nav-link[href*="promotions"] {
  color: var(--em-primary) !important;
  font-weight: 600;
}

/* Cart link in header */
.theme-emerald .header .nav-links a.cart-link {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem !important;
  margin: 0 0.25rem;
  background: var(--em-primary-lighter) !important;
  border: 1px solid rgba(0,135,90,0.25) !important;
  border-radius: var(--em-radius-full);
  color: var(--em-primary) !important;
  font-weight: 700;
  font-size: 0.9375rem;
  box-shadow: none;
}

.theme-emerald .header .nav-links a.cart-link:hover {
  background: rgba(0,135,90,0.12) !important;
  border-color: var(--em-primary) !important;
  color: var(--em-primary-dark) !important;
}

.theme-emerald .header .cart-badge {
  display: inline-flex !important;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  background: var(--em-primary) !important;
  color: #fff !important;
  border: none;
  border-radius: var(--em-radius-full);
  box-shadow: 0 2px 6px rgba(0,135,90,0.3);
}

.theme-emerald .header .cart-badge.cart-badge-empty {
  opacity: 0.5;
  background: var(--em-gray-300) !important;
  color: var(--em-gray-500) !important;
  box-shadow: none;
}

/* Profile trigger */
.theme-emerald .profile-trigger {
  background: var(--em-white);
  border-color: var(--em-gray-200);
  color: var(--em-gray-700);
}

.theme-emerald .profile-trigger:hover {
  border-color: var(--em-primary);
  box-shadow: 0 2px 8px rgba(0,135,90,0.1);
}

.theme-emerald .profile-name {
  color: var(--em-gray-700);
}

.theme-emerald .profile-chevron {
  color: var(--em-gray-400);
}

.theme-emerald .profile-menu {
  background: var(--em-white);
  border-color: var(--em-gray-200);
  box-shadow: var(--em-shadow-xl);
}

.theme-emerald .profile-menu-item:hover {
  background: var(--em-primary-lighter);
  color: var(--em-primary-dark);
}

/* ============================================
   BUTTONS
   ============================================ */
.theme-emerald .btn-primary {
  background: var(--em-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,135,90,0.25);
  font-weight: 700;
  border: none;
  border-radius: var(--em-radius-full);
}

.theme-emerald .btn-primary:hover {
  background: var(--em-primary-dark);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,135,90,0.35);
  transform: translateY(-1px);
}

.theme-emerald .btn-secondary {
  background: var(--em-white);
  color: var(--em-primary);
  border: 1.5px solid rgba(0,135,90,0.3);
}

.theme-emerald .btn-secondary:hover {
  background: var(--em-primary-lighter);
  border-color: var(--em-primary);
}

/* ============================================
   HERO SECTION — Green gradient with curve
   ============================================ */
.theme-emerald .hero-emerald {
  position: relative;
  background: linear-gradient(135deg, var(--em-primary) 0%, var(--em-primary-dark) 50%, #004d33 100%);
  padding: 2rem 1.5rem 3.5rem;
  color: #fff;
  overflow: hidden;
}

.theme-emerald .hero-emerald::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--em-neutral);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.hero-emerald-inner {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-emerald-welcome {
  font-size: 0.875rem;
  opacity: 0.8;
  margin-bottom: 0.25rem;
}

.hero-emerald-title {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.15;
  margin: 0 0 1.5rem;
  letter-spacing: -0.03em;
}

.hero-emerald-card {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--em-radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.hero-emerald-card-body {
  flex: 1;
}

.hero-emerald-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--em-radius-full);
  color: #fff;
  margin-bottom: 0.5rem;
}

.hero-emerald-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: #fff;
}

.hero-emerald-card p {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.7);
  margin: 0 0 0.75rem;
}

.hero-emerald-card .btn {
  background: var(--em-white);
  color: var(--em-primary);
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--em-radius-full);
  box-shadow: var(--em-shadow-sm);
}

.hero-emerald-card .btn:hover {
  background: var(--em-gray-100);
  transform: translateY(-1px);
}

.hero-emerald-card-img {
  width: 100px;
  height: 100px;
  border-radius: var(--em-radius);
  overflow: hidden;
  flex-shrink: 0;
}

.hero-emerald-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Desktop hero */
@media (min-width: 769px) {
  .theme-emerald .hero-emerald {
    padding: 3rem 2rem 4rem;
    border-radius: 0 0 2rem 2rem;
  }

  .hero-emerald-title {
    font-size: 2.75rem;
  }

  .hero-emerald-card {
    max-width: 500px;
    padding: 1.5rem;
  }

  .hero-emerald-card-img {
    width: 140px;
    height: 140px;
  }
}

/* ============================================
   SECTION TITLES — Emerald override
   ============================================ */
.theme-emerald .section-title-3d {
  color: var(--em-gray-800);
  font-weight: 800;
}

.theme-emerald .section-title-3d .highlight {
  color: var(--em-primary);
  -webkit-text-fill-color: var(--em-primary);
}

.theme-emerald .section-desc-3d {
  color: var(--em-gray-500);
}

/* ============================================
   PRODUCT CARDS — Emerald theme
   ============================================ */
.theme-emerald .product-card-3d {
  background: var(--em-white);
  border: 1px solid var(--em-gray-200);
  border-radius: var(--em-radius-lg);
  box-shadow: var(--em-shadow-xs);
}

.theme-emerald .product-card-3d:hover {
  border-color: rgba(0,135,90,0.2);
  box-shadow: var(--em-shadow-lg);
  transform: translateY(-4px);
}

.theme-emerald .product-card-3d .product-card-image {
  background: var(--em-gray-50);
  border-bottom: 1px solid var(--em-gray-200);
}

.theme-emerald .product-card-3d .product-card-body .brand {
  color: var(--em-primary);
}

.theme-emerald .product-card-3d .product-card-body .price {
  color: var(--em-primary);
  font-weight: 800;
}

/* Add to cart button — emerald */
.theme-emerald .product-card-cart-btn {
  background: var(--em-primary) !important;
  color: #fff;
  box-shadow: 0 3px 10px rgba(0,135,90,0.3);
}

.theme-emerald .product-card-cart-btn:hover {
  background: var(--em-primary-dark) !important;
  box-shadow: 0 5px 16px rgba(0,135,90,0.4);
}

.theme-emerald .product-card-cart-btn.added {
  background: var(--em-secondary) !important;
  box-shadow: 0 3px 10px rgba(0,203,161,0.3);
}

/* ============================================
   PROMO CARDS — Emerald override
   ============================================ */
.theme-emerald .promo-card {
  background: var(--em-white);
  border-color: var(--em-gray-200);
  box-shadow: var(--em-shadow-xs);
}

.theme-emerald .promo-card:hover {
  border-color: rgba(0,135,90,0.2);
  box-shadow: var(--em-shadow-lg);
}

.theme-emerald .promo-countdown {
  background: var(--em-gray-800);
  border-bottom: 2px solid var(--em-primary);
}

.theme-emerald .promo-cd-num {
  color: var(--em-primary-light);
}

.theme-emerald .promo-card-title:hover {
  color: var(--em-primary);
}

.theme-emerald .promo-price-current {
  color: var(--em-primary);
}

/* ============================================
   CATEGORY CARDS — Emerald
   ============================================ */
.theme-emerald .cat-card-3d {
  background: var(--em-white);
  border-color: var(--em-gray-200);
  box-shadow: var(--em-shadow-xs);
}

.theme-emerald .cat-card-3d:hover {
  border-color: rgba(0,135,90,0.3);
  box-shadow: var(--em-shadow-md);
}

.theme-emerald .cat-card-3d::before {
  background: linear-gradient(135deg, rgba(0,135,90,0.04) 0%, transparent 60%);
}

.theme-emerald .cat-card-3d .cat-icon {
  background: linear-gradient(135deg, var(--em-primary), var(--em-secondary));
  box-shadow: 0 3px 10px rgba(0,135,90,0.2);
}

/* ============================================
   BRAND PILLS
   ============================================ */
.theme-emerald .brand-pill-3d:hover {
  color: var(--em-primary);
  border-color: rgba(0,135,90,0.3);
  background: var(--em-primary-lighter);
}

/* ============================================
   CARDS
   ============================================ */
.theme-emerald .card {
  background: var(--em-white);
  border-color: var(--em-gray-200);
  box-shadow: var(--em-shadow-sm);
}

/* ============================================
   FORMS — Emerald focus
   ============================================ */
.theme-emerald .form-input {
  background: var(--em-white);
  border-color: var(--em-gray-300);
  color: var(--em-gray-800);
}

.theme-emerald .form-input:focus {
  border-color: var(--em-primary);
  box-shadow: 0 0 0 3px rgba(0,135,90,0.1);
}

/* ============================================
   FOOTER — Emerald dark
   ============================================ */
.theme-emerald .footer {
  background: linear-gradient(180deg, #1a2e28 0%, #0f1f1a 100%);
  border-top: none;
  color: rgba(255,255,255,0.8);
}

.theme-emerald .footer .footer-logo {
  color: #fff;
}

.theme-emerald .footer .footer-logo:hover {
  color: var(--em-secondary);
}

.theme-emerald .footer .footer-links a:hover {
  color: var(--em-secondary);
}

.theme-emerald .footer .footer-legal a:hover {
  color: var(--em-secondary);
}

/* ============================================
   AUTH PAGES
   ============================================ */
.theme-emerald .auth-card {
  background: var(--em-white);
  border: 1px solid var(--em-gray-200);
  box-shadow: var(--em-shadow-lg);
}

.theme-emerald .auth-links a {
  color: var(--em-primary);
}

.theme-emerald .auth-links a:hover {
  color: var(--em-primary-dark);
}

/* ============================================
   ACCOUNT PAGES
   ============================================ */
.theme-emerald .account-link-3d:hover {
  border-color: rgba(0,135,90,0.3);
}

.theme-emerald .account-link-3d .icon {
  background: linear-gradient(135deg, var(--em-primary), var(--em-secondary));
}

.theme-emerald .account-points-hero {
  background: linear-gradient(135deg, var(--em-primary-lighter), rgba(0,203,161,0.08));
  border-color: rgba(0,135,90,0.2);
}

/* ============================================
   PAGINATION
   ============================================ */
.theme-emerald nav[role="navigation"] a:hover {
  background: var(--em-primary-lighter);
  border-color: var(--em-primary);
  color: var(--em-primary);
}

.theme-emerald nav[role="navigation"] span[aria-current] {
  background: var(--em-primary);
  color: #fff;
  border-color: var(--em-primary);
}

/* ============================================
   PRODUCT DETAIL
   ============================================ */
.theme-emerald .thumb-item.active {
  border-color: var(--em-primary);
  box-shadow: 0 0 10px rgba(0,135,90,0.15);
}

.theme-emerald .brand-tag {
  color: var(--em-primary);
}

.theme-emerald .main-price {
  color: var(--em-primary);
}

.theme-emerald .qty-btn:hover {
  background: var(--em-primary-lighter);
}

.theme-emerald .category-pills a:hover {
  background: var(--em-primary-lighter);
  color: var(--em-primary);
  border-color: rgba(0,135,90,0.3);
}

.theme-emerald .share-icon.copy:hover {
  background: var(--em-primary);
  border-color: var(--em-primary);
}

/* ============================================
   RETURNS
   ============================================ */
.theme-emerald .returns-row-3d:hover {
  background: var(--em-primary-bg);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.theme-emerald .empty-state {
  background: linear-gradient(135deg, var(--em-primary-lighter), rgba(0,203,161,0.06));
  border-color: rgba(0,135,90,0.15);
}

.theme-emerald .empty-state-icon {
  color: var(--em-primary);
}

/* ============================================
   OUT OF STOCK — override
   ============================================ */
.theme-emerald .product-card-3d.out-of-stock .product-card-image::before,
.theme-emerald .promo-card.out-of-stock .promo-card-image::before {
  background: rgba(0,0,0,0.5);
}

/* ============================================
   MOBILE MENU — White slide panel
   ============================================ */
.theme-emerald .mobile-menu-btn {
  background: var(--em-gray-100);
  border: 1px solid var(--em-gray-200);
}

.theme-emerald .mobile-menu-btn:hover {
  background: var(--em-gray-200);
}

.theme-emerald .hamburger-line {
  background: var(--em-gray-700);
}

.theme-emerald .mobile-cart-btn {
  background: var(--em-primary-lighter);
  border: 1px solid rgba(0,135,90,0.2);
  color: var(--em-primary);
}

.theme-emerald .mobile-cart-btn:hover {
  background: rgba(0,135,90,0.12);
}

.theme-emerald .mobile-cart-badge {
  background: var(--em-primary) !important;
  box-shadow: 0 2px 6px rgba(0,135,90,0.35);
}

/* ============================================
   BOTTOM NAVIGATION (Mobile/Tablet only)
   ============================================ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--em-white);
  border-top: 1px solid var(--em-gray-200);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
  z-index: 100;
  padding: 0.375rem 0;
  padding-bottom: env(safe-area-inset-bottom, 0.375rem);
}

.bottom-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  max-width: 480px;
  margin: 0 auto;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  padding: 0.25rem 0.75rem;
  text-decoration: none;
  color: var(--em-gray-400);
  font-size: 0.625rem;
  font-weight: 600;
  transition: color 0.2s;
  border-radius: var(--em-radius-sm);
  min-width: 60px;
}

.bottom-nav-item.active {
  color: var(--em-primary);
}

.bottom-nav-item:hover {
  color: var(--em-primary);
}

.bottom-nav-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
}

.bottom-nav-label {
  font-size: 0.625rem;
  line-height: 1;
}

@media (max-width: 768px) {
  .bottom-nav {
    display: block;
  }

  /* Add padding at bottom for fixed nav */
  .theme-emerald .footer {
    padding-bottom: 4.5rem;
  }

  .theme-emerald .main-content {
    padding-bottom: 1rem;
  }
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
  .bottom-nav {
    display: none !important;
  }
}

/* ============================================
   MOBILE NAV — White panel override
   ============================================ */
@media (max-width: 768px) {
  .theme-emerald .nav-links {
    background: var(--em-white);
    box-shadow: -8px 0 32px rgba(0,0,0,0.12);
  }

  .theme-emerald .nav-links .nav-link {
    color: var(--em-gray-600);
  }

  .theme-emerald .nav-links .nav-link:hover {
    color: var(--em-primary);
    background: var(--em-primary-lighter);
  }

  .theme-emerald .nav-links .nav-link.active {
    color: var(--em-primary);
    background: var(--em-primary-lighter);
  }

  /* Profile in mobile nav — light */
  .theme-emerald .profile-trigger {
    background: var(--em-gray-50) !important;
    border-color: var(--em-gray-200) !important;
    color: var(--em-gray-700) !important;
  }

  .theme-emerald .profile-menu {
    background: var(--em-gray-50) !important;
    border-color: var(--em-gray-200) !important;
  }

  .theme-emerald .profile-menu-item {
    color: var(--em-gray-600) !important;
  }

  .theme-emerald .profile-menu-item:hover {
    background: var(--em-primary-lighter) !important;
    color: var(--em-primary) !important;
  }

  .theme-emerald .profile-menu-name {
    color: var(--em-gray-800) !important;
  }

  .theme-emerald .profile-menu-email {
    color: var(--em-gray-500) !important;
  }

  .theme-emerald .profile-menu-divider {
    background: var(--em-gray-200) !important;
  }

  /* Cart link in mobile nav */
  .theme-emerald .header .nav-links a.cart-link {
    background: var(--em-primary-lighter) !important;
    border-color: rgba(0,135,90,0.2) !important;
    color: var(--em-primary) !important;
  }

  /* Overlay */
  .theme-emerald.mobile-nav-open .header::after {
    background: rgba(0,0,0,0.35);
  }

  /* Hero — full width on mobile */
  .theme-emerald .hero-emerald {
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
    padding: 1.5rem 1.25rem 3rem;
  }

  .hero-emerald-title {
    font-size: 1.75rem;
  }

  .hero-emerald-card {
    padding: 1rem;
  }

  .hero-emerald-card-img {
    width: 80px;
    height: 80px;
  }
}

/* ============================================
   SPECIAL DEALS SECTION
   ============================================ */
.deals-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.deals-header-left h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--em-gray-800);
  margin: 0;
}

.deals-header-left p {
  font-size: 0.8125rem;
  color: var(--em-gray-500);
  margin: 0.125rem 0 0;
}

.deals-countdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  background: var(--em-gray-800);
  border-radius: var(--em-radius-full);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.deals-countdown-badge .cd-sep {
  opacity: 0.4;
}

.deals-countdown-badge .cd-unit {
  font-size: 0.55rem;
  font-weight: 600;
  opacity: 0.6;
  text-transform: uppercase;
}

/* ============================================
   RECOMMENDED SECTION
   ============================================ */
.section-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-header-flex h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--em-gray-800);
  margin: 0;
}

.view-all-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--em-primary);
  text-decoration: none;
}

.view-all-link:hover {
  text-decoration: underline;
}

/* ============================================
   EMERALD PRODUCT CARD (new style)
   ============================================ */
.em-product-card {
  background: var(--em-white);
  border: 1px solid var(--em-gray-200);
  border-radius: var(--em-radius-lg);
  overflow: hidden;
  transition: all 0.25s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.em-product-card:hover {
  box-shadow: var(--em-shadow-md);
  transform: translateY(-2px);
}

.em-product-card-image {
  aspect-ratio: 1;
  background: var(--em-gray-50);
  overflow: hidden;
  position: relative;
}

.em-product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.em-product-card:hover .em-product-card-image img {
  transform: scale(1.05);
}

.em-product-card-body {
  padding: 0.75rem;
  position: relative;
}

.em-product-card-cat {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--em-gray-400);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.125rem;
}

.em-product-card-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--em-gray-800);
  margin: 0 0 0.375rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.em-product-card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.em-product-card-price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--em-gray-800);
}

.em-add-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--em-primary);
  color: #fff;
  font-size: 1.125rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.em-add-btn:hover {
  background: var(--em-primary-dark);
  transform: scale(1.1);
}

.em-add-btn.added {
  background: var(--em-secondary);
}

/* ============================================
   SUCCESS/ERROR MESSAGES
   ============================================ */
.theme-emerald .main-content > div[style*="accent-green"] {
  background: var(--em-primary-lighter) !important;
  color: var(--em-primary-dark) !important;
  border-color: rgba(0,135,90,0.2) !important;
}

/* ============================================
   INLINE STYLE OVERRIDES
   ============================================ */
.theme-emerald [style*="color:#ff6b00"],
.theme-emerald [style*="color: #ff6b00"] {
  color: var(--em-primary) !important;
}

.theme-emerald [style*="color:var(--accent-cyan)"] {
  color: var(--em-primary) !important;
}

/* ============================================
   MISC OVERRIDES
   ============================================ */
.theme-emerald .account-card-3d:hover {
  border-color: rgba(0,135,90,0.3);
}

.theme-emerald .account-table th {
  background: var(--em-primary-lighter);
  color: var(--em-gray-800);
}

.theme-emerald .order-badge--pending,
.theme-emerald .order-badge--awaiting_payment {
  background: rgba(255,139,0,0.12);
  color: #b45309;
}

.theme-emerald .order-badge--paid,
.theme-emerald .order-badge--approved,
.theme-emerald .order-badge--completed,
.theme-emerald .order-badge--delivered {
  background: var(--em-primary-lighter);
  color: var(--em-primary-dark);
}

/* Thai address widget */
.theme-emerald .tai-search:focus {
  border-color: var(--em-primary) !important;
  box-shadow: 0 0 0 3px rgba(0,135,90,0.1) !important;
}

.theme-emerald .tai-suggestions .tai-item:hover,
.theme-emerald .tai-suggestions .tai-item.active {
  background: var(--em-primary-lighter) !important;
}

.theme-emerald .tai-suggestions .tai-zip {
  background: rgba(0,135,90,0.08) !important;
  color: var(--em-primary) !important;
}
