/* ==========================================================================
   SRI VINAYAKA STORE - MAIN STYLESHEET
   Brand Identity: Fresh, Modern, Trustworthy Grocery E-commerce
   Design System & Component Library
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS & CSS VARIABLES
   -------------------------------------------------------------------------- */
:root {
  /* Brand Palette */
  --color-primary: #16834A;
  --color-primary-hover: #126b3c;
  --color-primary-light: #eaf6ef;
  --color-primary-dark: #173B2A;
  --color-deep-forest: #173B2A;
  
  --color-accent-yellow: #F4B740;
  --color-accent-yellow-light: #fef8eb;
  --color-accent-yellow-hover: #e0a32d;
  
  --color-bg-main: #F7FAF5;
  --color-surface-white: #FFFFFF;
  --color-surface-muted: #F0F4EE;
  
  --color-text-main: #26332B;
  --color-text-secondary: #65746A;
  --color-text-muted: #8c9e93;
  --color-text-inverse: #FFFFFF;
  
  --color-border: #E5EBE4;
  --color-border-subtle: #edf2ec;
  --color-border-focus: #16834A;
  
  /* Status Colors */
  --color-success: #15803D;
  --color-success-bg: #eaf7ee;
  --color-error: #DC2626;
  --color-error-bg: #fee2e2;
  --color-warning: #D97706;
  --color-warning-bg: #fef3c7;
  --color-info: #2563EB;
  --color-info-bg: #eff6ff;

  /* Typography */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Elevation & Shadows */
  --shadow-xs: 0 1px 2px rgba(22, 59, 42, 0.05);
  --shadow-sm: 0 2px 6px rgba(22, 59, 42, 0.06);
  --shadow-md: 0 4px 14px rgba(22, 59, 42, 0.08);
  --shadow-lg: 0 10px 28px rgba(22, 59, 42, 0.12);
  --shadow-xl: 0 20px 40px rgba(22, 59, 42, 0.16);

  /* Border Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --container-max: 1240px;
  --header-height: 80px;
  --topbar-height: 38px;
}

/* --------------------------------------------------------------------------
   2. GLOBAL RESET & BASE STYLES
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-text-main);
  background-color: var(--color-bg-main);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

img, svg, picture {
  display: block;
  max-width: 100%;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* Accessibility Focus Ring */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-deep-forest);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2rem, 3.5vw, 2.75rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
  color: var(--color-text-secondary);
  margin-bottom: 0.75rem;
}

p:last-child {
  margin-bottom: 0;
}

.text-muted { color: var(--color-text-muted); }
.text-primary { color: var(--color-primary); }
.text-dark { color: var(--color-deep-forest); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* --------------------------------------------------------------------------
   4. LAYOUT & CONTAINERS
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.section {
  padding: 3.5rem 0;
}

.section-sm {
  padding: 2rem 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
}

.section-title-wrap h2 {
  margin-bottom: 0.35rem;
}

.section-title-wrap p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--color-primary);
  white-space: nowrap;
}

.view-all-link:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   5. UI COMPONENTS - BUTTONS & CONTROLS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-align: center;
  user-select: none;
  white-space: nowrap;
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: 0 2px 4px rgba(22, 131, 74, 0.2);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  color: var(--color-text-inverse);
  box-shadow: 0 4px 10px rgba(22, 131, 74, 0.3);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--color-surface-white);
  color: var(--color-deep-forest);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-surface-muted);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

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

.btn-outline:hover {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
}

.btn-accent {
  background-color: var(--color-accent-yellow);
  color: var(--color-deep-forest);
}

.btn-accent:hover {
  background-color: var(--color-accent-yellow-hover);
}

.btn-danger {
  background-color: var(--color-error);
  color: var(--color-text-inverse);
}

.btn-danger:hover {
  background-color: #b91c1c;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Badge System */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-discount {
  background-color: var(--color-accent-yellow);
  color: var(--color-deep-forest);
}

.badge-fresh {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
}

.badge-out {
  background-color: var(--color-error-bg);
  color: var(--color-error);
}

