html, body {
  height: 100%;
  margin: 0;
}

html {
  font-family: var(--font-family-primary);
  position: relative;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--white);
  color: var(--dark-gray);
  line-height: var(--line-height-normal);
  overflow-x: hidden; /* Prevent horizontal scrolling */
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
}

/* Additional custom variables for LocalFarmersHub specific features */
:root {
  --consumer-color: #FF8800; /* Vibrant orange for consumers */
  --farmer-color: #387a29;   /* Green for farmers */
  --accent-color: #EFE3C2;
}

.btn:focus, .btn:active {
  box-shadow: 0 0 0 0.25rem rgba(56, 122, 41, 0.25);
}

main {
  flex: 1 0 auto;
  padding-bottom: 60px;
}

/* Form styling */
.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(56, 122, 41, 0.25);
}

/* Navbar styling */
.navbar {
  background-color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 1rem;
  /* NEW: Add min-height and adjusted padding */
  min-height: 72px;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  align-items: center; /* Ensure vertical alignment */
}

header.sticky-top {
  position: sticky;
  top: 0;
  z-index: 1020;
  width: 100%;
}

.navbar-brand, .nav-link {
  color: var(--text-light) !important;
  transition: var(--transition);
  font-weight: 600;
  white-space: nowrap; /* Prevent text wrapping */
}

.navbar-logo {
  height: auto; /* Let max-height control */
  max-height: 56px; /* Adjust to fit new navbar height */
  object-fit: contain;
  transform: scale(1.5); /* Keep existing scale */
  transform-origin: center;
  margin-top: -10px;
  margin-bottom: -10px;
  margin-right: 0.5rem;
}

.navbar-brand img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.nav-link:hover {
  color: var(--accent-color) !important;
  transform: translateY(-2px);
}

.navbar-toggler {
  border-color: var(--text-light);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23FFFFFF' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Enhanced Footer styling */
.footer-enhanced {
  flex-shrink: 0;
  background-color: var(--light-bg);
  padding: 3rem 0 2rem;
  border-top: 1px solid #e9ecef;
  margin-top: auto;
  width: 100%;
}

.footer-enhanced h5 {
  font-weight: 600;
  margin-bottom: 1.2rem;
}

.footer-enhanced ul {
  padding-left: 0;
  list-style: none;
}

.footer-enhanced ul li {
  margin-bottom: 0.5rem;
}

.footer-enhanced a {
  color: var(--dark-text);
  text-decoration: none;
  transition: color var(--transition-speed);
}

.footer-enhanced a:hover {
  color: #ffc107 !important; /* Bootstrap yellow color for hover state */
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--light-bg);
  border: 1px solid #dee2e6;
  color: var(--dark-text);
  transition: all var(--transition-speed);
}

.social-icons a:hover {
  color: white !important; /* Ensure hover color overrides */
  background-color: #387a29 !important; /* Ensure hover background overrides */
  transform: translateY(-3px);
}

/* Enhanced Button styling with more vibrant colors */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--text-light);
  transition: var(--transition);
  box-shadow: var(--shadow);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* Consumer-focused button (orange) */
.btn-consumer {
  background-color: var(--consumer-color);
  border-color: var(--consumer-color);
  color: white;
  transition: var(--transition);
  box-shadow: var(--shadow);
  font-weight: 600;
}

.btn-consumer:hover {
  background-color: #e67e00;
  border-color: #e67e00;
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(255, 136, 0, 0.3);
}

/* Farmer-focused button (green) */
.btn-farmer {
  background-color: var(--farmer-color);
  border-color: var(--farmer-color);
  color: white;
  transition: var(--transition);
  box-shadow: var(--shadow);
  font-weight: 600;
}

.btn-farmer:hover {
  background-color: #2d6321;
  border-color: #26561c;
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(56, 122, 41, 0.3);
}

/* Enhanced CTA Button Styling */
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
  border-radius: 0.5rem;
  transition: all var(--transition-speed);
}

.btn-success {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-success:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--hover-shadow);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--hover-shadow);
}

/* CTA Card Styling */
.cta-card {
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.4s ease;
  border: none;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.cta-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.consumer-card {
  border-bottom: 5px solid var(--consumer-color);
}

.farmer-card {
  border-bottom: 5px solid var(--farmer-color);
}

.cta-card .card-title {
  font-weight: 700;
  color: #333;
}

.cta-card .display-1 {
  font-size: 4rem;
  opacity: 0.9;
}

.consumer-card .display-1 {
  color: var(--consumer-color);
}

.farmer-card .display-1 {
  color: var(--farmer-color);
}

/* Final CTA Section Styling */
.container-fluid.py-5 {
  background-color: rgba(56, 122, 41, 0.05);
  border-radius: 0;
  margin-left: -15px;
  margin-right: -15px;
  width: calc(100% + 30px);
  max-width: none;
}

/* Card styling */
.card {
  border: none;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

.card-header {
  background-color: var(--primary-light);
  color: var(--text-light);
  font-weight: 600;
}

/* Table styling */
table {
  box-shadow: var(--shadow);
  border-radius: 8px;
  overflow: hidden;
}

.table thead th {
  background-color: var(--primary-light);
  color: var(--text-light);
  border-color: var(--primary-dark);
}

/* Container styling */
.container {
  padding: 1.5rem 1rem;
}

/* Link styling */
a {
  color: var(--primary-color);
  transition: var(--transition);
}

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

/* Hero section enhancements */
.hero-section {
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from { 
    opacity: 0; 
    transform: translateY(-30px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-section h1 {
  color: var(--primary-color);
  font-weight: 800;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

/* Mission image container */
.mission-image-container {
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease;
}

.mission-image-container:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

/* Enhanced CTA final section */
.cta-final-section {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
  border-radius: 1rem;
  padding: 3rem 2rem !important;
  margin: 3rem 0;
  color: white;
  text-align: center;
}

.cta-final-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-final-section .lead {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.cta-final-section .btn {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Object fit utilities */
.object-fit-cover {
  object-fit: cover;
}

.object-fit-contain {
  object-fit: contain;
}

/* Hero section img styling */
.hero-section img {
  transform: rotate(2deg);
  transition: var(--transition);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  border: 5px solid white;
}

.hero-section img:hover {
  transform: rotate(0) scale(1.05);
}

/* Search Form Styling */
.search-form .input-group-text {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.search-form .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(56, 122, 41, 0.25);
}

/* Badge styling */
.badge {
  padding: 0.5em 0.8em;
  font-weight: 500;
  transition: var(--transition);
}

.badge.bg-light {
  color: var(--primary-dark);
  border: 1px solid #ddd;
}

.badge.bg-light:hover {
  background-color: #e2e6ea!important;
}

.badge.bg-primary {
  background-color: var(--primary-color)!important;
}

/* Testimonial card styling */
.testimonial-card {
  border-radius: 12px;
  overflow: hidden;
  border-left: 4px solid var(--primary-light);
  transition: var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Enhanced card styling for product images */
.card-img-top {
  height: 200px;
  object-fit: cover;
  transition: var(--transition);
  aspect-ratio: 3/2;
}

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

/* Styled figure captions for product images */
figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
}

figcaption {
  position: absolute;
  bottom: 0;
  width: 100%;
  background-color: rgba(56, 122, 41, 0.8);
  color: white;
  padding: 0.5rem;
  transform: translateY(100%);
  transition: var(--transition);
}

figure:hover figcaption {
  transform: translateY(0);
}

/* Improved spacing for sections */
section {
  margin-bottom: 4rem;
}

/* Product card styling */
.product-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card a {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-card .card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-card .card-title {
  font-weight: 600;
}

/* Product image styling - using 3:2 aspect ratio for better display of mobile photos */
.product-image {
  height: 200px;
  object-fit: cover;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  aspect-ratio: 3/2;
}

.product-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
}

.product-price {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary-color);
}

/* Banner image styling */
.banner-img {
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 2rem;
}

/* Quantity badge */
.quantity-badge {
  background-color: rgba(56, 122, 41, 0.1);
  color: var(--primary-color);
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}

/* Animation for cards and images */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Pulsating effect for primary CTAs */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(56, 122, 41, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(56, 122, 41, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(56, 122, 41, 0);
  }
}

.btn-pulse {
  animation: pulse 2s infinite;
}

/* Search and filter section */
.search-box {
  background-color: var(--light-bg);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--card-shadow);
}

/* Product type filters */
.product-type-filter {
  display: inline-block;
  background-color: var(--light-bg);
  color: var(--dark-text);
  padding: 0.5rem 1rem;
  margin: 0 0.5rem 0.5rem 0;
  border-radius: 2rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-speed);
  border: 1px solid #dee2e6;
}

.product-type-filter:hover, .product-type-filter.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  background-color: var(--light-bg);
  border-radius: 0.5rem;
  margin: 2rem 0;
}

.empty-state i {
  font-size: 3rem;
  color: #dee2e6;
  margin-bottom: 1rem;
}

/* Enhanced Farm Image Container Styling for Dynamic Products */
.farm-image-container {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  height: 200px; /* Default height for featured products */
}

/* Override height when farm-image-container contains a ratio */
.farm-image-container .ratio {
  height: auto;
}

/* Specific styling for About page mission image container */
.farm-image-container.position-relative {
  height: auto; /* Allow ratio to control height */
}

/* Custom Bootstrap ratio for 3:4 portrait orientation */
.ratio-3x4 {
  --bs-aspect-ratio: 133.33%; /* 4/3 * 100 = 133.33% for portrait 3:4 ratio */
}

.farm-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s ease-out;
}

.farm-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgba(46, 125, 50, 0.9) 0%, rgba(46, 125, 50, 0.8) 100%);
  color: white;
  padding: 0.75rem 1rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.025em;
  transform: translateY(0);
  transition: transform 0.3s ease-out, background 0.3s ease;
}

.farm-image-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.farm-image-container:hover .farm-image {
  transform: scale(1.1);
}

.farm-image-container:hover .farm-image-overlay {
  background: linear-gradient(0deg, rgba(46, 125, 50, 1) 0%, rgba(46, 125, 50, 0.9) 100%);
}

@media (max-width: 768px) {
  .farm-image-container {
    height: 160px;
  }
  
  .farm-image-overlay {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
}

/* --- Product Search Bar Input Group Styling --- */

/* Ensure consistent height and vertical alignment for all elements in the group */
.search-form .input-group {
    align-items: stretch; /* Make items fill the group height */
}

.search-form .input-group > *,
.search-form .input-group-text,
.search-form .form-control,
.search-form .mapboxgl-ctrl-geocoder input[type='text'],
.search-form .btn,
.search-form .form-select,
.search-form .mapboxgl-ctrl-geocoder {
    height: auto; /* Let padding and line-height determine height */
    min-height: 38px; /* Set a minimum height consistent with Bootstrap */
    display: flex; /* Use flex for alignment within each item */
    align-items: center; /* Center content vertically */
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
}

/* Specific adjustments */
.search-form .input-group-text {
    background-color: #e9ecef; /* Lighter background */
    border-color: #ced4da;
    color: #495057;
    border-right: none; /* Remove right border */
}

.search-form .form-control,
.search-form .mapboxgl-ctrl-geocoder input[type='text'] {
    border-left: none; /* Remove left border to connect with icon */
    border-right: none; /* Remove right border */
    padding-left: 0.75rem;
}

.search-form .mapboxgl-ctrl-geocoder {
    border-left: none; 
    border-right: none;
    padding: 0; /* Remove default padding */
    flex: 1 1 auto; /* Allow geocoder to take available space */
}

.search-form .mapboxgl-ctrl-geocoder input[type='text'] {
    padding-left: 0.75rem;
    width: 100%; /* Ensure input fills the geocoder container */
}

.search-form .form-select {
    border-left: none;
    border-right: none;
    width: auto; /* Allow select to size based on content */
    min-width: 6rem; /* Give it some minimum space */
}

.search-form #toggleMapBtn {
    border-left: none;
    border-right: none;
    background-color: #fff; /* Match input background */
    color: #6c757d; /* Muted color for icon */
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.search-form #toggleMapBtn:hover {
    background-color: #e9ecef;
}

/* Ensure correct rounding - applies to the group itself */
.search-form .input-group {
    border: 1px solid #ced4da;
    border-radius: 0.375rem; /* Bootstrap default */
    overflow: hidden; /* Clip children to the rounded border */
}

/* Remove individual borders and shadows from children */
.search-form .input-group > *,
.search-form .input-group-text,
.search-form .form-control,
.search-form .mapboxgl-ctrl-geocoder,
.search-form .mapboxgl-ctrl-geocoder input[type='text'],
.search-form .btn,
.search-form .form-select {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important; /* Remove individual rounding */
}

/* Fix focus state - apply focus ring to the whole group when an input within is focused */
.search-form .input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(56, 122, 41, 0.25); /* Use site's primary focus shadow */
    z-index: 5; /* Bring to front */
}

/* --- End Product Search Bar Styling --- */


/* Mobile-friendly enhancements - Added for better responsive design */
@media (max-width: 768px) {
  /* General mobile adjustments */
  body {
    padding-top: 0; /* Remove the padding-top to allow navbar to sit flush at top */
  }
  
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Navigation adjustments */
  .navbar-brand span {
    font-size: 1.1rem;
  }
  
  .navbar-brand img {
    width: 36px;
    height: 36px;
  }
  
  /* Form improvements */
  .form-group {
    margin-bottom: 0.75rem;
  }
  
  .form-control {
    font-size: 0.9rem;
    padding: 0.375rem 0.5rem;
  }
  
  /* Card adjustments */
  .card {
    margin-bottom: 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  /* Button improvements */
  .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .btn-lg {
    padding: 0.5rem 1rem;
    font-size: 1rem;
  }
  
  /* Product details */
  .product-card .card-img-top {
    height: 160px;
  }
  
  /* Form layout improvements */
  .col-md-6 {
    margin-bottom: 1rem;
  }
}

/* Enhanced mobile responsiveness */
@media (max-width: 768px) {
  .hero-section {
    background-position: center 20% !important;
    text-align: center;
    padding: 3rem 1rem;
  }
  
  .hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.85);
    z-index: 1;
  }
  
  .hero-section .container {
    position: relative;
    z-index: 2;
  }
  
  .hero-section h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .hero-section .lead {
    font-size: 1rem;
  }
  
  .cta-buttons {
    justify-content: center;
  }
  
  .cta-buttons .btn {
    width: 100%;
    margin-right: 0 !important;
    margin-bottom: 0.75rem;
  }

  /* Mobile Touch Target Optimization - Override default button sizing */
  .btn {
    min-height: 44px !important; /* iOS/Android recommended touch target */
    padding: 0.75rem 1rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .btn-lg {
    min-height: 50px !important;
    padding: 1rem 1.5rem !important;
  }

  /* Mobile-optimized button class for enhanced touch interaction */
  .btn-mobile-optimized {
    min-height: 48px !important;
    padding: 0.875rem 1.25rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 0.5rem !important;
    transition: all 0.2s ease !important;
    touch-action: manipulation !important; /* Optimize for touch devices */
  }

  /* Hero image mobile styling */
  .hero-image-mobile {
    max-width: 250px;
    height: auto;
    margin: 0 auto;
    opacity: 0.9;
    filter: brightness(1.1) contrast(1.05);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(56, 122, 41, 0.15);
    padding: 5px; /* Prevent text cutoff at edges */
    box-sizing: border-box; /* Ensure padding is included in dimensions */
  }
  
  body {
    margin-bottom: 0; /* Remove the excessive bottom margin */
  }

  .social-icons {
    margin-top: 1rem;
  }
  
  .cta-final-section {
    padding: 2rem 1rem !important;
  }
  
  .cta-final-section h2 {
    font-size: 2rem;
  }
  
  .cta-final-section .lead {
    font-size: 1rem;
  }

  /* Enhanced Hero Section Mobile Optimizations */
  .hero-section {
    padding: 1.5rem 0 !important;
  }

  .hero-section .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-section h1 {
    font-size: 2.25rem !important;
    line-height: 1.2 !important;
    margin-bottom: 1rem !important;
  }

  .hero-section .lead {
    font-size: 1.1rem !important;
    line-height: 1.4 !important;
    margin-bottom: 1.5rem !important;
  }

  /* Mobile image styling enhancements */
  .hero-image-mobile {
    animation: fadeInUp 0.8s ease-out;
    transform: translateZ(0); /* Force hardware acceleration */
    /* Ensure padding is maintained during animations */
    box-sizing: border-box;
  }

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translate3d(0, 20px, 0);
    }
    to {
      opacity: 0.9;
      transform: translate3d(0, 0, 0);
    }
  }
}

/* Desktop Hero Image Enhancements */
.hero-image-desktop {
  transition: transform 0.3s ease, opacity 0.3s ease;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(56, 122, 41, 0.15);
  padding: 5px; /* Prevent text cutoff at edges */
  max-width: 350px;
  height: auto;
  box-sizing: border-box; /* Ensure padding is included in dimensions */
}

.hero-image-desktop:hover {
  transform: scale(1.02) translateY(-2px);
  opacity: 0.95;
}

/* General logo with padding class for consistent text visibility */
.logo-with-padding {
  padding: 5px;
  box-sizing: border-box;
}

/* Global Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Styles for touch devices */
  .btn:hover {
    transform: none !important; /* Disable hover transforms on touch devices */
  }
  
  .btn:active {
    transform: scale(0.98) !important; /* Add subtle press feedback */
    transition: transform 0.1s ease !important;
  }
}

/* Fix for password inputs to hide browser's native eye button */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none !important;
}

input[type="password"] {
  /* Disable the native password reveal button in Chrome and Edge */
  -webkit-text-security: disc !important;
}

/* Ensure validation messages don't affect layout */
.form-floating {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-floating .text-danger {
  position: absolute;
  display: block;
  top: 100%;
  left: 0;
  right: 0;
  font-size: 0.75rem;
  padding-top: 0.25rem;
  z-index: 5;
}

.form-floating + .form-floating {
  margin-top: 1rem;
}

/* Add padding to bottom of form fields with validation errors */
.form-floating.mb-4, 
.form-floating.mb-5 {
  margin-bottom: 2rem !important;
}

/* Farmer Registration Form Styles */
#farmerRegistrationForm {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-top: 2rem; 
}

