/*
Theme Name: Japan Horti Sourcing
Theme URI: https://japanhorti.com
Author: Websalty Premium Concept
Description: Ultra-minimalist, bespoke editorial theme for premium horticulture imports from Japan to North Cyprus.
Version: 1.0.2
Text Domain: japanhorti
*/

:root {
  --bg-white: #ffffff;
  --text-dark: #1a1f18;
  --text-gray: #7a8278;
  --green-brand: #4a8233;
  --green-light: #eef4ec;
  --card-bg: #f7f9f7;
  --line-color: #e5e8e5;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-white);
  color: var(--text-dark);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
  position: relative;
  top: 0 !important;
}

/* --- Premium Preloader --- */
#theme-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-white);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
}
.loader-spinner {
  width: 40px;
  height: 40px;
  border: 2px solid var(--line-color);
  border-top-color: var(--green-brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Strict Google Translate Hiders --- */
.goog-te-banner-frame, 
.goog-te-banner, 
#goog-gt-tt, 
.goog-te-balloon-frame,
#google_translate_element {
  display: none !important;
  visibility: hidden !important;
}
body { top: 0px !important; }
.skiptranslate { display: none !important; }

/* --- Theme Layout Container --- */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
}

/* --- Header & Navigation Upgrades --- */
.header-wrapper {
  position: relative;
  width: 100%;
  z-index: 1000;
  background: var(--bg-white);
  border-bottom: 1px solid var(--line-color);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
}

.brand-logo img {
  height: 40px;
  width: auto;
  display: block;
  mix-blend-mode: multiply;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none !important;
  text-transform: none;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--green-brand);
}

/* --- Flag Selector Style --- */
.lang-switcher-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 20px;
  border-left: 1px solid var(--line-color);
}

.flag-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  opacity: 0.3;
  filter: grayscale(100%);
  transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 16px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.flag-btn:hover, 
.flag-btn.active {
  opacity: 1;
  filter: grayscale(0%);
  transform: translateY(-1px);
}

.flag-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Mobile Menu & Hamburger Toggle --- */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 1100;
}

.mobile-nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-dark);
  position: absolute;
  left: 0;
  transition: transform 0.3s ease, top 0.3s ease, opacity 0.3s ease;
}

.mobile-nav-toggle span:nth-child(1) { top: 0; }
.mobile-nav-toggle span:nth-child(2) { top: 9px; }
.mobile-nav-toggle span:nth-child(3) { top: 18px; }

.mobile-nav-toggle.open span:nth-child(1) { transform: rotate(45deg); top: 9px; }
.mobile-nav-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-nav-toggle.open span:nth-child(3) { transform: rotate(-45deg); top: 9px; }

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  margin-bottom: 60px;
}
.hero-bg-circle {
  position: absolute;
  left: -10%;
  top: 50%;
  transform: translateY(-50%);
  width: 800px;
  height: 800px;
  border: 1px solid var(--line-color);
  border-radius: 50%;
  z-index: -1;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-gray);
  margin-bottom: 24px;
}
.eyebrow::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--text-gray);
}
.hero-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(48px, 5.5vw, 76px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--text-dark);
}
.hero-content h1 span {
  color: var(--green-brand);
}
.hero-content p {
  font-size: 16px;
  color: var(--text-gray);
  line-height: 1.7;
  max-width: 440px;
  margin-bottom: 40px;
}
.btn-solid {
  background: var(--green-brand);
  color: #fff;
  padding: 16px 36px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  display: inline-block;
}
.btn-solid:hover {
  background: #3a6828;
  transform: translateY(-2px);
}
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.visual-circle {
  position: absolute;
  width: 480px;
  height: 480px;
  background: #f4f6f4;
  border-radius: 50%;
  z-index: 1;
}
.hero-visual img {
  position: relative;
  z-index: 2;
  max-width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}
