/* ==========================================================================
   JUICYFRESH - Organic Fruits E-Commerce Template Stylesheet
   ========================================================================== */

/* --- Custom Properties / Theme Variables --- */
:root {
  /* Color Palette */
  --primary: #FF6B00;          /* Vibrant Orange */
  --primary-hover: #E05D00;
  --primary-light: #FFF0E5;
  --secondary: #10B981;        /* Fresh Leaf Green */
  --secondary-hover: #059669;
  --secondary-light: #ECFDF5;
  --accent-yellow: #F59E0B;     /* Citrus Gold */
  --accent-red: #EF4444;        /* Berry Red */
  --accent-purple: #8B5CF6;     /* Plum Purple */
  
  /* Neutrals */
  --bg-main: #F8FAFC;
  --bg-card: #FFFFFF;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --border: #E2E8F0;
  
  /* Glassmorphism & Effects */
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
  --glass-blur: blur(16px);
  
  /* Radii & Shadows */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 35px rgba(0,0,0,0.12);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
}

body {
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

ul {
  list-style: none;
}

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

/* --- 3D Canvas Background Overlay --- */
#fruit-3d-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 10;
}

/* --- Layout Utility Classes --- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
  position: relative;
  z-index: 20;
}

.grid {
  display: grid;
  gap: 2rem;
}

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

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

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-lg);
}

/* --- Buttons & Badges --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-normal);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #FF8800);
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(255, 107, 0, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(255, 107, 0, 0.45);
  background: linear-gradient(135deg, #FF7711, #FF9911);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), #059669);
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(16, 185, 129, 0.4);
}

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

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

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--primary);
  color: #FFF;
  border-color: var(--primary);
  transform: scale(1.08);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-organic {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-sale {
  background: rgba(239, 68, 68, 0.15);
  color: #DC2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-fresh {
  background: rgba(245, 158, 11, 0.15);
  color: #D97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* --- Section Typography & Headers --- */
.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3.5rem auto;
}

.section-subtitle {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: block;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-main);
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 0.75rem;
}

/* --- Top Announcement Bar --- */
.top-bar {
  background: linear-gradient(90deg, #10B981, #059669);
  color: #FFFFFF;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  position: relative;
  z-index: 100;
}

/* --- Navbar / Header --- */
.header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 90;
  transition: all var(--transition-normal);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.header.scrolled {
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  background: rgba(255, 255, 255, 0.95);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent-yellow));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFF;
  font-size: 1.3rem;
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

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

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2.5px;
  background: var(--primary);
  border-radius: 2px;
  transition: width var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cart-btn-wrap {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--primary);
  color: #FFF;
  font-size: 0.7rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #FFF;
}

.hamburger-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger-btn span {
  width: 24px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* --- Hero Section --- */
.hero {
  min-height: 85vh;
  padding-top: 4rem;
  padding-bottom: 6rem;
  display: flex;
  align-items: center;
  position: relative;
}

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

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--secondary-light);
  color: var(--secondary-hover);
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.hero-title {
  font-size: 3.8rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--primary), var(--accent-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.2rem;
}

.hero-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stat-item h4 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
}

.stat-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-3d-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
  40% { transform: translate(-50%, -10px); }
  60% { transform: translate(-50%, -5px); }
}

/* --- Category Cards --- */
.category-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

.category-icon-bg {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  margin-bottom: 1.2rem;
  transition: transform var(--transition-bounce);
}

.category-card:hover .category-icon-bg {
  transform: scale(1.15) rotate(8deg);
}

.category-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.category-count {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- Product Cards --- */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 107, 0, 0.3);
}

.product-badge-wrap {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.product-wishlist-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 5;
}

.product-img-wrap {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at center, #F1F5F9 0%, #E2E8F0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

.product-fruit-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  transition: transform var(--transition-normal);
  display: block;
}

.product-card:hover .product-fruit-img {
  transform: scale(1.08);
}

/* Legacy emoji support fallback */
.product-fruit-visual {
  font-size: 5rem;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.15));
  transition: transform var(--transition-normal);
}
.product-card:hover .product-fruit-visual {
  transform: scale(1.12) rotate(-5deg);
}

.product-quick-view {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  transition: bottom var(--transition-fast);
}

.product-card:hover .product-quick-view {
  bottom: 15px;
}

.product-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--accent-yellow);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.product-rating span {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.product-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid #F1F5F9;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

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

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

/* --- Interactive 3D Showcase Banner --- */
.showcase-banner {
  background: linear-gradient(135deg, #0F172A, #1E293B);
  border-radius: var(--radius-lg);
  padding: 4rem 3rem;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.showcase-content {
  max-width: 550px;
  position: relative;
  z-index: 5;
}

.showcase-content h2 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.showcase-content p {
  color: #94A3B8;
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.showcase-3d-stage {
  height: 300px;
  width: 100%;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* --- Features / Value Props --- */
.feature-box {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  transition: transform var(--transition-fast);
}

.feature-box:hover {
  transform: translateY(-4px);
  border-color: var(--secondary);
}

.feature-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--secondary-light);
  color: var(--secondary-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.feature-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.feature-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- Cart Drawer Overlay --- */
.cart-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.cart-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -450px;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  background: var(--bg-card);
  z-index: 210;
  box-shadow: -10px 0 30px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  transition: right var(--transition-normal);
}

.cart-drawer-overlay.active .cart-drawer {
  right: 0;
}

.cart-drawer-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-drawer-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.cart-item-img {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  flex-shrink: 0;
}

.cart-item-details {
  flex: 1;
}

.cart-item-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.cart-item-price {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.cart-drawer-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  background: #F8FAFC;
}

/* --- Quick View & Modals --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform var(--transition-fast);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 1.5rem;
  color: var(--text-muted);
}

.modal-close:hover {
  color: var(--text-main);
}

/* --- Toast Notification --- */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: #0F172A;
  color: #FFF;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  animation: slideInRight 0.3s forwards;
  border-left: 4px solid var(--secondary);
}

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

/* --- Footer --- */
.footer {
  background: #0F172A;
  color: #94A3B8;
  padding: 5rem 0 2rem 0;
  position: relative;
  z-index: 20;
}

.footer-top {
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-title {
  color: #FFFFFF;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: #94A3B8;
  font-size: 0.9rem;
}

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

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.newsletter-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  color: #FFF;
  outline: none;
}

.newsletter-input:focus {
  border-color: var(--primary);
}

.footer-bottom {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

/* --- Responsive Media Queries --- */
@media (max-width: 992px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 2.8rem; }
  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: var(--bg-card);
    flex-direction: column;
    padding: 2rem;
    align-items: flex-start;
    transition: left var(--transition-normal);
  }
  .nav-menu.active {
    left: 0;
  }
  .hamburger-btn { display: flex; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.2rem; }
  .section { padding: 4rem 0; }
  .showcase-banner { padding: 2rem 1.5rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}