#farmerRegistrationForm .card {
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Add styles for validation messages */
.form-floating {
    position: relative;
    margin-bottom: 1.5rem;
}

.text-danger {
    position: absolute;
    bottom: -20px;
    font-size: 0.75rem;
    padding-top: 0.25rem;
}

/* Add space between form groups */
.form-floating + .form-floating {
    margin-top: 1rem;
}

/* Add padding to bottom of form fields with validation errors */
.mb-4.has-validation-error {
    margin-bottom: 2rem !important;
}

.mb-5.has-validation-error {
    margin-bottom: 2rem !important;
}

/* Hide browser's password reveal button */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

/* Force webkit to not show reveal button */
input[type="password"] {
    -webkit-text-security: disc !important;
}

/* Make the eye icon button more visible */
.btn-outline-secondary {
    z-index: 5;
}

/* Modern Product Card Styling */
.card.product-card {
  border: none;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.product-card .card-img-top {
  height: 180px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

/* Button Consistency in Product Cards */
.card-footer {
  background-color: transparent;
  border-top: none;
  padding: 1rem;
}

.card-footer .btn {
  border-radius: 0.5rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.card-footer .btn-outline-primary,
.card-footer .btn-outline-secondary,
.card-footer .btn-primary,
.card-footer .btn-outline-info,
.card-footer .btn-outline-danger {
  min-width: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.card-footer .dropdown-toggle {
  min-height: 38px;
  width: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
}

.card-footer .btn-outline-secondary.dropdown-toggle {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.card-footer .btn-outline-secondary.dropdown-toggle:hover {
  background-color: var(--primary-color);
  color: white;
}

.card-footer .bi-three-dots-vertical {
  font-size: 1.2rem;
}

/* Enhanced Mobile Product Card Experience */
@media (max-width: 768px) {
  .card-footer {
    padding: 0.75rem;
  }
  
  .card-footer .d-flex {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .card-footer .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 0.5rem;
  }
  
  .product-card .card-img-top {
    height: 150px;
  }
  
  .card-body {
    padding: 1rem 0.75rem;
  }
  
  .product-card .card-title {
    font-size: 1.1rem;
  }
  
  .dropdown-menu {
    width: 100%;
    padding: 0.5rem;
  }
  
  .dropdown-item {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
  }
}

/* Modern Typography for Millennials & Gen Z */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card-title {
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.badge {
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.5em 0.75em;
  border-radius: 0.4rem;
}

/* Enhanced Colors for Modern Appeal */
:root {
  --primary-color: #2E7D32;    /* Deeper green */
  --primary-hover: #1B5E20;    /* Darker green */
  --primary-light: #81C784;    /* Light green */
  --accent-color: #FFC107;     /* Amber accent */
  --secondary-color: #448AFF;  /* Modern blue */
  --surface-color: #FFFFFF;    /* Surface color */
  --background-color: #F5F5F5; /* Background color */
  --text-primary: #212121;     /* Primary text */
  --text-secondary: #757575;   /* Secondary text */
}

/* Additional Modern UI Enhancements for Gen Z & Millennials */

/* Card image hover effects */
.card:hover .card-img-top {
  transform: scale(1.05);
  transition: transform 0.5s ease;
}

/* Enhanced shadows for depth */
.shadow-modern {
  box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
}

/* Smooth transitions */
.btn, .card, .form-control, .nav-link, img, .badge {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Modern form controls */
.form-control {
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.form-control:focus {
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
}

/* Modern table styling */
.table thead th {
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-top: none;
  border-bottom: 2px solid var(--primary-color);
}

/* Hover effects for interactive elements */
.card, .btn, .nav-link {
  position: relative;
  overflow: hidden;
}

.card:hover, .btn:hover {
  transform: translateY(-5px);
}

/* Pill-shaped badges */
.badge {
  border-radius: 50rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.5em 0.85em;
}

/* Enhanced mobile responsiveness for badges and small UI elements */
@media (max-width: 576px) {
  .badge {
    font-size: 0.7rem;
    padding: 0.4em 0.7em;
  }
  
  .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .card-title {
    font-size: 1.1rem;
  }
}

/* Subtle animations for testimonial cards */
.testimonial-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
}

/* Refined footer for modern look */
.footer-enhanced {
  background: linear-gradient(to right, #f8f9fa 0%, #e9ecef 100%);
}

@media (max-width: 576px) {
  .card-footer .dropdown-toggle {
    min-height: 38px;
    width: 44px;
  }
}

/* Messaging System */
.message-icon {
    position: relative;
}

/* THIS IS FOR THE NAVBAR MAIL ICON BADGE ONLY */
.unread-count {
    position: absolute;
    top: 0px; 
    right: 0px; 
    transform: translate(45%, -45%);
    font-size: 0.7rem; 
    font-weight: 600;
    color: white;
    background-color: #dc3545; 
    min-width: 1.1rem; 
    height: 1.1rem; 
    line-height: 1.1rem;
    padding: 0; /* No padding for the small circular icon badge */
    text-align: center;
    border-radius: 50%; /* Perfect circle */
    box-shadow: 0 0 0 1px white, 0 1px 1px rgba(0,0,0,0.3);
    z-index: 10;
}

/* Notification Bell Styles */
.notification-bell {
    position: relative;
    color: white !important;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-bottom: calc(0.5rem + 2px); /* Add space for underline */
}

.notification-bell:hover {
    color: var(--accent-color) !important; /* Change to yellow on hover */
    text-decoration: none;
}

/* Add underline effect */
.notification-bell::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0.5rem;
    left: 50%;
    background-color: #ffffff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.notification-bell:hover::after {
    width: 100%;
}

.notification-count {
    position: absolute;
    top: 0px; 
    right: 0px; 
    transform: translate(45%, -45%);
    font-size: 0.7rem; 
    font-weight: 600;
    color: white;
    background-color: #dc3545; 
    min-width: 1.1rem; 
    height: 1.1rem; 
    line-height: 1.1rem;
    padding: 0; /* No padding for the small circular icon badge */
    text-align: center;
    border-radius: 50%; /* Perfect circle */
    box-shadow: 0 0 0 1px white, 0 1px 1px rgba(0,0,0,0.3);
    z-index: 10;
}

/* THIS IS FOR INLINE BADGES IN THE INBOX LIST */
.inbox-unread-count {
    display: inline-block;
    vertical-align: middle; /* Align with text */
    font-size: 0.75rem; 
    font-weight: 600;
    color: white;
    background-color: #dc3545; 
    min-width: 1.3rem;   
    height: 1.3rem;
    line-height: 1.3rem; 
    padding: 0 0.3em;    /* Small horizontal padding for multi-digit numbers */
    text-align: center;
    border-radius: 0.65rem; /* Rounded pill shape */
    box-shadow: 0 0 0 1px white, 0 1px 1px rgba(0,0,0,0.2);
    margin-left: 0.3rem; /* Space from the text it's next to */
}

/* Optional: A slightly larger version for H1 if needed. 
   To use, add class "inbox-unread-count-lg" to the span in Inbox.cshtml 
   next to the H1 title. */
.inbox-unread-count-lg {
    font-size: 0.9rem;
    min-width: 1.5rem;
    height: 1.5rem;
    line-height: 1.5rem;
    border-radius: 0.75rem; /* Correspondingly larger rounding */
    padding: 0 0.35em;
}

.message-item {
    transition: background-color 0.2s ease;
}

.message-item:hover {
    background-color: #f8f9fa;
}

.message-dropdown .dropdown-item {
    white-space: normal;
}

/* Message Thread Styles */
.message-actions {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.message:hover .message-actions {
    opacity: 1;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Account management styling */
.nav-pills .nav-link.active, .nav-pills .show>.nav-link {
    background-color: #387a29 !important;
    color: var(--text-light) !important;
}

/* Style inactive nav items */
.nav-pills .nav-link:not(.active) {
    color: #bdbdbd !important;
}

/* Hover effect for inactive nav items */
.nav-pills .nav-link:not(.active):hover {
    color: #787878 !important;
    background-color: rgba(56, 122, 41, 0.05);
}

/* === Custom Styles (Moved from About.cshtml & Enhanced) === */

/* Improved Base Readability (Already similar in existing body styles) */
/* body { line-height: 1.6; color: #333; } */ /* Ensure this doesn't conflict with existing body */

/* Better contrast for lead text */
.lead {
    color: #333; /* Slightly darker than default potentially */
}

/* Card hover effect */
.hover-lift {
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important; /* Using existing shadow variables might be better */
}

/* Icon circles for visual consistency */
.icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-circle i {
    font-size: 2rem;
}

/* Custom Green Color Utilities */
.custom-green {
    color: var(--primary-color) !important; /* Use variable */
}

.custom-green-bg {
    background-color: var(--primary-color) !important; /* Use variable */
}

.custom-green-bg-light {
    background-color: rgba(56, 122, 41, 0.1) !important;
}

/* Consistent Button Styles */
.btn-custom-green {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transition: all var(--transition-speed) ease;
}

.btn-custom-green:hover, .btn-custom-green:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.btn-outline-custom-green {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
    transition: all var(--transition-speed) ease;
}

.btn-outline-custom-green:hover, .btn-outline-custom-green:focus {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

/* White Button Styles (for dark backgrounds) */
.btn-custom-white {
    background-color: white;
    border-color: white;
    color: var(--primary-color);
    transition: all var(--transition-speed) ease;
}

.btn-custom-white:hover, .btn-custom-white:focus {
    background-color: #f8f9fa; /* Slightly off-white */
    border-color: #f8f9fa;
    color: var(--primary-hover);
}

.btn-outline-custom-white {
    color: white;
    border-color: white;
    background-color: transparent;
    transition: all var(--transition-speed) ease;
}

.btn-outline-custom-white:hover, .btn-outline-custom-white:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: white;
}

/* Ensure btn-lg styles are consistent */
.btn-lg {
    font-weight: 500;
    border-radius: 0.5rem; /* Consistent radius */
    /* Removed transform/shadow from base .btn-lg to avoid conflicts */
}

/* === End Custom Styles === */

/* Autocomplete Styles */
.ui-autocomplete {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.ui-autocomplete .ui-menu-item {
    padding: 0;
    border: none;
}

.ui-autocomplete .autocomplete-item {
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s;
}

.ui-autocomplete .ui-state-focus .autocomplete-item {
    background-color: #387a29;
    color: #fff;
    border: none;
    margin: 0;
}

/* Hide the default jQuery UI highlight */
.ui-state-active,
.ui-widget-content .ui-state-active {
    border: none;
    background: none;
    margin: 0;
}

/* Mobile-friendly enhancements - Added for better responsive design */
@media (max-width: 768px) {
  /* General mobile adjustments */
  body {
    padding-top: 0; /* Remove the padding-top to allow navbar to sit flush at top */
  }
  
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Navigation adjustments */
  .navbar-brand span {
    font-size: 1.1rem;
  }
  
  .navbar-brand img {
    width: 36px;
    height: 36px;
  }
  
  /* Form improvements */
  .form-group {
    margin-bottom: 0.75rem;
  }
  
  .form-control {
    font-size: 0.9rem;
    padding: 0.375rem 0.5rem;
  }
  
  /* Card adjustments */
  .card {
    margin-bottom: 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  /* Button improvements */
  .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .btn-lg {
    padding: 0.5rem 1rem;
    font-size: 1rem;
  }
  
  /* Product details */
  .product-card .card-img-top {
    height: 160px;
  }
  
  /* Form layout improvements */
  .col-md-6 {
    margin-bottom: 1rem;
  }
}

/* Even smaller screens */
@media (max-width: 576px) {
  /* More aggressive mobile styling */
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  /* Stack buttons on mobile */
  .form-group .btn + .btn, 
  .d-flex .btn + .btn {
    margin-top: 0.5rem;
    margin-left: 0 !important;
  }
  
  .d-flex.justify-content-between,
  .d-flex.justify-content-end {
    flex-direction: column;
    align-items: stretch !important;
  }
  
  .d-flex.justify-content-between .btn,
  .d-flex.justify-content-end .btn {
    margin-bottom: 0.5rem;
    width: 100%;
  }
  
  /* Adjust hero section */
  .hero-section h1 {
    font-size: 1.5rem;
  }
  
  .hero-section .lead {
    font-size: 1rem;
  }
  
  /* Smaller padding for better space usage */
  .card-body {
    padding: 0.75rem;
  }
  
  /* Adjust forms */
  .form-floating > label {
    font-size: 0.85rem;
  }
  
  /* Smaller image thumbnails */
  .img-thumbnail {
    max-height: 100px;
  }
  
  /* Full width form inputs */
  .form-control, .form-select {
    width: 100%;
  }
  
  /* Adjust footer */
  .footer-enhanced {
    text-align: center;
    padding: 1.5rem 0;
  }
  
  .social-icons {
    justify-content: center;
    margin-top: 1rem;
  }
  
  /* Table responsive */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
  }
}

/* Page specific mobile enhancements */
/* About page mobile responsiveness */
@media (max-width: 767.98px) {
  /* About page specific styles */
  .display-4 {
    font-size: 2.5rem;
  }
  
  .lead.fs-4 {
    font-size: 1.15rem !important;
  }
  
  .lead.fs-5 {
    font-size: 1.1rem !important;
  }
  
  /* Improve spacing between sections */
  .row.mb-5 {
    margin-bottom: 2rem !important;
  }
  
  .py-md-4 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }
  
  /* Better spacing for stacked content */
  .icon-circle {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
  }
  
  .icon-circle i {
    font-size: 1.5rem;
  }
}

/* Products page mobile responsiveness */
@media (max-width: 767.98px) {
  /* Product cards in grid */
  .product-card {
    margin-bottom: 1rem;
  }
  
  /* Adjust product detail page */
  .img-thumbnail {
    max-height: 150px;
    margin-bottom: 1rem;
  }
  
  /* Product form inputs */
  .form-floating {
    margin-bottom: 1rem;
  }
  
  /* Manage product images better on mobile */
  .cropper-container {
    max-width: 100%;
  }
  
  /* Inbox message preview */
  .message-item p.mb-1.text-truncate {
    max-width: 200px !important;
  }
  
  /* Profile page sections */
  .password-page-header {
    text-align: center;
    padding: 1rem !important;
  }
  
  .password-page-header h3 {
    font-size: 1.5rem !important;
  }
}

/* Account management mobile improvements */
@media (max-width: 767.98px) {
  /* Form headers */
  .form-floating {
    margin-bottom: 1.5rem;
  }
  
  /* Notification settings */
  .card.shadow-sm {
    margin-bottom: 1.5rem;
  }
  
  /* Button placement */
  .w-100.btn.btn-lg {
    padding: 0.5rem;
  }
}

/* Navbar mobile improvements */
@media (max-width: 576px) {
  /* Navbar brand and logo */
  .navbar-brand {
    font-size: 1rem;
  }
  
  .navbar-brand img {
    width: 32px;
    height: 32px;
  }
  
  /* Collapsed navbar spacing */
  .navbar-collapse {
    padding-top: 0.5rem;
  }
  
  .navbar-nav .nav-item {
    margin-bottom: 0.5rem;
  }
  
  /* Better search form on mobile */
  #searchForm {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    width: 100%;
  }
  
  #searchForm .position-relative {
    width: 100%;
  }
  
  #searchForm .form-control {
    height: 38px;
  }
  
  #searchForm .btn {
    height: 38px;
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Ensure login/register buttons stack properly */
  .navbar-collapse .d-flex {
    flex-direction: column;
    width: 100%;
  }
  
  .navbar-collapse .d-flex .btn {
    margin-bottom: 0.5rem;
    width: 100%;
    text-align: center;
  }
}

/* Fix autocomplete dropdown on mobile */
@media (max-width: 768px) {
  .ui-autocomplete {
    max-width: 90%;
    font-size: 0.9rem;
  }
  
  .ui-menu-item {
    padding: 10px;
  }
}

/* Touch-friendly improvements */
@media (max-width: 768px) {
  /* Larger touch targets */
  a, button, .btn, .nav-link, .form-check-input, .form-control {
    min-height: 44px;  /* Apple's recommended minimum touch target size */
    /* REMOVED: touch-action: manipulation - was causing touch failures on real devices */
  }

  /* Enhanced button touch interactions */
  button, .btn, input[type="button"], input[type="submit"] {
    cursor: pointer;
    /* REMOVED: touch-action: manipulation - was blocking touch events on mobile devices */
    -webkit-tap-highlight-color: rgba(56, 122, 41, 0.2);
    /* REMOVED: position: relative and z-index: 1 - was causing stacking issues */
  }

  /* Add more space between checkbox/radio options */
  .form-check {
    margin-bottom: 0.75rem;
  }

  .form-check-input {
    margin-top: 0.2rem;
    width: 18px;
    height: 18px;
    /* REMOVED: touch-action: manipulation - was causing touch failures */
  }

  /* Increase spacing for dropdowns */
  .dropdown-item {
    padding: 0.5rem 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    /* REMOVED: touch-action: manipulation - was causing touch failures */
  }

  /* Better spacing for buttons in rows */
  .btn-group > .btn {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Fix modal padding on small screens */
  .modal-body {
    padding: 1rem;
  }

  .modal-footer {
    padding: 0.75rem;
  }

  /* Ensure modal buttons are touch-friendly */
  .modal-footer .btn {
    min-height: 44px;
    padding: 0.75rem 1rem;
  }
  
  /* Make checkbox labels easier to tap */
  .form-check-label {
    padding: 0.25rem 0;
    display: inline-block;
  }
}

/* Footer fixes to remove extra space at bottom */
html, body {
  height: 100%;
  min-height: 100%;
  margin: 0;
}

@media (max-width: 768px) {
  main {
    padding-bottom: 20px; /* Reduce bottom padding on mobile */
  }
  
  .footer-enhanced {
    padding: 2rem 0 1.5rem; /* Less padding in footer on mobile */
  }
}

.navbar-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  transform: scale(1.5); /* Increase size */
  transform-origin: center;
  margin-top: -10px; /* Adjust positioning if needed */
  margin-bottom: -10px;
  margin-right: 0.5rem; /* Add some margin to the right */
}

.navbar-brand img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

/* Styles moved from _Layout.cshtml */
.suggestion-input {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    color: #999;
    background: transparent;
    pointer-events: none;
    padding: 6px 12px;
    overflow: hidden;
    white-space: nowrap;
    border: 1px solid transparent;
}
.search-input {
    background-color: white !important;
    color: #212529 !important;
    position: relative;
    z-index: 1;
}
.ui-autocomplete {
    z-index: 2000 !important;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid rgba(0,0,0,.1);
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    background-color: white;
}
.ui-menu-item {
    padding: 8px 12px;
    cursor: pointer;
}
.ui-menu-item:hover {
    background-color: #f8f9fa;
}
.ui-menu-item .autocomplete-item {
    color: #212529;
    font-size: 0.9rem;
}
#searchForm .input-group {
    position: relative;
    width: 100%;
}

.max-w-500 {
    max-width: 350px;
}

/* Button styling */
#searchForm .btn {
    transform: none !important;
    transition: background-color 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    height: 38px;
}

#searchForm .btn:active {
    transform: translateY(1px) !important;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125) !important;
}

/* Input styling */
#searchForm .form-control {
    height: 38px;
}

/* Footer styling */
.footer-enhanced a {
    color: #387a29 !important; /* Force green color */
}

.footer-enhanced a:hover {
    color: #ffc107 !important; /* Bootstrap yellow color for hover state */
}

.social-icons a {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #387a29 !important; /* Force green color */
    margin: 5px;
    padding: 0; /* Ensure no padding interferes */
    box-sizing: border-box; /* Include padding/border in element's total width and height */
    transition: all 0.3s ease;
    text-decoration: none; /* Ensure no underline affects layout */
}

.social-icons a:hover {
    color: white !important; /* Ensure hover color overrides */
    background-color: #387a29 !important; /* Ensure hover background overrides */
}

.social-icons i {
    font-size: 18px;
    line-height: 1; /* Ensure icon doesn't add extra height */
}

@media (max-width: 768px) {
    .social-icons a {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
    
    .social-icons i {
        font-size: 16px;
    }
}

@media (max-width: 991px) {
    .navbar-collapse {
        padding: 1rem 0;
    }
    #searchForm {
        margin: 1rem 0;
        width: 100%;
    }
    .max-w-500 {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .navbar-brand img {
        /* Base styles may cover this, adjust if needed */
    }
    
    /* Improved mobile search form */
    #searchForm {
        max-width: 100%;
    }
    
    #searchForm .input-group {
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
    }
    
    #searchForm .form-control {
        height: 36px;
        font-size: 0.9rem;
        border-right: none;
    }
    
    #searchForm .btn {
        padding: 0.25rem 0.5rem;
        height: 36px;
        font-size: 0.9rem;
        border-left: none;
        margin-left: -1px !important;
        width: auto;
    }
    
    #searchForm .suggestion-input {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
}