.floating-number {
  position: absolute;
  top: 10%;
  right: 15%;
  width: 48px;
  height: 48px;
  border: 1px solid var(--green-brand);
  color: var(--green-brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  z-index: 3;
}
.scroll-down {
  position: absolute;
  right: -20px;
  bottom: 10%;
  transform: rotate(90deg);
  transform-origin: right bottom;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-gray);
  display: flex;
  align-items: center;
  gap: 12px;
}
.scroll-down::after {
  content: "→";
  font-size: 16px;
}

/* --- Interactive JS Planner --- */
.interactive-section {
  padding: 100px 0 60px;
  border-top: 1px solid var(--line-color);
}
.interactive-title {
  max-width: 600px;
  margin-bottom: 50px;
}
.interactive-title h2 {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.planner-tabs {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line-color);
  padding-bottom: 16px;
}
.tab-btn {
  background: transparent;
  border: none;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-gray);
  cursor: pointer;
  padding: 8px 16px;
  position: relative;
  transition: color 0.3s;
}
.tab-btn.active {
  color: var(--green-brand);
}
.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -17px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--green-brand);
}
.planner-display {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  background: var(--card-bg);
  padding: 50px;
  border-radius: 16px;
  align-items: center;
  min-height: 380px;
}
.planner-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 30px;
  border-top: 1px solid var(--line-color);
  padding-top: 30px;
}
.stat-box span {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-gray);
  display: block;
  margin-bottom: 4px;
}
.stat-box strong {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
}
.planner-image-container {
  display: flex;
  justify-content: center;
}
.planner-image-container img {
  max-height: 300px;
  mix-blend-mode: multiply;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* --- Nursery Formats & Volumes Grid --- */
.product-section {
  padding: 60px 0 120px;
}
.section-header {
  margin-bottom: 120px;
  max-width: 600px;
}
.section-header h2 {
  font-family: var(--font-heading);
  font-size: 48px;
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 20px;
}
.section-header p {
  color: var(--text-gray);
  font-size: 18px;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: end;
}
.product-card {
  background: var(--card-bg);
  padding: 40px 32px;
  position: relative;
  margin-top: 80px;
  transition: transform 0.4s ease;
}
.product-card:hover {
  transform: translateY(-5px);
}
.product-card img {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  height: 240px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.product-info {
  margin-top: 120px;
}
.product-label {
  font-size: 12px;
  color: var(--text-gray);
  margin-bottom: 8px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.product-card h3 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
  line-height: 1.2;
}
.product-card p {
  color: var(--text-gray);
  font-size: 14px;
  margin-bottom: 24px;
}
.shop-now {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--green-brand);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--green-brand);
  padding-bottom: 2px;
}

/* --- Logistics Timeline --- */
.logistics-section {
  padding: 120px 0;
  border-top: 1px solid var(--line-color);
  position: relative;
}
.logistics-bg-circle {
  position: absolute;
  right: -20%;
  top: 20%;
  width: 1000px;
  height: 1000px;
  border: 1px solid var(--line-color);
  border-radius: 50%;
  z-index: -1;
}
.process-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  margin-bottom: 160px;
}
.process-row:nth-child(even) .process-content { order: 2; }
.process-row:nth-child(even) .process-visual { order: 1; }
.process-number {
  font-family: var(--font-heading);
  font-size: 80px;
  font-weight: 800;
  color: var(--green-light);
  line-height: 0.8;
  margin-bottom: 20px;
}
.process-content h3 {
  font-family: var(--font-heading);
  font-size: 36px;
  margin-bottom: 24px;
  font-weight: 700;
}
.process-content p {
  color: var(--text-gray);
  font-size: 16px;
  max-width: 440px;
}
.process-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.process-visual img {
  max-width: 400px;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.04));
}
.process-circle {
  position: absolute;
  width: 380px;
  height: 380px;
  background: #f7f9f7;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
}

