/* ═══════════════════════════════════════
   LBL FARM — Boutique Agricultural Theme
   Colors extracted from logo:
   - Green: #7CB342, #8BC34A, #9CCC65
   - Gold:  #F9A825, #FFD54F
   - White: #FAFAF5
   ═══════════════════════════════════════ */

:root {
  --green-900: #33691E;
  --green-700: #689F38;
  --green-500: #8BC34A;
  --green-400: #9CCC65;
  --green-300: #AED581;
  --green-100: #DCEDC8;
  --green-50:  #F1F8E9;

  --gold-600: #F9A825;
  --gold-500: #FBC02D;
  --gold-400: #FFD54F;
  --gold-200: #FFF9C4;
  --gold-50:  #FFFDE7;

  --primary: var(--green-700);
  --primary-dark: var(--green-900);
  --primary-light: var(--green-400);
  --accent: var(--gold-600);
  --accent-light: var(--gold-400);

  --bg: #FAFAF5;
  --bg-alt: #FFFFFF;
  --bg-dark: #1B2E0E;
  --text: #1A1A1A;
  --text-light: #6B7280;
  --text-muted: #9CA3AF;
  --border: #E5E7EB;
  --shadow: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-khmer: 'Noto Sans Khmer', 'Inter', system-ui, sans-serif;

  --container: 1140px;
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Khmer font for Khmer pages */
html[lang="km"] body,
.lang-km {
  font-family: var(--font-khmer);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-dark);
}

ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ═══ Header ═══ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

.logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.logo-text {
  color: var(--primary-dark);
}

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

.nav-list {
  display: flex;
  gap: 4px;
}

.nav-link {
  display: block;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.nav-link:hover {
  background: var(--green-50);
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
}

/* ═══ Language Switcher ═══ */
.lang-switcher {
  display: flex;
  gap: 2px;
  background: var(--bg);
  border-radius: 10px;
  padding: 3px;
}

.lang-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--text-light);
  transition: all 0.25s;
  font-family: inherit;
}

.lang-btn.active {
  background: var(--bg-alt);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.lang-btn:hover:not(.active) {
  color: var(--text);
}

/* ═══ Mobile Menu ═══ */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ═══ Hero ═══ */
.hero {
  padding: calc(var(--header-height) + 60px) 0 80px;
  position: relative;
  overflow: hidden;
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--green-50) 0%, var(--gold-50) 50%, #FFFFFF 100%);
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139,195,74,0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(249,168,37,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--text);
}

.hero-title .highlight {
  color: var(--primary);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 500;
  color: var(--green-700);
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-img {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  aspect-ratio: 1;
}

/* ═══ Buttons ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  border: 2px solid transparent;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(104,159,56,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.btn-lg {
  padding: 18px 36px;
  font-size: 1.05rem;
}

/* ═══ Sections ═══ */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.section-title .highlight {
  color: var(--primary);
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* ═══ Features Grid ═══ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.feature-card {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 36px 28px;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--green-300);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.feature-desc {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* ═══ About Preview ═══ */
.about-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-preview-text {
  padding: 12px 0;
}

.about-preview-text p {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 20px;
}

.about-preview-text .btn {
  margin-top: 8px;
}

.img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--green-100), var(--gold-200));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-icon {
  font-size: 5rem;
  opacity: 0.7;
}

/* ═══ CTA ═══ */
.cta {
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  color: white;
  text-align: center;
}

.cta-content {
  max-width: 600px;
}

.cta-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 16px;
}

.cta-desc {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 32px;
}

.cta .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text);
}

.cta .btn-primary:hover {
  background: var(--gold-500);
  box-shadow: 0 8px 24px rgba(249,168,37,0.4);
}

/* ═══ Page Content ═══ */
.page {
  padding-top: calc(var(--header-height) + 60px);
  min-height: 70vh;
}

.page-header {
  margin-bottom: 40px;
}

.page-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
}

.page-content {
  max-width: 720px;
}

.page-content h2 {
  font-size: 1.4rem;
  margin: 32px 0 12px;
  color: var(--primary-dark);
}

