/* FreshMarket Responsive Global CSS Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  --primary: #0b793a;
  --primary-hover: #08602e;
  --primary-light: #e6f4ec;
  --accent: #10b981;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border-light: #e2e8f0;
  --badge-organic: #10b981;
  --badge-sale: #ef4444;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header & Top Bar Navigation */
.header-container {
  background: white;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.5px;
}

.brand-logo .dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
  font-weight: 600;
}

.search-bar {
  flex: 1;
  max-width: 420px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  background: #f1f5f9;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.search-bar input:focus {
  background: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 121, 58, 0.1);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 16px;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  font-size: 20px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.icon-btn:hover {
  color: var(--primary);
}

.badge-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.account-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #f1f5f9;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: background 0.2s;
}

.account-pill:hover {
  background: #e2e8f0;
}

/* Page Layout Container */
.main-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* UI Badges & Buttons */
.btn-primary {
  background: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: rgba(255,255,255,0.85);
  color: #1e293b;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--border-light);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: white;
  border-color: #cbd5e1;
}

.badge-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  color: white;
  display: inline-block;
}

.badge-tag.organic {
  background: var(--badge-organic);
}

.badge-tag.sale {
  background: var(--badge-sale);
}

/* Homepage Hero Section */
.hero-section {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  height: 420px;
  background: url('https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  display: flex;
  align-items: center;
  padding: 0 50px;
  margin-bottom: 32px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 520px;
  color: white;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.9);
  color: white;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
}

.hero-subtitle {
  font-size: 15px;
  color: #e2e8f0;
  margin-bottom: 24px;
}

/* Value Props Banner */
.value-props {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.prop-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.prop-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.prop-title {
  font-weight: 700;
  font-size: 15px;
  color: #0f172a;
}

.prop-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* Browse Categories Section */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
}

.section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.categories-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: repeat(2, 180px);
  gap: 20px;
  margin-bottom: 48px;
}

.category-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-card:hover img {
  transform: scale(1.05);
}

.category-card.large {
  grid-row: span 2;
}

.category-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
  color: white;
}

.category-name {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.category-subtext {
  font-size: 12px;
  color: #cbd5e1;
}

/* Product Cards Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.product-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.product-img-box {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 12px;
  border-radius: 8px;
  overflow: hidden;
  background: #fafafa;
}

.product-img-box img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.product-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.wishlist-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  cursor: pointer;
  z-index: 2;
  transition: color 0.2s;
}

.wishlist-btn:hover {
  color: #ef4444;
}

.product-brand {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 2px;
}

.product-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
  line-height: 1.3;
}

.product-weight {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.product-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  display: flex;
  flex-direction: column;
}

.price-main {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
}

.price-old {
  font-size: 11px;
  color: #94a3b8;
  text-decoration: line-through;
}

.add-cart-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
}

.add-cart-icon:hover {
  background: var(--primary-hover);
}

/* Newsletter Section */
.newsletter-card {
  background: linear-gradient(135deg, #0b793a 0%, #054f24 100%);
  border-radius: 24px;
  padding: 48px;
  color: white;
  text-align: center;
  margin-bottom: 48px;
}

.newsletter-title {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
}

.newsletter-subtext {
  font-size: 14px;
  color: #a7f3d0;
  margin-bottom: 28px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form {
  display: flex;
  justify-content: center;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  border: none;
  outline: none;
  font-size: 14px;
}

/* Footer Section */
.footer-main {
  background: white;
  border-top: 1px solid var(--border-light);
  padding: 48px 0 24px;
  color: #64748b;
  font-size: 13px;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}

.footer-col h4 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-dark);
  font-size: 14px;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

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

.footer-col ul li a:hover {
  color: var(--primary);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 0;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .categories-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .category-card.large {
    grid-row: span 1;
  }
  .value-props {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .hero-section {
    height: 320px;
    padding: 24px;
  }
  .hero-title {
    font-size: 28px;
  }
  .categories-grid {
    grid-template-columns: 1fr;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
