@media only screen and (max-width: 767px) {
  /* ===================================================================
     VERANDA MARKET - MOBILE & BASE STYLES
     =================================================================== */

  /* ===================================
     1. CSS VARIABLES & ROOT
     =================================== */
  :root {
    /* Brand Colors */
    --primary-color: #1a8917;
    --primary-dark: #146812;
    --primary-light: #22a31f;
    --accent-yellow: #e6c855;

    /* Grayscale */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Footer Colors */
    --footer-bg: #0f172a;
    --footer-bg-light: #1e293b;
    --footer-text: #94a3b8;
    --footer-heading: #f1f5f9;
    --footer-border: rgba(148, 163, 184, 0.2);

    /* Fonts */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-secondary: 'Space Grotesk', sans-serif;

    /* Spacing */
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-base: 250ms ease;
  }

  /* ===================================
     2. BASE & GLOBAL STYLES
     =================================== */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  html {
    font-size: 16px;
    scroll-behavior: smooth;
  }

  body {
    font-family: var(--font-primary);
    color: var(--gray-900);
    background-color: var(--gray-50);
    line-height: 1.6;
    padding-top: 56px;
    padding-bottom: 60px;
    box-sizing: border-box;
  }

  body.filters-open::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

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

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

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

  .container {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 1rem;
  }

/* ===================================
   MOBILE FIRST BASE STYLES (0 - 767px)
   =================================== */

/* Reset body padding that causes issues */
body {
  padding-top: 0 !important;
}

/* Header Container */
.header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Top Navigation Bar */
.top-nav {
  border-bottom: 2px solid var(--primary-color);
  min-height: 60px;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

.top-nav-wrapper {
  display: grid;
  grid-template-columns: 40px auto 1fr; /* Hamburger + Brand + Search */
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
  position: relative;
}

/* Mobile Menu Toggle (Hamburger) */
.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
  color: var(--gray-700);
  background: transparent;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:active {
  background: var(--gray-100);
  color: var(--primary-color);
}

/* Brand/Logo - Mobile - Compact version */
.brand {
  flex-shrink: 0;
  min-width: 0; /* Allow shrinking */
}

.brand .logo-container {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
}

.brand .logo {
  width: 32px;
  height: 32px;
  animation: none; /* Disable animation on mobile */
}

.brand .brand-text h1 {
  font-size: 0.75rem;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand .brand-text h1::after {
  display: none; /* Hide underline animation on mobile */
}

.brand .slogan {
  display: none; /* Hide on mobile */
}

/* Search Container - Mobile - FULL SEARCH BAR */
.search-container {
  position: relative;
  display: flex !important;
  flex: 1;
  min-width: 0; /* Allow shrinking in grid */
  max-width: 100%;
  margin: 0;
}

/* Mobile Search - Full Width Search Bar */
.search-wrapper {
  display: flex !important;
  align-items: center;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 24px;
  padding: 4px 4px 4px 8px;
  height: 44px;
  width: 100%;
  overflow: visible;
}

/* Show category dropdown on mobile with compact styling */
.search-category-dropdown {
  display: flex !important;
  align-items: center;
  padding: 0 8px 0 0;
  border-right: 1px solid var(--gray-300);
  min-width: auto;
  flex-shrink: 0;
  height: 100%;
}

.search-category-dropdown select {
  font-size: 12px;
  padding: 4px 2px;
  background: transparent;
  border: none;
  color: var(--gray-700);
  cursor: pointer;
  width: auto;
  min-width: 65px;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}

.search-category-dropdown .dropdown-indicator {
  font-size: 9px;
  color: var(--gray-500);
  margin-left: 2px;
}

/* Show search input on mobile - CRITICAL */
.search-input-wrapper {
  display: flex !important;
  flex: 1 !important;
  align-items: center;
  padding: 0 8px;
  min-width: 50px !important;
  height: 100%;
}

.search-input-wrapper .search-input {
  display: block !important;
  flex: 1;
  width: 100% !important;
  font-size: 14px;
  border: none !important;
  background: transparent !important;
  padding: 8px 4px;
  min-width: 0;
  outline: none;
  height: 100%;
  color: var(--gray-800);
}

.search-input-wrapper .search-input::placeholder {
  color: var(--gray-400);
  font-size: 12px;
}

/* Hide voice search on mobile to save space */
.search-input-wrapper .voice-search-btn {
  display: none !important;
}

/* Hide search button text on mobile */
.search-btn-text {
  display: none !important;
}

/* Search button as green circle on mobile */
.search-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  background: var(--primary-color) !important;
  color: white !important;
  font-size: 0.9rem;
  border-radius: 50%;
  transition: all 0.2s ease;
  flex-shrink: 0;
  border: none;
}

.search-btn:hover,
.search-btn:active {
  background: var(--primary-dark) !important;
  color: white !important;
}

/* User Actions - Hide entire section on mobile (cart moved to lower nav) */
.user-actions {
  display: none !important;
}

/* Products Navigation Bar - Mobile */
.products-nav {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  padding: 0.75rem 0;
}

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

.nav-back {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--gray-600);
  font-weight: 500;
  font-size: 0.9rem;
}

.nav-back span {
  display: none; /* Hide text on mobile */
}

.nav-breadcrumb {
  display: none; /* Hide breadcrumb on mobile */
}

.create-shop-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-color);
  color: var(--white);
  padding: 0.5rem 0.75rem;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.85rem;
}

