/* ===== BASE STYLES ===== */
:root {
  --primary-color: #5D4037;
  --primary-dark: #3E2723;
  --primary-light: #8D6E63;
  --accent-color: #D7CCC8;
  --light-color: #EFEBE9;
  --dark-color: #3E2723;
  --text-dark: #212121;
  --text-light: #f5f5f5;
  --playfair: 'Playfair Display', serif;
  --raleway: 'Raleway', sans-serif;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
  --section-padding: clamp(4rem, 6vw, 6rem);
  --header-height: 80px;
  --image-load-bg: #f3f3f3;
  --vh: 1vh;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}
.language-zh {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ===== LAYOUT ===== */
#mainHeader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(239, 235, 233, 0.96);
  backdrop-filter: blur(8px);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  max-width: 1400px;
  margin: 0 auto;
}

/* ===== MOBILE MENU - FIXED VERSION ===== */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-color);
  cursor: pointer;
  z-index: 1001;
  padding: 0.5rem;
}

.mobile-menu {
  position: fixed;
  top: var(--header-height);
  right: -100%;
  width: 85%;
  height: 100vh;
  height: 100dvh;
  background: var(--light-color);
  box-shadow: -5px 0 15px rgba(0,0,0,0.2);
  z-index: 1000;
  transition: right 0.3s ease-out;
  overflow-y: auto;
  padding: 2rem;
  padding-top: calc(var(--header-height) + 1rem);
}

.mobile-menu.active {
  right: 0;
}

.mobile-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-color);
  cursor: pointer;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

.mobile-nav a {
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(93, 64, 55, 0.1);
}

body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* ===== DESKTOP NAVIGATION ===== */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  font-weight: 600;
  font-size: 1rem;
  color: var(--primary-dark);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: var(--transition);
}

.nav-links a:hover {
  background-color: rgba(93, 64, 55, 0.08);
}

.nav-actions {
  margin-left: 1.5rem; /* or auto if you want it to push to the right */
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 992px) {
  .nav-links {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 1rem;
  }

  /* Remove these conflicting/duplicate rules:
  #mainNav {
    display: none;
  }
  #mainNav .nav-links,
  #mainNav .nav-actions,
  #mainNav .language-selector {
    display: none !important;
  }
  */

  /* Keep only the .main-nav version for mobile nav: */
  .main-nav .nav-links,
  .main-nav .nav-actions,
  .main-nav .language-selector {
    display: none !important;
  }
  .mobile-toggle {
    display: inline-flex !important;
  }

  .hero-content {
    padding: 1.5rem;
    margin-left: 1rem;
  }

  .content-wrapper,
  .contact-container {
    flex-direction: column;
  }
}

/* Show nav links and actions on desktop */
@media (min-width: 769px) {
  .main-nav .nav-links,
  .main-nav .nav-actions,
  .main-nav .language-selector {
    display: flex !important;
  }
  .mobile-toggle {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0.75rem 1rem;
  }

  .mobile-menu {
    width: 90%;
    padding: 1.5rem;
  }

  .mobile-nav a {
    font-size: 1rem;
    padding: 0.5rem 0;
  }

  .hero-cta {
    flex-direction: column;
  }
}

/* ===== SAFE AREA SUPPORT ===== */
@supports (padding: max(0px)) {
  .mobile-menu {
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

/* ===== REST OF YOUR STYLES ===== */
/* (Keep all your existing styles for other sections below this point) */
/* They should work as-is with these mobile menu fixes in place */

.nav-actions .btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: var(--text-light);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.nav-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Language Selector */
.language-selector {
  position: relative;
  margin-left: 1rem;
  height: 40px;
  display: flex;
  align-items: center;
}

.language-toggle {
  background: transparent;
  border: none;
  color: var(--primary-color);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.language-toggle:hover {
  background: rgba(93, 64, 55, 0.1);
}

.language-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  padding: 8px 0;
  min-width: 140px;
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.1);
}

.language-selector.active .language-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 16px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  color: var(--text-dark);
  transition: var(--transition);
  font-size: 0.9rem;
  gap: 8px;
}