.badge-low {
  background-color: var(--color-warning-bg);
  color: var(--color-warning);
}

/* --------------------------------------------------------------------------
   6. TOPBAR & MAIN HEADER
   -------------------------------------------------------------------------- */
.topbar {
  background-color: var(--color-deep-forest);
  color: #c9d8ce;
  font-size: 0.825rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.topbar-badge {
  background-color: rgba(244, 183, 64, 0.2);
  color: var(--color-accent-yellow);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.725rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.topbar-link {
  color: #c9d8ce;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.topbar-link:hover {
  color: #FFFFFF;
}

/* Site Header */
.site-header {
  background-color: var(--color-surface-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 990;
  transition: box-shadow var(--transition-normal);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1.5rem;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.brand-icon-box {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-deep-forest));
  color: #ffffff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(22, 131, 74, 0.25);
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-deep-forest);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Delivery Location Selector */
.location-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  background-color: var(--color-surface-muted);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.location-selector:hover {
  border-color: var(--color-border);
  background-color: #e9f0e6;
}

.location-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.location-label {
  font-size: 0.7rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.location-name {
  font-weight: 700;
  color: var(--color-deep-forest);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Header Search Bar */
.header-search {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  background-color: var(--color-surface-muted);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 0.25rem 0.5rem 0.25rem 1rem;
  transition: all var(--transition-fast);
}

.search-input-wrap:focus-within {
  border-color: var(--color-primary);
  background-color: var(--color-surface-white);
  box-shadow: 0 0 0 3px rgba(22, 131, 74, 0.12);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.45rem 0.5rem;
  font-size: 0.925rem;
  color: var(--color-text-main);
  outline: none;
}

.search-input::placeholder {
  color: var(--color-text-muted);
}

.search-btn {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

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

/* Live Search Dropdown */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background-color: var(--color-surface-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-height: 380px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.search-results-dropdown.active {
  display: block;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border-subtle);
  transition: background-color var(--transition-fast);
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover {
  background-color: var(--color-surface-muted);
}

.search-item-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background-color: var(--color-surface-muted);
}

.search-item-info {
  flex: 1;
}

.search-item-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-deep-forest);
}

.search-item-meta {
  font-size: 0.775rem;
  color: var(--color-text-secondary);
}

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

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--color-deep-forest);
  font-weight: 600;
  font-size: 0.9rem;
  position: relative;
  transition: all var(--transition-fast);
}

.action-btn:hover {
  background-color: var(--color-surface-muted);
  color: var(--color-primary);
}

.action-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background-color: var(--color-primary);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cart-btn-header {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
}

.cart-btn-header:hover {
  background-color: #d8eee1;
  color: var(--color-primary-dark);
}

/* Category Navigation Bar */
.category-nav-bar {
  background-color: var(--color-surface-white);
  border-bottom: 1px solid var(--color-border);
  padding: 0.5rem 0;
}

.category-nav-list {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.category-nav-list::-webkit-scrollbar {
  display: none;
}

.nav-link {
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--color-text-secondary);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0;
  position: relative;
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  right: 0;
  height: 2.5px;
  background-color: var(--color-primary);
  border-radius: var(--radius-pill);
}

/* Mobile Header Hamburger */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-deep-forest);
  padding: 0.4rem;
}

