/* Nimart Green & white theme */
:root{
  --nimart-green: #008751;
  --nimart-dark-green: #006641;
  --bg: #ffffff;
  --muted: #6b7280;
  --card-shadow: 0 6px 18px rgba(3,15,12,0.06);
  --radius: 12px;
  --max-width: 1100px;
  --container-padding: 16px;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

*{box-sizing:border-box}

/* FIX FOR STICKY HEADER - ADD THESE STYLES FIRST */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: #0b1220;
  line-height: 1.4;
  padding-top: 70px !important; /* Reduced for header only */
}

/* HEADER - COMPLETELY FIXED STICKY VERSION */
.site-header {
  background: var(--nimart-green);
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 12px 0;
}

.container{
  max-width:var(--max-width);
  margin:0 auto;
  padding:0 var(--container-padding);
}

.header-inner{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.logo{
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-image {
  height: 40px;
  width: auto;
}

.search-area{
  flex: 1;
  min-width: 0;
}

.search-container{
  display: flex;
  background: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-container input{
  flex: 1;
  padding: 12px 16px;
  border: none;
  outline: none;
  font-size: 14px;
  min-width: 0;
}

.search-button{
  background: var(--nimart-green);
  color: white;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.3s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-button:hover{
  background: var(--nimart-dark-green);
}

.search-button i {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

/* Auth Section */
.auth-section {
  margin-left: auto;
}

.auth-button {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  white-space: nowrap;
}

.auth-button:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.5);
}

/* Location Filter Section - NO LONGER STICKY */
.location-filter {
  background: var(--nimart-green);
  padding: 15px 0;
  margin: 0;
  width: 100%;
  color: white;
  /* REMOVED: position: fixed, top, z-index */
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.location-filter-inner {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.location-filter-header {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.location-filter-header h2 {
  color: white;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.product-counter {
  background: rgba(255,255,255,0.2);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.location-filter-selects {
  display: flex;
  gap: 15px;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
}

.location-filter select {
  padding: 12px 14px; /* Increased padding */
  border-radius: 8px; /* Slightly larger radius */
  border: 1px solid rgba(255,255,255,0.3);
  background: var(--nimart-green);
  color: white;
  font-size: 15px; /* Slightly larger font */
  min-width: 170px; /* Slightly wider */
  cursor: pointer;
  transition: all 0.3s;
  min-height: 48px; /* Better touch target */
}

.location-filter select:hover {
  background: var(--nimart-dark-green);
}

.location-filter select option {
  background: white;
  color: #333;
  padding: 10px; /* More padding for options */
  font-size: 14px;
}

/* Main Content - NORMAL FLOW */
.main-content {
  padding-top: 20px;
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 200px);
}

/* Professional Loader - Faster loading */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--nimart-green);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  color: white;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.logo-container {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
}

.loader-logo {
  width: 96px;
  height: 86px;
  animation: professionalRotate 1s linear infinite;
}

.loader p {
  font-size: 18px;
  font-weight: 500;
  margin: 0;
  letter-spacing: 0.5px;
}

.dot {
  animation: dotPing 1s infinite ease-in-out;
}

.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: 0.15s; }
.dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes professionalRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes dotPing {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

.loader.hidden {
  display: none;
}

/* Categories - FIXED ICON STYLING */
.categories{
  padding: 20px 0 15px;
}

.categories h2{
  color: var(--nimart-green);
  margin-bottom: 15px;
}

.categories-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.category-card{
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px 10px;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  border: 1px solid #f1f4f6;
  min-height: 100px;
  justify-content: center;
}

.category-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,135,81,0.15);
  border-color: var(--nimart-green);
}

/* FIXED: Category icons - NO BACKGROUND, NO CROPPING */
.category-card .icon{
  width: 70px;
  height: 70px;
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  overflow: visible;
}

.category-card .icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

.cat-name {
  font-size: 12px;
  font-weight: 600;
  color: #333;
  line-height: 1.2;
}

/* Stores carousel */
.top-stores{
  padding: 20px 0;
}

.top-stores h2{
  color: var(--nimart-green);
  margin-bottom: 15px;
}

.stores-carousel{
  display: flex;
  gap: 15px;
  overflow: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
}

.stores-carousel::-webkit-scrollbar {
  display: none;
}

.store-pill{
  min-width: 160px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 15px;
  border-radius: 12px;
  background: #fff;
  border: 2px solid #f1f4f6;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.store-pill:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,135,81,0.1);
  border-color: var(--nimart-green);
}

.store-pill img{
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.store-name{
  font-weight: 600;
  font-size: 14px;
}

/* Products grid */
.top-products{
  padding: 20px 0 40px;
}

.top-products h2{
  color: var(--nimart-green);
  margin-bottom: 5px;
}

.section-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.showing-info{
  color: var(--muted);
  font-size: 14px;
}

.products-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.card{
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--card-shadow);
  border: 2px solid #f3f6f7;
  transition: all 0.3s ease;
}

.card:hover{
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,135,81,0.15);
}

.card img{
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}

.card h3{
  font-size: 15px;
  margin: 8px 0;
  line-height: 1.3;
  color: #333;
}

.card .price{
  font-weight: 700;
  color: var(--nimart-green);
  font-size: 18px;
  margin: 8px 0;
}

.card .meta{
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0;
}

.card .actions{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  gap: 8px;
}

.card button{
  background: var(--nimart-green);
  color: #fff;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  flex: 1;
  transition: background 0.3s;
  font-weight: 600;
}

.card button:hover{
  background: var(--nimart-dark-green);
}

.card button.report-button {
  background: #dc2626 !important;
  color: #fff !important;
  border: none !important;
}

.card button.report-button:hover {
  background: #b91c1c !important;
}

/* Modal */
.modal{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7,10,10,0.7);
  z-index: 1000;
  padding: 20px;
}

.modal.hidden{
  display: none;
}

.modal-content{
  background: #fff;
  border-radius: 16px;
  width: min(900px,95%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-close{
  background: none;
  border: none;
  font-size: 24px;
  position: absolute;
  top: 15px;
  right: 15px;
  cursor: pointer;
  color: var(--muted);
  z-index: 1;
}

.modal-close:hover{
  color: #333;
}

.modal-report-button {
  background: #dc2626 !important;
  color: white !important;
  border: 1px solid #dc2626 !important;
}

.modal-report-button:hover {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
}

/* Footer */
.site-footer{
  padding: 30px 0;
  border-top: 1px solid #eef2f4;
  margin-top: 40px;
  text-align: center;
  color: var(--muted);
}

/* Loading state for products */
.products-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Subcategory styles */
.category-card {
  position: relative;
}

.subcategory-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 16px;
  color: var(--nimart-green);
  font-weight: bold;
}

.back-button {
  background: #f8f9fa;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.back-button:hover {
  background: #e9ecef;
}

.categories-breadcrumb {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.breadcrumb-item {
  padding: 6px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}

.breadcrumb-item:hover {
  background: #e9ecef;
}

.breadcrumb-item.active {
  background: var(--nimart-green);
  color: white;
}

/* Enhanced category grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

@media (max-width: 768px) {
  .categories-grid {
      grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .categories-grid {
      grid-template-columns: repeat(2, 1fr);
  }
}

/* Enhanced Category Styles */
.category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px 10px;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  min-height: 100px;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  border: 1px solid #f1f4f6;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,135,81,0.15);
  border-color: var(--nimart-green);
}

.category-card .icon {
  width: 70px;
  height: 70px;
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  overflow: visible;
}

.category-card .icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

.cat-name {
  font-size: 12px;
  font-weight: 600;
  color: #333;
  line-height: 1.2;
}

.subcategory-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 16px;
  color: var(--nimart-green);
  font-weight: bold;
}

/* View More Button Styles */
.view-more-button {
  background: #f8f9fa;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  order: 999;
}

.view-more-button:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

.view-more-button .icon {
  background: rgba(0,135,81,0.12);
  color: var(--nimart-green);
}

/* Back Button Styles */
.back-button {
  background: #f8f9fa;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  order: -1;
}

.back-button:hover {
  background: #e9ecef;
}

/* Category counter */
.categories-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.category-count {
  font-size: 14px;
  color: var(--muted);
  background: #f1f4f6;
  padding: 4px 8px;
  border-radius: 6px;
}

/* Upload Button Styles */
.upload-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--nimart-green);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 1000;
  font-weight: 600;
}