.page-content h3 {
  font-size: 1.15rem;
  margin: 24px 0 10px;
}

.page-content p {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* ═══ Footer ═══ */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.85);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-logo {
  width: 256px;
  height: 256px;
  object-fit: cover;
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 0.95rem;
  opacity: 0.8;
  line-height: 1.6;
  text-align: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-links h4,
.footer-contact h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: white;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: var(--green-300);
}

.footer-contact p {
  font-size: 0.92rem;
  margin-bottom: 8px;
  opacity: 0.8;
}

.social-link {
  color: var(--green-400) !important;
  font-weight: 500;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.85rem;
  opacity: 0.6;
}

/* ═══ Hero Badge ═══ */
.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--green-100);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 20px;
  margin-bottom: 16px;
}

/* ═══ Section Badge ═══ */
.section-badge {
  display: inline-block;
  padding: 4px 14px;
  background: var(--gold-200);
  color: var(--gold-600);
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 20px;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

/* ═══ Gallery — Circular Image Grid ═══ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  padding: 0 10px;
}

.gallery-item {
  display: flex;
  justify-content: center;
  align-items: center;
}

.gallery-item:nth-child(even) {
  margin-top: 30px;
}

.gallery-item:nth-child(6n+4),
.gallery-item:nth-child(6n+5),
.gallery-item:nth-child(6n+6) {
  margin-top: 0;
}

.gallery-circle {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 3px solid white;
}

.gallery-circle:hover {
  transform: scale(1.12);
  box-shadow: 0 8px 32px rgba(104,159,56,0.25);
  border-color: var(--green-300);
  z-index: 2;
}

.gallery-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0);
  transition: all 0.3s;
  border-radius: 50%;
}

.gallery-circle:hover .gallery-overlay {
  background: rgba(0,0,0,0.45);
}

.gallery-emoji {
  font-size: 1.6rem;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s;
}

.gallery-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: white;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s;
  text-align: center;
  max-width: 90%;
  line-height: 1.2;
  margin-top: 2px;
}

.gallery-circle:hover .gallery-emoji {
  opacity: 1;
  transform: translateY(0);
}

.gallery-circle:hover .gallery-label {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.05s;
}

/* ═══ About Image Collage ═══ */
.about-image-collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  height: 100%;
  min-height: 320px;
}

.collage-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.collage-item.c1 {
  grid-column: 1;
  grid-row: 1 / 3;
}

.collage-item.c2 {
  grid-column: 2;
  grid-row: 1;
}

.collage-item.c3 {
  grid-column: 2;
  grid-row: 2;
}

/* ═══ Products Mini Grid ═══ */
.products-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.product-mini-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s;
  text-align: center;
}

.product-mini-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--green-300);
}

.pm-emoji {
  font-size: 1.8rem;
  line-height: 1;
}

.pm-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.products-cta {
  text-align: center;
  margin-top: 32px;
}

/* ═══ Responsive ═══ */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-alt);
    flex-direction: column;
    padding: 24px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    gap: 20px;
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
  }

  .nav-link {
    padding: 12px 16px;
    width: 100%;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-desc {
    margin: 0 auto 32px;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .about-preview-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-preview-img {
    order: -1;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Gallery mobile */
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding: 0;
  }

  .gallery-item:nth-child(even) {
    margin-top: 18px;
  }

  .gallery-item:nth-child(3n+2),
  .gallery-item:nth-child(3n+3) {
    margin-top: 0;
  }

  .gallery-emoji {
    font-size: 1.2rem;
  }

  .gallery-label {
    font-size: 0.55rem;
  }

  .products-mini-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Small phone */
@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .gallery-item:nth-child(even) {
    margin-top: 14px;
  }

  .gallery-item:nth-child(2n+2) {
    margin-top: 0;
  }

  .products-mini-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero-content {
    gap: 32px;
  }

  .about-preview-grid {
    gap: 32px;
  }

  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .gallery-item:nth-child(even) {
    margin-top: 24px;
  }

  .gallery-item:nth-child(4n+3),
  .gallery-item:nth-child(4n+4) {
    margin-top: 0;
  }
}