/* --------------------------------------------------------------------------
   7. HERO BANNER
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 2.5rem 0 1.5rem;
}

.hero-card {
  background: linear-gradient(110deg, #173B2A 0%, #1a5739 55%, #246a48 100%);
  color: #FFFFFF;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  min-height: 380px;
}

.hero-content {
  padding: 3.5rem 3rem;
  z-index: 2;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: rgba(244, 183, 64, 0.2);
  color: var(--color-accent-yellow);
  border: 1px solid rgba(244, 183, 64, 0.4);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.825rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero-title {
  color: #FFFFFF;
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-subtitle {
  color: #d1dfd6;
  font-size: 1.05rem;
  max-width: 480px;
  margin-bottom: 2rem;
}

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

.hero-features-list {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-feat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #e3ede6;
  font-weight: 500;
}

.hero-feat-icon {
  color: var(--color-accent-yellow);
}

.hero-image-wrap {
  position: relative;
  height: 100%;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.hero-img {
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

/* --------------------------------------------------------------------------
   8. CATEGORY CARDS & GRID
   -------------------------------------------------------------------------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
}

.category-card {
  background-color: var(--color-surface-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 0.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  transition: all var(--transition-normal);
  cursor: pointer;
}

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

.category-icon-box {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background-color: var(--color-surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  transition: all var(--transition-fast);
  overflow: hidden;
}

.category-icon-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card:hover .category-icon-box {
  background-color: var(--color-primary);
  color: #FFFFFF;
}

.category-title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-deep-forest);
  line-height: 1.2;
}

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

/* --------------------------------------------------------------------------
   9. PRODUCT CARDS & GRID
   -------------------------------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.product-card {
  background-color: var(--color-surface-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-normal);
  height: 100%;
}

.product-card:hover {
  border-color: #bcdbc7;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* Card Badges & Actions Overlay */
.product-badge-wrap {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 2;
}

.wishlist-btn {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 2;
  box-shadow: var(--shadow-xs);
}

.wishlist-btn:hover {
  color: var(--color-error);
  background-color: #FFFFFF;
  transform: scale(1.08);
}

.wishlist-btn.active {
  color: var(--color-error);
}

.wishlist-btn.active svg {
  fill: currentColor;
}

/* Product Media */
.product-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--color-surface-muted);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.quick-view-btn {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: rgba(23, 59, 42, 0.9);
  color: #FFFFFF;
  font-size: 0.775rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  opacity: 0;
  transition: all var(--transition-fast);
  pointer-events: none;
  white-space: nowrap;
}

.product-card:hover .quick-view-btn {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Product Body */
.product-category-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.product-name {
  font-family: var(--font-heading);
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--color-deep-forest);
  line-height: 1.3;
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.product-name a:hover {
  color: var(--color-primary);
}

.product-unit {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.85rem;
}

/* Product Footer */
.product-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

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

.price-current {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-deep-forest);
  line-height: 1.1;
}

.price-original {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-decoration: line-through;
  margin-top: 0.15rem;
}

/* Add to Cart / Quantity Selector */
.product-action-box {
  position: relative;
}

.btn-add-cart {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid #c7e5d2;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.btn-add-cart:hover {
  background-color: var(--color-primary);
  color: #FFFFFF;
  border-color: var(--color-primary);
}

