/* ========================================
   Thai Fertilizer
   Lightweight Premium Stylesheet
   ======================================== */

/* CSS Variables - Design System */
:root {
  --color-primary: #1B5E20;
  --color-primary-dark: #0D3B10;
  --color-accent: #4CAF50;
  --color-accent-light: #66BB6A;
  --color-light: #E8F5E9;
  --color-lightest: #F1F8E9;
  --color-text: #1A1A1A;
  --color-text-body: #4A4A4A;
  --color-text-muted: #6B7280;
  --color-white: #FFFFFF;
  --color-border: #E5E7EB;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 72px;
  --transition: 0.25s ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--color-text-body);
  line-height: 1.6;
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text);
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.125rem, 2vw, 1.5rem); }

p {
  margin-bottom: 1rem;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--color-accent);
}

.nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.9375rem;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.nav a.active {
  color: var(--color-primary);
}

.nav-cta {
  background: var(--color-primary);
  color: var(--color-white) !important;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--color-accent);
  color: var(--color-white) !important;
}

.nav-cta::after {
  display: none !important;
}

/* Nav Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dropdown-arrow {
  font-size: 0.65em;
  transition: transform var(--transition);
  display: inline-block;
}

.nav-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  min-width: 220px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 1100;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.55rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
}

.nav-dropdown-menu a::after {
  display: none !important;
}

.nav-dropdown-menu a:hover {
  background: var(--color-lightest);
  color: var(--color-primary);
  padding-left: 1.5rem;
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--color-lightest) 0%, var(--color-light) 100%);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-size: cover;
  background-position: center;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 640px;
}

.hero h1 {
  margin-bottom: 1rem;
  color: var(--color-primary-dark);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-text-body);
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-white {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
}

.btn-white:hover {
  background: var(--color-light);
  color: var(--color-primary-dark);
}

.btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

/* Section Styles */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--color-lightest);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 1.0625rem;
}

/* Cards */
.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-body {
  padding: 1.5rem;
}

.card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.card p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin-bottom: 0;
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* Feature Items */
.feature {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.feature-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: var(--color-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 1.25rem;
}

.feature h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.375rem;
}

.feature p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* Product Cards */
.product-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.product-card-img {
  aspect-ratio: 4/3;
  background: var(--color-lightest);
  overflow: hidden;
}

.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.product-card:hover .product-card-img img {
  transform: scale(1.05);
}

.product-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.25rem;
}

.product-card .npk {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.product-card p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  flex: 1;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.table th,
.table td {
  padding: 0.875rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.table th {
  background: var(--color-lightest);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: var(--color-lightest);
}

/* Lists */
.checklist {
  list-style: none;
}

.checklist li {
  padding: 0.5rem 0;
  padding-left: 1.75rem;
  position: relative;
  color: var(--color-text-body);
}

.checklist li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

/* FAQ Accordion */
.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 0;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--color-accent);
  min-width: 20px;
  text-align: center;
}

.faq-item.active .faq-question::after {
  content: '\2013';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition), padding var(--transition);
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding-bottom: 1.25rem;
}

.faq-answer p {
  color: var(--color-text-muted);
  margin: 0;
}

/* Testimonials */
.testimonial {
  background: var(--color-white);
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.testimonial-text {
  font-style: italic;
  color: var(--color-text-body);
  margin-bottom: 1.25rem;
  font-size: 1rem;
  line-height: 1.7;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1rem;
}

.testimonial-name {
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.9375rem;
}

.testimonial-role {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Countries */
.country-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.country-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
}

/* Certifications */
.cert-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  align-items: center;
}

.cert-item {
  text-align: center;
  padding: 1.5rem;
}

.cert-item svg,
.cert-item .cert-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.75rem;
  color: var(--color-primary);
}

.cert-item h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.cert-item p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--color-text);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(76,175,80,0.15);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

/* Blog */
.blog-card-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.blog-card:hover .blog-card-img img {
  transform: scale(1.05);
}

.blog-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

/* Contact Page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.contact-info-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: var(--color-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.contact-info-item h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.contact-info-item p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin: 0;
}

.map-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  height: 300px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ========================================
   Premium WhatsApp Chat Widget
   ======================================== */
.chat-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Chat Button */
.chat-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4), 0 2px 8px rgba(0,0,0,0.15);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.chat-button:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5), 0 4px 12px rgba(0,0,0,0.2);
}

.chat-button:active {
  transform: scale(0.95);
}

.chat-button svg {
  width: 30px;
  height: 30px;
}

/* Online pulse ring */
.chat-button::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #25D366;
  opacity: 0;
  animation: chatPulse 2s infinite;
}

