/* ===================================
   MODERN HOME PAGE ENHANCEMENTS
   Premium UI for Plant E-commerce
   =================================== */

/* ========== GLOBAL IMPROVEMENTS ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2d6a4f;
  --primary-light: #40916c;
  --primary-dark: #1b4332;
  --accent: #95d5b2;
  --text-dark: #081c15;
  --text-light: #d8f3dc;
  --bg-light: #f1faee;
  --white: #ffffff;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 15px 50px rgba(0, 0, 0, 0.2);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ========== ENHANCED NAVBAR ========== */
.navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  padding: 0.5rem 0;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.12);
}

.navbar-brand {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  transition: transform 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.nav-link {
  font-weight: 500;
  color: var(--text-dark) !important;
  position: relative;
  padding: 0.5rem 1.2rem !important;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-link:hover {
  color: var(--primary) !important;
}

.icon-btn {
  background: transparent;
  border: 2px solid #e0e0e0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0.3rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.icon-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(45, 106, 79, 0.3);
}

.icon-btn:hover i,
.icon-btn:hover a {
  color: white;
}

.icon-btn i,
.icon-btn a {
  font-size: 1.1rem;
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.3s ease;
}

.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(238, 90, 111, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

/* ========== HERO SECTION ========== */
.hero-section {
  min-height: 90vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #d8f3dc 0%, #b7e4c7 50%, #95d5b2 100%);
  position: relative;
  overflow: hidden;
  padding: 4rem 0;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s ease-in-out infinite;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(45, 106, 79, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  33% {
    transform: translate(30px, -50px) rotate(120deg);
  }

  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
  animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--primary);
  margin-bottom: 2rem;
  font-weight: 400;
  position: relative;
  z-index: 1;
  animation: slideInLeft 0.8s ease-out 0.2s both;
}

.hero-image {
  position: relative;
  z-index: 1;
  animation: slideInRight 0.8s ease-out 0.3s both;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-image img {
  width: 100%;
  max-width: 600px;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
  animation: floatImage 6s ease-in-out infinite;
}

@keyframes floatImage {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

.stat-box {
  background: rgba(255, 255, 255, 0.9);
  padding: 1.5rem;
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.5);
  position: relative;
  z-index: 1;
}

.stat-box:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 500;
}

/* ========== CTA BUTTONS ========== */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(45, 106, 79, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  position: relative;
  overflow: hidden;
}

.btn-primary-custom::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn-primary-custom:hover::before {
  left: 100%;
}

.btn-primary-custom:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(45, 106, 79, 0.4);
}

.btn-secondary-custom {
  background: transparent;
  color: var(--primary);
  padding: 1rem 2.5rem;
  border: 2px solid var(--primary);
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.btn-secondary-custom:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(45, 106, 79, 0.3);
}

/* ========== PRODUCT CARDS ========== */
.product-section {
  padding: 5rem 0;
  background: white;
  position: relative;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  text-align: center;
  color: var(--primary);
  font-size: 1.2rem;
  margin-bottom: 3rem;
  font-weight: 400;
}

.filter-pills {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.filter-pill {
  padding: 0.7rem 1.8rem;
  border: 2px solid var(--accent);
  background: white;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  color: var(--primary);
  font-size: 1rem;
}

.filter-pill:hover,
.filter-pill.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(45, 106, 79, 0.3);
}

.product-card {
  background: white;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent);
}

.product-image-container {
  position: relative;
  overflow: hidden;
  padding-top: 100%;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.product-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image {
  transform: scale(1.1);
}

.product-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(238, 90, 111, 0.4);
  z-index: 2;
}

.product-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.product-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.product-description {
  color: #6c757d;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  flex-grow: 1;
  line-height: 1.6;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 2px solid #f1f3f5;
}

.product-price {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.add-to-cart-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(45, 106, 79, 0.3);
}

.add-to-cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 106, 79, 0.4);
}

.add-to-cart-btn.added {
  background: linear-gradient(135deg, #51cf66, #37b24d);
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 991px) {
  .hero-section {
    min-height: auto;
    padding: 3rem 0;
  }

  .hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }

  .navbar-brand {
    font-size: 1.5rem;
  }

  .stat-box {
    margin-bottom: 1rem;
  }

  .btn-primary-custom,
  .btn-secondary-custom {
    padding: 0.8rem 2rem;
    font-size: 1rem;
  }
}

@media (max-width: 767px) {
  .hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .filter-pills {
    gap: 0.5rem;
  }

  .filter-pill {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
  }

  .product-card {
    margin-bottom: 1.5rem;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
    margin: 0 0.2rem;
  }

  .icon-btn i {
    font-size: 1rem;
  }
}

@media (max-width: 575px) {
  .hero-section {
    padding: 2rem 0;
  }

  .stat-number {
    font-size: 2rem;
  }

  .product-price {
    font-size: 1.5rem;
  }

  .add-to-cart-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}

/* ========== SMOOTH ANIMATIONS ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out both;
}

/* Stagger animation for product cards */
.product-card:nth-child(1) {
  animation-delay: 0.1s;
}

.product-card:nth-child(2) {
  animation-delay: 0.2s;
}

.product-card:nth-child(3) {
  animation-delay: 0.3s;
}

.product-card:nth-child(4) {
  animation-delay: 0.4s;
}

/* ========== LOADING STATE ========== */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 4px solid var(--accent);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* ========== ACCESSIBILITY ========== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ========== PRINT STYLES ========== */
@media print {

  .navbar,
  .hero-section,
  .icon-btn,
  .add-to-cart-btn {
    display: none;
  }
}