/* Custom Form Switch Styles */
.form-switch .form-check-input {
    /* Keep default background-image for unchecked state */
}

.form-switch .form-check-input:focus {
    border-color: rgba(56, 122, 41, 0.5); /* Slightly darker border on focus */
    box-shadow: 0 0 0 0.25rem rgba(56, 122, 41, 0.25); /* Green glow */
    /* Keep default background-image for focus state knob if desired */
}

.form-switch .form-check-input:checked {
    background-color: #387a29; /* Primary green background */
    border-color: #387a29;     /* Primary green border */
    /* Keep default background-image for checked state knob (white circle) */
}

/* Ensure hover states don't override focus */
.form-switch .form-check-input:hover:not(:checked) {
    /* Optional: Add a subtle hover effect for unchecked state if needed */
}

/* Override Bootstrap success colors with our brand green */
.text-success {
  color: #387a29 !important;
}

.bg-success {
  background-color: #387a29 !important;
}

.border-success {
  border-color: #387a29 !important;
}

.btn-success {
  background-color: #387a29 !important;
  border-color: #387a29 !important;
}

.btn-success:hover, 
.btn-success:focus {
  background-color: #2d6321 !important;
  border-color: #2d6321 !important;
}

.btn-outline-success {
  color: #387a29 !important;
  border-color: #387a29 !important;
}

.btn-outline-success:hover,
.btn-outline-success:focus {
  background-color: #387a29 !important;
  color: #fff !important;
}

/* Keep the opacity variations but adjust their base color */
.bg-success-subtle,
.bg-success.bg-opacity-10,
.bg-success.bg-opacity-25 {
  background-color: rgba(56, 122, 41, 0.1) !important;
}

.text-success-emphasis {
  color: #2d6321 !important;
}

/* Add additional classes as needed */

/* Add styles for Google Place Autocomplete web component */

/* Style the internal input to mimic Bootstrap's form-control */
gmp-place-autocomplete input {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem; /* From Bootstrap .form-control */
    font-size: 1rem; /* From Bootstrap .form-control */
    font-weight: 400;
    line-height: 1.5;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    background-clip: padding-box;
    border: var(--bs-border-width) solid var(--bs-border-color);
    appearance: none;
    /* Ensure correct height matching other form-controls */
    min-height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2)); /* From Bootstrap .form-control */
    /* Reset border radius - input-group structure should handle corners */
    border-radius: 0; 
    /* NEW: Force the input to properly fill its container */
    box-sizing: border-box !important;
    width: 100% !important;
}

/* NEW: Enhance the container component to properly fit in input groups */
gmp-place-autocomplete {
    display: flex !important;
    align-items: stretch !important; /* Makes the internal input stretch vertically */
    width: 100% !important; /* Ensure component takes full width available to it */
}

/* Add back: Focus styling for the autocomplete input */
gmp-place-autocomplete input:focus {
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  border-color: #86b7fe; /* Bootstrap focus color */
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); /* Bootstrap focus shadow */
}

/* --- Input Group Fixes for Place Autocomplete --- */

/* Remove left border radius from the internal input */
gmp-place-autocomplete input {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Remove left border radius from adjacent button/select */
.input-group > #geolocateBtn,
.input-group > #radiusSelect {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Desktop input group styling */
@media (min-width: 768px) {
    /* Set consistent height for all inputs and buttons */
    .search-form .input-group > *,
    .search-form .input-group-text,
    .search-form .form-control,
    .search-form .btn,
    .search-form .form-select,
    gmp-place-autocomplete input {
        height: 38px !important;
    }
    
    /* Ensure location autocomplete displays correctly */
    gmp-place-autocomplete {
        flex: 1;
        min-width: 0; /* Prevent flex items from overflowing */
    }
    
    /* Ensure the dropdown has enough width */
    #radiusSelect {
        min-width: 7rem;
        width: auto;
    }
    
    /* Make sure all input group icons are properly centered */
    .input-group-text {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.375rem 0.75rem;
    }
    
    /* Ensure buttons in input groups have consistent styling */
    .input-group .btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Border radius fixes for better connected appearance */
    .input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n+3), 
    .input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu) {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }
    
    /* Ensure search button has consistent styling */
    .search-form .btn.btn-primary {
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Mobile-specific overrides for wrapping and layout */
@media (max-width: 767.98px) {
    /* Override flex-nowrap on mobile to allow stacking */
    .input-group.flex-nowrap { 
        flex-wrap: wrap !important;
    }

    /* Create a grouped look for location input on mobile */
    .input-group > span.input-group-text:first-child,
    gmp-place-autocomplete,
    #geolocateBtn {
        /* Reset border radius for all elements */
        border-radius: 0.375rem !important;
    }
    
    /* Style the specific location input group */
    /* The green map pin icon takes full width */
    .input-group > span.input-group-text:first-child {
        width: 100%;
        margin-bottom: 0.5rem;
        justify-content: center;
        background-color: var(--primary-color);
        color: white;
        height: 42px; /* Match input height */
    }
    
    /* Autocomplete takes full width */
    #locationInput { 
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Position crosshair button and radius select in a row */
    #geolocateBtn {
        width: 15%; /* Small fixed percentage */
        margin-right: 2%;
        margin-bottom: 0.5rem;
        height: 42px; /* Match input height */
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #radiusSelect {
        width: 83%; /* Take remaining width */
        margin-bottom: 0.5rem;
        min-width: auto; /* Reset min-width */
        height: 42px; /* Match input height */
    }
    
    /* Make search button stand out */
    .col-md-2 .btn.btn-primary {
        height: 48px; /* Slightly taller */
        font-size: 1rem;
    }
}

/* --- End Input Group Fixes --- */

/* Filter Type Pills Styling - More dramatic version */
.filter-pill {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem !important;
    font-weight: 600 !important;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0 !important;
    margin: 0.25rem !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 5rem !important;
}

/* Inactive pill */
.badge.rounded-pill.bg-light.text-dark.filter-pill {
    background-color: white !important;
    color: #333 !important;
    border-color: #e0e0e0 !important;
}

/* Active pill */
.badge.rounded-pill.bg-primary.filter-pill {
    background-color: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 3px 8px rgba(56, 122, 41, 0.4) !important;
    border-color: var(--primary-color) !important;
    position: relative;
    transform: translateY(-2px);
}

.filter-pill:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
    border-color: #ccc !important;
}

/* Mobile-specific styling */
@media (max-width: 767.98px) {
    .filter-types-container > span {
        display: block !important;
        margin-bottom: 0.75rem !important;
        font-weight: 500 !important;
    }
    
    .filter-types-container .d-inline-flex {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }
    
    .filter-pill {
        font-size: 0.85rem !important;
        padding: 0.7rem 0.5rem !important;
        margin: 0.3rem !important;
        min-width: calc(33% - 0.6rem) !important; /* Roughly 3 per row with margins */
        flex-grow: 1 !important;
        text-align: center !important;
    }
}

/* Add custom styles here */
.navbar-logo {
    height: 40px; /* Adjust as needed */
    margin-right: 10px;
}

/* Enhance footer */
.footer-enhanced {
    background-color: #f8f9fa; /* Light background */
    padding: 40px 0;
    margin-top: 40px;
    border-top: 1px solid #e9ecef;
    font-size: 0.9rem;
}

.footer-enhanced h5 {
    color: #387a29; /* Green header text */
    margin-bottom: 15px;
}

.footer-enhanced p {
    color: #6c757d; /* Muted text color */
}

.footer-enhanced a {
    color: #495057;
    transition: color 0.2s ease;
}

.footer-enhanced a:hover {
    color: #387a29; /* Green on hover */
}

.footer-enhanced .list-unstyled li {
    margin-bottom: 8px;
}

.footer-enhanced .social-icons a {
    color: #495057;
    font-size: 1.5rem;
    margin-right: 15px;
    transition: color 0.2s ease;
}

.footer-enhanced .social-icons a:last-child {
    margin-right: 0;
}

.footer-enhanced .social-icons a:hover {
    color: #387a29; /* Green on hover */
}

.footer-link-green {
    color: #387a29 !important; /* Green color for specific links */
    text-decoration: none; /* Remove underline */
}

.footer-link-green:hover {
    color: #2a5920 !important; /* Darker green on hover */
    text-decoration: underline;
}

/* Product Card Enhancements */
.product-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.3s ease-in-out;
}

.product-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.product-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.product-price {
    font-weight: bold;
    color: #28a745; /* Green price */
}

/* Location Detection Enhancements */
.location-detect-btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.location-detect-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.location-detect-btn:disabled {
    transform: none;
    box-shadow: none;
}

.location-input-group {
    position: relative;
}

.location-icon {
    transition: color 0.3s ease;
}

.location-status-dynamic {
    animation: slideInUp 0.3s ease-out;
    margin-top: 0.25rem;
}

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

/* Spinning animation for loading states */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Enhanced mobile location detection */
@media (max-width: 768px) {
    .location-detect-btn {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }

    .location-input-group .form-control {
        font-size: 0.9rem;
    }

    .location-input-group .form-select {
        font-size: 0.9rem;
    }
}

/* ===================================================================
   MOBILE TOUCH INTERACTION FIXES
   =================================================================== */

/* Fix z-index conflicts for better touch interaction */
@media (max-width: 768px) {
  /* REMOVED: Aggressive z-index overrides - were causing stacking issues that blocked touch events */
  /* Only keep essential z-index fixes for mobile panel */
  .mobile-user-panel {
    z-index: 1060 !important;
  }

  /* Fix pointer events issues - KEEP THESE for working hamburger menu */
  .navbar-toggler-icon {
    pointer-events: none !important; /* Icon should not intercept clicks */
  }

  .navbar-toggler {
    pointer-events: auto !important; /* Button should receive clicks */
    touch-action: manipulation !important; /* KEEP - this makes hamburger work */
  }

  /* Ensure overlays don't block interactions */
  .premium-overlay {
    pointer-events: auto;
    /* REMOVED: z-index: 5 - was causing stacking issues */
  }

  .premium-overlay .btn {
    pointer-events: auto;
    /* REMOVED: touch-action and z-index - were causing touch failures */
  }

  /* Fix loading overlays */
  .loading-overlay {
    pointer-events: none; /* Allow clicks to pass through when not loading */
    z-index: 10;
  }

  .loading-overlay.active {
    pointer-events: auto; /* Block clicks when loading */
  }

  /* Ensure form elements are touch-friendly */
  input, select, textarea {
    /* REMOVED: touch-action: manipulation - was causing touch failures */
    min-height: 44px;
  }

  /* Fix button group interactions */
  .btn-group .btn {
    /* REMOVED: touch-action: manipulation - was causing touch failures */
    /* REMOVED: position: relative and z-index: 1 - was causing stacking issues */
  }

  .btn-group .btn:hover,
  .btn-group .btn:focus,
  .btn-group .btn:active {
    z-index: 2;
  }
}

/* ===================================================================
   MOBILE RADIO CARDS COMPONENT
   =================================================================== */

/* Enhanced Mobile Radio Cards - Modern Design with Complete Visual Replacement */
@media (max-width: 768px) {
  .mobile-radio-cards-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding: 0.25rem;
  }

  .mobile-radio-card {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-radio-card .icon {
    font-size: 1.8rem;
    color: #495057;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
  }

  .mobile-radio-card.selected .icon {
    color: var(--primary-color, #387a29);
  }

  .mobile-radio-card-text-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
  }

  .mobile-radio-card-title {
    font-weight: 600;
    font-size: 1rem;
    color: #343a40;
    line-height: 1.3;
    display: flex;
    align-items: center;
  }

  .mobile-radio-card.selected .mobile-radio-card-title {
    color: #2d6320;
  }

  .mobile-radio-card-description {
    font-size: 0.875rem;
    color: #6c757d;
    line-height: 1.4;
  }

  .mobile-radio-card-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25em 0.6em;
    border-radius: 1em;
    background-color: #ffc107;
    color: #212529;
    margin-left: 0.5rem;
  }

  /* Hover state for desktop/trackpad users */
  .mobile-radio-card:hover:not(.selected) {
    border-color: #387a29;
    background-color: #f8fdf8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 122, 41, 0.15);
  }

  /* Hovering state (mouse hover) */
  .mobile-radio-card.hovering {
    border-color: #387a29;
    background-color: #f8fdf8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 122, 41, 0.15);
  }

  /* Touch feedback */
  .mobile-radio-card.touching {
    transform: scale(0.98) translateY(1px);
    background-color: #f0f8f0;
    border-color: #387a29;
  }

  /* Selected state with enhanced visual feedback */
  .mobile-radio-card.selected {
    border-color: #387a29;
    background: linear-gradient(135deg, #f8fdf8 0%, #f0f8f0 100%);
    box-shadow: 0 4px 20px rgba(56, 122, 41, 0.25);
    transform: translateY(-2px);
  }

  /* Selection animation */
  .mobile-radio-card.selecting {
    animation: cardSelect 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }

  /* Enhanced card content layout */
  .mobile-radio-card-content {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 1rem;
    position: relative;
    z-index: 2;
  }

  /* Enhanced radio button icon container */
  .mobile-radio-card-check {
    position: relative;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }

  .mobile-radio-card-icon-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-radio-card-check i {
    position: absolute;
    font-size: 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Unchecked state */
  .mobile-radio-card-unchecked {
    color: #adb5bd;
    opacity: 1;
    transform: scale(1);
  }

  /* Checked state */
  .mobile-radio-card-checked {
    color: #387a29;
    opacity: 0;
    transform: scale(0.5);
  }

  /* Selected card icon states */
  .mobile-radio-card.selected .mobile-radio-card-unchecked {
    opacity: 0;
    transform: scale(1.3);
  }

  .mobile-radio-card.selected .mobile-radio-card-checked {
    opacity: 1;
    transform: scale(1);
  }

  /* Hover state for icons */
  .mobile-radio-card.hovering .mobile-radio-card-unchecked {
    color: #387a29;
    transform: scale(1.1);
  }

  /* Enhanced label styling */
  .mobile-radio-card-label {
    flex: 1;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    font-weight: 400;
    transition: all 0.3s ease;
  }

  .mobile-radio-card.selected .mobile-radio-card-label {
    color: #2d6320;
    font-weight: 600;
  }

  .mobile-radio-card.hovering .mobile-radio-card-label {
    color: #387a29;
  }

  /* Selection indicator (checkmark on the right) */
  .mobile-radio-card-indicator {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }

  .mobile-radio-card-checkmark {
    color: #387a29;
    font-size: 18px;
    font-weight: bold;
  }

  .mobile-radio-card.selected .mobile-radio-card-indicator {
    opacity: 1;
    transform: scale(1);
  }

  /* Ripple effect */
  .mobile-radio-card-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(56, 122, 41, 0.3);
    transform: scale(0);
    pointer-events: none;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    margin-top: -10px;
    z-index: 1;
  }

  .mobile-radio-card-ripple.active {
    animation: ripple 0.6s ease-out;
  }

  /* Keyframe animations */
  @keyframes cardSelect {
    0% { transform: translateY(-2px) scale(1); }
    50% { transform: translateY(-4px) scale(1.02); }
    100% { transform: translateY(-2px) scale(1); }
  }

  @keyframes ripple {
    0% {
      transform: scale(0);
      opacity: 1;
    }
    100% {
      transform: scale(4);
      opacity: 0;
    }
  }

  /* Special styling for different radio button types */

  /* Location preference cards with enhanced icons */
  .mobile-radio-card[data-radio-value="Zip"] .mobile-radio-card-label::before,
  .mobile-radio-card[data-radio-value="zipcode"] .mobile-radio-card-label::before {
    content: "📍";
    margin-right: 0.5rem;
    font-size: 1.1em;
  }

  .mobile-radio-card[data-radio-value="FullAddress"] .mobile-radio-card-label::before,
  .mobile-radio-card[data-radio-value="address"] .mobile-radio-card-label::before {
    content: "🏠";
    margin-right: 0.5rem;
    font-size: 1.1em;
  }

  /* Enhanced product availability cards */
  .mobile-radio-card[data-radio-value="true"] .mobile-radio-card-label::before {
    content: "✅";
    margin-right: 0.5rem;
    font-size: 1.1em;
  }

  .mobile-radio-card[data-radio-value="true"].selected {
    border-color: #28a745;
    background: linear-gradient(135deg, #f8fff8 0%, #f0fff0 100%);
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.25);
  }

  .mobile-radio-card[data-radio-value="true"] .mobile-radio-card-checked,
  .mobile-radio-card[data-radio-value="true"] .mobile-radio-card-checkmark {
    color: #28a745;
  }

  .mobile-radio-card[data-radio-value="false"] .mobile-radio-card-label::before {
    content: "❌";
    margin-right: 0.5rem;
    font-size: 1.1em;
  }

  .mobile-radio-card[data-radio-value="false"].selected {
    border-color: #6c757d;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    box-shadow: 0 4px 20px rgba(108, 117, 125, 0.25);
  }

  .mobile-radio-card[data-radio-value="false"] .mobile-radio-card-checked,
  .mobile-radio-card[data-radio-value="false"] .mobile-radio-card-checkmark {
    color: #6c757d;
  }

  /* Address verification cards with icons */
  .mobile-radio-card[data-radio-value="keep"] .mobile-radio-card-label::before {
    content: "📋";
    margin-right: 0.5rem;
    font-size: 1.1em;
  }

  .mobile-radio-card[data-radio-value="validated"] .mobile-radio-card-label::before {
    content: "✨";
    margin-right: 0.5rem;
    font-size: 1.1em;
  }

  .mobile-radio-card[data-radio-value="edit"] .mobile-radio-card-label::before {
    content: "✏️";
    margin-right: 0.5rem;
    font-size: 1.1em;
  }

  /* Enhanced star rating cards (feedback) */
  .mobile-radio-card[data-radio-id^="star"] {
    justify-content: center;
    min-height: 60px;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3d3 100%);
    border-color: #ffc107;
  }

  .mobile-radio-card[data-radio-id^="star"].selected {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-color: #f39c12;
    box-shadow: 0 4px 20px rgba(243, 156, 18, 0.3);
  }

  .mobile-radio-card[data-radio-id^="star"] .mobile-radio-card-label {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
  }

  .mobile-radio-card[data-radio-id^="star"] .mobile-radio-card-checked,
  .mobile-radio-card[data-radio-id^="star"] .mobile-radio-card-checkmark {
    color: #f39c12;
  }

  /* Focus states for accessibility */
  .mobile-radio-card:focus {
    outline: 2px solid #387a29;
    outline-offset: 2px;
  }

  /* Ensure proper spacing between card groups */
  .mobile-radio-cards-container + .mobile-radio-cards-container {
    margin-top: 1.5rem;
  }

  /* CRITICAL: Completely hide original radio buttons on mobile when cards are active */
  .mobile-radio-card-input,
  .mobile-radio-cards-converted .mobile-radio-original,
  .mobile-radio-cards-converted input[type="radio"],
  .mobile-radio-cards-converted .form-check-input[type="radio"],
  .mobile-radio-cards-converted .btn-check {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
  }
}