.create-shop-link span {
  display: none; /* Show only icon on mobile */
}

/* Mobile Cart in Lower Nav Bar */
.mobile-cart-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 44px;
  height: 44px;
  font-size: 1.25rem;
  color: var(--gray-700);
  cursor: pointer;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.mobile-cart-container:hover,
.mobile-cart-container:active {
  color: var(--primary-color);
  transform: scale(1.05);
}

.mobile-cart-container .cart-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--primary-color);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
  line-height: 1.2;
}

/* ===================================
   MOBILE SLIDE-OUT MENU
   =================================== */

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 1998;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Menu Container */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  background: var(--white);
  z-index: 1999;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
}

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

/* Mobile Menu Header */
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.mobile-menu-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-menu-user i {
  font-size: 2rem;
  color: var(--gray-400);
}

.mobile-menu-user-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
}

.mobile-menu-user-info p {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin: 0;
}

.mobile-menu-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--gray-600);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-menu-close:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

/* Mobile Menu Content */
.mobile-menu-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}

/* Mobile Menu Sections */
.mobile-menu-section {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.mobile-menu-section:last-child {
  border-bottom: none;
}

.mobile-menu-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  margin: 0;
}

/* Mobile Menu Items */
.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--gray-700);
  font-size: 0.95rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.mobile-menu-item:hover {
  background: var(--gray-50);
  color: var(--primary-color);
  padding-left: 1.25rem;
}

.mobile-menu-item i {
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
  color: var(--gray-400);
}

.mobile-menu-item:hover i {
  color: var(--primary-color);
}

/* Location Selector in Mobile Menu */
.mobile-location-selector {
  padding: 0.75rem 1rem;
  background: var(--gray-50);
  border-radius: 8px;
  margin: 0.5rem 1rem;
}

.mobile-location-label {
  font-size: 0.75rem;
  color: var(--gray-600);
  margin-bottom: 0.25rem;
}

.mobile-location-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: var(--gray-900);
}

.mobile-location-current i {
  color: var(--primary-color);
}

/* Mobile Menu Footer */
.mobile-menu-footer {
  padding: 1rem;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.mobile-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-signin-btn,
.mobile-register-btn {
  width: 100%;
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.mobile-signin-btn {
  background: var(--primary-color);
  color: var(--white);
  border: 2px solid var(--primary-color);
}

.mobile-signin-btn:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

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

.mobile-register-btn:hover {
  background: rgba(26, 137, 23, 0.05);
}

/* ===================================
   MOBILE SEARCH EXPANSION
   =================================== */

.mobile-search-expanded {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--white);
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 2000;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.mobile-search-expanded.active {
  transform: translateY(0);
}

.mobile-search-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.mobile-search-back {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--gray-700);
  background: var(--gray-100);
  border-radius: 8px;
  cursor: pointer;
}

.mobile-search-form {
  flex: 1;
  display: flex;
  gap: 0.5rem;
}

.mobile-search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-300);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
}

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

.mobile-search-submit {
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

/* ===================================
   TABLET STYLES (768px - 991px)
   =================================== */

@media (min-width: 768px) {
  /* Adjust grid for tablet */
  .top-nav-wrapper {
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    padding: 1rem 0;
  }
  
  /* Hide mobile menu toggle */
  .mobile-menu-toggle {
    display: none;
  }
  
  /* Expand brand */
  .brand .logo-container {
    gap: 0.75rem;
  }
  
  .brand .logo {
    width: 48px;
    height: 48px;
  }
  
  .brand .brand-text h1 {
    font-size: 1.5rem;
  }
  
  .brand .slogan {
    display: block;
    font-size: 0.7rem;
  }
  
  /* Search expands on tablet */
  .search-container {
    max-width: 400px;
    width: 100%;
  }
  
  .search-wrapper {
    display: flex;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 24px;
    height: 44px;
    width: 100%;
    padding-right: 4px;
    align-items: center;
  }
  
  .search-input-wrapper {
    display: flex !important;
    flex: 1;
    align-items: center;
  }
  
  .search-input {
    display: block;
    padding: 0 1rem;
    height: 100%;
  }
  
  .search-btn {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    font-size: 1rem;
  }
  
  /* Show user actions partially */
  .user-actions {
    gap: 1rem;
  }
  
  .deliver-to {
    display: flex !important;
  }
  
  .deliver-text .deliver-label {
    display: none; /* Still hide label on tablet */
  }
  
  /* Products nav adjustments */
  .nav-back span {
    display: inline;
  }
  
  .create-shop-link {
    padding: 0.5rem 1.25rem;
  }
  
  .create-shop-link span {
    display: inline;
  }
}

/* ===================================
   SMALL DESKTOP (992px - 1199px)
   =================================== */

@media (min-width: 992px) {
  /* Full grid layout */
  .top-nav-wrapper {
    grid-template-columns: 280px 1fr auto;
    gap: 2rem;
  }
  
  /* Full brand display */
  .brand .logo {
    width: 55px;
    height: 55px;
    animation: logoEntrance 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }
  
  .brand .brand-text h1 {
    font-size: 2rem;
  }
  
  .brand .brand-text h1::after {
    display: block; /* Show underline animation */
  }
  
  .brand .slogan {
    font-size: 0.7rem;
  }
  
  /* Full search */
  .search-container {
    max-width: 600px;
  }
  
  .search-wrapper {
    height: 48px;
    border-radius: 28px;
  }
  
  .search-category-dropdown {
    display: flex !important;
  }
  
  .search-btn-text {
    display: inline !important;
  }
  
  /* All user actions visible */
  .user-account {
    display: block !important;
  }
  
  .deliver-text .deliver-label {
    display: block;
  }
  
  .nav-breadcrumb {
    display: flex;
  }
}

/* ===================================
   LARGE DESKTOP (1200px+)
   =================================== */

@media (min-width: 1200px) {
  .search-container {
    max-width: 700px;
  }
  
  .container {
    padding: 0 2rem;
  }
  
  /* Enable all hover effects */
  .cart-container:hover {
    transform: scale(1.1);
  }
  
  .user-account:hover {
    transform: scale(1.05);
  }
}

/* ===================================
   UTILITIES & HELPERS
   =================================== */

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
  overflow: hidden;
}