/* --- Immersive Harvest Grid --- */
.harvest-section {
  padding: 120px 0;
  background: var(--bg-white);
}
.harvest-header {
  margin-bottom: 60px;
  max-width: 600px;
}
.harvest-header h2 {
  font-family: var(--font-heading);
  font-size: 48px;
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 20px;
}
.harvest-header p {
  color: var(--text-gray);
  font-size: 18px;
}
.harvest-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 24px;
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 40px;
}
.harvest-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: 70vh;
  min-height: 500px;
}
.harvest-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}
.harvest-card:hover img {
  transform: scale(1.05);
}
.harvest-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 40px 30px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: #fff;
}
.harvest-card-overlay span {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.8);
}
.harvest-card-overlay h3 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
}

/* --- Contact & Contact Form 7 Section --- */
.contact-section {
  padding: 120px 0;
  background: var(--text-dark);
  color: var(--bg-white);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 100px;
}
.contact-info h2 {
  font-family: var(--font-heading);
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 30px;
}
.contact-info p {
  color: #a0a6a0;
  font-size: 18px;
  margin-bottom: 60px;
  max-width: 400px;
}
.contact-details {
  display: grid;
  gap: 24px;
}
.contact-details span {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6d766d;
  margin-bottom: 4px;
}
.contact-details strong {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
}

/* Contact Form 7 Bespoke Styling overrides */
.contact-section .wpcf7 form {
  display: grid;
  gap: 40px;
}
.contact-section .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.contact-section .wpcf7-form-control-wrap {
  width: 100%;
}
.contact-section .wpcf7 input[type="text"],
.contact-section .wpcf7 input[type="email"],
.contact-section .wpcf7 input[type="tel"],
.contact-section .wpcf7 select,
.contact-section .wpcf7 textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid #4a524a;
  padding: 12px 0;
  color: var(--bg-white);
  font-family: var(--font-body);
  font-size: 16px;
  outline: none;
  border-radius: 0;
  transition: border-color 0.3s ease;
}
.contact-section .wpcf7 select {
  color: #a0a6a0;
}
.contact-section .wpcf7 select option {
  background-color: var(--text-dark);
  color: var(--bg-white);
}
.contact-section .wpcf7 input:focus,
.contact-section .wpcf7 select:focus,
.contact-section .wpcf7 textarea:focus {
  border-bottom-color: var(--green-brand);
}
.contact-section .wpcf7 textarea {
  resize: vertical;
  min-height: 100px;
}
.contact-section .wpcf7 input[type="submit"] {
  background: var(--bg-white);
  color: var(--text-dark);
  padding: 16px 40px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.contact-section .wpcf7 input[type="submit"]:hover {
  background: var(--green-light);
  transform: translateY(-2px);
}

/* --- Footer Area --- */
.footer-wrapper {
  border-top: 1px solid var(--line-color);
  background: var(--bg-white);
}
.site-footer {
  padding: 40px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-gray);
  background: var(--bg-white);
}
.footer-links {
  display: flex;
  gap: 24px;
  align-items: center;
}
.footer-links a {
  color: var(--text-gray);
  text-decoration: none !important;
  font-weight: 500;
  transition: color 0.3s ease;
}
.footer-links a:hover {
  color: var(--green-brand);
}
.footer-email {
  color: var(--text-dark) !important;
}
.footer-email:hover {
  color: var(--green-brand) !important;
}