.lang-option:hover {
  background: var(--light-color);
}
.site-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 99999;
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  animation: slideInUp 0.3s ease;
  max-width: 300px;
}

.site-toast--success {
  background: rgba(40, 167, 69, 0.9);
}

.site-toast--error {
  background: rgba(220, 53, 69, 0.9);
}

.site-toast--info {
  background: rgba(23, 162, 184, 0.9);
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.lang-option.active {
  color: var(--primary-color);
  font-weight: 600;
}
/* Add flag icons - optional but nice for UX */
.lang-option[data-lang="en"]::before {
  content: "🇬🇧";
}
.lang-option[data-lang="fr"]::before {
  content: "🇫🇷";
}
.lang-option[data-lang="zh"]::before {
  content: "🇨🇳";
}

/* Mobile specific styles */
@media (max-width: 768px) {
  .language-selector {
    margin-left: auto; /* Push to right in mobile menu */
    margin-right: 1rem;
  }
  
  .mobile-nav .language-selector {
    margin: 1rem 0 0;
    width: 100%;
  }
  
  .mobile-nav .language-dropdown {
    position: static;
    width: 100%;
    box-shadow: none;
    border: 1px solid rgba(0,0,0,0.1);
    margin-top: 8px;
    display: none;
  }
  
  .mobile-nav .language-selector.active .language-dropdown {
    display: block;
  }
}



/* ===== REST OF YOUR EXISTING CSS ===== */
/* [All your other existing CSS styles remain unchanged below this point] */
/* ===== HERO SECTION ===== */
.hero-unity {
  position: relative;
  height: 100vh;
  height: 100dvh; /* New CSS unit */
  min-height: -webkit-fill-available; /* iOS Safari */
  min-height: 680px;
  display: flex;
  align-items: center;
  margin-top: 80px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  color: var(--text-light);
  padding: 2rem;
  margin-left: clamp(1rem, 5vw, 3rem);
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1.5rem;
  line-height: 1.1;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-content .subtitle {
  font-size: clamp(1rem, 2vw, 1.4rem);
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fallback-image {
  width: 100%;
  min-height: 100vh;
  object-fit: cover;
}

.overlay-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(61, 39, 35, 0.8) 0%, rgba(61, 39, 35, 0.4) 100%);
}

/* ===== BUTTONS ===== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.875rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--primary-color); /* Solid color instead of gradient */
  color: var(--text-light);
  border: 2px solid var(--primary-color); /* Adds definition */
  border-radius: 8px;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: none;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); 
}

.btn-primary:active {
  transform: translateY(0);
}
.btn-primary:focus {
  outline: 2px solid var(--primary-dark);
  outline-offset: 4px;
}
.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(93, 64, 55, 0.08);
  border-color: var(--primary-dark);
  color: var(--primary-dark);
}
.btn-secondary:focus {
  outline: 2px solid var(--accent-color);
}

.btn-video {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
  transition: var(--transition);
}

.btn-video i {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-video:hover i {
  background: var(--primary-color); /* Solid color on hover */
  transform: scale(1.1);
}

/* ===== MAIN CONTENT ===== */
main {
  overflow-x: hidden;
}

.section {
  padding: var(--section-padding) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 0 1rem;
}

.section-header h2 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin-bottom: 1rem;
}

.section-header .subtitle {
  font-size: 1.1rem;
  color: var(--primary-light);
}