@keyframes chatPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* Chat Popup */
.chat-popup {
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 340px;
  max-width: calc(100vw - 2rem);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-popup.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Popup Header */
.chat-popup-header {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-popup-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-popup-avatar {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-popup-avatar svg {
  width: 22px;
  height: 22px;
}

.chat-popup-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.chat-popup-status {
  font-size: 12px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.chat-status-dot {
  width: 8px;
  height: 8px;
  background: #AFF8A4;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(175, 248, 164, 0.6);
  animation: statusBlink 2.5s infinite;
}

@keyframes statusBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.chat-popup-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.chat-popup-close:hover {
  background: rgba(255,255,255,0.15);
}

.chat-popup-close svg {
  width: 20px;
  height: 20px;
}

/* Popup Body */
.chat-popup-body {
  padding: 20px;
  background: #F0F2F5;
  min-height: 160px;
}

.chat-message {
  background: #fff;
  padding: 14px 16px;
  border-radius: 14px 14px 14px 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  font-size: 14px;
  line-height: 1.6;
  color: #1a1a1a;
  max-width: 100%;
  word-wrap: break-word;
  animation: messageIn 0.4s ease;
}

@keyframes messageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Typing Indicator */
.chat-typing {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 14px 14px 14px 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  width: fit-content;
}

.chat-typing.active {
  display: flex;
}

.chat-typing-dot {
  width: 7px;
  height: 7px;
  background: #9098A3;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.chat-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.chat-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* Popup Footer */
.chat-popup-footer {
  padding: 14px 20px;
  background: #fff;
  border-top: 1px solid #E5E7EB;
}

.chat-popup-footer a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.chat-popup-footer a:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
}

.chat-popup-footer a svg {
  width: 18px;
  height: 18px;
}

/* Notification Bubble */
.chat-notification {
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 260px;
  background: #fff;
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.14);
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.chat-notification.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.chat-notification-text {
  font-size: 13px;
  color: #1a1a1a;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-notification-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.chat-notification-icon svg {
  width: 18px;
  height: 18px;
}

.chat-notification-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  font-size: 16px;
}

.chat-notification-close:hover {
  color: #4B5563;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .chat-widget {
    bottom: 1rem;
    right: 1rem;
  }

  .chat-popup {
    width: calc(100vw - 2rem);
    right: -0.5rem;
  }

  .chat-popup-body {
    min-height: 140px;
  }

  .chat-notification {
    width: calc(100vw - 3rem);
    right: -0.5rem;
  }
}

@media (max-width: 360px) {
  .chat-button {
    width: 54px;
    height: 54px;
  }

  .chat-button svg {
    width: 26px;
    height: 26px;
  }
}

/* Footer */
.footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: 1rem;
  display: block;
}

.footer p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.footer h4 {
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.625rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9375rem;
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
}

/* Breadcrumbs */
.breadcrumbs {
  background: var(--color-lightest);
  padding: 1rem 0;
  font-size: 0.875rem;
}

.breadcrumbs a {
  color: var(--color-text-muted);
}

.breadcrumbs a:hover {
  color: var(--color-primary);
}

.breadcrumbs span {
  color: var(--color-text);
  font-weight: 500;
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, var(--color-lightest) 0%, var(--color-light) 100%);
  padding: 4rem 0;
  text-align: center;
}

.page-header h1 {
  margin-bottom: 0.75rem;
}

.page-header p {
  color: var(--color-text-muted);
  font-size: 1.0625rem;
  max-width: 640px;
  margin: 0 auto;
}

/* Stats */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

/* Internal Links Box */
.related-links {
  background: var(--color-lightest);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin-top: 2rem;
}

.related-links h4 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.related-links ul {
  list-style: none;
}

.related-links li {
  padding: 0.375rem 0;
}

.related-links a {
  font-size: 0.9375rem;
}

/* Product Detail Layout */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.product-detail-img {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.product-detail-img img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.product-badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: var(--color-light);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}

/* Blog Post */
.blog-post-content {
  max-width: 720px;
  margin: 0 auto;
}

.blog-post-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.blog-post-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-post-content p {
  margin-bottom: 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.8;
}

.blog-post-content ul,
.blog-post-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.blog-post-content li {
  margin-bottom: 0.5rem;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.blog-post-content img {
  border-radius: var(--radius-md);
  margin: 2rem 0;
}

.blog-post-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ========================================
   PREMIUM PRODUCT PAGE STYLES
   ======================================== */

/* Product Hero */
.product-hero {
  background: linear-gradient(135deg, var(--color-lightest) 0%, var(--color-light) 100%);
  padding: 4rem 0;
}

.product-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.product-hero-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}

.product-hero-img img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.product-hero-content .product-badge {
  font-size: 1rem;
  padding: 0.5rem 1.25rem;
  margin-bottom: 1.25rem;
}

.product-hero-content h1 {
  margin-bottom: 1rem;
  color: var(--color-primary-dark);
}