.upload-button:hover {
  background: var(--nimart-dark-green);
  transform: translateY(-2px);
}

/* Product Title Text Wrapping */
.product-title {
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card text improvements */
.card h3 {
  font-size: 15px;
  margin: 8px 0;
  line-height: 1.3;
  color: #333;
  word-wrap: break-word;
  word-break: break-word;
}

/* Prevent long words from breaking layout */
.card {
  overflow: hidden;
}

.card * {
  max-width: 100%;
}

/* Success Modal Styles */
.success-modal {
  text-align: center;
  padding: 20px;
}

.success-icon {
  font-size: 48px;
  color: #1a4721;
  margin-bottom: 15px;
}

.success-title {
  color: #1a4721;
  margin-bottom: 10px;
}

.success-message {
  color: #666;
  margin-bottom: 20px;
}

.success-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.success-button {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
}

.success-primary {
  background: #1a4721;
  color: white;
}

.success-secondary {
  background: #f0f0f0;
  color: #333;
}

/* Multi-Image Upload Styles */
.upload-area {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  margin-bottom: 15px;
  cursor: pointer;
  transition: border-color 0.3s;
}

.upload-area:hover {
  border-color: #1a4721;
}

.upload-area.dragover {
  border-color: #1a4721;
  background: #f8fff8;
}

.upload-icon {
  font-size: 48px;
  color: #666;
  margin-bottom: 10px;
}

.upload-text {
  color: #666;
  margin-bottom: 10px;
}

.upload-hint {
  font-size: 12px;
  color: #999;
}

.image-preview-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
  margin: 15px 0;
}

