/* ==========================================================================
   Laxmi Krishi Kendra - Master CSS Stylesheet (Professional Edition)
   No Emojis | Vector SVG & Font Awesome Icons | Circular Preloader
   ========================================================================== */

:root {
  --primary: #059669;
  --primary-dark: #047857;
  --primary-light: #10b981;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --bg-light: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.3);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-light: #0f172a;
  --bg-card: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
}

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

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-light);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

body.loaded {
  opacity: 1;
}

/* Circular Loading Spinner Overlay */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-light);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.spinner-ring {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(16, 185, 129, 0.2);
  border-top-color: var(--primary);
  border-right-color: var(--primary-light);
  border-radius: 50%;
  animation: rotate-spinner 0.8s linear infinite;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.spinner-text {
  margin-top: 16px;
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

@keyframes rotate-spinner {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

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

ul {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(15px, 4vw, 30px);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.section-title p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

[data-theme="dark"] .navbar {
  background: rgba(15, 23, 42, 0.9);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: clamp(64px, 8vh, 80px);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 16px) !important;
  flex-shrink: 1;
  min-width: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 14px);
  font-size: clamp(1.05rem, 3.5vw, 1.4rem);
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 1;
}

.brand-logo img {
  height: clamp(36px, 8vw, 50px);
  width: auto;
  max-width: 140px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: high-quality;
  filter: contrast(1.05) saturate(1.05) drop-shadow(0 2px 8px rgba(5, 150, 105, 0.15));
  animation: logo-glow-pulse 3s infinite ease-in-out;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-logo:hover img {
  transform: scale(1.1) rotate(-3deg);
}

@keyframes logo-glow-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.3));
    transform: translateY(0);
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.6));
    transform: translateY(-2px);
  }
}

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

.nav-links a {
  color: var(--text-main);
  font-weight: 500;
  position: relative;
  padding: 6px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--primary-light);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.btn-icon {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: clamp(0.9rem, 2vw, 1rem);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-icon:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  color: #fff;
}

.btn-whatsapp {
  background: #25d366;
  color: #ffffff;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background: #1eb956;
  transform: translateY(-2px);
  color: #fff;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-main);
  cursor: pointer;
}

/* Hero Section */
.hero {
  position: relative;
  padding: max(40px, 4vw) 0;
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.12), transparent 50%),
              radial-gradient(circle at bottom left, rgba(245, 158, 11, 0.08), transparent 50%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: max(20px, 3vw);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 20px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 20px;
}

.hero p {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--text-muted);
  margin-bottom: 30px;
}

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

.hero-image-wrap {
  position: relative;
}

.hero-image-wrap img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: contain;
  background: transparent;
  padding: 0;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: high-quality;
  filter: contrast(1.05) brightness(1.02) saturate(1.05);
}

/* Stats Section */
.stats-section {
  padding: 40px 0;
  margin-top: -30px;
  position: relative;
  z-index: 10;
}

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

.stat-card {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.stat-card h3 {
  font-size: 2.2rem;
  color: var(--primary);
}

.stat-card p {
  color: var(--text-muted);
  font-weight: 500;
}

/* Products Grid */
.products-section {
  padding: 80px 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.product-img-wrap {
  position: relative;
  height: 220px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-img-wrap img {
  max-height: 190px;
  object-fit: contain;
  transition: var(--transition);
}

.product-card:hover .product-img-wrap img {
  transform: scale(1.06);
}

.product-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

.product-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 6px;
}

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

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 12px 0 16px;
}

.price-current {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.price-old {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-card .btn-whatsapp {
  margin-top: auto;
  width: 100%;
  justify-content: center;
}

/* Brands Grid */
.brands-section {
  padding: 70px 0;
  background: rgba(16, 185, 129, 0.03);
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.brand-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.brand-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.brand-card img {
  max-height: 60px;
  width: auto;
  object-fit: contain;
  margin-bottom: 12px;
}

/* Floating WhatsApp Button */
.floating-whatsapp {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  width: 60px;
  height: 60px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: var(--transition);
  animation: pulse-wa 2s infinite;
}

.floating-whatsapp:hover {
  transform: scale(1.1);
  color: #fff;
}

@keyframes pulse-wa {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Scroll To Top */
.scroll-top {
  position: fixed;
  bottom: 100px;
  right: 30px;
  z-index: 998;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.scroll-top.visible {
  display: flex;
}

.scroll-top:hover {
  background: var(--primary);
  color: #fff;
}

/* Form Controls */
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  color: var(--text-main);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-lg);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s ease;
}

.toast.error {
  border-left-color: #ef4444;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Footer */
footer {
  background: #09121d;
  color: #94a3b8;
  padding: 70px 0 30px;
  border-top: 1px solid #1e293b;
}

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

.footer-brand h3 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.footer-links h4 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

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

.footer-links a {
  color: #94a3b8;
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid #1e293b;
  font-size: 0.9rem;
}

/* Skeleton Loading Effect */
.skeleton {
  background: linear-gradient(90deg, var(--border-color) 25%, var(--bg-card) 50%, var(--border-color) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================================================
   Public Page Dynamic Animations (Farmer Attraction Edition)
   ========================================================================== */

/* Hero Badge & WhatsApp Pulsing Animations */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: badge-float 3s infinite ease-in-out;
}

@keyframes badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.floating-whatsapp {
  animation: wa-pulse 2s infinite ease-in-out;
}

@keyframes wa-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.75);
  }
}

/* Hero Store Logo Floating Showcase Animation */
.hero-image-wrap img {
  animation: hero-logo-float 4s infinite ease-in-out;
}

@keyframes hero-logo-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

/* Stat Cards & Feature Cards Hover Elevation & Shimmer */
.stat-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 25px -5px rgba(5, 150, 105, 0.2);
}

.product-card {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px -10px rgba(5, 150, 105, 0.25);
}

/* Button Shimmer Sweeping Light Effect */
.btn-primary, .btn-whatsapp {
  position: relative;
  overflow: hidden;
}

.btn-primary::after, .btn-whatsapp::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent 30%, rgba(255, 255, 255, 0.25) 50%, transparent 70%);
  transform: rotate(30deg) translateX(-100%);
  transition: transform 0.8s ease;
}

.btn-primary:hover::after, .btn-whatsapp:hover::after {
  transform: rotate(30deg) translateX(100%);
}