/* ===================================================================
   PROFILE IMAGE FIXES - Ensure Perfect Circular Images
   =================================================================== */

/* Global fix for all profile images to ensure perfect circles */
.rounded-circle {
  border-radius: 50% !important;
  overflow: hidden;
}

/* Ensure all profile images maintain aspect ratio and fill container properly */
.rounded-circle img,
img.rounded-circle {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fix for farmer avatar containers to prevent dimension conflicts */
.farmer-avatar,
.grower-avatar {
  overflow: hidden;
  flex-shrink: 0;
}

/* Ensure profile images in cards maintain proper circular shape */
.card .rounded-circle,
.card-body .rounded-circle {
  border-radius: 50% !important;
}

/* Fix for any profile image containers that might have padding issues */
.profile-image-container {
  display: inline-block;
  border-radius: 50%;
  overflow: hidden;
}

/* Ensure Bootstrap img-thumbnail class doesn't interfere with circular shape */
.img-thumbnail.rounded-circle {
  border-radius: 50% !important;
  padding: 0.125rem; /* Minimal padding to maintain border effect */
}

/* ===================================================================
   SKELETON LOADING SCREENS
   =================================================================== */

/* Base skeleton styles */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 0.375rem;
    position: relative;
    overflow: hidden;
}

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

/* Skeleton card structure */
.product-card-skeleton {
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #fff;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-title {
    height: 1.25rem;
    width: 80%;
    margin-bottom: 0.75rem;
}

.skeleton-text {
    height: 1rem;
    width: 100%;
    margin-bottom: 0.5rem;
}

.skeleton-text-sm {
    width: 60%;
}

.skeleton-badge {
    height: 1.5rem;
    width: 4rem;
    border-radius: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-button {
    height: 2.25rem;
    width: 100%;
    border-radius: 0.375rem;
}

/* Skeleton loader container */
.skeleton-loader {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.skeleton-loader.fade-out {
    opacity: 0;
}

/* Enhanced skeleton for mobile */
@media (max-width: 768px) {
    .skeleton-image {
        height: 150px;
    }

    .skeleton-title {
        height: 1.1rem;
    }

    .skeleton-text {
        height: 0.9rem;
    }

    .skeleton-button {
        height: 2rem;
    }
}

/* Progressive loading states */
.loading-state {
    position: relative;
}

.loading-state::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-state::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2rem;
    height: 2rem;
    margin: -1rem 0 0 -1rem;
    border: 2px solid #e9ecef;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

/* ===================================================================
   FEATURE DISCOVERY & PREMIUM ENHANCEMENTS
   =================================================================== */

/* Feature tooltips */
.feature-tooltip {
    cursor: help;
    transition: color 0.2s ease;
}

.feature-tooltip:hover {
    color: var(--primary-color) !important;
}

/* Premium feature preview */
.premium-feature-preview {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.premium-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(56, 122, 41, 0.95), rgba(45, 99, 32, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.premium-overlay-content {
    padding: 2rem;
    max-width: 400px;
}

.premium-overlay:hover {
    background: linear-gradient(135deg, rgba(56, 122, 41, 0.98), rgba(45, 99, 32, 0.98));
}

/* Feature locked styling */
.feature-locked {
    position: relative;
    transition: all 0.3s ease;
}

.feature-locked::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 249, 250, 0.8);
    z-index: 1;
    border-radius: 0.375rem;
    pointer-events: none;
}

.feature-locked .form-control,
.feature-locked .form-select {
    position: relative;
    z-index: 2;
}

/* Feature badges */
.feature-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.1);
    }
}

/* Feature preview button */
.feature-preview-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s ease;
}

.feature-preview-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Feature showcase in modal */
.feature-showcase {
    text-align: center;
    padding: 1rem;
    border-radius: 0.5rem;
    transition: transform 0.2s ease;
}

.feature-showcase:hover {
    transform: translateY(-2px);
    background: rgba(248, 249, 250, 0.5);
}

.feature-icon {
    margin-bottom: 0.5rem;
}

/* Enhanced search button states */
.search-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-button:disabled {
    opacity: 0.8;
}

.search-btn-loading {
    display: none;
}

/* Mobile enhancements for feature discovery */
@media (max-width: 768px) {
    .premium-overlay-content {
        padding: 1rem;
    }

    .premium-overlay-content h5 {
        font-size: 1.1rem;
    }

    .premium-overlay-content p {
        font-size: 0.85rem;
    }

    .feature-showcase {
        padding: 0.75rem;
    }

    .feature-icon {
        font-size: 1.5rem !important;
    }

    .feature-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}

/* ===================================================================
   ENHANCED PREMIUM UPGRADE BANNER
   =================================================================== */

.premium-upgrade-banner.enhanced {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border: 1px solid #ffeaa7;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.1);
    transition: all 0.3s ease;
}

.premium-upgrade-banner.enhanced:hover {
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.15);
    transform: translateY(-1px);
}

.premium-icon-container {
    width: 48px;
    height: 48px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.premium-title {
    color: #856404;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.premium-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.benefit-tag {
    background: rgba(40, 167, 69, 0.1);
    color: #155724;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.benefit-tag i {
    color: #28a745;
}

.premium-upgrade-btn {
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.2);
    transition: all 0.2s ease;
}

.premium-upgrade-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

.premium-learn-more {
    color: #856404;
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    margin-left: 0.5rem;
}

.premium-learn-more:hover {
    color: #533f03;
    text-decoration: underline;
}

/* Mobile premium benefits */
.premium-benefits-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.benefit-tag-mobile {
    background: rgba(40, 167, 69, 0.1);
    color: #155724;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.benefit-tag-mobile i {
    color: #28a745;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .premium-upgrade-banner.enhanced {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .premium-icon-container {
        width: 40px;
        height: 40px;
    }

    .premium-icon-container i {
        font-size: 1.2rem;
    }

    .premium-title {
        font-size: 0.95rem;
    }

    .premium-upgrade-btn {
        width: 100%;
        margin-top: 0.5rem;
    }
}

@media (max-width: 576px) {
    .premium-upgrade-banner.enhanced {
        padding: 0.75rem;
    }

    .premium-content {
        margin-left: 0.5rem;
    }
}

/* ===================================================================
   ENHANCED PRODUCT CARDS
   =================================================================== */

.product-card-enhanced {
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.product-card-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(56, 122, 41, 0.2);
}

/* Product Image Container */
.product-image-container {
    overflow: hidden;
    background: #f8f9fa;
}

.product-image-enhanced {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Product Type Badge */
.product-type-badge {
    background: rgba(56, 122, 41, 0.9);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    backdrop-filter: blur(4px);
}

/* Favorite Button */
.favorite-btn {
    top: 0.5rem;
    right: 0.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.favorite-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.favorite-btn.is-favorite {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border-color: #dc3545;
}

.favorite-btn.is-favorite:hover {
    background: #dc3545;
}

/* Product Header */
.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    color: #2c3e50;
}

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

/* Grower Info */
.grower-info {
    font-size: 0.85rem;
}

.grower-info a:hover {
    color: var(--primary-color) !important;
}

.distance-badge {
    background: rgba(56, 122, 41, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

/* Product Description */
.product-description {
    line-height: 1.4;
    color: #6c757d;
}

/* Product Pricing */
.product-price {
    font-weight: 700;
    color: #28a745;
    font-size: 1.2rem;
}

.availability-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.4rem;
}

/* Card Actions */
.card-footer .btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.card-footer .btn:hover {
    transform: translateY(-1px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-image-enhanced {
        height: 180px;
    }

    .product-title {
        font-size: 1rem;
    }

    .product-price {
        font-size: 1.1rem;
    }

    .favorite-btn {
        width: 32px;
        height: 32px;
    }

    .card-footer .btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }
}

@media (max-width: 576px) {
    .product-image-enhanced {
        height: 160px;
    }

    .product-card-enhanced {
        border-radius: 0.5rem;
    }

    .card-footer .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }

    .card-footer .btn {
        width: 100%;
    }
}

/* ===================================================================
   LOCALFARMERSHUB THEMED MODAL COMPONENTS
   =================================================================== */

/* Feature showcase for LocalFarmersHub modal */
.feature-showcase-lfh {
    text-align: center;
    padding: 1.5rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
}

.feature-showcase-lfh:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(56, 122, 41, 0.2);
}

.feature-icon-lfh {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.feature-showcase-lfh:hover .feature-icon-lfh {
    transform: scale(1.1);
}

/* Modal header enhancements */
.feature-header-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 193, 7, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Modal content styling */
.modal-content {
    border-radius: 1rem;
    overflow: hidden;
}

/* Responsive adjustments for LocalFarmersHub modal */
@media (max-width: 768px) {
    .feature-showcase-lfh {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .feature-icon-lfh {
        width: 48px;
        height: 48px;
    }

    .feature-icon-lfh i {
        font-size: 1.5rem !important;
    }

    .feature-header-icon {
        width: 48px;
        height: 48px;
    }

    .feature-header-icon i {
        font-size: 1.5rem !important;
    }

    .modal-header {
        padding: 1rem !important;
    }

    .modal-body {
        padding: 1.5rem !important;
    }

    .modal-footer {
        padding: 1rem !important;
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
    }

    .feature-showcase-lfh {
        padding: 0.75rem;
    }

    .modal-title {
        font-size: 1.1rem !important;
    }

    .feature-header-icon {
        width: 40px;
        height: 40px;
    }

    .feature-header-icon i {
        font-size: 1.25rem !important;
    }
}

/* Search Box Styling */
.search-box {
    border-radius: 0.75rem;
}

.search-form .input-group-text {
    background-color: #f8f9fa;
    border-right: 0;
}

.search-form .form-control,
.search-form .form-select {
    border-left: 0;
}

.search-form .form-control:focus,
.search-form .form-select:focus {
    box-shadow: none;
    border-color: #ced4da;
}

/* Filter Pills Styling */
.filter-pill {
    padding: 0.4em 0.9em;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.filter-pill.bg-light {
    border-color: #dee2e6;
}

.filter-pill:hover {
    opacity: 0.85;
}

/* Custom Green Light Background */
.custom-green-bg-light {
    background-color: #e6f3e3; /* Lighter green background */
    border-left: 4px solid #387a29;
}

/* General Button Styles */
.btn-primary {
    background-color: #387a29;
    border-color: #387a29;
}

.btn-primary:hover {
    background-color: #2a5920;
    border-color: #2a5920;
}

.btn-outline-primary {
    color: #387a29;
    border-color: #387a29;
}

.btn-outline-primary:hover {
    background-color: #387a29;
    color: white;
}

/* Search Input Suggestions */
.suggestion-input {
    position: absolute;
    top: 1px; /* Adjust based on border */
    left: 1px; /* Adjust based on border */
    width: calc(100% - 2px); /* Adjust based on border */
    height: calc(100% - 2px); /* Adjust based on border */
    padding: .375rem .75rem;
    font-size: 1rem;
    color: #adb5bd; /* Suggestion color */
    background-color: transparent;
    border: none;
    pointer-events: none; /* Allows clicks to go through */
    z-index: 3; /* Below the input */
    display: block; /* Ensure it takes up space */
    line-height: 1.5;
    box-sizing: border-box;
}

.search-input {
    position: relative;
    z-index: 4; /* Above the suggestion */
    background-color: transparent; /* Make input background transparent */
}

.ui-autocomplete {
    position: absolute;
    z-index: 1000;
    cursor: default;
    padding: 0;
    margin-top: 2px;
    list-style: none;
    background-color: #fff;
    border: 1px solid #ccc;
    -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}
.ui-menu-item {
    padding: 3px 10px;
}
.ui-menu-item:hover {
    background-color: #f8f9fa;
    color: #000;
}
.ui-menu-item .autocomplete-item {
    color: #212529;
    font-size: 0.9rem;
}
#searchForm .input-group {
    position: relative;
    width: 100%;
}

.max-w-500 {
    max-width: 350px;
}

/* Button styling */
#searchForm .btn {
    transform: none !important;
    transition: background-color 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    height: 38px;
}

#searchForm .btn:active {
    transform: translateY(1px) !important;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125) !important;
}

/* Input styling */
#searchForm .form-control {
    height: 38px;
}

/* Footer styling */
.footer-enhanced a {
    color: #387a29 !important; /* Force green color */
}

.footer-enhanced a:hover {
    color: #ffc107 !important; /* Bootstrap yellow color for hover state */
}

.social-icons a {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #387a29 !important; /* Force green color */
    margin: 5px;
    padding: 0; /* Ensure no padding interferes */
    box-sizing: border-box; /* Include padding/border in element's total width and height */
    transition: all 0.3s ease;
    text-decoration: none; /* Ensure no underline affects layout */
}

.social-icons a:hover {
    color: white !important; /* Ensure hover color overrides */
    background-color: #387a29 !important; /* Ensure hover background overrides */
}

.social-icons i {
    font-size: 18px;
    line-height: 1; /* Ensure icon doesn't add extra height */
}

@media (max-width: 768px) {
    .social-icons a {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
    
    .social-icons i {
        font-size: 16px;
    }
}

@media (max-width: 991px) {
    .navbar-collapse {
        padding: 1rem 0;
    }
    #searchForm {
        margin: 1rem 0;
        width: 100%;
    }
    .max-w-500 {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .navbar-brand img {
        /* Base styles may cover this, adjust if needed */
    }
    
    /* Improved mobile search form */
    #searchForm {
        max-width: 100%;
    }
    
    #searchForm .input-group {
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
    }
    
    #searchForm .form-control {
        height: 36px;
        font-size: 0.9rem;
        border-right: none;
    }
    
    #searchForm .btn {
        padding: 0.25rem 0.5rem;
        height: 36px;
        font-size: 0.9rem;
        border-left: none;
        margin-left: -1px !important;
        width: auto;
    }
    
    #searchForm .suggestion-input {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
}

/* Custom Form Switch Styles */
.form-switch .form-check-input {
    /* Keep default background-image for unchecked state */
}