.image-preview {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e0e0e0;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-image {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(220, 53, 69, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-status {
  margin: 10px 0;
  font-size: 14px;
}

.upload-complete {
  color: #1a4721;
  font-weight: 600;
}

/* Image Slider Styles */
.product-slider {
  position: relative;
  margin-bottom: 15px;
}

.slider-main {
  width: 100%;
  height: 300px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.slider-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-thumbnails {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding: 5px 0;
}

.thumbnail {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: all 0.3s;
}

.thumbnail.active {
  border-color: #1a4721;
  opacity: 1;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.slider-prev {
  left: 10px;
}

.slider-next {
  right: 10px;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.action-button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

.action-primary {
  background: #1a4721;
  color: white;
}

.action-primary:hover:not(:disabled) {
  background: #2d5a32;
}

.action-secondary {
  background: #6c757d;
  color: white;
}

.action-secondary:hover:not(:disabled) {
  background: #5a6268;
}

.action-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ========== PRODUCT PAGE LINK STYLES ========== */
/* Product Links */
.product-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-link:hover {
  text-decoration: none;
  color: inherit;
}

.card .product-title a {
  color: #333;
  text-decoration: none;
}

.card .product-title a:hover {
  color: var(--nimart-green);
}

.btn-view-details{
  display: block;
  background: var(--nimart-green);
  color: #fff;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  flex: 1;
  transition: background 0.3s;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
}

.btn-view-details:hover{
  background: var(--nimart-dark-green);
  color: white;
  text-decoration: none;
}

.card .actions a {
  flex: 1;
  text-decoration: none;
}

/* Make entire card clickable area better */
.card {
  cursor: default;
}

.card img {
  transition: transform 0.3s ease;
}

.card:hover img {
  transform: scale(1.02);
}

/* Enhanced mobile dropdown height fixes */
@media (max-width: 768px){
  .location-filter select {
    min-height: 52px; /* Better touch target */
    font-size: 16px; /* Prevent zoom on iOS */
  }
}

@media (max-width: 480px){
  .location-filter select {
    min-height: 54px; /* Better touch target */
    font-size: 16px; /* Prevent zoom on iOS */
  }
}

@media (max-width: 360px){
  .location-filter select {
    min-height: 56px; /* Better touch target */
    font-size: 16px; /* Prevent zoom on iOS */
  }
}

/* Additional mobile optimizations for better touch targets */
@media (max-width: 768px) {
  .category-card {
    min-height: 95px; /* Slightly larger for better touch */
  }
  
  .card .actions {
    gap: 8px; /* More space between buttons */
  }
  
  .btn-view-details, .card button {
    min-height: 44px; /* Better touch targets */
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ========== CATEGORIES PAGE STYLES ========== */
.categories-main {
  padding: 20px 0 40px;
}

.categories-hero {
  text-align: center;
  padding: 40px 0;
  background: linear-gradient(135deg, #f8fff8, #ffffff);
  border-radius: 12px;
  margin-bottom: 40px;
}

.categories-hero h1 {
  color: var(--nimart-green);
  font-size: 2.5em;
  margin-bottom: 15px;
}

.categories-hero p {
  font-size: 1.2em;
  color: #666;
  max-width: 600px;
  margin: 0 auto 20px;
}

.category-count {
  background: var(--nimart-green);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  display: inline-block;
}

.all-categories {
  margin-bottom: 60px;
}

.all-categories h2 {
  color: var(--nimart-green);
  margin-bottom: 25px;
  text-align: center;
}

/* Enhanced category grid for categories page */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 25px 20px;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 2px solid #f1f4f6;
  min-height: 180px;
  justify-content: center;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,135,81,0.15);
  border-color: var(--nimart-green);
}

.category-card .icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.category-card .cat-name {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}

.category-description {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
  margin-bottom: 10px;
}

.product-count {
  font-size: 12px;
  color: var(--nimart-green);
  font-weight: 600;
  background: rgba(0,135,81,0.1);
  padding: 4px 8px;
  border-radius: 12px;
}

/* Popular Categories Section */
.popular-categories {
  margin-bottom: 40px;
}

.popular-categories h2 {
  color: var(--nimart-green);
  margin-bottom: 25px;
  text-align: center;
}

.popular-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.popular-category-card {
  display: flex;
  align-items: center;
  padding: 25px;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 2px solid #f1f4f6;
}

.popular-category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,135,81,0.15);
  border-color: var(--nimart-green);
}

.popular-icon {
  font-size: 48px;
  margin-right: 20px;
  flex-shrink: 0;
}

.popular-content h3 {
  color: #333;
  margin-bottom: 8px;
  font-size: 18px;
}

.popular-content p {
  color: #666;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 8px;
}

/* Breadcrumb */
.breadcrumb {
  margin: 20px auto;
  font-size: 14px;
}

.breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 8px;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: "›";
  margin-left: 8px;
  color: #666;
}

.breadcrumb a {
  color: var(--nimart-green);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Mobile Responsive for Categories Page */
@media (max-width: 768px) {
  .categories-hero h1 {
    font-size: 2em;
  }
  
  .categories-hero p {
    font-size: 1.1em;
  }
  
  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
  }
  
  .popular-categories-grid {
    grid-template-columns: 1fr;
  }
  
  .popular-category-card {
    padding: 20px;
  }
  
  .popular-icon {
    font-size: 40px;
    margin-right: 15px;
  }
}

@media (max-width: 480px) {
  .categories-grid {
    grid-template-columns: 1fr;
  }
  
  .category-card {
    padding: 20px 15px;
  }
  
  .popular-category-card {
    flex-direction: column;
    text-align: center;
  }
  
  .popular-icon {
    margin-right: 0;
    margin-bottom: 15px;
  }
}
/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 768px){
  .container {
    padding: 0 20px;
  }
  
  .site-header {
    padding: 12px 0;
    position: fixed !important;
  }
  
  .location-filter {
    padding: 15px 0; /* Normal padding */
  }
  
  body {
    padding-top: 70px !important; /* Normal for header only */
  }
  
  .header-inner{
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px 0;
  }
  
  .logo {
    flex: 1;
    margin-bottom: 0;
    padding-left: 8px;
  }
  
  .logo-image {
    height: 38px;
  }
  
  .auth-section {
    order: 2;
    flex: 0 0 auto;
    margin-left: auto;
    padding-right: 8px;
  }
  
  .auth-button {
    max-width: 120px;
    padding: 10px 12px;
    font-size: 14px;
  }
  
  .search-area {
    order: 3;
    flex: 1 0 100%;
    margin-top: 12px;
  }
  
  .location-filter-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 15px; /* Normal gap */
    text-align: center;
  }
  
  .location-filter-header {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .location-filter-header h2 {
    font-size: 14px;
    text-align: center;
    white-space: normal;
    line-height: 1.2;
  }
  
  .product-counter {
    font-size: 11px;
    padding: 3px 6px;
  }
  
  .location-filter-selects {
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
  }
  
  .location-filter select {
    min-width: 160px; /* Wider for mobile */
    flex: 1;
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 14px 12px; /* Good padding for touch */
    max-width: 180px;
    min-height: 52px; /* Good touch target */
  }
  
  /* Categories - Mobile adjustments */
  .categories-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
  
  .category-card {
    padding: 12px 6px;
    min-height: 90px;
  }
  
  .category-card .icon {
    width: 50px;
    height: 50px;
    border-radius: 0;
    background: transparent;
    margin-bottom: 6px;
  }
  
  .cat-name {
    font-size: 11px;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .card {
    padding: 12px;
  }
  
  .card img {
    height: 160px;
  }
  
  .card h3 {
    font-size: 14px;
  }
  
  .card .price {
    font-size: 16px;
  }
  
  .card .actions {
    flex-direction: column;
    gap: 6px;
  }
  
  .card button {
    width: 100%;
    font-size: 12px;
    padding: 8px 10px;
  }
}

@media (max-width: 480px){
  .container {
    padding: 0 16px;
  }
  
  body {
    padding-top: 70px !important; /* Normal for header only */
  }
  
  .location-filter {
    padding: 15px 0; /* Normal padding */
  }
  
  .logo-image {
    height: 35px;
  }
  
  .auth-button {
    max-width: 110px;
    font-size: 13px;
    padding: 9px 12px;
  }
  
  .location-filter-header h2 {
    font-size: 13px;
  }
  
  .location-filter select {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 14px 10px; /* Good padding */
    min-width: 150px;
    min-height: 54px; /* Good touch target */
  }
  
  .location-filter-inner {
    gap: 15px; /* Normal gap */
  }
  
  .categories-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  
  .category-card {
    padding: 10px 5px;
  }
  
  .category-card .icon {
    width: 45px;
    height: 45px;
    border-radius: 0;
    background: transparent;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .card {
    padding: 10px;
  }
  
  .card img {
    height: 150px;
  }
}

/* Very small screens - iPhone 12 and similar */
@media (max-width: 390px){
  body {
    padding-top: 70px !important; /* Normal for header only */
  }
  
  .location-filter {
    padding: 15px 0; /* Normal padding */
  }
  
  .location-filter-inner {
    gap: 15px; /* Normal gap */
  }
  
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .auth-button {
    max-width: 100px;
    font-size: 12px;
  }
  
  .location-filter-header h2 {
    font-size: 12px;
  }
  
  .location-filter select {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 14px 8px; /* Good padding */
    min-width: 140px;
    min-height: 54px; /* Good touch target */
  }
}

/* Extra small screens */
@media (max-width: 360px){
  body {
    padding-top: 70px !important; /* Normal for header only */
  }
  
  .location-filter {
    padding: 15px 0; /* Normal padding */
  }
  
  .location-filter-inner {
    gap: 15px; /* Normal gap */
  }
  
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .auth-button {
    max-width: 100px;
    font-size: 12px;
  }
  
  .location-filter-header h2 {
    font-size: 12px;
  }
  
  .location-filter select {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 14px 6px; /* Good padding */
    min-width: 130px;
    min-height: 54px; /* Good touch target */
  }
}
/* Top Stores Section */
.top-stores {
  margin: 40px 0;
}

.stores-carousel {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding: 20px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.stores-carousel::-webkit-scrollbar {
  display: none;
}

.store-pill {
  min-width: 130px;
  padding: 20px 15px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  position: relative;
  border: 2px solid transparent;
}

.store-pill:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  border-color: #1a4721;
}

.store-pill img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
  border: 3px solid #f8f9fa;
  background: #f8f9fa;
}

.store-name {
  font-size: 13px;
  font-weight: 700;
  color: #2d3748;
  line-height: 1.3;
  margin: 0;
  word-break: break-word;
}

.store-description {
  font-size: 11px;
  color: #666;
  margin-top: 5px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Premium Featured Stores */
.featured-store {
  border: 2px solid #ffd700 !important;
  background: linear-gradient(135deg, #fff9e6, #ffffff) !important;
  position: relative;
  overflow: hidden;
}

.featured-store::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ffd700, #ffed4e, #ffd700);
}

.premium-badge {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #8b6914;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: bold;
  margin-top: 8px;
  display: inline-block;
}

/* Empty state for featured stores */
.empty-featured-stores {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  width: 100%;
}

.empty-featured-stores .empty-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.empty-featured-stores h4 {
  color: #1a4721;
  margin-bottom: 10px;
}
/* Fix Product Grid for All Mobile Devices */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Always 2 columns */
    gap: 15px;
    width: 100%;
}

/* Ensure cards fit properly in 2 columns */
.card {
    width: 100%;
    margin: 0;
    break-inside: avoid;
}

/* Fix images to fit the grid */
.card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

/* Mobile-specific optimizations */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 10px;
    }
    
    .card {
        padding: 12px;
    }
    
    .card img {
        height: 120px;
    }
    
    .product-title {
        font-size: 14px;
        line-height: 1.3;
    }
    
    .price {
        font-size: 16px;
    }
}

/* Very small phones (under 360px) */
@media (max-width: 360px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .card {
        padding: 10px;
    }
    
    .card img {
        height: 100px;
    }
    
    .product-title {
        font-size: 13px;
    }
    
    .price {
        font-size: 14px;
    }
}

/* Tablet and larger screens */
@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }
}