/* Smooth transitions for all interactive elements */
.mobile-menu-toggle,
.search-btn,
.cart-container,
.nav-back,
.create-shop-link,
.mobile-menu-close,
.mobile-menu-item {
  transition: all 0.2s ease;
}

/* Focus styles for accessibility */
.mobile-menu-toggle:focus,
.search-btn:focus,
.cart-container:focus,
.mobile-search-input:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Hide dropdowns on mobile */
@media (max-width: 991px) {
  .location-dropdown,
  .account-dropdown {
    display: none !important;
  }
}

/* ===================================
   MOBILE MENU FIXES
   Add these styles to your main CSS file
   =================================== */

/* 1. HIDE MOBILE MENU ELEMENTS BY DEFAULT */
.mobile-menu-overlay,
.mobile-menu,
.mobile-search-expanded {
    display: none;
}

/* Show mobile menu elements only on mobile/tablet */
@media (max-width: 991px) {
    .mobile-menu-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
        z-index: 1998;
    }
    
    .mobile-menu {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        background: var(--white);
        z-index: 1999;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        flex-direction: column;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-search-expanded {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 2000;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
    }
}

/* 2. FIX MOBILE MENU SCROLLING */
.mobile-menu {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
}

.mobile-menu-header {
    flex-shrink: 0; /* Prevent header from shrinking */
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--gray-50);
}

.mobile-menu-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    padding-bottom: 1rem; /* Add padding at bottom */
}