.product-hero-desc {
  font-size: 1.0625rem;
  color: var(--color-text-body);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-buttons .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Product Details Section */
.product-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.product-gallery {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.product-gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.product-info h2 {
  margin-bottom: 1.25rem;
  color: var(--color-primary-dark);
}

.product-info p {
  color: var(--color-text-body);
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

/* Benefits */
.benefits-list {
  list-style: none;
  margin-bottom: 1.5rem;
}

.benefits-list li {
  padding: 0.625rem 0;
  padding-left: 2rem;
  position: relative;
  color: var(--color-text-body);
  font-size: 1rem;
  line-height: 1.6;
}

.benefits-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.875rem;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%234CAF50' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* Specifications */
.specs-section {
  background: var(--color-white);
}

.specs-section h2 {
  margin-bottom: 1.5rem;
  text-align: center;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.specs-table th,
.specs-table td {
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.specs-table th {
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
  white-space: nowrap;
  width: 35%;
}

.specs-table tr:last-child td {
  border-bottom: none;
}

.specs-table tr:nth-child(even) td {
  background: var(--color-lightest);
}

.specs-table td {
  color: var(--color-text-body);
  font-weight: 500;
}

/* Packaging Cards */
.packaging-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.packaging-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 1.75rem;
  text-align: center;
  transition: all var(--transition);
}

.packaging-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--color-accent);
}

.packaging-icon {
  width: 56px;
  height: 56px;
  background: var(--color-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--color-primary);
}

.packaging-card h4 {
  font-size: 1.0625rem;
  margin-bottom: 0.5rem;
}

.packaging-card p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* Application / Crops */
.crops-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.crop-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: var(--color-light);
  border-radius: 100px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-primary);
}

/* Trust Section */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.trust-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}

.trust-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--color-accent-light);
}

.trust-icon {
  width: 56px;
  height: 56px;
  background: var(--color-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--color-primary);
}

.trust-item h4 {
  font-size: 1rem;
  margin-bottom: 0.375rem;
}

.trust-item p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Inline Inquiry Form */
.inquiry-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-white);
  padding: 4rem 0;
}

.inquiry-section h2 {
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

.inquiry-section > .container > p {
  color: rgba(255,255,255,0.85);
  margin-bottom: 2rem;
  max-width: 600px;
}

.inquiry-form {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  color: var(--color-text);
  max-width: 720px;
}

.inquiry-form .form-group {
  margin-bottom: 1rem;
}

.inquiry-form .form-label {
  font-size: 0.875rem;
  margin-bottom: 0.375rem;
}

.inquiry-form .form-input,
.inquiry-form .form-select,
.inquiry-form .form-textarea {
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
}

.inquiry-form .btn-primary {
  width: 100%;
  margin-top: 0.5rem;
}

/* Related Products */
.related-products h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.related-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.related-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.related-card-img {
  aspect-ratio: 4/3;
  background: var(--color-lightest);
  overflow: hidden;
}

.related-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.related-card:hover .related-card-img img {
  transform: scale(1.05);
}

.related-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.related-card .npk {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.related-card h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.related-card h4 a {
  color: var(--color-text);
}

.related-card h4 a:hover {
  color: var(--color-primary);
}

.related-card p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  flex: 1;
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* Responsive */
@media (max-width: 992px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .product-detail { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .product-hero-grid { grid-template-columns: 1fr; }
  .product-details-grid { grid-template-columns: 1fr; }
  .packaging-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  
  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    transform: translateY(-150%);
    transition: transform var(--transition);
    box-shadow: var(--shadow-lg);
  }
  
  .nav.active {
    transform: translateY(0);
  }
  
  .nav a {
    width: 100%;
    padding: 0.75rem 0;
  }
  
  .nav-dropdown {
    width: 100%;
  }
  
  .nav-dropdown-toggle {
    width: 100%;
    padding: 0.75rem 0;
  }
  
  .nav-dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: var(--color-lightest);
    margin: 0;
    padding: 0;
    min-width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease, visibility 0.2s, padding 0.2s ease;
  }
  
  .nav-dropdown:hover .nav-dropdown-menu {
    opacity: 0;
    visibility: hidden;
    max-height: 0;
  }
  
  .nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    max-height: 500px;
    padding: 0.25rem 0 0.5rem 0;
    transform: none;
  }
  
  .nav-dropdown-menu a {
    padding: 0.6rem 1rem 0.6rem 1.5rem;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(0,0,0,0.04);
  }
  
  .nav-dropdown-menu a:hover {
    padding-left: 2rem;
  }
  
  .nav-cta {
    text-align: center;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .hero {
    min-height: 480px;
    padding: 3rem 0;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .packaging-grid,
  .trust-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .product-hero {
    padding: 2.5rem 0;
  }

  .inquiry-form {
    padding: 1.5rem;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