/* Process Section */
.card-grid {
  padding: var(--section-padding) 0;
  background-color: var(--light-color);
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

.feature-card {
  background-color: white;
  border-radius: 12px;
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background-color: var(--light-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--primary-color);
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-card p {
  margin-bottom: 1.5rem;
  color: var(--primary-light);
}

.card-link {
  color: var(--primary-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Gallery Section */
.dark-section {
  background-color: var(--dark-color);
  color: var(--text-light);
}

.light-section {
  background-color: var(--light-color);
}

.content-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}


.content-wrapper.reverse {
  flex-direction: row-reverse;
}

.text-content {
  flex: 1 1 45%;
  min-width: 300px;
}

.text-content h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
}

.text-content p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.gallery-container {
  position: relative;
  width: 100%;
  overflow: hidden; /* Hide scrollbar */
}

.image-scroller {
  display: flex;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  overflow-x: auto !important;
  scroll-behavior: smooth;
  gap: 20px;
  padding: 10px 0;
}

.image-scroller::-webkit-scrollbar {
  height: 6px;
  background: rgba(0,0,0,0.1);
  display: block !important;  /* Show scrollbar */
}

.image-scroller::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

.image-content {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 300px;
  height: 400px;
  border-radius: 8px;
  opacity: 1 !important;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.image-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--image-load-bg);
  transition: filter 0.5s ease;
}
.image-content img.loaded {
  filter: blur(0);
}

.image-content:hover img {
  transform: scale(1.03);
}

/* Active image styling */
.image-content.active {
  transform: scale(1.02);
}

.video-fallback-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: var(--primary-color);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: var(--transition);
}

.video-fallback-button:hover {
  background: white;
  transform: translate(-50%, -50%) scale(1.1);
}

.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.7);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
}

.scroll-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}
.scroll-btn:hover {
  background: rgba(0,0,0,0.8);
}

.left-btn {
  left: 10px;
}

.right-btn {
  right: 10px;
}

.dots-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background: white;
  transform: scale(1.2);
}