.mobile-menu-footer {
    flex-shrink: 0; /* Prevent footer from shrinking */
    position: sticky;
    bottom: 0;
    background: var(--gray-50);
    padding: 1rem;
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

/* 3. ENSURE PROPER DISPLAY WHEN ACTIVE */
.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

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

.mobile-search-expanded.active {
    transform: translateY(0);
}

/* 4. FIX MOBILE MENU HEIGHT ON SMALL DEVICES */
@media (max-height: 600px) {
    .mobile-menu-header {
        padding: 0.75rem 1rem;
    }
    
    .mobile-menu-section-title {
        padding: 0.25rem 1rem;
        margin-bottom: 0.25rem;
    }
    
    .mobile-menu-item {
        padding: 0.5rem 1rem;
    }
    
    .mobile-menu-footer {
        padding: 0.75rem 1rem;
    }
    
    .mobile-auth-buttons {
        gap: 0.5rem;
    }
    
    .mobile-signin-btn,
    .mobile-register-btn {
        padding: 0.625rem;
    }
}

/* 5. ENSURE SMOOTH SCROLLING BEHAVIOR */
.mobile-menu * {
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.mobile-menu-content::-webkit-scrollbar {
    width: 4px;
}

.mobile-menu-content::-webkit-scrollbar-track {
    background: transparent;
}

.mobile-menu-content::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 2px;
}

/* 6. PREVENT CONTENT JUMPING */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* 7. Z-INDEX HIERARCHY FIX */
.mobile-menu-overlay {
    z-index: 9998;
}

.mobile-menu {
    z-index: 9999;
}

.mobile-search-expanded {
    z-index: 10000;
}

/* 8. ANIMATION PERFORMANCE */
.mobile-menu,
.mobile-menu-overlay,
.mobile-search-expanded {
    will-change: transform, opacity;
}

/* 9. SAFE AREA INSETS FOR MODERN DEVICES */
@supports (padding: max(0px)) {
    .mobile-menu {
        padding-left: env(safe-area-inset-left);
    }
    
    .mobile-menu-footer {
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
}

/* 10. LANDSCAPE MODE ADJUSTMENTS */
@media (max-height: 500px) and (orientation: landscape) {
    .mobile-menu {
        width: 320px;
    }
    
    .mobile-menu-content {
        padding: 0.5rem 0;
    }
    
    .mobile-location-selector {
        margin: 0.25rem 1rem;
        padding: 0.5rem;
    }
}

/* ===================================
   HERO SECTION RESPONSIVE STYLES
   Mobile-First Approach
   =================================== */

/* ===================================
   MOBILE FIRST BASE (0 - 767px)
   =================================== */

/* Hero Container - Mobile Base */
.shops-hero {
  padding: 3rem 0;
  min-height: 350px;
  position: relative;
  overflow: hidden;
  background-attachment: scroll; /* Better performance on mobile */
}

/* Optimize background for mobile */
@media (max-width: 767px) {
  .shops-hero {
    /* Use smaller image for mobile to improve loading */
    background-image: var(--hero-image-mobile, var(--hero-image, url('https://images.unsplash.com/photo-1472851294608-062f824d29cc?w=800&h=600&fit=crop')));
    background-position: center center;
  }
}

/* Hero Content - Mobile */
.hero-content {
  padding: 0 1rem;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
}

/* Hero Badge - Mobile */
.hero-badge {
  display: inline-block;
  background: var(--accent-yellow);
  color: var(--gray-900);
  padding: 0.375rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(230, 200, 85, 0.3);
  animation: fadeInDown 0.6s ease-out;
}

/* Hero Title - Mobile */
.hero-title {
  font-size: 1.875rem; /* 30px */
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

/* Hero Description - Mobile */
.hero-description {
  font-size: 0.9375rem; /* 15px */
  line-height: 1.6;
  margin-bottom: 1.5rem;
  opacity: 0.9;
  max-width: 100%;
  padding: 0 0.5rem;
  animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

/* Hero CTA - Mobile */
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  color: var(--primary-color);
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9375rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  border: 2px solid transparent;
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease-out 0.3s backwards;
  /* Touch target minimum 44px */
  min-height: 44px;
  touch-action: manipulation;
}

.hero-cta:active {
  transform: scale(0.98);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);
}

/* Hero Pattern - Hide on small mobile */
@media (max-width: 480px) {
  .hero-pattern {
    opacity: 0.3; /* Reduce pattern opacity on very small screens */
  }
}

/* ===================================
   SMALL MOBILE ADJUSTMENTS (320px - 480px)
   =================================== */

@media (max-width: 480px) {
  .shops-hero {
    padding: 2.5rem 0;
    min-height: 320px;
  }
  
  .hero-badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.875rem;
  }
  
  .hero-title {
    font-size: 1.625rem; /* 26px */
    padding: 0 0.5rem;
  }
  
  .hero-description {
    font-size: 0.875rem; /* 14px */
    padding: 0 1rem;
  }
  
  .hero-cta {
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
  }
  
  .hero-cta i {
    display: none; /* Hide icon on very small screens to save space */
  }
}

/* ===================================
   TABLET STYLES (768px - 991px)
   =================================== */

@media (min-width: 768px) {
  .shops-hero {
    padding: 4rem 0;
    min-height: 400px;
  }
  
  .hero-content {
    max-width: 600px;
    padding: 0 2rem;
  }
  
  .hero-badge {
    font-size: 0.875rem;
    padding: 0.5rem 1.25rem;
    margin-bottom: 1.25rem;
  }
  
  .hero-title {
    font-size: 2.5rem; /* 40px */
    margin-bottom: 1.25rem;
  }
  
  .hero-description {
    font-size: 1.0625rem; /* 17px */
    line-height: 1.7;
    margin-bottom: 2rem;
    padding: 0 1rem;
  }
  
  .hero-cta {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    border-radius: 40px;
  }
  
  .hero-cta:hover {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  }
}

/* ===================================
   SMALL DESKTOP (992px - 1199px)
   =================================== */

@media (min-width: 992px) {
  .shops-hero {
    padding: 5rem 0;
    min-height: 450px;
    background-attachment: fixed; /* Parallax on desktop */
  }
  
  .hero-content {
    max-width: 700px;
  }
  
  .hero-badge {
    font-size: 0.9rem;
    padding: 0.5rem 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-title {
    font-size: 3rem; /* 48px */
    margin-bottom: 1.5rem;
  }
  
  .hero-description {
    font-size: 1.125rem; /* 18px */
    line-height: 1.8;
    margin-bottom: 2.5rem;
    padding: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-cta {
    padding: 1rem 2.5rem;
    font-size: 1.0625rem;
    border-radius: 50px;
  }
  
  /* Re-enable pattern on desktop */
  .hero-pattern {
    opacity: 1;
  }
}

/* ===================================
   LARGE DESKTOP (1200px+)
   =================================== */

@media (min-width: 1200px) {
  .shops-hero {
    padding: 5rem 0;
    min-height: 500px;
  }
  
  .hero-content {
    max-width: 800px;
  }
  
  .hero-title {
    font-size: 3.5rem; /* 56px */
  }
  
  .hero-description {
    font-size: 1.2rem; /* 19px */
  }
  
  .hero-cta {
    font-size: 1.1rem;
  }
}

/* ===================================
   LANDSCAPE MOBILE (max-height: 600px)
   =================================== */

@media (max-height: 600px) and (orientation: landscape) {
  .shops-hero {
    padding: 2rem 0;
    min-height: 280px;
  }
  
  .hero-title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
  }
  
  .hero-description {
    margin-bottom: 1rem;
  }
  
  .hero-badge {
    margin-bottom: 0.75rem;
  }
}

/* ===================================
   ANIMATIONS
   =================================== */

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

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

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .hero-badge,
  .hero-title,
  .hero-description,
  .hero-cta {
    animation: none;
  }
}

/* ===================================
   OVERLAY ADJUSTMENTS
   =================================== */

/* Adjust overlay opacity for better readability on mobile */
@media (max-width: 767px) {
  .shops-hero::before {
    background: linear-gradient(135deg, 
      rgba(26, 137, 23, 0.5) 0%,   /* Darker overlay on mobile */
      rgba(20, 104, 18, 0.5) 100%);
  }
}

/* ===================================
   HIGH DPI DISPLAYS
   =================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .shops-hero {
    /* Load higher resolution image for retina displays */
    background-image: var(--hero-image-2x, var(--hero-image));
  }
}