.qty-control {
  display: inline-flex;
  align-items: center;
  background-color: var(--color-primary);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.qty-btn {
  background: transparent;
  color: #FFFFFF;
  width: 30px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  transition: background-color var(--transition-fast);
}

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

.qty-value {
  padding: 0 0.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  min-width: 24px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   10. PROMO BANNER / FEATURES SECTION
   -------------------------------------------------------------------------- */
.promo-strip {
  background: linear-gradient(90deg, #F4B740 0%, #f6c464 100%);
  color: var(--color-deep-forest);
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 2rem 0;
}

.promo-text h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
  color: var(--color-deep-forest);
}

.promo-text p {
  color: #4a4022;
  font-size: 0.925rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background-color: var(--color-surface-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: box-shadow var(--transition-fast);
}

.feature-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: #cfded2;
}

.feature-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-body h4 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.feature-body p {
  font-size: 0.85rem;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   11. FORMS & INPUT CONTROLS
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-deep-forest);
  margin-bottom: 0.45rem;
}

.form-label .required {
  color: var(--color-error);
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.95rem;
  font-size: 0.925rem;
  color: var(--color-text-main);
  background-color: var(--color-surface-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(22, 131, 74, 0.12);
}

.form-control::placeholder {
  color: var(--color-text-muted);
}

.form-control.is-invalid {
  border-color: var(--color-error);
  background-color: #fffafa;
}

.form-control.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.invalid-feedback {
  display: block;
  font-size: 0.8rem;
  color: var(--color-error);
  margin-top: 0.35rem;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.35rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* Radio & Checkbox styling */
.custom-checkbox, .custom-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-text-main);
  cursor: pointer;
  user-select: none;
}

.custom-checkbox input, .custom-radio input {
  accent-color: var(--color-primary);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   12. MODAL & DIALOG SYSTEM
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(23, 59, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background-color: var(--color-surface-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.modal-backdrop.active .modal-box {
  transform: scale(1);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background-color: var(--color-surface-muted);
  color: var(--color-deep-forest);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* --------------------------------------------------------------------------
   13. TOAST NOTIFICATIONS
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background-color: var(--color-deep-forest);
  color: #FFFFFF;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  max-width: 360px;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.toast-success {
  background-color: #15803d;
}

.toast.toast-error {
  background-color: #b91c1c;
}

.toast.toast-warning {
  background-color: #b45309;
}

@keyframes toastIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   14. EMPTY, LOADING & SKELETON STATES
   -------------------------------------------------------------------------- */
.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background-color: var(--color-surface-white);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-xl);
  margin: 1.5rem 0;
}

.empty-icon-box {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--color-surface-muted);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--color-text-secondary);
  max-width: 400px;
  margin: 0 auto 1.5rem;
  font-size: 0.925rem;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #eef2ec 25%, #f7faf5 50%, #eef2ec 75%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

/* --------------------------------------------------------------------------
   15. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-deep-forest);
  color: #c0d1c6;
  padding: 4rem 0 2rem;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

.footer-brand .brand-title {
  color: #FFFFFF;
}

.footer-brand .brand-subtitle {
  color: var(--color-accent-yellow);
}

.footer-about {
  margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #a8bfae;
  max-width: 320px;
}

.footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.875rem;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #c0d1c6;
}

.footer-col-title {
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

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

.footer-link {
  color: #a8bfae;
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: #FFFFFF;
  padding-left: 4px;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.825rem;
  color: #8fa695;
}

.footer-legal-links {
  display: flex;
  gap: 1.5rem;
}

.footer-legal-links a:hover {
  color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   16. MOBILE DRAWER & BOTTOM NAV
   -------------------------------------------------------------------------- */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(23, 59, 42, 0.6);
  backdrop-filter: blur(3px);
  z-index: 1020;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.mobile-drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 82%;
  max-width: 320px;
  background-color: var(--color-surface-white);
  z-index: 1030;
  transform: translateX(-100%);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
}

.mobile-drawer-backdrop.active .mobile-drawer {
  transform: translateX(0);
}

.drawer-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-body {
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  color: var(--color-deep-forest);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.drawer-nav-item:hover, .drawer-nav-item.active {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
}

/* Mobile Fixed Bottom Nav */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: var(--color-surface-white);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  z-index: 980;
  align-items: center;
  justify-content: space-around;
  padding: 0 0.5rem;
}

.bottom-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  position: relative;
  flex: 1;
  height: 100%;
}

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

.bottom-nav-badge {
  position: absolute;
  top: 6px;
  right: 25%;
  background-color: var(--color-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   17. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-content {
    padding: 2.5rem 2rem;
  }
  .hero-image-wrap {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .topbar {
    display: none;
  }
  .location-selector {
    display: none;
  }
  .category-nav-bar {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .mobile-bottom-nav {
    display: flex;
  }
  body {
    padding-bottom: 60px; /* offset for bottom nav */
  }
  .header-actions .action-text {
    display: none;
  }
  .header-search {
    order: 3;
    max-width: 100%;
    width: 100%;
  }
  .header-main {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.65rem 0;
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }
  .product-card {
    padding: 0.75rem;
  }
  .product-name {
    font-size: 0.875rem;
  }
  .price-current {
    font-size: 1rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }
  .btn-add-cart {
    padding: 0.4rem 0.65rem;
    font-size: 0.775rem;
  }
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
  }
}