.form-switch .form-check-input:focus {
    border-color: rgba(56, 122, 41, 0.5); /* Slightly darker border on focus */
    box-shadow: 0 0 0 0.25rem rgba(56, 122, 41, 0.25); /* Green glow */
    /* Keep default background-image for focus state knob if desired */
}

.form-switch .form-check-input:checked {
    background-color: #387a29; /* Primary green background */
    border-color: #387a29;     /* Primary green border */
    /* Keep default background-image for checked state knob (white circle) */
}

/* Ensure hover states don't override focus */
.form-switch .form-check-input:hover:not(:checked) {
    /* Optional: Add a subtle hover effect for unchecked state if needed */
}

/* Override Bootstrap success colors with our brand green */
.text-success {
  color: #387a29 !important;
}

.bg-success {
  background-color: #387a29 !important;
}

.border-success {
  border-color: #387a29 !important;
}

.btn-success {
  background-color: #387a29 !important;
  border-color: #387a29 !important;
}

.btn-success:hover, 
.btn-success:focus {
  background-color: #2d6321 !important;
  border-color: #2d6321 !important;
}

.btn-outline-success {
  color: #387a29 !important;
  border-color: #387a29 !important;
}

.btn-outline-success:hover,
.btn-outline-success:focus {
  background-color: #387a29 !important;
  color: #fff !important;
}

/* Keep the opacity variations but adjust their base color */
.bg-success-subtle,
.bg-success.bg-opacity-10,
.bg-success.bg-opacity-25 {
  background-color: rgba(56, 122, 41, 0.1) !important;
}

.text-success-emphasis {
  color: #2d6321 !important;
}

/* Add additional classes as needed */

/* Add styles for Google Place Autocomplete web component */

/* Style the internal input to mimic Bootstrap's form-control */
gmp-place-autocomplete input {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem; /* From Bootstrap .form-control */
    font-size: 1rem; /* From Bootstrap .form-control */
    font-weight: 400;
    line-height: 1.5;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    background-clip: padding-box;
    border: var(--bs-border-width) solid var(--bs-border-color);
    appearance: none;
    /* Ensure correct height matching other form-controls */
    min-height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2)); /* From Bootstrap .form-control */
    /* Reset border radius - input-group structure should handle corners */
    border-radius: 0; 
    /* NEW: Force the input to properly fill its container */
    box-sizing: border-box !important;
    width: 100% !important;
}

/* NEW: Enhance the container component to properly fit in input groups */
gmp-place-autocomplete {
    display: flex !important;
    align-items: stretch !important; /* Makes the internal input stretch vertically */
    width: 100% !important; /* Ensure component takes full width available to it */
}

/* Add back: Focus styling for the autocomplete input */
gmp-place-autocomplete input:focus {
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  border-color: #86b7fe; /* Bootstrap focus color */
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); /* Bootstrap focus shadow */
}

/* --- Input Group Fixes for Place Autocomplete --- */

/* Remove left border radius from the internal input */
gmp-place-autocomplete input {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Remove left border radius from adjacent button/select */
.input-group > #geolocateBtn,
.input-group > #radiusSelect {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Desktop input group styling */
@media (min-width: 768px) {
    /* Set consistent height for all inputs and buttons */
    .search-form .input-group > *,
    .search-form .input-group-text,
    .search-form .form-control,
    .search-form .btn,
    .search-form .form-select,
    gmp-place-autocomplete input {
        height: 38px !important;
    }
    
    /* Ensure location autocomplete displays correctly */
    gmp-place-autocomplete {
        flex: 1;
        min-width: 0; /* Prevent flex items from overflowing */
    }
    
    /* Ensure the dropdown has enough width */
    #radiusSelect {
        min-width: 7rem;
        width: auto;
    }
    
    /* Make sure all input group icons are properly centered */
    .input-group-text {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.375rem 0.75rem;
    }
    
    /* Ensure buttons in input groups have consistent styling */
    .input-group .btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Border radius fixes for better connected appearance */
    .input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n+3), 
    .input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu) {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }
    
    /* Ensure search button has consistent styling */
    .search-form .btn.btn-primary {
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Mobile-specific overrides for wrapping and layout */
@media (max-width: 767.98px) {
    /* Override flex-nowrap on mobile to allow stacking */
    .input-group.flex-nowrap { 
        flex-wrap: wrap !important;
    }

    /* Create a grouped look for location input on mobile */
    .input-group > span.input-group-text:first-child,
    gmp-place-autocomplete,
    #geolocateBtn {
        /* Reset border radius for all elements */
        border-radius: 0.375rem !important;
    }
    
    /* Style the specific location input group */
    /* The green map pin icon takes full width */
    .input-group > span.input-group-text:first-child {
        width: 100%;
        margin-bottom: 0.5rem;
        justify-content: center;
        background-color: var(--primary-color);
        color: white;
        height: 42px; /* Match input height */
    }
    
    /* Autocomplete takes full width */
    #locationInput { 
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Position crosshair button and radius select in a row */
    #geolocateBtn {
        width: 15%; /* Small fixed percentage */
        margin-right: 2%;
        margin-bottom: 0.5rem;
        height: 42px; /* Match input height */
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #radiusSelect {
        width: 83%; /* Take remaining width */
        margin-bottom: 0.5rem;
        min-width: auto; /* Reset min-width */
        height: 42px; /* Match input height */
    }
    
    /* Make search button stand out */
    .col-md-2 .btn.btn-primary {
        height: 48px; /* Slightly taller */
        font-size: 1rem;
    }
}

/* --- End Input Group Fixes --- */

/* Filter Type Pills Styling - More dramatic version */
.filter-pill {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem !important;
    font-weight: 600 !important;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0 !important;
    margin: 0.25rem !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 5rem !important;
}

/* Inactive pill */
.badge.rounded-pill.bg-light.text-dark.filter-pill {
    background-color: white !important;
    color: #333 !important;
    border-color: #e0e0e0 !important;
}

/* Active pill */
.badge.rounded-pill.bg-primary.filter-pill {
    background-color: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 3px 8px rgba(56, 122, 41, 0.4) !important;
    border-color: var(--primary-color) !important;
    position: relative;
    transform: translateY(-2px);
}

.filter-pill:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
    border-color: #ccc !important;
}

/* Mobile-specific styling */
@media (max-width: 767.98px) {
    .filter-types-container > span {
        display: block !important;
        margin-bottom: 0.75rem !important;
        font-weight: 500 !important;
    }
    
    .filter-types-container .d-inline-flex {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }
    
    .filter-pill {
        font-size: 0.85rem !important;
        padding: 0.7rem 0.5rem !important;
        margin: 0.3rem !important;
        min-width: calc(33% - 0.6rem) !important; /* Roughly 3 per row with margins */
        flex-grow: 1 !important;
        text-align: center !important;
    }
}

/* Add custom styles here */
.navbar-logo {
    height: 40px; /* Adjust as needed */
    margin-right: 10px;
}

/* Enhance footer */
.footer-enhanced {
    background-color: #f8f9fa; /* Light background */
    padding: 40px 0;
    margin-top: 40px;
    border-top: 1px solid #e9ecef;
    font-size: 0.9rem;
}

.footer-enhanced h5 {
    color: #387a29; /* Green header text */
    margin-bottom: 15px;
}

.footer-enhanced p {
    color: #6c757d; /* Muted text color */
}

.footer-enhanced a {
    color: #495057;
    transition: color 0.2s ease;
}

.footer-enhanced a:hover {
    color: #387a29; /* Green on hover */
}

.footer-enhanced .list-unstyled li {
    margin-bottom: 8px;
}

.footer-enhanced .social-icons a {
    color: #495057;
    font-size: 1.5rem;
    margin-right: 15px;
    transition: color 0.2s ease;
}

.footer-enhanced .social-icons a:last-child {
    margin-right: 0;
}

.footer-enhanced .social-icons a:hover {
    color: #387a29; /* Green on hover */
}

.footer-link-green {
    color: #387a29 !important; /* Green color for specific links */
    text-decoration: none; /* Remove underline */
}

.footer-link-green:hover {
    color: #2a5920 !important; /* Darker green on hover */
    text-decoration: underline;
}

/* Product Card Enhancements */
.product-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.3s ease-in-out;
}

.product-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.product-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.product-price {
    font-weight: bold;
    color: #28a745; /* Green price */
}

/* Search Box Styling */
.search-box {
    border-radius: 0.75rem;
}

.search-form .input-group-text {
    background-color: #f8f9fa;
    border-right: 0;
}

.search-form .form-control,
.search-form .form-select {
    border-left: 0;
}

.search-form .form-control:focus,
.search-form .form-select:focus {
    box-shadow: none;
    border-color: #ced4da;
}

/* Filter Pills Styling */
.filter-pill {
    padding: 0.4em 0.9em;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.filter-pill.bg-light {
    border-color: #dee2e6;
}

.filter-pill:hover {
    opacity: 0.85;
}

/* Custom Green Light Background */
.custom-green-bg-light {
    background-color: #e6f3e3; /* Lighter green background */
    border-left: 4px solid #387a29;
}

/* General Button Styles */
.btn-primary {
    background-color: #387a29;
    border-color: #387a29;
}

.btn-primary:hover {
    background-color: #2a5920;
    border-color: #2a5920;
}

.btn-outline-primary {
    color: #387a29;
    border-color: #387a29;
}

.btn-outline-primary:hover {
    background-color: #387a29;
    color: white;
}

/* Search Input Suggestions */
.suggestion-input {
    position: absolute;
    top: 1px; /* Adjust based on border */
    left: 1px; /* Adjust based on border */
    width: calc(100% - 2px); /* Adjust based on border */
    height: calc(100% - 2px); /* Adjust based on border */
    padding: .375rem .75rem;
    font-size: 1rem;
    color: #adb5bd; /* Suggestion color */
    background-color: transparent;
    border: none;
    pointer-events: none; /* Allows clicks to go through */
    z-index: 3; /* Below the input */
    display: block; /* Ensure it takes up space */
    line-height: 1.5;
    box-sizing: border-box;
}

.search-input {
    position: relative;
    z-index: 4; /* Above the suggestion */
    background-color: transparent; /* Make input background transparent */
}

.ui-autocomplete {
    position: absolute;
    z-index: 1000;
    cursor: default;
    padding: 0;
    margin-top: 2px;
    list-style: none;
    background-color: #fff;
    border: 1px solid #ccc;
    -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}
.ui-menu-item {
    padding: 3px 10px;
}
.ui-menu-item:hover {
    background-color: #f8f9fa;
    color: #000;
}
.ui-menu-item .autocomplete-item {
    color: #212529;
    font-size: 0.9rem;
}
#searchForm .input-group {
    position: relative;
    width: 100%;
}

.max-w-500 {
    max-width: 350px;
}

/* Button styling */
#searchForm .btn {
    transform: none !important;
    transition: background-color 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    height: 38px;
}

#searchForm .btn:active {
    transform: translateY(1px) !important;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125) !important;
}

/* Input styling */
#searchForm .form-control {
    height: 38px;
}

/* Footer styling */
.footer-enhanced a {
    color: #387a29 !important; /* Force green color */
}

.footer-enhanced a:hover {
    color: #ffc107 !important; /* Bootstrap yellow color for hover state */
}

.social-icons a {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #387a29 !important; /* Force green color */
    margin: 5px;
    padding: 0; /* Ensure no padding interferes */
    box-sizing: border-box; /* Include padding/border in element's total width and height */
    transition: all 0.3s ease;
    text-decoration: none; /* Ensure no underline affects layout */
}

.social-icons a:hover {
    color: white !important; /* Ensure hover color overrides */
    background-color: #387a29 !important; /* Ensure hover background overrides */
}

.social-icons i {
    font-size: 18px;
    line-height: 1; /* Ensure icon doesn't add extra height */
}

@media (max-width: 768px) {
    .social-icons a {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
    
    .social-icons i {
        font-size: 16px;
    }
}

@media (max-width: 991px) {
    .navbar-collapse {
        padding: 1rem 0;
    }
    #searchForm {
        margin: 1rem 0;
        width: 100%;
    }
    .max-w-500 {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .navbar-brand img {
        /* Base styles may cover this, adjust if needed */
    }
    
    /* Improved mobile search form */
    #searchForm {
        max-width: 100%;
    }
    
    #searchForm .input-group {
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
    }
    
    #searchForm .form-control {
        height: 36px;
        font-size: 0.9rem;
        border-right: none;
    }
    
    #searchForm .btn {
        padding: 0.25rem 0.5rem;
        height: 36px;
        font-size: 0.9rem;
        border-left: none;
        margin-left: -1px !important;
        width: auto;
    }
    
    #searchForm .suggestion-input {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
}

/* Custom Form Switch Styles */
.form-switch .form-check-input {
    /* Keep default background-image for unchecked state */
}

.form-switch .form-check-input:focus {
    border-color: rgba(56, 122, 41, 0.5); /* Slightly darker border on focus */
    box-shadow: 0 0 0 0.25rem rgba(56, 122, 41, 0.25); /* Green glow */
    /* Keep default background-image for focus state knob if desired */
}

.form-switch .form-check-input:checked {
    background-color: #387a29; /* Primary green background */
    border-color: #387a29;     /* Primary green border */
    /* Keep default background-image for checked state knob (white circle) */
}

/* Ensure hover states don't override focus */
.form-switch .form-check-input:hover:not(:checked) {
    /* Optional: Add a subtle hover effect for unchecked state if needed */
}

/* Override Bootstrap success colors with our brand green */
.text-success {
  color: #387a29 !important;
}

.bg-success {
  background-color: #387a29 !important;
}

.border-success {
  border-color: #387a29 !important;
}

.btn-success {
  background-color: #387a29 !important;
  border-color: #387a29 !important;
}

.btn-success:hover, 
.btn-success:focus {
  background-color: #2d6321 !important;
  border-color: #2d6321 !important;
}

.btn-outline-success {
  color: #387a29 !important;
  border-color: #387a29 !important;
}

.btn-outline-success:hover,
.btn-outline-success:focus {
  background-color: #387a29 !important;
  color: #fff !important;
}

/* Keep the opacity variations but adjust their base color */
.bg-success-subtle,
.bg-success.bg-opacity-10,
.bg-success.bg-opacity-25 {
  background-color: rgba(56, 122, 41, 0.1) !important;
}

.text-success-emphasis {
  color: #2d6321 !important;
}

/* Add additional classes as needed */

/* Add styles for Google Place Autocomplete web component */

/* Style the internal input to mimic Bootstrap's form-control */
gmp-place-autocomplete input {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem; /* From Bootstrap .form-control */
    font-size: 1rem; /* From Bootstrap .form-control */
    font-weight: 400;
    line-height: 1.5;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    background-clip: padding-box;
    border: var(--bs-border-width) solid var(--bs-border-color);
    appearance: none;
    /* Ensure correct height matching other form-controls */
    min-height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2)); /* From Bootstrap .form-control */
    /* Reset border radius - input-group structure should handle corners */
    border-radius: 0; 
    /* NEW: Force the input to properly fill its container */
    box-sizing: border-box !important;
    width: 100% !important;
}

/* NEW: Enhance the container component to properly fit in input groups */
gmp-place-autocomplete {
    display: flex !important;
    align-items: stretch !important; /* Makes the internal input stretch vertically */
    width: 100% !important; /* Ensure component takes full width available to it */
}

/* Add back: Focus styling for the autocomplete input */
gmp-place-autocomplete input:focus {
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  border-color: #86b7fe; /* Bootstrap focus color */
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); /* Bootstrap focus shadow */
}

/* --- Input Group Fixes for Place Autocomplete --- */

/* Remove left border radius from the internal input */
gmp-place-autocomplete input {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Remove left border radius from adjacent button/select */
.input-group > #geolocateBtn,
.input-group > #radiusSelect {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Desktop input group styling */
@media (min-width: 768px) {
    /* Set consistent height for all inputs and buttons */
    .search-form .input-group > *,
    .search-form .input-group-text,
    .search-form .form-control,
    .search-form .btn,
    .search-form .form-select,
    gmp-place-autocomplete input {
        height: 38px !important;
    }
    
    /* Ensure location autocomplete displays correctly */
    gmp-place-autocomplete {
        flex: 1;
        min-width: 0; /* Prevent flex items from overflowing */
    }
    
    /* Ensure the dropdown has enough width */
    #radiusSelect {
        min-width: 7rem;
        width: auto;
    }
    
    /* Make sure all input group icons are properly centered */
    .input-group-text {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.375rem 0.75rem;
    }
    
    /* Ensure buttons in input groups have consistent styling */
    .input-group .btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Border radius fixes for better connected appearance */
    .input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n+3), 
    .input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu) {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }
    
    /* Ensure search button has consistent styling */
    .search-form .btn.btn-primary {
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Mobile-specific overrides for wrapping and layout */
@media (max-width: 767.98px) {
    /* Override flex-nowrap on mobile to allow stacking */
    .input-group.flex-nowrap { 
        flex-wrap: wrap !important;
    }

    /* Create a grouped look for location input on mobile */
    .input-group > span.input-group-text:first-child,
    gmp-place-autocomplete,
    #geolocateBtn {
        /* Reset border radius for all elements */
        border-radius: 0.375rem !important;
    }
    
    /* Style the specific location input group */
    /* The green map pin icon takes full width */
    .input-group > span.input-group-text:first-child {
        width: 100%;
        margin-bottom: 0.5rem;
        justify-content: center;
        background-color: var(--primary-color);
        color: white;
        height: 42px; /* Match input height */
    }
    
    /* Autocomplete takes full width */
    #locationInput { 
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Position crosshair button and radius select in a row */
    #geolocateBtn {
        width: 15%; /* Small fixed percentage */
        margin-right: 2%;
        margin-bottom: 0.5rem;
        height: 42px; /* Match input height */
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #radiusSelect {
        width: 83%; /* Take remaining width */
        margin-bottom: 0.5rem;
        min-width: auto; /* Reset min-width */
        height: 42px; /* Match input height */
    }
    
    /* Make search button stand out */
    .col-md-2 .btn.btn-primary {
        height: 48px; /* Slightly taller */
        font-size: 1rem;
    }
}