/* ===================================
   UTILITY CLASSES FOR HERO
   =================================== */

/* Text alignment variations */
@media (min-width: 768px) {
  .shops-hero.text-left .hero-content {
    text-align: left;
    padding-left: 3rem;
  }
  
  .shops-hero.text-right .hero-content {
    text-align: right;
    padding-right: 3rem;
  }
}

/* Height variations */
.shops-hero.hero-tall {
  min-height: 400px;
}

@media (min-width: 768px) {
  .shops-hero.hero-tall {
    min-height: 500px;
    padding: 6rem 0;
  }
}

.shops-hero.hero-short {
  min-height: 250px;
  padding: 2rem 0;
}

@media (min-width: 768px) {
  .shops-hero.hero-short {
    min-height: 300px;
    padding: 3rem 0;
  }
}

/* ===================================
   HERO CTA ARROW ANIMATION
   =================================== */

.hero-cta i {
  transition: transform 0.3s ease;
  font-size: 0.875rem;
}

.hero-cta:hover i {
  animation: bounceDown 0.6s ease-in-out infinite;
}

@keyframes bounceDown {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
}


  /* ===================================
     5. MAIN CONTENT & SHOPS LISTING
     =================================== */
  .shops-listing {
    padding: 2rem 0;
  }

  .shops-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .section-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
  }

  .section-title {
    font-size: 1.5rem;
    font-weight: 700;
  }

  .filter-controls {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
  }

  .results-count {
    font-size: 0.9rem;
    color: var(--gray-600);
  }

  .sort-dropdown select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: var(--white);
  }

  /* 5.1. Filters Toggle */
  .filters-toggle-mobile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
    margin-bottom: 1rem;
  }

  /* 5.2. Filters Sidebar (Mobile First) */
  .filters-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    max-width: 85%;
    height: 100vh;
    background: white;
    z-index: 2000;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
  }

  .filters-sidebar.mobile-open {
    left: 0;
  }

  .filter-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
  }

  .filter-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
  }
  .filter-group:last-child {
    border-bottom: none;
  }

  .filter-group-title {
    font-weight: 600;
    margin-bottom: 1rem;
  }

  /* 5.3. Shop Cards (Mobile First) */
  .shops-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .shop-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
  }

  .shop-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
  }
  .shop-badge.dynamic {
    background: var(--primary-color);
    color: white;
  }
  .shop-badge.mock {
    background: var(--gray-600);
    color: white;
  }

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

  .shop-logo {
    width: 50px;
    height: 50px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
  }

  .shop-title-group .shop-name {
    font-size: 1.1rem;
    font-weight: 600;
  }

  .shop-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--gray-600);
  }

  .shop-body {
    font-size: 0.9rem;
  }

  .shop-products-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .product-preview img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
  }

  .shop-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .chat-btn,
  .visit-shop-btn {
    padding: 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
  }

  .chat-btn {
    background: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
  }

  .visit-shop-btn {
    background: var(--primary-color);
    color: var(--white);
  }

  /* ===================================
     6. FOOTER (MOBILE FIRST)
     =================================== */
  .modern-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 3rem 0 1rem;
    margin-top: 2rem;
  }

  .footer-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .footer-column {
    text-align: center;
  }

  .column-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--footer-heading);
    margin-bottom: 1rem;
  }

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

  .footer-bottom {
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--footer-border);
    text-align: center;
    font-size: 0.8rem;
  }

  /* ===================================
     7. COMPONENTS & UTILITIES
     =================================== */

  /* 7.1. Floating Buttons */
  .floating-create-shop-btn,
  .back-to-top {
    position: fixed;
    right: 1rem;
    background: var(--primary-color);
    color: var(--white);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .floating-create-shop-btn {
    bottom: 80px;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
    font-weight: 600;
  }

  .back-to-top {
    bottom: 140px;
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
  }

  .back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  /* 7.2. Load More Button */
  .load-more-container {
    text-align: center;
    margin-top: 2rem;
  }

  .load-more-btn {
    padding: 0.75rem 2rem;
    background: var(--white);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--radius-md);
    font-weight: 600;
  }

  /* 7.3. Notifications */
  .notification {
    position: fixed;
    top: 70px;
    left: 1rem;
    right: 1rem;
    background: white;
    padding: 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10000;
    transform: translateY(-150px);
    transition: transform 0.3s ease;
  }

  .notification.show {
    transform: translateY(0);
  }

  .notification.success {
    border-left: 4px solid #10b981;
  }

  .notification.info {
    border-left: 4px solid #3b82f6;
  }

  .notification.success i {
    color: #10b981;
  }

  .notification.info i {
    color: #3b82f6;
  }

  /* ===================================
     10. ANIMATIONS & KEYFRAMES
     =================================== */
  @keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
  }

  @keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}


