/*
Theme Name: Hort Americas Theme
Theme URI: https://github.com/azapata13/hortamericas-theme
Author: Felipe Zapata
Author URI: https://github.com/azapata13
Description: Custom bilingual (FR/EN) theme for Hort Americas Canada — agricultural technology, horticultural lighting, and growing solutions.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: Private
Text Domain: hortamericas
Tags: bilingual, ecommerce, agriculture, custom
*/

/* =========================================
   BASE RESET & VARIABLES
   ========================================= */
:root {
  --color-bg: #ffffff;
  --color-surface: #f8f8f8;
  --color-border: #e5e7eb;
  --color-text: #111111;
  --color-text-muted: #6b7280;
  --color-accent: #1a7a4a; /* Hort Americas green */
  --color-accent-dark: #145c38;
  --color-accent-light: #e8f5ee;
  --color-white: #ffffff;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Inter', sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);

  --transition: 0.3s ease;
  --max-width: 1280px;
  --nav-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; line-height: 1.3; }
h4 { font-size: 1.1rem; font-weight: 600; }
p  { font-size: 1rem; color: var(--color-text-muted); line-height: 1.75; }

/* =========================================
   LAYOUT UTILITIES
   ========================================= */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section--gray {
  background-color: var(--color-surface);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(26,122,74,0);
}
.btn--primary:hover {
  background: var(--color-accent-dark);
  box-shadow: 0 4px 20px rgba(26,122,74,0.35);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}
.btn--outline:hover {
  background: var(--color-accent-light);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  padding: 10px 16px;
}
.btn--ghost:hover { background: var(--color-surface); }

/* =========================================
   CARDS
   ========================================= */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__image { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.card__body { padding: 20px; }
.card__tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
}
.card__title { font-size: 1rem; font-weight: 600; color: var(--color-text); margin-bottom: 8px; }
.card__desc { font-size: 0.875rem; color: var(--color-text-muted); margin-bottom: 16px; }

/* =========================================
   NAVIGATION
   ========================================= */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.site-nav.scrolled {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

/* Homepage uniquement : texte blanc sur le hero vidéo sombre */
.site-nav--hero:not(.scrolled) .menu-item > a,
.site-nav--hero:not(.scrolled) .menu-item > button {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
  letter-spacing: 0.01em;
}
.site-nav--hero:not(.scrolled) .menu-item > a:hover,
.site-nav--hero:not(.scrolled) .menu-item > button:hover,
.site-nav--hero:not(.scrolled) .menu-item.active > a {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.site-nav--hero:not(.scrolled) .menu-item > a svg,
.site-nav--hero:not(.scrolled) .menu-item > button svg {
  stroke: #fff;
}
.site-nav--hero:not(.scrolled) .lang-toggle {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.35);
}
.site-nav--hero:not(.scrolled) .lang-toggle button {
  color: rgba(255,255,255,0.75);
}
.site-nav--hero:not(.scrolled) .lang-toggle button.active {
  background: rgba(255,255,255,0.28);
  color: #fff;
  box-shadow: none;
}
.site-nav--hero:not(.scrolled) .nav-hamburger span {
  background: #fff;
}

.site-nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-nav__logo img {
  height: 36px;
  width: auto;
}
.site-nav__logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.02em;
}

.site-nav__menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.menu-item {
  position: relative;
}

.menu-item > a,
.menu-item > button {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  border: none;
  background: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.menu-item > a:hover,
.menu-item > button:hover,
.menu-item.active > a {
  background: var(--color-surface);
  color: var(--color-accent);
}

/* Dropdown */
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 100;
}

.menu-item:hover .dropdown,
.menu-item:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a {
  display: block;
  padding: 9px 14px;
  font-size: 0.875rem;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.dropdown a:hover {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

/* Mega dropdown for Products */
.dropdown--mega {
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 680px;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}
.menu-item:hover .dropdown--mega {
  transform: translateX(-50%) translateY(0);
}

.dropdown__group-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  padding: 0 14px;
}

/* Lang Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  padding: 3px;
  gap: 2px;
}

.lang-toggle button {
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  background: transparent;
  border-radius: 100px;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: all 0.2s ease;
}

.lang-toggle button.active {
  background: var(--color-white);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

/* Hamburger mobile */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: none;
  background: none;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition);
}

@media (max-width: 1024px) {
  .site-nav__menu { display: none; }
  .nav-hamburger { display: flex; }
}

/* Mobile menu overlay */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-white);
  z-index: 999;
  padding: calc(var(--nav-height) + 24px) 24px 24px;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  display: block;
}
.mobile-menu a:hover { background: var(--color-surface); color: var(--color-accent); }
.mobile-menu .mobile-menu__group-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  padding: 16px 16px 4px;
}

/* =========================================
   HERO
   ========================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #f0f9f4 0%, #ffffff 60%, #f8fbf6 100%);
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  background: var(--color-accent-light);
  border: 1px solid rgba(26,122,74,0.2);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero__title {
  margin-bottom: 20px;
  color: var(--color-text);
}

.hero__title span {
  color: var(--color-accent);
}

.hero__desc {
  font-size: 1.1rem;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* =========================================
   PRODUCT HOTSPOT (Image interactive)
   ========================================= */
.hotspot-container {
  position: relative;
  display: inline-block;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.hotspot-container img {
  width: 100%;
  height: auto;
  display: block;
}

.hotspot {
  position: absolute;
  z-index: 10;
}

.hotspot__dot {
  width: 18px;
  height: 18px;
  background: var(--color-accent);
  border: 3px solid white;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(26,122,74,0.25);
  transition: all var(--transition);
  animation: pulse-dot 2.5s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(26,122,74,0.25); }
  50%       { box-shadow: 0 0 0 8px rgba(26,122,74,0.10); }
}

.hotspot:hover .hotspot__dot {
  transform: scale(1.25);
  animation: none;
  box-shadow: 0 0 0 6px rgba(26,122,74,0.3);
}

.hotspot__tooltip {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  min-width: 200px;
  max-width: 260px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  pointer-events: none;
}

.hotspot:hover .hotspot__tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: all;
}

.hotspot__tooltip-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 4px;
}

.hotspot__tooltip-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.hotspot__tooltip-desc {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.hotspot__tooltip-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  transition: gap var(--transition);
}
.hotspot__tooltip-link:hover { gap: 10px; }

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background: #0f1f16;
  color: rgba(255,255,255,0.8);
  padding: 64px 0 32px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 32px;
}

.site-footer__brand p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  margin-top: 12px;
  max-width: 280px;
  line-height: 1.65;
}

.site-footer__title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}

.site-footer__links { display: flex; flex-direction: column; gap: 10px; }
.site-footer__links a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
  transition: color var(--transition);
}
.site-footer__links a:hover { color: #fff; }

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer__copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

.footer-lang-toggle {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  padding: 3px;
  gap: 2px;
}
.footer-lang-toggle button {
  padding: 4px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  background: transparent;
  border-radius: 100px;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  transition: all 0.2s ease;
}
.footer-lang-toggle button.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

@media (max-width: 768px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .site-footer__grid { grid-template-columns: 1fr; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* =========================================
   SECTION TITLES
   ========================================= */
.section-title {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-title__eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.section-title h2 {
  margin-bottom: 14px;
}

.section-title p {
  font-size: 1rem;
  color: var(--color-text-muted);
}

/* =========================================
   BILINGUAL ELEMENTS
   ========================================= */
[data-lang="fr"] .lang-en,
[data-lang="en"] .lang-fr {
  display: none;
}