.scroll-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* About Section */
.image-contents {
  flex: 1 1 45%;
  min-width: 300px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.image-contents img {
  width: 100%;
  height: auto;
  display: block;
  transition: var(--transition);
}

/* Products Section */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

.product-card {
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

.product-image {
  height: 280px;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-card-content {
  padding: 1.5rem;
}

.product-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.product-card p {
  color: var(--primary-light);
  margin-bottom: 1.25rem;
}



.cert-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.badge {
  background-color: var(--light-color);
  color: var(--primary-color);
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.btn-product {
  display: block;
  width: 100%;
  padding: 0.8rem;
  background: var(--primary-color);
  color: var(--text-light);
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-product:hover {
  background: var(--primary-dark);
}

/* Contact Section */
/* ===== CONTACT SECTION ===== */
.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

/* Contact Info Sidebar */
.contact-info {
  flex: 1 1 300px;
  min-width: min(300px, 100%);
  background: var(--light-color);
  border-radius: 12px;
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--header-height) + 1rem);
  
}

/* Remove scrollbar styles */
.contact-info::-webkit-scrollbar,
.contact-info {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.contact-info::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.contact-info::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 3px;
}

.contact-detail {
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
  padding-bottom: clamp(1rem, 2vw, 1.5rem);
  border-bottom: 1px solid rgba(93, 64, 55, 0.1);
}

.contact-detail:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.contact-detail i {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  display: inline-block;
}

.contact-detail h4 {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
}

.contact-detail p {
  color: var(--text-dark);
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  line-height: 1.5;
  margin-bottom: 0.25rem;
}

/* Contact Form */
.contact-form {
  flex: 2 1 600px;
  min-width: min(320px, 100%);
  background-color: white;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

/* Social Links */
.social-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.social-links a {
  width: clamp(36px, 5vw, 44px);
  height: clamp(36px, 5vw, 44px);
  border-radius: 50%;
  background: rgba(93, 64, 55, 0.08);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
}

.social-links a:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(93, 64, 55, 0.2);
}

/* Form Elements */
.form-group {
  margin-bottom: clamp(1.25rem, 2.5vw, 1.5rem);
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  color: var(--primary-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: clamp(0.875rem, 2vw, 1rem);
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: clamp(0.95rem, 1.5vw, 1rem);
  transition: var(--transition);
  background-color: #fff;
}

/* Mobile Safari fix */
@media (max-width: 768px) {
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px;
  }
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(93, 64, 55, 0.1);
}

.form-group textarea {
  min-height: clamp(120px, 20vh, 200px);
  resize: vertical;
  line-height: 1.5;
}

/* Form Submit Button */
.contact-form .btn-primary {
  width: 100%;
  padding: clamp(0.875rem, 2vw, 1rem);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  min-height: clamp(48px, 6vw, 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

/* Error States */
.form-group.error input,
.form-group.error textarea,
.form-group.error select {
  border-color: #dc3545;
  background-color: #fff8f8;
}

.field-error {
  color: #dc3545;
  font-size: clamp(0.8rem, 1.2vw, 0.875rem);
  margin-top: 0.375rem;
  display: block;
}

/* Success/Error Messages */
.form-message {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  display: none;
}

.form-message.success {
  display: block;
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.form-message.error {
  display: block;
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */

/* Tablets and Small Laptops (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .contact-container {
    gap: 2rem;
  }
  
  .contact-info {
    flex: 1 1 280px;
    position: static;
    max-height: none;
    overflow-y: visible;
  }
  
  .contact-form {
    flex: 1 1 400px;
  }
}

/* Mobile Devices (up to 768px) */
@media (max-width: 768px) {
  .contact-container {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .contact-info {
    width: 100%;
    flex: none;
    order: 2;
    position: static;
    max-height: none;
    overflow-y: visible;
  }
  
  .contact-form {
    width: 100%;
    flex: none;
    order: 1;
  }
  
  .contact-detail {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
  }
  
  .contact-detail i {
    grid-row: span 2;
    align-self: start;
    margin-top: 0.25rem;
  }
  
  .contact-detail h4 {
    margin-bottom: 0.25rem;
  }
  
  .social-links {
    justify-content: center;
    margin-top: 1rem;
  }
}

/* Small Mobile Devices (up to 480px) */
@media (max-width: 480px) {
  .contact-container {
    padding: 0 1rem;
    gap: 1rem;
  }
  
  .contact-info,
  .contact-form {
    padding: 1.25rem;
  }
  
  .contact-detail {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    text-align: center;
  }
  
  .contact-detail i {
    grid-row: auto;
    margin: 0 auto 0.5rem;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 0.75rem;
  }
  
  .contact-form .btn-primary {
    min-height: 52px;
  }
}

/* Very Small Devices (up to 360px) */
@media (max-width: 360px) {
  .contact-info,
  .contact-form {
    padding: 1rem;
  }
  
  .social-links a {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
  
  .contact-form .btn-primary {
    font-size: 1rem;
    padding: 0.75rem;
  }
}

/* Landscape Orientation on Mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .contact-info {
    max-height: 80vh;
    overflow-y: auto;
  }
  
  .form-group textarea {
    min-height: 80px;
  }
}

/* High-DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .contact-form {
    border: 0.5px solid rgba(0, 0, 0, 0.1);
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    border-width: 0.5px;
  }
}
/* WeChat QR Popup */
.wechat-qr-popup {
  display: none; /* keep hidden by default (HTML inline may override) */
  position: fixed;
  inset: 0;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.65);
  z-index: 99999; /* ensure above other UI */
  padding: 1rem;
  overflow: auto;
}

.wechat-qr-popup[aria-hidden="false"] {
  display: flex;
}

.wechat-qr-popup .qr-container {
  position: relative;
  background: var(--surface, #fff);
  border-radius: 12px;
  padding: 1rem;
  max-width: 420px;
  width: 100%;
  max-height: 90vh;   /* keep container inside viewport */
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  overflow: auto;     /* allow internal scroll if content too tall */
}

/* Keep image contained and never overflow viewport */
.wechat-qr-popup .qr-inner img {
  width: auto;
  height: auto;
  max-width: 92%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

/* Ensure close button inside popup is visible and clickable (scoped to popup only) */
.wechat-qr-popup .close-btn,
#wechatQrClose {
  color: var(--text-dark);         /* replace blue */
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(0,0,0,0.05);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: none;
}
.wechat-qr-popup .close-btn,
.wechat-qr-popup #wechatQrClose {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
}

.wechat-qr-popup .close-btn i,
#wechatQrClose i {
  color: inherit; /* ensure icon inherits the button color */
}

.wechat-qr-popup .close-btn:hover,
#wechatQrClose:hover {
  background: rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

/* Focus visible for accessibility */
.wechat-qr-popup .close-btn:focus,
#wechatQrClose:focus {
  outline: 2px solid rgba(93,64,55,0.16);
  outline-offset: 2px;
  box-shadow: none;
}

/* Slightly tighter caps for very small screens */
@media (max-width: 420px) {
  .wechat-qr-popup .qr-container {
    max-width: 96%;
    padding: 0.6rem;
  }
  .wechat-qr-popup .qr-inner img {
    max-height: 56vh;
  }
}

/* Fail-safe: keep popup from overflowing the viewport */
.wechat-qr-popup .qr-container {
  box-sizing: border-box;
  overflow: hidden;
}

/* Hide nav links and actions on small screens */
@media (max-width: 768px) {
  .main-nav .nav-links,
  .main-nav .nav-actions,
  .main-nav .language-selector {
    display: none !important;
  }
  .mobile-toggle {
    display: inline-flex !important;
  }
}

/* Show nav links and actions on desktop */
@media (min-width: 769px) {
  .main-nav .nav-links,
  .main-nav .nav-actions,
  .main-nav .language-selector {
    display: flex !important;
  }
  .mobile-toggle {
    display: none !important;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* ===== FOOTER ===== */
footer {
  background-color: var(--dark-color);
  color: var(--text-light);
  padding-top: 4rem;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
}

.footer-main {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  padding: 0 clamp(1rem, 3vw, 2rem);
  margin-bottom: 3rem;
}

.footer-brand {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-logo {
  width: 160px;
  height: auto;
}

.footer-info p {
  opacity: 0.8;
  margin-bottom: 1.5rem;
}

.footer-links {
  flex: 2 1 600px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
}

.footer-column h4 {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-column h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent-color);
}

.footer-column ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-column a {
  color: var(--accent-color);
  opacity: 0.8;
  transition: var(--transition);
}

.footer-column a:hover {
  opacity: 1;
  color: var(--light-color);
  transform: translateX(5px);
}

.footer-legal {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.5rem clamp(1rem, 3vw, 2rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.footer-copyright {
  opacity: 0.7;
  font-size: 0.9rem;
}

.legal-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.legal-links a {
  color: var(--accent-color);
  font-size: 0.9rem;
  opacity: 0.7;
  transition: var(--transition);
}

.legal-links a:hover {
  opacity: 1;
  color: var(--light-color);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 1024px) {
  .hero-content {
    max-width: 600px;
  }
  
  .content-wrapper {
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 1rem;
  }
  
  
  
  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }
  
  .nav-actions {
    width: 100%;
    margin: 1.5rem 0 0;
  }
  
  .language-switcher {
    margin: 1.5rem 0 0;
    justify-content: center;
  }

  
  .hero-content {
    padding: 1.5rem;
    margin-left: 1rem;
  }
  
  .hero-cta {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 3rem 0;
  }
  
  .section-header {
    margin-bottom: 2rem;
  }
  
  .content-wrapper, 
  .contact-container {
    gap: 2rem;
  }
  
  .footer-brand {
    align-items: center;
    text-align: center;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
  }
  
  .footer-column {
    text-align: center;
  }
  
  .footer-column h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .legal-links {
    justify-content: center;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.feature-card, .product-card {
  will-change: transform, opacity;
  animation: fadeIn 0.6s ease forwards;
}

.feature-card:nth-child(2) { animation-delay: 0.1s; }
.feature-card:nth-child(3) { animation-delay: 0.2s; }
.feature-card:nth-child(4) { animation-delay: 0.3s; }
.feature-card:nth-child(5) { animation-delay: 0.4s; }
.feature-card:nth-child(6) { animation-delay: 0.5s; }

.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.4s; }

.logo img {
  width: 160px;
  height: auto;
  object-fit: contain;
  max-width: 100%;
  display: block;
}

/* QR popup: constrain image size on small viewports (do NOT change .close-btn) */
.wechat-qr-popup .qr-container {
  box-sizing: border-box;
  max-width: 420px; /* desktop cap */
  width: 100%;
  padding: 0.75rem;
}

.wechat-qr-popup .qr-container img {
  display: block;
  width: auto;
  height: auto;
  max-width: 90%;   /* leave space for padding and close button */
  max-height: 60vh; /* prevents full-screen takeover on small phones */
  object-fit: contain;
  margin: 0 auto;
  border-radius: 6px;
}

/* Slightly tighter caps for very small screens */
@media (max-width: 380px) {
  .wechat-qr-popup .qr-container { max-height: 78vh; padding: 0.4rem; }
  .wechat-qr-popup .qr-inner img { max-height: 48vh; }
}

/* Additional safe constraints for WeChat QR popup (append only) */
.wechat-qr-popup .qr-container {
  /* keep container inside viewport and allow internal scroll */
  max-height: 82vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.6rem; /* small padding so close button isn't off-screen */
}

/* Limit QR image height on narrow screens so it never covers controls */
.wechat-qr-popup .qr-inner img {
  width: auto;
  max-width: 92%;
  max-height: 56vh; /* primary cap */
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* Fix contact layout and social icons sizing on small viewports */
.contact-container {
  display: flex;
  flex-wrap: wrap;     /* allow items to wrap instead of staying side-by-side */
  gap: 2rem;
  align-items: flex-start; /* Align items to the top */
  flex-wrap: nowrap; 
}

.contact-info {
  flex: 0 0 320px;     /* fixed-ish sidebar width on larger screens */
  min-width: 220px;
  padding: 1rem 1.25rem; /* adds left/right padding so content isn't flush to edge */
  box-sizing: border-box;
}

/* Slightly larger padding on bigger screens for visual balance */
@media (min-width: 1200px) {
  .contact-info {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Reduce vertical padding on small screens but keep horizontal spacing */
@media (max-width: 768px) {
  .contact-info {
    padding: 0.75rem 0.75rem;
  }
}

.contact-form {
  flex: 1 1 560px;     /* allow form to grow, but stay reasonable on wide screens */
  min-width: 280px;
  background-color: white;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}


/* Make phone links look like regular text / emphasized label (tel: links) */
a[href^="tel:"] {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 700;
  display: inline-block;
  line-height: 1;
}

.page-loader {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

a[href^="tel:"]:hover,
a[href^="tel:"]:focus {
  color: var(--primary-color);
  text-decoration: none;
  outline: none;
}
/* Add to CSS */
.form-group.has-error input,
.form-group.has-error textarea,
.form-group.has-error select {
  border-color: #dc3545;
  background-color: #fff8f8;
}

.field-error {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: block;
}

.form-group:focus-within .field-error {
  display: none; /* Hide errors when user focuses on field */
}
.product-card--large-image .product-image {
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fbf8f6;
}
.product-card--large-image .product-image img {
  width: auto;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s ease;
}
.product-card--large-image.product-card:hover .product-image img {
  transform: scale(1.02);
}
/* Responsive */
@media (max-width: 768px) {
  .product-card--large-image .product-image { height: 300px; }
}
@media (max-width: 480px) {
  .product-card--large-image .product-image { height: 220px; }
}