/* ===================================
   SHOP CARDS MOBILE ENHANCEMENTS
   Text & Visual Refinements Only - No Layout Changes
   =================================== */

/* ===================================
   MOBILE ONLY STYLES (max-width: 767px)
   =================================== */

@media only screen and (max-width: 767px) {
  /* Card container - subtle enhancements */
  .shop-card {
    /* Better shadow for mobile visibility */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    /* Smoother transitions */
    transition: all 0.2s ease;
  }
  
  .shop-card:active {
    /* Touch feedback */
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    transform: scale(0.995);
  }
  
  /* Shop name - better readability */
  .shop-name {
    font-size: 1.05rem; /* Slightly larger on mobile */
    font-weight: 700; /* Bolder for clarity */
    letter-spacing: -0.01em;
    line-height: 1.3;
    /* Better text rendering */
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
  
  /* Info badges - enhanced visibility */
  .years-badge {
    font-size: 0.8rem; /* Slightly larger */
    font-weight: 600;
    padding: 3px 10px; /* More padding for touch */
    background: #f0f0f0; /* Slightly darker bg */
  }
  
  .verified-badge {
    font-size: 0.8rem;
    font-weight: 600;
  }
  
  .verified-badge i {
    font-size: 0.9rem; /* Larger icon */
  }
  
  /* Rating - more prominent */
  .rating-value {
    font-size: 1.1rem; /* Larger rating number */
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(26, 137, 23, 0.1);
  }
  
  .rating-text {
    font-size: 0.8rem; /* Slightly larger */
    color: #555; /* Darker for contrast */
  }
  
  /* Response time - better visibility */
  .response-value {
    font-weight: 700;
    font-size: 0.85rem;
    padding: 3px 10px; /* More padding */
    background: #d4edda; /* Slightly darker green */
    color: #155724; /* Darker text */
  }
  
  .response-label {
    font-size: 0.85rem;
    color: #666; /* Darker gray */
  }
  
  /* Products list - optimize readability */
  .products-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 6px; /* More space */
  }
  
  .products-list {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #222; /* Darker text */
    /* Limit lines on mobile */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  /* Product prices - more prominent */
  .product-price {
    font-size: 0.85rem; /* Larger */
    font-weight: 700;
    color: #111; /* Darker */
  }
  
  .product-moq {
    font-size: 0.75rem; /* Slightly larger */
    font-weight: 600;
  }
  
  /* Action buttons - better touch targets */
  .chat-btn,
  .visit-shop-btn {
    font-size: 0.9rem; /* Larger text */
    font-weight: 600;
    padding: 10px 20px; /* More padding */
    letter-spacing: 0.01em;
    /* Better text rendering */
    -webkit-font-smoothing: antialiased;
  }
  
  /* Chat button enhancement */
  .chat-btn {
    border-width: 2px; /* Thicker border */
  }
  
  .chat-btn:active {
    background: rgba(26, 137, 23, 0.08);
  }
  
  /* Visit shop button enhancement */
  .visit-shop-btn {
    box-shadow: 0 2px 4px rgba(26, 137, 23, 0.2);
  }
  
  .visit-shop-btn:active {
    box-shadow: 0 1px 2px rgba(26, 137, 23, 0.2);
  }
  
  /* Shop badge positioning */
  .shop-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 5px 14px;
    letter-spacing: 0.05em;
  }
  
  /* Improve product image borders */
  .product-preview {
    border-width: 2px; /* Thicker border for definition */
  }
  
  .product-preview:active {
    border-color: var(--primary-light);
  }
}

/* ===================================
   SMALL MOBILE REFINEMENTS (max-width: 480px)
   =================================== */