/* --- End Input Group Fixes --- */

/* Filter Type Pills Styling - More dramatic version */
.filter-pill {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem !important;
    font-weight: 600 !important;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0 !important;
    margin: 0.25rem !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 5rem !important;
}

/* Inactive pill */
.badge.rounded-pill.bg-light.text-dark.filter-pill {
    background-color: white !important;
    color: #333 !important;
    border-color: #e0e0e0 !important;
}

/* Active pill */
.badge.rounded-pill.bg-primary.filter-pill {
    background-color: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 3px 8px rgba(56, 122, 41, 0.4) !important;
    border-color: var(--primary-color) !important;
    position: relative;
    transform: translateY(-2px);
}

.filter-pill:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
    border-color: #ccc !important;
}

/* Mobile-specific styling */
@media (max-width: 767.98px) {
    .filter-types-container > span {
        display: block !important;
        margin-bottom: 0.75rem !important;
        font-weight: 500 !important;
    }
    
    .filter-types-container .d-inline-flex {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }
    
    .filter-pill {
        font-size: 0.85rem !important;
        padding: 0.7rem 0.5rem !important;
        margin: 0.3rem !important;
        min-width: calc(33% - 0.6rem) !important; /* Roughly 3 per row with margins */
        flex-grow: 1 !important;
        text-align: center !important;
    }
}

/* Add custom styles here */
.navbar-logo {
    height: 40px; /* Adjust as needed */
    margin-right: 10px;
}

/* Enhance footer */
.footer-enhanced {
    background-color: #f8f9fa; /* Light background */
    padding: 40px 0;
    margin-top: 40px;
    border-top: 1px solid #e9ecef;
    font-size: 0.9rem;
}

.footer-enhanced h5 {
    color: #387a29; /* Green header text */
    margin-bottom: 15px;
}

.footer-enhanced p {
    color: #6c757d; /* Muted text color */
}

.footer-enhanced a {
    color: #495057;
    transition: color 0.2s ease;
}

.footer-enhanced a:hover {
    color: #387a29; /* Green on hover */
}

.footer-enhanced .list-unstyled li {
    margin-bottom: 8px;
}

.footer-enhanced .social-icons a {
    color: #495057;
    font-size: 1.5rem;
    margin-right: 15px;
    transition: color 0.2s ease;
}

.footer-enhanced .social-icons a:last-child {
    margin-right: 0;
}

.footer-enhanced .social-icons a:hover {
    color: #387a29; /* Green on hover */
}

.footer-link-green {
    color: #387a29 !important; /* Green color for specific links */
    text-decoration: none; /* Remove underline */
}

.footer-link-green:hover {
    color: #2a5920 !important; /* Darker green on hover */
    text-decoration: underline;
}

/* Product Card Enhancements */
.product-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.3s ease-in-out;
}

.product-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.product-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.product-price {
    font-weight: bold;
    color: #28a745; /* Green price */
}

/* Search Box Styling */
.search-box {
    border-radius: 0.75rem;
}

.search-form .input-group-text {
    background-color: #f8f9fa;
    border-right: 0;
}

.search-form .form-control,
.search-form .form-select {
    border-left: 0;
}

.search-form .form-control:focus,
.search-form .form-select:focus {
    box-shadow: none;
    border-color: #ced4da;
}

/* Filter Pills Styling */
.filter-pill {
    padding: 0.4em 0.9em;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.filter-pill.bg-light {
    border-color: #dee2e6;
}

.filter-pill:hover {
    opacity: 0.85;
}

/* Custom Green Light Background */
.custom-green-bg-light {
    background-color: #e6f3e3; /* Lighter green background */
    border-left: 4px solid #387a29;
}

/* General Button Styles */
.btn-primary {
    background-color: #387a29;
    border-color: #387a29;
}

.btn-primary:hover {
    background-color: #2a5920;
    border-color: #2a5920;
}

.btn-outline-primary {
    color: #387a29;
    border-color: #387a29;
}

.btn-outline-primary:hover {
    background-color: #387a29;
    color: white;
}

/* Search Input Suggestions */
.suggestion-input {
    position: absolute;
    top: 1px; /* Adjust based on border */
    left: 1px; /* Adjust based on border */
    width: calc(100% - 2px); /* Adjust based on border */
    height: calc(100% - 2px); /* Adjust based on border */
    padding: .375rem .75rem;
    font-size: 1rem;
    color: #adb5bd; /* Suggestion color */
    background-color: transparent;
    border: none;
    pointer-events: none; /* Allows clicks to go through */
    z-index: 3; /* Below the input */
    display: block; /* Ensure it takes up space */
    line-height: 1.5;
    box-sizing: border-box;
}

.search-input {
    position: relative;
    z-index: 4; /* Above the suggestion */
    background-color: transparent; /* Make input background transparent */
}

.ui-autocomplete {
    position: absolute;
    z-index: 1000;
    cursor: default;
    padding: 0;
    margin-top: 2px;
    list-style: none;
    background-color: #fff;
    border: 1px solid #ccc;
    -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}
.ui-menu-item {
    padding: 3px 10px;
}
.ui-menu-item:hover {
    background-color: #f8f9fa;
    color: #000;
}
.ui-menu-item .autocomplete-item {
    color: #212529;
    font-size: 0.9rem;
}
#searchForm .input-group {
    position: relative;
    width: 100%;
}

.max-w-500 {
    max-width: 350px;
}

/* Button styling */
#searchForm .btn {
    transform: none !important;
    transition: background-color 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    height: 38px;
}

#searchForm .btn:active {
    transform: translateY(1px) !important;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125) !important;
}

/* Input styling */
#searchForm .form-control {
    height: 38px;
}

/* Footer styling */
.footer-enhanced a {
    color: #387a29 !important; /* Force green color */
}

.footer-enhanced a:hover {
    color: #ffc107 !important; /* Bootstrap yellow color for hover state */
}

.social-icons a {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #387a29 !important; /* Force green color */
    margin: 5px;
    padding: 0; /* Ensure no padding interferes */
    box-sizing: border-box; /* Include padding/border in element's total width and height */
    transition: all 0.3s ease;
    text-decoration: none; /* Ensure no underline affects layout */
}

.social-icons a:hover {
    color: white !important; /* Ensure hover color overrides */
    background-color: #387a29 !important; /* Ensure hover background overrides */
}

.social-icons i {
    font-size: 18px;
    line-height: 1; /* Ensure icon doesn't add extra height */
}

@media (max-width: 768px) {
    .social-icons a {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
    
    .social-icons i {
        font-size: 16px;
    }
}

@media (max-width: 991px) {
    .navbar-collapse {
        padding: 1rem 0;
    }
    #searchForm {
        margin: 1rem 0;
        width: 100%;
    }
    .max-w-500 {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .navbar-brand img {
        /* Base styles may cover this, adjust if needed */
    }
    
    /* Improved mobile search form */
    #searchForm {
        max-width: 100%;
    }
    
    #searchForm .input-group {
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
    }
    
    #searchForm .form-control {
        height: 36px;
        font-size: 0.9rem;
        border-right: none;
    }
    
    #searchForm .btn {
        padding: 0.25rem 0.5rem;
        height: 36px;
        font-size: 0.9rem;
        border-left: none;
        margin-left: -1px !important;
        width: auto;
    }
    
    #searchForm .suggestion-input {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
}

/* Custom Form Switch Styles */
.form-switch .form-check-input {
    /* Keep default background-image for unchecked state */
}

.form-switch .form-check-input:focus {
    border-color: rgba(56, 122, 41, 0.5); /* Slightly darker border on focus */
    box-shadow: 0 0 0 0.25rem rgba(56, 122, 41, 0.25); /* Green glow */
    /* Keep default background-image for focus state knob if desired */
}

.form-switch .form-check-input:checked {
    background-color: #387a29; /* Primary green background */
    border-color: #387a29;     /* Primary green border */
    /* Keep default background-image for checked state knob (white circle) */
}

/* Ensure hover states don't override focus */
.form-switch .form-check-input:hover:not(:checked) {
    /* Optional: Add a subtle hover effect for unchecked state if needed */
}

/* Override Bootstrap success colors with our brand green */
.text-success {
  color: #387a29 !important;
}

.bg-success {
  background-color: #387a29 !important;
}

.border-success {
  border-color: #387a29 !important;
}

.btn-success {
  background-color: #387a29 !important;
  border-color: #387a29 !important;
}

.btn-success:hover, 
.btn-success:focus {
  background-color: #2d6321 !important;
  border-color: #2d6321 !important;
}

.btn-outline-success {
  color: #387a29 !important;
  border-color: #387a29 !important;
}

.btn-outline-success:hover,
.btn-outline-success:focus {
  background-color: #387a29 !important;
  color: #fff !important;
}

/* Keep the opacity variations but adjust their base color */
.bg-success-subtle,
.bg-success.bg-opacity-10,
.bg-success.bg-opacity-25 {
  background-color: rgba(56, 122, 41, 0.1) !important;
}

.text-success-emphasis {
  color: #2d6321 !important;
}

/* Add additional classes as needed */

/* Add styles for Google Place Autocomplete web component */

/* Style the internal input to mimic Bootstrap's form-control */
gmp-place-autocomplete input {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem; /* From Bootstrap .form-control */
    font-size: 1rem; /* From Bootstrap .form-control */
    font-weight: 400;
    line-height: 1.5;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    background-clip: padding-box;
    border: var(--bs-border-width) solid var(--bs-border-color);
    appearance: none;
    /* Ensure correct height matching other form-controls */
    min-height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2)); /* From Bootstrap .form-control */
    /* Reset border radius - input-group structure should handle corners */
    border-radius: 0; 
    /* NEW: Force the input to properly fill its container */
    box-sizing: border-box !important;
    width: 100% !important;
}

/* NEW: Enhance the container component to properly fit in input groups */
gmp-place-autocomplete {
    display: flex !important;
    align-items: stretch !important; /* Makes the internal input stretch vertically */
    width: 100% !important; /* Ensure component takes full width available to it */
}

/* Add back: Focus styling for the autocomplete input */
gmp-place-autocomplete input:focus {
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  border-color: #86b7fe; /* Bootstrap focus color */
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); /* Bootstrap focus shadow */
}

/* --- Input Group Fixes for Place Autocomplete --- */

/* Remove left border radius from the internal input */
gmp-place-autocomplete input {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Remove left border radius from adjacent button/select */
.input-group > #geolocateBtn,
.input-group > #radiusSelect {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Desktop input group styling */
@media (min-width: 768px) {
    /* Set consistent height for all inputs and buttons */
    .search-form .input-group > *,
    .search-form .input-group-text,
    .search-form .form-control,
    .search-form .btn,
    .search-form .form-select,
    gmp-place-autocomplete input {
        height: 38px !important;
    }
    
    /* Ensure location autocomplete displays correctly */
    gmp-place-autocomplete {
        flex: 1;
        min-width: 0; /* Prevent flex items from overflowing */
    }
    
    /* Ensure the dropdown has enough width */
    #radiusSelect {
        min-width: 7rem;
        width: auto;
    }
    
    /* Make sure all input group icons are properly centered */
    .input-group-text {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.375rem 0.75rem;
    }
    
    /* Ensure buttons in input groups have consistent styling */
    .input-group .btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Border radius fixes for better connected appearance */
    .input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n+3), 
    .input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu) {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }
    
    /* Ensure search button has consistent styling */
    .search-form .btn.btn-primary {
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Mobile-specific overrides for wrapping and layout */
@media (max-width: 767.98px) {
    /* Override flex-nowrap on mobile to allow stacking */
    .input-group.flex-nowrap { 
        flex-wrap: wrap !important;
    }

    /* Create a grouped look for location input on mobile */
    .input-group > span.input-group-text:first-child,
    gmp-place-autocomplete,
    #geolocateBtn {
        /* Reset border radius for all elements */
        border-radius: 0.375rem !important;
    }
    
    /* Style the specific location input group */
    /* The green map pin icon takes full width */
    .input-group > span.input-group-text:first-child {
        width: 100%;
        margin-bottom: 0.5rem;
        justify-content: center;
        background-color: var(--primary-color);
        color: white;
        height: 42px; /* Match input height */
    }
    
    /* Autocomplete takes full width */
    #locationInput { 
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Position crosshair button and radius select in a row */
    #geolocateBtn {
        width: 15%; /* Small fixed percentage */
        margin-right: 2%;
        margin-bottom: 0.5rem;
        height: 42px; /* Match input height */
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #radiusSelect {
        width: 83%; /* Take remaining width */
        margin-bottom: 0.5rem;
        min-width: auto; /* Reset min-width */
        height: 42px; /* Match input height */
    }
    
    /* Make search button stand out */
    .col-md-2 .btn.btn-primary {
        height: 48px; /* Slightly taller */
        font-size: 1rem;
    }
}

/* --- End Input Group Fixes --- */

/* Filter Type Pills Styling - More dramatic version */
.filter-pill {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem !important;
    font-weight: 600 !important;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0 !important;
    margin: 0.25rem !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 5rem !important;
}

/* Inactive pill */
.badge.rounded-pill.bg-light.text-dark.filter-pill {
    background-color: white !important;
    color: #333 !important;
    border-color: #e0e0e0 !important;
}

/* Active pill */
.badge.rounded-pill.bg-primary.filter-pill {
    background-color: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 3px 8px rgba(56, 122, 41, 0.4) !important;
    border-color: var(--primary-color) !important;
    position: relative;
    transform: translateY(-2px);
}

.filter-pill:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
    border-color: #ccc !important;
}

/* Mobile-specific styling */
@media (max-width: 767.98px) {
    .filter-types-container > span {
        display: block !important;
        margin-bottom: 0.75rem !important;
        font-weight: 500 !important;
    }
    
    .filter-types-container .d-inline-flex {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }
    
    .filter-pill {
        font-size: 0.85rem !important;
        padding: 0.7rem 0.5rem !important;
        margin: 0.3rem !important;
        min-width: calc(33% - 0.6rem) !important; /* Roughly 3 per row with margins */
        flex-grow: 1 !important;
        text-align: center !important;
    }
}

/* Add custom styles here */
.navbar-logo {
    height: 40px; /* Adjust as needed */
    margin-right: 10px;
}

/* Enhance footer */
.footer-enhanced {
    background-color: #f8f9fa; /* Light background */
    padding: 40px 0;
    margin-top: 40px;
    border-top: 1px solid #e9ecef;
    font-size: 0.9rem;
}

.footer-enhanced h5 {
    color: #387a29; /* Green header text */
    margin-bottom: 15px;
}

.footer-enhanced p {
    color: #6c757d; /* Muted text color */
}

.footer-enhanced a {
    color: #495057;
    transition: color 0.2s ease;
}

.footer-enhanced a:hover {
    color: #387a29; /* Green on hover */
}

.footer-enhanced .list-unstyled li {
    margin-bottom: 8px;
}

.footer-enhanced .social-icons a {
    color: #495057;
    font-size: 1.5rem;
    margin-right: 15px;
    transition: color 0.2s ease;
}

.footer-enhanced .social-icons a:last-child {
    margin-right: 0;
}

.footer-enhanced .social-icons a:hover {
    color: #387a29; /* Green on hover */
}

.footer-link-green {
    color: #387a29 !important; /* Green color for specific links */
    text-decoration: none; /* Remove underline */
}

.footer-link-green:hover {
    color: #2a5920 !important; /* Darker green on hover */
    text-decoration: underline;
}

/* Product Card Enhancements */
.product-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.3s ease-in-out;
}

.product-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.product-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.product-price {
    font-weight: bold;
    color: #28a745; /* Green price */
}

/* Search Box Styling */
.search-box {
    border-radius: 0.75rem;
}

.search-form .input-group-text {
    background-color: #f8f9fa;
    border-right: 0;
}

.search-form .form-control,
.search-form .form-select {
    border-left: 0;
}

.search-form .form-control:focus,
.search-form .form-select:focus {
    box-shadow: none;
    border-color: #ced4da;
}

/* Filter Pills Styling */
.filter-pill {
    padding: 0.4em 0.9em;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.filter-pill.bg-light {
    border-color: #dee2e6;
}

.filter-pill:hover {
    opacity: 0.85;
}

/* Custom Green Light Background */
.custom-green-bg-light {
    background-color: #e6f3e3; /* Lighter green background */
    border-left: 4px solid #387a29;
}

/* General Button Styles */
.btn-primary {
    background-color: #387a29;
    border-color: #387a29;
}

.btn-primary:hover {
    background-color: #2a5920;
    border-color: #2a5920;
}

.btn-outline-primary {
    color: #387a29;
    border-color: #387a29;
}

.btn-outline-primary:hover {
    background-color: #387a29;
    color: white;
}

/* Search Input Suggestions */
.suggestion-input {
    position: absolute;
    top: 1px; /* Adjust based on border */
    left: 1px; /* Adjust based on border */
    width: calc(100% - 2px); /* Adjust based on border */
    height: calc(100% - 2px); /* Adjust based on border */
    padding: .375rem .75rem;
    font-size: 1rem;
    color: #adb5bd; /* Suggestion color */
    background-color: transparent;
    border: none;
    pointer-events: none; /* Allows clicks to go through */
    z-index: 3; /* Below the input */
    display: block; /* Ensure it takes up space */
    line-height: 1.5;
    box-sizing: border-box;
}

.search-input {
    position: relative;
    z-index: 4; /* Above the suggestion */
    background-color: transparent; /* Make input background transparent */
}

.ui-autocomplete {
    position: absolute;
    z-index: 1000;
    cursor: default;
    padding: 0;
    margin-top: 2px;
    list-style: none;
    background-color: #fff;
    border: 1px solid #ccc;
    -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}
.ui-menu-item {
    padding: 3px 10px;
}
.ui-menu-item:hover {
    background-color: #f8f9fa;
    color: #000;
}
.ui-menu-item .autocomplete-item {
    color: #212529;
    font-size: 0.9rem;
}
#searchForm .input-group {
    position: relative;
    width: 100%;
}

.max-w-500 {
    max-width: 350px;
}