/* --- Animations Engine --- */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =======================================================
   MOBILE & RESPONSIVE FIXES
   ======================================================= */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 60px; }
  .eyebrow { justify-content: center; }
  .eyebrow::before { display: none; }
  .hero-content p { margin: 0 auto 40px; }
  .hero-visual { margin-top: 40px; }
  .scroll-down { display: none; }
  
  .planner-display { grid-template-columns: 1fr; padding: 30px; text-align: center; }
  .planner-image-container { order: -1; }
  
  .products-grid { grid-template-columns: 1fr; gap: 120px; margin-top: 100px; }
  .product-card { padding: 40px; text-align: center; }
  
  .process-row { grid-template-columns: 1fr; gap: 60px; text-align: center; margin-bottom: 100px;}
  .process-row:nth-child(even) .process-content,
  .process-row:nth-child(even) .process-visual { order: unset; }
  .process-content p { margin: 0 auto; }

  .harvest-grid { grid-template-columns: 1fr; height: auto; }
  .harvest-card { height: 45vh; }
  
  .contact-grid { grid-template-columns: 1fr; gap: 60px; }
  .contact-section .form-row { grid-template-columns: 1fr; gap: 40px; }

  .site-footer {
      flex-direction: column;
      gap: 24px;
      text-align: center;
  }
  .footer-links {
      flex-direction: column;
      gap: 16px;
  }
}

@media (max-width: 768px) {
  /* 1. Global Screen Bounds Fix */
  body, html {
    overflow-x: hidden !important;
    width: 100%;
  }
  
  .container {
    padding: 0 20px !important;
    width: 100%;
    overflow-x: hidden;
  }

  /* 2. Mobile Nav Toggle & Menu */
  .mobile-nav-toggle { 
      display: block; 
  }
  
  .nav-links {
      position: fixed;
      top: 0;
      right: -100%;
      width: 100%;
      height: 100vh;
      background: rgba(255, 255, 255, 0.98);
      backdrop-filter: blur(15px);
      -webkit-backdrop-filter: blur(15px);
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 40px;
      transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
      z-index: 1050;
  }

  .nav-links.open {
      right: 0;
  }

  .nav-links a {
      font-size: 20px;
  }

  .lang-switcher-wrapper {
      border-left: none;
      padding-left: 0;
      margin-top: 20px;
  }

  /* 3. Hero Section Adjustments */
  .hero {
    margin-top: 40px;
    min-height: auto;
    padding-bottom: 60px;
  }

  .hero-bg-circle {
    width: 400px;
    height: 400px;
    left: -20%;
  }

  .hero-content h1 {
    font-size: 40px !important;
    line-height: 1.15;
  }

  .visual-circle {
    width: 260px !important;
    height: 260px !important;
  }

  .floating-number {
    right: 10%;
  }

  /* 4. Interactive Matrix (Tabs & Single Text Fix) */
  .planner-tabs {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    border-bottom: none;
    margin-bottom: 30px;
  }

  .tab-btn {
    width: 100%;
    border: 1px solid var(--line-color);
    border-radius: 8px;
    padding: 14px;
    font-size: 16px;
  }

  .tab-btn.active::after {
    display: none;
  }

  .tab-btn.active {
    background: var(--green-light);
    border-color: var(--green-brand);
  }

  .planner-display {
    padding: 24px 20px !important;
    gap: 30px;
  }

  .planner-stats {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* 5. Logistics Pipeline (01 02 03 Out of Screen Fix) */
  .process-row {
    gap: 40px !important;
    margin-bottom: 80px !important;
  }

  .process-number {
    font-size: 64px !important;
  }

  .process-circle {
    width: 260px !important;
    height: 260px !important;
  }

  .process-visual img {
    max-width: 100% !important;
    height: auto;
  }

  /* 6. Harvest Section (Bottom Images Dimming & Sizing) */
  .harvest-section {
    padding: 60px 0 !important;
  }

  .harvest-card {
    height: 280px !important;
    min-height: auto !important;
  }

  .harvest-card-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent) !important; 
    padding: 20px !important;
  }

  .harvest-card-overlay h3 {
    font-size: 22px !important;
  }

  /* 7. General Padding Reductions for Mobile */
  .product-section, 
  .interactive-section, 
  .logistics-section, 
  .contact-section {
    padding: 60px 0 !important;
  }

  .section-header {
    margin-bottom: 40px !important;
  }
}