/*................................................*/
/* Fix Product Grid for All Mobile Devices */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Always 2 columns */
  gap: 15px;
  width: 100%;
}

/* Ensure cards fit properly in 2 columns */
.card {
  width: 100%;
  margin: 0;
  break-inside: avoid;
}

/* Fix images to fit the grid */
.card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

/* Mobile-specific optimizations */
@media (max-width: 480px) {
  .products-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
      padding: 0 10px;
  }
  
  .card {
      padding: 12px;
  }
  
  .card img {
      height: 120px;
  }
  
  .product-title {
      font-size: 14px;
      line-height: 1.3;
  }
  
  .price {
      font-size: 16px;
  }
}

/* Very small phones (under 360px) */
@media (max-width: 360px) {
  .products-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 8px;
  }
  
  .card {
      padding: 10px;
  }
  
  .card img {
      height: 100px;
  }
  
  .product-title {
      font-size: 13px;
  }
  
  .price {
      font-size: 14px;
  }
}

/* Tablet and larger screens */
@media (min-width: 768px) {
  .products-grid {
      grid-template-columns: repeat(3, 1fr);
      gap: 20px;
  }
}

@media (min-width: 1024px) {
  .products-grid {
      grid-template-columns: repeat(4, 1fr);
      gap: 25px;
  }
}