/* Button styling */
#searchForm .btn {
    transform: none !important;
    transition: background-color 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    height: 38px;
}

#searchForm .btn:active {
    transform: translateY(1px) !important;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125) !important;
}

/* Input styling */
#searchForm .form-control {
    height: 38px;
}

/* Footer styling */
.footer-enhanced a {
    color: #387a29 !important; /* Force green color */
}

.footer-enhanced a:hover {
    color: #ffc107 !important; /* Bootstrap yellow color for hover state */
}

.social-icons a {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #387a29 !important; /* Force green color */
    margin: 5px;
    padding: 0; /* Ensure no padding interferes */
    box-sizing: border-box; /* Include padding/border in element's total width and height */
    transition: all 0.3s ease;
    text-decoration: none; /* Ensure no underline affects layout */
}

.social-icons a:hover {
    color: white !important; /* Ensure hover color overrides */
    background-color: #387a29 !important; /* Ensure hover background overrides */
}

.social-icons i {
    font-size: 18px;
    line-height: 1; /* Ensure icon doesn't add extra height */
}

@media (max-width: 768px) {
    .social-icons a {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
    
    .social-icons i {
        font-size: 16px;
    }
}

@media (max-width: 991px) {
    .navbar-collapse {
        padding: 1rem 0;
    }
    #searchForm {
        margin: 1rem 0;
        width: 100%;
    }
    .max-w-500 {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .navbar-brand img {
        /* Base styles may cover this, adjust if needed */
    }
    
    /* Improved mobile search form */
    #searchForm {
        max-width: 100%;
    }
    
    #searchForm .input-group {
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
    }
    
    #searchForm .form-control {
        height: 36px;
        font-size: 0.9rem;
        border-right: none;
    }
    
    #searchForm .btn {
        padding: 0.25rem 0.5rem;
        height: 36px;
        font-size: 0.9rem;
        border-left: none;
        margin-left: -1px !important;
        width: auto;
    }
    
    #searchForm .suggestion-input {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
}

/* Custom Form Switch Styles */
.form-switch .form-check-input {
    /* Keep default background-image for unchecked state */
}

.form-switch .form-check-input:focus {
    border-color: rgba(56, 122, 41, 0.5); /* Slightly darker border on focus */
    box-shadow: 0 0 0 0.25rem rgba(56, 122, 41, 0.25); /* Green glow */
    /* Keep default background-image for focus state knob if desired */
}

.form-switch .form-check-input:checked {
    background-color: #387a29; /* Primary green background */
    border-color: #387a29;     /* Primary green border */
    /* Keep default background-image for checked state knob (white circle) */
}

/* Ensure hover states don't override focus */
.form-switch .form-check-input:hover:not(:checked) {
    /* Optional: Add a subtle hover effect for unchecked state if needed */
}

/* Override Bootstrap success colors with our brand green */
.text-success {
  color: #387a29 !important;
}

.bg-success {
  background-color: #387a29 !important;
}

.border-success {
  border-color: #387a29 !important;
}

.btn-success {
  background-color: #387a29 !important;
  border-color: #387a29 !important;
}

.btn-success:hover, 
.btn-success:focus {
  background-color: #2d6321 !important;
  border-color: #2d6321 !important;
}

.btn-outline-success {
  color: #387a29 !important;
  border-color: #387a29 !important;
}

.btn-outline-success:hover,
.btn-outline-success:focus {
  background-color: #387a29 !important;
  color: #fff !important;
}

/* Keep the opacity variations but adjust their base color */
.bg-success-subtle,
.bg-success.bg-opacity-10,
.bg-success.bg-opacity-25 {
  background-color: rgba(56, 122, 41, 0.1) !important;
}

.text-success-emphasis {
  color: #2d6321 !important;
}

/* Add additional classes as needed */

/* Add styles for Google Place Autocomplete web component */

/* Style the internal input to mimic Bootstrap's form-control */
gmp-place-autocomplete input {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem; /* From Bootstrap .form-control */
    font-size: 1rem; /* From Bootstrap .form-control */
    font-weight: 400;
    line-height: 1.5;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    background-clip: padding-box;
    border: var(--bs-border-width) solid var(--bs-border-color);
    appearance: none;
    /* Ensure correct height matching other form-controls */
    min-height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2)); /* From Bootstrap .form-control */
    /* Reset border radius - input-group structure should handle corners */
    border-radius: 0; 
    /* NEW: Force the input to properly fill its container */
    box-sizing: border-box !important;
    width: 100% !important;
}

/* NEW: Enhance the container component to properly fit in input groups */
gmp-place-autocomplete {
    display: flex !important;
    align-items: stretch !important; /* Makes the internal input stretch vertically */
    width: 100% !important; /* Ensure component takes full width available to it */
}

/* Add back: Focus styling for the autocomplete input */
gmp-place-autocomplete input:focus {
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  border-color: #86b7fe; /* Bootstrap focus color */
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); /* Bootstrap focus shadow */
}

/* --- Input Group Fixes for Place Autocomplete --- */

/* Remove left border radius from the internal input */
gmp-place-autocomplete input {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Remove left border radius from adjacent button/select */
.input-group > #geolocateBtn,
.input-group > #radiusSelect {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Desktop input group styling */
@media (min-width: 768px) {
    /* Set consistent height for all inputs and buttons */
    .search-form .input-group > *,
    .search-form .input-group-text,
    .search-form .form-control,
    .search-form .btn,
    .search-form .form-select,
    gmp-place-autocomplete input {
        height: 38px !important;
    }
    
    /* Ensure location autocomplete displays correctly */
    gmp-place-autocomplete {
        flex: 1;
        min-width: 0; /* Prevent flex items from overflowing */
    }
    
    /* Ensure the dropdown has enough width */
    #radiusSelect {
        min-width: 7rem;
        width: auto;
    }
    
    /* Make sure all input group icons are properly centered */
    .input-group-text {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.375rem 0.75rem;
    }
    
    /* Ensure buttons in input groups have consistent styling */
    .input-group .btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Border radius fixes for better connected appearance */
    .input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n+3), 
    .input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu) {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }
    
    /* Ensure search button has consistent styling */
    .search-form .btn.btn-primary {
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Mobile-specific overrides for wrapping and layout */
@media (max-width: 767.98px) {
    /* Override flex-nowrap on mobile to allow stacking */
    .input-group.flex-nowrap { 
        flex-wrap: wrap !important;
    }

    /* Create a grouped look for location input on mobile */
    .input-group > span.input-group-text:first-child,
    gmp-place-autocomplete,
    #geolocateBtn {
        /* Reset border radius for all elements */
        border-radius: 0.375rem !important;
    }
    
    /* Style the specific location input group */
    /* The green map pin icon takes full width */
    .input-group > span.input-group-text:first-child {
        width: 100%;
        margin-bottom: 0.5rem;
        justify-content: center;
        background-color: var(--primary-color);
        color: white;
        height: 42px; /* Match input height */
    }
    
    /* Autocomplete takes full width */
    #locationInput { 
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Position crosshair button and radius select in a row */
    #geolocateBtn {
        width: 15%; /* Small fixed percentage */
        margin-right: 2%;
        margin-bottom: 0.5rem;
        height: 42px; /* Match input height */
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #radiusSelect {
        width: 83%; /* Take remaining width */
        margin-bottom: 0.5rem;
        min-width: auto; /* Reset min-width */
        height: 42px; /* Match input height */
    }
    
    /* Make search button stand out */
    .col-md-2 .btn.btn-primary {
        height: 48px; /* Slightly taller */
        font-size: 1rem;
    }
}

/* --- End Input Group Fixes --- */

/* Filter Type Pills Styling - More dramatic version */
.filter-pill {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem !important;
    font-weight: 600 !important;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0 !important;
    margin: 0.25rem !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 5rem !important;
}

/* Inactive pill */
.badge.rounded-pill.bg-light.text-dark.filter-pill {
    background-color: white !important;
    color: #333 !important;
    border-color: #e0e0e0 !important;
}

/* Active pill */
.badge.rounded-pill.bg-primary.filter-pill {
    background-color: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 3px 8px rgba(56, 122, 41, 0.4) !important;
    border-color: var(--primary-color) !important;
    position: relative;
    transform: translateY(-2px);
}

.filter-pill:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
    border-color: #ccc !important;
}

/* Mobile-specific styling */
@media (max-width: 767.98px) {
    .filter-types-container > span {
        display: block !important;
        margin-bottom: 0.75rem !important;
        font-weight: 500 !important;
    }
    
    .filter-types-container .d-inline-flex {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }
    
    .filter-pill {
        font-size: 0.85rem !important;
        padding: 0.7rem 0.5rem !important;
        margin: 0.3rem !important;
        min-width: calc(33% - 0.6rem) !important; /* Roughly 3 per row with margins */
        flex-grow: 1 !important;
        text-align: center !important;
    }
}

/* Add custom styles here */
.navbar-logo {
    height: 40px; /* Adjust as needed */
    margin-right: 10px;
}

/* Enhance footer */
.footer-enhanced {
    background-color: #f8f9fa; /* Light background */
    padding: 40px 0;
    margin-top: 40px;
    border-top: 1px solid #e9ecef;
    font-size: 0.9rem;
}

.footer-enhanced h5 {
    color: #387a29; /* Green header text */
    margin-bottom: 15px;
}

.footer-enhanced p {
    color: #6c757d; /* Muted text color */
}

.footer-enhanced a {
    color: #495057;
    transition: color 0.2s ease;
}

.footer-enhanced a:hover {
    color: #387a29; /* Green on hover */
}

.footer-enhanced .list-unstyled li {
    margin-bottom: 8px;
}

.footer-enhanced .social-icons a {
    color: #495057;
    font-size: 1.5rem;
    margin-right: 15px;
    transition: color 0.2s ease;
}

.footer-enhanced .social-icons a:last-child {
    margin-right: 0;
}

.footer-enhanced .social-icons a:hover {
    color: #387a29; /* Green on hover */
}

.footer-link-green {
    color: #387a29 !important; /* Green color for specific links */
    text-decoration: none; /* Remove underline */
}

.footer-link-green:hover {
    color: #2a5920 !important; /* Darker green on hover */
    text-decoration: underline;
}

/* Product Card Enhancements */
.product-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.3s ease-in-out;
}

.product-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.product-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.product-price {
    font-weight: bold;
    color: #28a745; /* Green price */
}

/* Search Box Styling */
.search-box {
    border-radius: 0.75rem;
}

.search-form .input-group-text {
    background-color: #f8f9fa;
    border-right: 0;
}

.search-form .form-control,
.search-form .form-select {
    border-left: 0;
}

.search-form .form-control:focus,
.search-form .form-select:focus {
    box-shadow: none;
    border-color: #ced4da;
}

/* Filter Pills Styling */
.filter-pill {
    padding: 0.4em 0.9em;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.filter-pill.bg-light {
    border-color: #dee2e6;
}

.filter-pill:hover {
    opacity: 0.85;
}

/* Custom Green Light Background */
.custom-green-bg-light {
    background-color: #e6f3e3; /* Lighter green background */
    border-left: 4px solid #387a29;
}

/* General Button Styles */
.btn-primary {
    background-color: #387a29;
    border-color: #387a29;
}

.btn-primary:hover {
    background-color: #2a5920;
    border-color: #2a5920;
}

.btn-outline-primary {
    color: #387a29;
    border-color: #387a29;
}

.btn-outline-primary:hover {
    background-color: #387a29;
    color: white;
}

/* Search Input Suggestions */
.suggestion-input {
    position: absolute;
    top: 1px; /* Adjust based on border */
    left: 1px; /* Adjust based on border */
    width: calc(100% - 2px); /* Adjust based on border */
    height: calc(100% - 2px); /* Adjust based on border */
    padding: .375rem .75rem;
    font-size: 1rem;
    color: #adb5bd; /* Suggestion color */
    background-color: transparent;
    border: none;
    pointer-events: none; /* Allows clicks to go through */
    z-index: 3; /* Below the input */
    display: block; /* Ensure it takes up space */
    line-height: 1.5;
    box-sizing: border-box;
}

.search-input {
    position: relative;
    z-index: 4; /* Above the suggestion */
    background-color: transparent; /* Make input background transparent */
}

.ui-autocomplete {
    position: absolute;
    z-index: 1000;
    cursor: default;
    padding: 0;
    margin-top: 2px;
    list-style: none;
    background-color: #fff;
    border: 1px solid #ccc;
    -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}
.ui-menu-item {
    padding: 3px 10px;
}
.ui-menu-item:hover {
    background-color: #f8f9fa;
    color: #000;
}
.ui-menu-item .autocomplete-item {
    color: #212529;
    font-size: 0.9rem;
}
#searchForm .input-group {
    position: relative;
    width: 100%;
}

.max-w-500 {
    max-width: 350px;
}

/* Button styling */
#searchForm .btn {
    transform: none !important;
    transition: background-color 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    height: 38px;
}

#searchForm .btn:active {
    transform: translateY(1px) !important;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125) !important;
}

/* Input styling */
#searchForm .form-control {
    height: 38px;
}

/* Footer styling */
.footer-enhanced a {
    color: #387a29 !important; /* Force green color */
}

.footer-enhanced a:hover {
    color: #ffc107 !important; /* Bootstrap yellow color for hover state */
}

.social-icons a {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #387a29 !important; /* Force green color */
    margin: 5px;
    padding: 0; /* Ensure no padding interferes */
    box-sizing: border-box; /* Include padding/border in element's total width and height */
    transition: all 0.3s ease;
    text-decoration: none; /* Ensure no underline affects layout */
}

.social-icons a:hover {
    color: white !important; /* Ensure hover color overrides */
    background-color: #387a29 !important; /* Ensure hover background overrides */
}

.social-icons i {
    font-size: 18px;
    line-height: 1; /* Ensure icon doesn't add extra height */
}

@media (max-width: 768px) {
    .social-icons a {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
    
    .social-icons i {
        font-size: 16px;
    }
}

@media (max-width: 991px) {
    .navbar-collapse {
        padding: 1rem 0;
    }
    #searchForm {
        margin: 1rem 0;
        width: 100%;
    }
    .max-w-500 {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .navbar-brand img {
        /* Base styles may cover this, adjust if needed */
    }
    
    /* Improved mobile search form */
    #searchForm {
        max-width: 100%;
    }
    
    #searchForm .input-group {
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
    }
    
    #searchForm .form-control {
        height: 36px;
        font-size: 0.9rem;
        border-right: none;
    }
    
    #searchForm .btn {
        padding: 0.25rem 0.5rem;
        height: 36px;
        font-size: 0.9rem;
        border-left: none;
        margin-left: -1px !important;
        width: auto;
    }
    
    #searchForm .suggestion-input {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
}

/* Custom Form Switch Styles */
.form-switch .form-check-input {
    /* Keep default background-image for unchecked state */
}

.form-switch .form-check-input:focus {
    border-color: rgba(56, 122, 41, 0.5); /* Slightly darker border on focus */
    box-shadow: 0 0 0 0.25rem rgba(56, 122, 41, 0.25); /* Green glow */
    /* Keep default background-image for focus state knob if desired */
}

.form-switch .form-check-input:checked {
    background-color: #387a29; /* Primary green background */
    border-color: #387a29;     /* Primary green border */
    /* Keep default background-image for checked state knob (white circle) */
}

/* Ensure hover states don't override focus */
.form-switch .form-check-input:hover:not(:checked) {
    /* Optional: Add a subtle hover effect for unchecked state if needed */
}

/* Override Bootstrap success colors with our brand green */
.text-success {
  color: #387a29 !important;
}

.bg-success {
  background-color: #387a29 !important;
}

.border-success {
  border-color: #387a29 !important;
}

.btn-success {
  background-color: #387a29 !important;
  border-color: #387a29 !important;
}

.btn-success:hover, 
.btn-success:focus {
  background-color: #2d6321 !important;
  border-color: #2d6321 !important;
}

.btn-outline-success {
  color: #387a29 !important;
  border-color: #387a29 !important;
}

.btn-outline-success:hover,
.btn-outline-success:focus {
  background-color: #387a29 !important;
  color: #fff !important;
}

/* Keep the opacity variations but adjust their base color */
.bg-success-subtle,
.bg-success.bg-opacity-10,
.bg-success.bg-opacity-25 {
  background-color: rgba(56, 122, 41, 0.1) !important;
}

.text-success-emphasis {
  color: #2d6321 !important;
}

/* Add additional classes as needed */

/* Add styles for Google Place Autocomplete web component */

/* Style the internal input to mimic Bootstrap's form-control */
gmp-place-autocomplete input {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem; /* From Bootstrap .form-control */
    font-size: 1rem; /* From Bootstrap .form-control */
    font-weight: 400;
    line-height: 1.5;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    background-clip: padding-box;
    border: var(--bs-border-width) solid var(--bs-border-color);
    appearance: none;
    /* Ensure correct height matching other form-controls */
    min-height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2)); /* From Bootstrap .form-control */
    /* Reset border radius - input-group structure should handle corners */
    border-radius: 0; 
    /* NEW: Force the input to properly fill its container */
    box-sizing: border-box !important;
    width: 100% !important;
}

/* NEW: Enhance the container component to properly fit in input groups */
gmp-place-autocomplete {
    display: flex !important;
    align-items: stretch !important; /* Makes the internal input stretch vertically */
    width: 100% !important; /* Ensure component takes full width available to it */
}

/* Add back: Focus styling for the autocomplete input */
gmp-place-autocomplete input:focus {
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  border-color: #86b7fe; /* Bootstrap focus color */
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); /* Bootstrap focus shadow */
}

/* --- Input Group Fixes for Place Autocomplete --- */