@media only screen and (max-width: 480px) {
  /* Further optimize for very small screens */
  .shop-name {
    font-size: 1rem;
    /* Truncate very long names */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .products-list {
    -webkit-line-clamp: 1; /* Show only 1 line on very small screens */
  }
  
  /* Compact info row */
  .shop-info-row {
    gap: 8px; /* Smaller gap */
  }
  
  /* Smaller text for space saving */
  .years-badge,
  .verified-badge {
    font-size: 0.75rem;
  }
  
  /* Action buttons - full width on very small screens */
  .shop-actions {
    gap: 8px;
  }
  
  .chat-btn,
  .visit-shop-btn {
    font-size: 0.85rem;
    padding: 9px 16px;
  }
}

/* ===================================
   LARGE MOBILE / SMALL TABLET (481px - 767px)
   =================================== */

@media only screen and (min-width: 481px) and (max-width: 767px) {
  .shop-card {
    /* Slightly more padding for a less cramped feel */
    padding: 1.25rem; 
  }

  .shop-header {
    /* Align logo and title group more cleanly */
    align-items: flex-start;
  }

  .shop-logo {
    width: 60px;
    height: 60px;
  }

  .shop-name {
    font-size: 1.15rem; /* Larger shop name */
  }

  /* Re-introduce a two-column layout for product previews */
  .shop-products-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .product-preview img {
    height: 140px; /* Taller images for better detail */
  }

  /* Keep action buttons side-by-side */
  .shop-actions {
    grid-template-columns: 1fr 1fr;
  }
}


/* ===================================
   VERY SMALL MOBILE (max-width: 375px)
   =================================== */

@media only screen and (max-width: 375px) {
  .shop-card {
    /* Reduce padding to maximize content space */
    padding: 0.75rem; 
  }

  .shop-header {
    /* Reduce gap to save horizontal space */
    gap: 0.75rem; 
  }

  .shop-logo {
    width: 45px;
    height: 45px;
  }
  
  .shop-name {
    font-size: 0.95rem; /* Slightly smaller shop name */
  }

  .shop-info-row {
    font-size: 0.75rem; /* Smaller info text */
  }
  
  .product-preview img {
    /* Shorter images to fit the compact layout */
    height: 100px;
  }

  /* Make buttons smaller to fit the screen */
  .chat-btn,
  .visit-shop-btn {
    font-size: 0.8rem;
    padding: 0.6rem;
  }
}

/* ===================================
   SMALL MOBILE LANDSCAPE (max-height: 420px)
   =================================== */

@media only screen and (max-height: 420px) and (orientation: landscape) {
  .shop-card {
    /* Use a grid to create a two-column layout */
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Left column for info, right for products/actions */
    grid-template-rows: auto auto;
    gap: 1rem;
    align-items: center;
  }

  .shop-header {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }
  
  .shop-body {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
  }

  .shop-products-preview {
    grid-column: 2 / 3;
    grid-row: 1 / 3; /* Span both rows */
    margin-top: 0;
  }

  .shop-actions {
    grid-column: 1 / 3; /* Span entire width at the bottom */
    grid-row: 3 / 4;
    margin-top: 0;
  }

  .product-preview img {
    height: 110px;
  }
}

/* ===================================
   SAMSUNG GALAXY FOLD - FOLDED (Cover Screen)
   Targets very narrow portrait screens (~320px)
   =================================== */

@media (max-width: 340px) {
  .shop-card {
    padding: 0.6rem; /* Further reduce padding for more space */
  }

  .shop-header {
    gap: 0.6rem; /* Tighten the gap between the logo and title */
  }
  
  .shop-logo {
    width: 40px; /* Make the logo slightly smaller */
    height: 40px;
  }

  .shop-name {
    font-size: 0.9rem; /* Ensure the shop name doesn't wrap aggressively */
  }
  
  /* Stack the action buttons vertically to give them full width */
  .shop-actions {
    grid-template-columns: 1fr; 
    gap: 0.4rem;
  }
  
  .chat-btn,
  .visit-shop-btn {
    padding: 0.5rem;
    font-size: 0.8rem;
  }
}

/* ===================================
   SAMSUNG GALAXY FOLD - UNFOLDED (Inner Screen)
   Targets square-like tablet screens (~600px - 767px)
   =================================== */

@media (min-width: 600px) and (max-width: 767px) {
  
  /* Create a two-column grid for the list of shops */
  .shops-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  
  .shop-card {

  }

  .product-preview img {
    height: 120px; 
  }
}

/* ===================================
   LANDSCAPE MOBILE (max-height: 600px)
   =================================== */

@media only screen and (max-height: 600px) and (orientation: landscape) {
  /* Optimize for landscape viewing */
  .shop-card {
    padding: 16px; /* Slightly less padding */
  }
  
  .shop-products-row {
    margin-bottom: 12px; /* Less bottom margin */
  }
  
  .products-list {
    -webkit-line-clamp: 1; /* Single line in landscape */
  }
}

/* ===================================
   HIGH CONTRAST MODE SUPPORT
   =================================== */

@media (prefers-contrast: high) {
  @media only screen and (max-width: 767px) {
    .shop-card {
      border-width: 2px;
      border-color: #000;
    }
    
    .shop-name {
      color: #000;
    }
    
    .rating-value {
      color: #000;
      font-weight: 800;
    }
    
    .visit-shop-btn {
      border: 2px solid #000;
    }
  }
}

/* ===================================
   TOUCH INTERACTION ENHANCEMENTS
   =================================== */

@media (hover: none) and (pointer: coarse) {
  /* Touch devices only */
  .shop-card {
    /* Larger touch area */
    -webkit-tap-highlight-color: rgba(26, 137, 23, 0.1);
  }
  
  /* Remove hover effects on touch devices */
  .shop-name:hover {
    color: inherit;
  }
  
  /* Better button states for touch */
  .chat-btn:active,
  .visit-shop-btn:active {
    transition: none;
  }
}

/* ===================================
   PERFORMANCE OPTIMIZATIONS
   =================================== */

@media only screen and (max-width: 767px) {
  /* Optimize rendering performance */
  .shop-card {
    will-change: auto; /* Don't over-optimize */
    backface-visibility: hidden; /* Prevent flickering */
  }
  
  /* Reduce motion for performance */
  @media (prefers-reduced-motion: reduce) {
    .shop-card,
    .chat-btn,
    .visit-shop-btn {
      transition: none;
    }
  }
}

/* ===================================
   FONT LOADING OPTIMIZATION
   =================================== */

@media only screen and (max-width: 767px) {
  /* Use system fonts for better performance on mobile */
  .shop-card {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 
                 'Helvetica Neue', Arial, sans-serif;
  }
}

/* ===================================
   SHOP CARDS LOADING STATES
   =================================== */

@media only screen and (max-width: 767px) {
  /* Image loading states */
  .product-preview img {
    transition: opacity 0.3s ease;
  }
  
  .product-preview img.loading {
    opacity: 0.5;
    background: #f0f0f0;
  }
  
  .product-preview img.loaded {
    opacity: 1;
  }
  
  /* Skeleton loading effect */
  .product-preview img.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.5) 50%,
      rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 1.5s infinite;
  }
  
  @keyframes shimmer {
    0% {
      transform: translateX(-100%);
    }
    100% {
      transform: translateX(100%);
    }
  }
}