/* Remove left border radius from the internal input */
gmp-place-autocomplete input {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Remove left border radius from adjacent button/select */
.input-group > #geolocateBtn,
.input-group > #radiusSelect {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Desktop input group styling */
@media (min-width: 768px) {
    /* Set consistent height for all inputs and buttons */
    .search-form .input-group > *,
    .search-form .input-group-text,
    .search-form .form-control,
    .search-form .btn,
    .search-form .form-select,
    gmp-place-autocomplete input {
        height: 38px !important;
    }
    
    /* Ensure location autocomplete displays correctly */
    gmp-place-autocomplete {
        flex: 1;
        min-width: 0; /* Prevent flex items from overflowing */
    }
    
    /* Ensure the dropdown has enough width */
    #radiusSelect {
        min-width: 7rem;
        width: auto;
    }
    
    /* Make sure all input group icons are properly centered */
    .input-group-text {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.375rem 0.75rem;
    }
    
    /* Ensure buttons in input groups have consistent styling */
    .input-group .btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Border radius fixes for better connected appearance */
    .input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n+3), 
    .input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu) {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }
    
    /* Ensure search button has consistent styling */
    .search-form .btn.btn-primary {
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Mobile-specific overrides for wrapping and layout */
@media (max-width: 767.98px) {
    /* Override flex-nowrap on mobile to allow stacking */
    .input-group.flex-nowrap { 
        flex-wrap: wrap !important;
    }

    /* Create a grouped look for location input on mobile */
    .input-group > span.input-group-text:first-child,
    gmp-place-autocomplete,
    #geolocateBtn {
        /* Reset border radius for all elements */
        border-radius: 0.375rem !important;
    }
    
    /* Style the specific location input group */
    /* The green map pin icon takes full width */
    .input-group > span.input-group-text:first-child {
        width: 100%;
        margin-bottom: 0.5rem;
        justify-content: center;
        background-color: var(--primary-color);
        color: white;
        height: 42px; /* Match input height */
    }
    
    /* Autocomplete takes full width */
    #locationInput { 
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Position crosshair button and radius select in a row */
    #geolocateBtn {
        width: 15%; /* Small fixed percentage */
        margin-right: 2%;
        margin-bottom: 0.5rem;
        height: 42px; /* Match input height */
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #radiusSelect {
        width: 83%; /* Take remaining width */
        margin-bottom: 0.5rem;
        min-width: auto; /* Reset min-width */
        height: 42px; /* Match input height */
    }
    
    /* Make search button stand out */
    .col-md-2 .btn.btn-primary {
        height: 48px; /* Slightly taller */
        font-size: 1rem;
    }
}

/* --- End Input Group Fixes --- */

/* Filter Type Pills Styling - More dramatic version */
.filter-pill {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem !important;
    font-weight: 600 !important;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0 !important;
    margin: 0.25rem !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 5rem !important;
}

/* Inactive pill */
.badge.rounded-pill.bg-light.text-dark.filter-pill {
    background-color: white !important;
    color: #333 !important;
    border-color: #e0e0e0 !important;
}

/* Active pill */
.badge.rounded-pill.bg-primary.filter-pill {
    background-color: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 3px 8px rgba(56, 122, 41, 0.4) !important;
    border-color: var(--primary-color) !important;
    position: relative;
    transform: translateY(-2px);
}

.filter-pill:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
    border-color: #ccc !important;
}

/* Mobile-specific styling */
@media (max-width: 767.98px) {
    .filter-types-container > span {
        display: block !important;
        margin-bottom: 0.75rem !important;
        font-weight: 500 !important;
    }
    
    .filter-types-container .d-inline-flex {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }
    
    .filter-pill {
        font-size: 0.85rem !important;
        padding: 0.7rem 0.5rem !important;
        margin: 0.3rem !important;
        min-width: calc(33% - 0.6rem) !important; /* Roughly 3 per row with margins */
        flex-grow: 1 !important;
        text-align: center !important;
    }
}

/* Premium Badge Styling - Updated for image */
.premium-badge-container {
  height: 100%;
    display: flex;
    align-items: center;
  margin: 0 0.5rem;
}

.premium-badge-img {
  height: 30px; /* Increased default size */
  width: auto;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s ease;
}

.premium-badge-img:hover {
  transform: scale(1.1);
}

.admin-badge {
  /* Special styling for admin badge */
  height: 30px;
}

/* Mobile-first Navbar Improvements */
.navbar {
  background-color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 1rem;
  /* NEW: Add min-height and adjusted padding */
  min-height: 72px;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  align-items: center; /* Ensure vertical alignment */
}

.navbar-brand, .nav-link {
  color: var(--text-light) !important;
  transition: var(--transition);
  font-weight: 600;
  white-space: nowrap; /* Prevent text wrapping */
}

.navbar-collapse {
  flex-basis: 100%;
  flex-grow: 1;
  align-items: center;
}

/* Fix search input on mobile */
    #searchForm {
        width: 100%;
  margin: 0.5rem 0;
}

.navbar .container {
        flex-wrap: nowrap;
    }
    
/* Ensure nav items don't stack on medium+ screens */
@media (min-width: 992px) {
  .navbar-nav {
    flex-direction: row;
    align-items: center;
  }
  
  .nav-item {
    margin: 0 0.25rem;
  }
  
  #searchForm {
    margin: 0 1rem;
    max-width: 400px;
  }
  
  .premium-badge-img {
    height: 36px !important; /* Updated increased size */
  }
}

/* Ensure mobile-friendly menu */
@media (max-width: 991.98px) {
  .navbar-collapse {
    padding-top: 1rem; /* Increased padding */
    padding-bottom: 1rem; /* Increased padding */
  }
  
  .navbar-nav {
    padding-bottom: 0.5rem;
  }
  
  .nav-item {
    padding: 0.25rem 0;
  }
  
  .premium-badge-container {
    margin: 0.5rem 0;
  }
  
  .premium-badge-img {
    height: 36px !important; /* Updated increased size for mobile too */
  }
}

/* Locked Premium Feature Styling */
.feature-locked {
  position: relative;
  cursor: pointer;
}

.feature-locked-overlay {
  position: absolute;
  top: 0;
  left: 0;
    width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.03);
  border-radius: inherit;
        display: flex;
  flex-direction: column;
        align-items: center;
        justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-locked:hover .feature-locked-overlay {
  opacity: 1;
}

.feature-locked-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  opacity: 0.9;
  z-index: 5;
}

.feature-locked-icon {
  font-size: 1.5rem;
  color: var(--bs-warning);
        margin-bottom: 0.5rem;
}

.feature-locked-text {
    font-size: 0.9rem;
  color: var(--dark-text);
  font-weight: 600;
  text-align: center;
  padding: 0 1rem;
}

.feature-locked-button {
  margin-top: 0.75rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Premium menu item styling */
.dropdown-item .bi-star-fill {
  color: #ffc107;
}

/* Premium feature highlight styling */
.premium-feature-highlight {
  border: 1px dashed #ffc107;
  border-radius: 0.375rem;
  padding: 1rem;
    position: relative;
  margin: 1rem 0;
  background-color: rgba(255, 193, 7, 0.05);
}

.premium-feature-highlight:before {
  content: "Premium";
    position: absolute;
  top: -0.7rem;
  left: 1rem;
    background-color: #fff;
  padding: 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffc107;
}

/* Premium upgrade CTA banner */
.premium-upgrade-banner {
  background-color: rgba(255, 193, 7, 0.1);
  border-left: 4px solid #ffc107;
  padding: 1rem;
  margin: 1.5rem 0;
  border-radius: 0.375rem;
}

@media (max-width: 767.98px) {
  .feature-locked-overlay {
    padding: 0.5rem;
  }
  
  .feature-locked-text {
    font-size: 0.8rem;
  }
  
  .feature-locked-button {
    font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
  }
}

/* Styles for the combined user account toggle link */
.user-account-toggle {
    color: white !important;
    transition: opacity 0.2s ease;
    position: relative; /* Needed for the ::after pseudo-element */
    padding-bottom: 2px; /* Add a little space for the underline */
}
.user-account-toggle:hover {
    opacity: 1; /* Reset opacity change */
    color: var(--accent-color) !important; /* Change text color to yellow on hover */
    /* text-decoration: none; Remove underline if needed, but Bootstrap handles this */
}

/* Underline effect for user account toggle */
.user-account-toggle::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #ffffff; /* White underline */
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.user-account-toggle:hover::after {
    width: 100%; /* Expand underline on hover */
}

.navbar .container-fluid {
  /* NEW: Ensure container aligns items and inherits height */
        align-items: center;
  min-height: inherit;
    }
    
/* Add rule for row alignment */
.navbar .row {
        align-items: center;
  /* flex-wrap: nowrap; Let Bootstrap handle wrapping based on cols */
}

/* Re-adding the mobile alignment rules */
@media (max-width: 991.98px) {
  .navbar-collapse {
    padding-top: 1rem; /* Increased padding */
    padding-bottom: 1rem; /* Increased padding */
  }

  /* --- Ensure right group items stay in a row and align center on mobile --- */
  .navbar-collapse .col-lg-auto.order-lg-3 {
      flex-direction: row !important; /* Force row layout (horizontal alignment) */
      justify-content: center !important; /* Keep horizontal centering of the group */
      align-items: center !important; /* Ensure vertical centering within the row */
      /* Add gap if needed, Bootstrap gap utilities on the parent div in HTML might be better */
      /* gap: 0.75rem; */
  }
  /* --- End mobile alignment --- */

  .navbar-nav {
    padding-bottom: 0.5rem;
  }

  .nav-item {
    padding: 0.25rem 0;
  }

  .premium-badge-container {
    margin: 0.5rem 0;
  }

  .premium-badge-img {
    height: 36px !important; /* Updated increased size for mobile too */
  }
}

/* Styles for the combined user account toggle link */
.user-account-toggle {
    color: white !important;
    transition: opacity 0.2s ease;
    position: relative; /* Needed for the ::after pseudo-element */
    padding-bottom: 2px; /* Add a little space for the underline */
}
.user-account-toggle:hover {
    opacity: 1; /* Reset opacity change */
    color: var(--accent-color) !important; /* Change text color to yellow on hover */
    /* text-decoration: none; Remove underline if needed, but Bootstrap handles this */
}

/* Underline effect for user account toggle */
.user-account-toggle::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #ffffff; /* White underline */
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.user-account-toggle:hover::after {
    width: 100%; /* Expand underline on hover */
}

@media (max-width: 991.98px) {
    .navbar-collapse {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  /* --- NEW: Stack right group items vertically and center them horizontally on mobile --- */
  .navbar-collapse .col-lg-auto.order-lg-3 {
      width: 100% !important; /* Make container full width */
      flex-direction: column !important; /* Force column layout (vertical stack) */
      align-items: center !important; /* Horizontally center items in the column */
      gap: 0.75rem; /* Add vertical space between stacked items */
      /* Remove justify-content as it's for the main axis (now vertical) */
  }
  /* --- End mobile alignment --- */

  .navbar-nav {
    padding-bottom: 0.5rem;
  }

  .nav-item {
    padding: 0.25rem 0;
  }

  .premium-badge-container {
    margin: 0.5rem 0;
  }

  .premium-badge-img {
    height: 36px !important; /* Updated increased size for mobile too */
  }
}

/* --- Styles for Mapbox Geocoder --- */

/* Make Geocoder input look like Bootstrap form-control */
.mapboxgl-ctrl-geocoder,
.mapboxgl-ctrl-geocoder input[type='text'] {
    font-size: 1rem; /* Match Bootstrap form-control */
    line-height: 1.5; /* Match Bootstrap form-control */
    font-family: inherit; /* Use website font */
    border-radius: 0.375rem; /* Bootstrap default */
    min-width: 280px; /* Ensure it doesn't get too small */
}

/* Override Mapbox default styling to better fit Bootstrap input-group */
.input-group .mapboxgl-ctrl-geocoder {
    box-shadow: none; /* Remove Mapbox shadow */
    border: var(--bs-border-width) solid var(--bs-border-color); /* Use Bootstrap border */
    /* Important: Force the geocoder to take up flexible space */
    flex: 1 1 auto !important;
    width: 1% !important; /* Flexbox hack to make it flexible */
    min-width: 0; /* Allow shrinking */
}

/* Style the input inside the geocoder within an input group */
.input-group .mapboxgl-ctrl-geocoder input[type='text'] {
    min-height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2)); /* Match BS height */
    padding: 0.375rem 0.75rem; /* Match BS padding */
    border: none; /* Remove internal border */
    box-shadow: none;
    border-radius: inherit; /* Inherit border radius from parent */
}

/* Adjust focus style to match Bootstrap */
.input-group .mapboxgl-ctrl-geocoder--focused {
    border-color: #86b7fe; /* Bootstrap focus color */
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); /* Bootstrap focus shadow */
}

.input-group .mapboxgl-ctrl-geocoder input[type='text']:focus {
     box-shadow: none; /* Remove Mapbox internal focus shadow */
}

/* Adjust suggestion list appearance */
.mapboxgl-ctrl-geocoder .suggestions {
    background-color: var(--bs-body-bg);
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-top: none;
    box-shadow: var(--bs-box-shadow-sm);
    font-family: inherit;
    z-index: 1050; /* Ensure suggestions appear above other elements */
}

.mapboxgl-ctrl-geocoder .suggestions > li > a {
    color: var(--bs-body-color);
    padding: 0.5rem 0.75rem;
}

.mapboxgl-ctrl-geocoder .suggestions > li.active > a,
.mapboxgl-ctrl-geocoder .suggestions > li > a:hover {
    background-color: var(--primary-color); /* Use site's primary color for hover/active */
    color: var(--text-light);
}

/* Hide Mapbox Magnifying glass icon if desired (Bootstrap prepends its own) */
.input-group .mapboxgl-ctrl-geocoder--icon-search {
     display: none;
}

/* Adjust clear button position/style */
.input-group .mapboxgl-ctrl-geocoder--button {
    /* Optional: Style clear button if needed */
}

/* Desktop input group styling */
@media (min-width: 768px) {
    /* Set consistent height for all inputs and buttons */
    .search-form .input-group > *,
    .search-form .input-group-text,
    .search-form .form-control,
    .search-form .mapboxgl-ctrl-geocoder input[type='text'], /* Added */
    .search-form .btn,
    .search-form .form-select,
    .search-form .mapboxgl-ctrl-geocoder /* Added container */ {
        height: 38px !important;
    }
    
    /* Remove border radius when Geocoder is not the first/last element */
    .input-group > .mapboxgl-ctrl-geocoder:not(:first-child) .mapboxgl-ctrl-geocoder--input {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
    }
    .input-group > .mapboxgl-ctrl-geocoder:not(:last-child) .mapboxgl-ctrl-geocoder--input {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }
    /* Apply to the wrapper too */
     .input-group > .mapboxgl-ctrl-geocoder:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
     .input-group > .mapboxgl-ctrl-geocoder:not(:last-child) {
         border-top-right-radius: 0;
         border-bottom-right-radius: 0;
    }
    
    /* Ensure the dropdown has enough width */
    #radiusSelect {
        min-width: 7rem;
        width: auto;
    }
    
    /* Make sure all input group icons are properly centered */
    .input-group-text {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.375rem 0.75rem;
    }
    
    /* Ensure buttons in input groups have consistent styling */
    .input-group .btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Border radius fixes for better connected appearance */
    .input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n+3), 
    .input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu) {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }
    
    /* Ensure search button has consistent styling */
    .search-form .btn.btn-primary {
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Mobile-specific overrides for wrapping and layout */
@media (max-width: 767.98px) {
    /* Override flex-nowrap on mobile to allow stacking */
    .input-group.flex-nowrap { 
        flex-wrap: wrap !important;
    }

    /* --- Mobile Geocoder Styling --- */
    /* Make geocoder take full width on mobile within the input group */
    .input-group .mapboxgl-ctrl-geocoder {
         width: 100% !important;
         margin-bottom: 0.5rem;
    }
    .input-group .mapboxgl-ctrl-geocoder input[type='text'] {
         height: 42px; /* Match other mobile inputs */
    }
    
    /* Style the specific location input group */
    /* The green map pin icon takes full width */
    .input-group > span.input-group-text:first-child {
        width: 100%;
        margin-bottom: 0.5rem;
        justify-content: center;
        background-color: var(--primary-color);
        color: white;
        height: 42px; /* Match input height */
    }
    
    /* Radius select */
    #radiusSelect {
        width: 100%; /* Take full width below geocoder */
        margin-bottom: 0.5rem;
        min-width: auto; /* Reset min-width */
        height: 42px; /* Match input height */
    }
    /* --- End Mobile Geocoder Styling --- */
    
    /* Make search button stand out */
    .col-md-2 .btn.btn-primary {
        height: 48px; /* Slightly taller */
        font-size: 1rem;
    }
}

/* Geolocation Suggestions Dropdown */
.suggestions-dropdown {
    position: absolute;
    z-index: 1050;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background-color: #f0f8eb; /* Light green background on hover */
    color: #387a29; /* Local Farmers Hub green */
}

/* Geocoder styles override */
.mapboxgl-ctrl-geocoder {
        max-width: 100%;
    width: 100%;
    font-size: 15px;
    line-height: 20px;
    border-radius: 4px;
    }
    
.mapboxgl-ctrl-geocoder .mapboxgl-ctrl-geocoder--input {
        height: 36px;
}

.mapboxgl-ctrl-geocoder .mapboxgl-ctrl-geocoder--icon {
    top: 8px;
}

/* Location input with map toggle button */
.location-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* Map container styling */
#mapContainer {
    background-color: rgba(56, 122, 41, 0.05);
    border-radius: 8px;
    padding: 10px;
    border: 1px solid rgba(56, 122, 41, 0.2);
    margin-top: 15px;
}

/* Replace deprecated -ms-high-contrast with modern forced-colors mode */
@media (forced-colors: active) {
    /* Add transparent borders for elements that may need visual boundaries */
    button, 
    .btn,
    .card,
    .modal {
    border: 1px solid transparent;
}

    /* Make sure SVG icons use the right system colors */
    svg {
        fill: CanvasText;
    }
    
    a svg {
        fill: LinkText;
    }
    
    button svg,
    .btn svg {
        fill: ButtonText;
    }
    
    /* Ensure focus styles are visible */
    a:focus,
    button:focus,
    input:focus,
    select:focus,
    textarea:focus,
    [tabindex]:focus {
        outline: 2px solid transparent;
        outline-offset: 2px;
    }
}