/* ===================================
   FILTERS SIDEBAR - CLOSE BUTTON
   =================================== */
.filters-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  background-color: var(--gray-100);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.filters-close-btn:hover {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-dark);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 4px 15px rgba(26, 137, 23, 0.2);
}

.filters-close-btn:active {
  transform: rotate(90deg) scale(1);
  box-shadow: 0 2px 8px rgba(26, 137, 23, 0.15);
}

/* Ensure sidebar has room for the button */
.filters-sidebar .filter-title {
  padding-right: 45px; /* Add space to prevent overlap with the close button */
}


/* ===================================
   MODERN FOOTER - MOBILE FIRST STYLES
   =================================== */

/* --- 7.1 Main Footer Container --- */
.modern-footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 3rem 0 0; /* Add padding top, remove bottom for footer-bottom */
  margin-top: 2rem;
  position: relative;
  overflow: hidden; /* Contains decorative elements */
}

/* --- 7.2 Newsletter Section (Mobile) --- */
.newsletter-section {
  background: var(--footer-bg-light);
  padding: 2rem 1.5rem;
  border-radius: var(--radius-lg);
  margin: 0 1rem 3rem 1rem; /* Contained within page padding */
  text-align: center;
}

.newsletter-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--footer-heading);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.newsletter-title i {
  display: none; /* Hide icon on mobile to save space */
}

.newsletter-subtitle {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.newsletter-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.newsletter-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--footer-border);
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--footer-heading);
  font-size: 1rem;
}

.newsletter-input::placeholder {
  color: var(--footer-text);
}

.newsletter-btn {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  background-color: var(--primary-color);
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
}

.newsletter-meta {
  display: none; /* Hide meta info on small screens */
}

/* --- 7.3 Footer Grid (Mobile) --- */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr; /* Single column layout */
  gap: 2.5rem;
  padding: 0 1.5rem;
}

.footer-column .column-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--footer-heading);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-color);
  display: inline-block;
}

.footer-column {
  text-align: left; /* Align text left for readability */
}

.company-info {
  text-align: center; /* Center the main company info */
}

.footer-logo {
  justify-content: center;
}

.social-links {
  justify-content: center;
  margin-top: 1rem;
}

.social-link {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--footer-border);
  border-radius: 50%;
  color: var(--footer-link);
  font-size: 1.1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  padding: 0.25rem 0;
}

/* --- 7.4 Features Bar (Mobile) --- */
.features-bar {
  display: grid;
  grid-template-columns: 1fr; /* Stack items vertically */
  gap: 1.5rem;
  padding: 2rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--footer-border);
  border-bottom: 1px solid var(--footer-border);
  margin-top: 3rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.feature-item i {
  font-size: 1.75rem;
  color: var(--primary-color);
  width: 40px;
  text-align: center;
}

/* --- 7.5 Footer Bottom (Mobile) --- */
.footer-bottom {
  padding: 1.5rem;
  text-align: center;
}

.bottom-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.copyright {
  font-size: 0.8rem;
  line-height: 1.5;
}

.bottom-links {
  display: flex;
  flex-direction: column; /* Stack links vertically */
  gap: 0.75rem;
}

.bottom-links .separator {
  display: none; /* Hide separators */
}

