@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* ═══════════════════════════════════════════════════════════════
   SUSHILA KIRANA — PREMIUM BRAND DESIGN SYSTEM
   Deep Forest Green + Warm Cream + Lime Accent + Amber Offers
   ═══════════════════════════════════════════════════════════════ */
:root {
  /* Primary Brand — Deep Forest Green */
  --primary:         #1B5E35;
  --primary-mid:     #2A7D4F;
  --primary-light:   #3A9E65;
  --primary-dark:    #0F3D22;
  --primary-50:      #EFF7F2;
  --primary-100:     #D4EDDF;

  /* Accent / CTA — Vibrant Golden Yellow */
  --yellow:          #FFC107;
  --yellow-light:    #FACC15;
  --yellow-dark:     #D99B00;
  --yellow-50:       #FFFDE7;

  /* Secondary Accent — Fresh Lime Green */
  --lime:            #4CAF70;
  --lime-dark:       #3A9460;
  --lime-light:      #7BCCA0;
  --lime-50:         #F0FBF4;

  /* Offer / Discount — Warm Amber */
  --amber:           #E8940A;
  --amber-dark:      #C47A08;
  --amber-light:     #F5B942;
  --amber-50:        #FEF7E6;

  /* Backgrounds */
  --bg-cream:        #F7F5EF;
  --bg-white:        #FFFFFF;
  --bg-sage:         #EFF7F2;
  --bg-sage-deep:    #D8EDDE;

  /* Text */
  --text-heading:    #1A2E1A;
  --text-body:       #334040;
  --text-muted:      #6B7E6B;
  --text-subtle:     #9DB09D;

  /* Borders */
  --border-light:    #E4EFE7;
  --border-mid:      #C8DFCD;

  /* Shadows */
  --shadow-card:     0 2px 12px rgba(27, 94, 53, 0.06), 0 1px 4px rgba(27, 94, 53, 0.04);
  --shadow-hover:    0 8px 28px rgba(27, 94, 53, 0.13), 0 2px 10px rgba(27, 94, 53, 0.07);
  --shadow-cta:      0 4px 18px rgba(76, 175, 112, 0.35);
  --shadow-navbar:   0 2px 16px rgba(27, 94, 53, 0.08);
}

/* ── Base ── */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-cream);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-heading);
}

html {
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: var(--bg-sage);
}
::-webkit-scrollbar-thumb {
  background: var(--border-mid);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* Hide scrollbar for clean carousel slider */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ═══════════════════════════════════════════════════════════════
   GLASSMORPHISM
   ═══════════════════════════════════════════════════════════════ */
.glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.glass-green {
  background: rgba(27, 94, 53, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(76, 175, 112, 0.2);
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
@keyframes pulse-slow {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-5px); }
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes leafSway {
  0%, 100% { transform: rotate(-3deg); }
  50%       { transform: rotate(3deg); }
}

.animate-fade-in       { animation: fadeIn 0.4s ease forwards; }
.animate-fade-in-up    { animation: fadeInUp 0.5s ease forwards; }
.animate-slide-in-right{ animation: slideInRight 0.32s cubic-bezier(0.32,0.72,0,1) forwards; }
.animate-pulse-slow    { animation: pulse-slow 2.2s cubic-bezier(0.4,0,0.6,1) infinite; }
.animate-float         { animation: float 3s ease-in-out infinite; }
.animate-leaf          { animation: leafSway 4s ease-in-out infinite; }

/* ═══════════════════════════════════════════════════════════════
   SHADOWS — PREMIUM CARD SYSTEM
   ═══════════════════════════════════════════════════════════════ */
.shadow-premium {
  box-shadow: var(--shadow-card);
}
.shadow-premium-hover {
  transition: box-shadow 0.28s ease, transform 0.28s ease;
}
.shadow-premium-hover:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.shadow-cta {
  box-shadow: var(--shadow-cta);
}

/* ═══════════════════════════════════════════════════════════════
   BRAND BUTTON SYSTEM
   ═══════════════════════════════════════════════════════════════ */

/* Primary CTA — Dark Green */
.btn-brand-primary {
  background-color: var(--primary);
  color: #ffffff;
  transition: all 0.22s ease;
  border: none;
}
.btn-brand-primary:hover {
  background-color: var(--primary-mid);
  box-shadow: 0 6px 20px rgba(27, 94, 53, 0.28);
  transform: translateY(-1px);
}
.btn-brand-primary:active { transform: scale(0.98); }

/* Secondary CTA — Lime Green */
.btn-lime {
  background-color: var(--lime);
  color: #ffffff;
  transition: all 0.22s ease;
}
.btn-lime:hover {
  background-color: var(--lime-dark);
  box-shadow: var(--shadow-cta);
  transform: translateY(-1px);
}

/* Outline brand */
.btn-brand-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  transition: all 0.22s ease;
}
.btn-brand-outline:hover {
  background: var(--primary);
  color: white;
}

/* ═══════════════════════════════════════════════════════════════
   BRAND UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════ */
.bg-brand-primary   { background-color: var(--primary); }
.bg-brand-mid       { background-color: var(--primary-mid); }
.bg-brand-dark      { background-color: var(--primary-dark); }
.bg-brand-50        { background-color: var(--primary-50); }
.bg-lime            { background-color: var(--lime); }
.bg-lime-50         { background-color: var(--lime-50); }
.bg-amber-offer     { background-color: var(--amber); }
.bg-cream           { background-color: var(--bg-cream); }
.bg-sage            { background-color: var(--bg-sage); }

.text-brand-primary { color: var(--primary); }
.text-brand-mid     { color: var(--primary-mid); }
.text-brand-dark    { color: var(--primary-dark); }
.text-lime          { color: var(--lime); }
.text-amber         { color: var(--amber); }
.text-muted-green   { color: var(--text-muted); }

.border-brand       { border-color: var(--border-light); }
.border-brand-mid   { border-color: var(--border-mid); }

/* ═══════════════════════════════════════════════════════════════
   PRODUCT CARD — PREMIUM GROCERY STYLE
   ═══════════════════════════════════════════════════════════════ */
.sk-product-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  overflow: hidden;
  transition: box-shadow 0.28s ease, transform 0.28s ease, border-color 0.22s ease;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}
.sk-product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: var(--border-mid);
}
.sk-product-card .card-img-wrap {
  background: var(--bg-sage);
  overflow: hidden;
  position: relative;
}
.sk-product-card .card-img-wrap img {
  transition: transform 0.4s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sk-product-card:hover .card-img-wrap img {
  transform: scale(1.07);
}
.sk-add-btn {
  background: #FFFFFF !important;
  color: #1B5E35 !important;
  border: 2px solid #2B8A4C !important;
  border-radius: 10px;
  font-weight: 800 !important;
  font-size: 11px !important;
  padding: 5px 12px !important;
  transition: all 0.2s ease;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.sk-add-btn:hover {
  background: #2B8A4C !important;
  color: #FFFFFF !important;
  border-color: #2B8A4C !important;
  box-shadow: 0 4px 14px rgba(43,138,76,0.3);
  transform: translateY(-1px);
}
.sk-add-btn:active { transform: scale(0.96); }

/* ═══════════════════════════════════════════════════════════════
   CATEGORY CARD
   ═══════════════════════════════════════════════════════════════ */
.sk-cat-card {
  background: var(--bg-white);
  border: 1.5px solid var(--border-light);
  border-radius: 20px;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-card);
}
.sk-cat-card:hover {
  border-color: var(--lime);
  box-shadow: 0 6px 20px rgba(76, 175, 112, 0.18);
  transform: translateY(-3px);
}

/* ═══════════════════════════════════════════════════════════════
   SECTION STYLES
   ═══════════════════════════════════════════════════════════════ */
.sk-section {
  border-radius: 24px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
}
.sk-section-white { background: var(--bg-white); }
.sk-section-sage  { background: var(--bg-sage); }

.sk-section-header-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  color: var(--text-heading);
  font-size: 1.1rem;
  line-height: 1.25;
}

/* ═══════════════════════════════════════════════════════════════
   BADGE SYSTEM
   ═══════════════════════════════════════════════════════════════ */
.badge-offer {
  background: var(--amber);
  color: #fff;
  font-weight: 800;
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 6px rgba(232, 148, 10, 0.4);
}
.badge-new {
  background: var(--lime);
  color: #fff;
  font-weight: 800;
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 8px;
}
.badge-free-del {
  background: var(--primary-50);
  color: var(--primary);
  font-weight: 700;
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}
.badge-delivery {
  position: relative;
}
.badge-delivery::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background-color: var(--lime);
  border-radius: 50%;
  border: 2px solid white;
}

/* ═══════════════════════════════════════════════════════════════
   HERO BANNER OVERLAY
   ═══════════════════════════════════════════════════════════════ */
.hero-leaf-pattern {
  background-image:
    radial-gradient(circle at 20% 80%, rgba(76,175,112,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(76,175,112,0.06) 0%, transparent 50%);
}
.hero-dot-pattern {
  background-image: radial-gradient(rgba(255,255,255,0.15) 1px, transparent 1px);
  background-size: 18px 18px;
}

/* ═══════════════════════════════════════════════════════════════
   PROMOTIONAL BANNERS
   ═══════════════════════════════════════════════════════════════ */
.promo-banner-green {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}
.promo-banner-amber {
  background: linear-gradient(135deg, #C47A08 0%, var(--amber) 100%);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}
.promo-banner-lime {
  background: linear-gradient(135deg, var(--lime-dark) 0%, var(--lime) 100%);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

/* ═══════════════════════════════════════════════════════════════
   SKELETON LOADER
   ═══════════════════════════════════════════════════════════════ */
.loading-skeleton {
  background: linear-gradient(90deg, var(--bg-sage) 25%, var(--bg-sage-deep) 50%, var(--bg-sage) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}

/* ═══════════════════════════════════════════════════════════════
   FORM INPUTS
   ═══════════════════════════════════════════════════════════════ */
.sk-input {
  background: var(--bg-cream);
  border: 2px solid var(--border-light);
  border-radius: 14px;
  color: var(--text-heading);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  width: 100%;
  font-family: 'Inter', sans-serif;
}
.sk-input:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(76, 175, 112, 0.12);
}
.sk-input::placeholder {
  color: var(--text-subtle);
  font-weight: 400;
}

/* Hide arrow on number inputs */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] { -moz-appearance: textfield; }

/* ═══════════════════════════════════════════════════════════════
   NAVBAR OVERRIDES
   ═══════════════════════════════════════════════════════════════ */
#main-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-navbar);
}
#nav-search-input,
#nav-search-input-mobile {
  background: var(--bg-cream);
  border: 2px solid var(--border-light);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  color: var(--text-heading);
}
#nav-search-input:focus,
#nav-search-input-mobile:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(76, 175, 112, 0.1);
  outline: none;
  background: white;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE BOTTOM NAV
   ═══════════════════════════════════════════════════════════════ */
#mobile-bottom-nav {
  background: var(--bg-white);
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -4px 20px rgba(27, 94, 53, 0.08);
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
#main-footer {
  background: var(--primary-dark);
  border-top: 1px solid rgba(76, 175, 112, 0.12);
}

/* ═══════════════════════════════════════════════════════════════
   DECORATIVE LEAF DIVIDER
   ═══════════════════════════════════════════════════════════════ */
.leaf-divider {
  display: flex;
  align-items: center;
  gap: 12px;
}
.leaf-divider::before,
.leaf-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-mid), transparent);
}

/* ═══════════════════════════════════════════════════════════════
   STAR RATING
   ═══════════════════════════════════════════════════════════════ */
.star-filled { color: var(--amber); }
.star-empty  { color: var(--border-mid); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE TWEAKS
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  /* Section headers */
  .sk-section-header-title { font-size: 0.97rem; }
  .sk-product-card { border-radius: 14px; }

  /* Hero banner mobile fixes */
  #hero-slider > div:not(.hero-promo-slide):not(.hero-custom-slide) {
    min-height: 200px !important;
    padding: 20px 18px !important;
  }
  #hero-slider > div.hero-promo-slide,
  #hero-slider > div.hero-custom-slide {
    padding: 0 !important;
  }
  #hero-slider h2 {
    font-size: 1.35rem !important;
    line-height: 1.25 !important;
  }
  #hero-slider p {
    font-size: 0.72rem !important;
  }

  /* Promo banner cards — stack vertically on mobile */
  .promo-card-grid {
    grid-template-columns: 1fr !important;
  }

  /* Product scroller cards — slightly smaller on mobile */
  .scroll-track > div {
    min-width: 130px !important;
    width: 130px !important;
  }

  /* Quick food grid — 2 cols on mobile */
  .quick-food-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  /* Category icon grid — 4 per row on mobile */
  .cat-icon-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
  }

  /* Main sections — tighter padding on phone */
  .sk-section {
    padding: 14px 14px 18px !important;
    border-radius: 16px !important;
    margin-bottom: 12px !important;
  }

  /* Product grid pages — 2 cols on mobile */
  .sk-product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}

/* Small phones (< 400px) */
@media (max-width: 400px) {
  #hero-slider h2 {
    font-size: 1.15rem !important;
  }
  #hero-slider > div:not(.hero-promo-slide):not(.hero-custom-slide) {
    padding: 16px 14px !important;
  }
}

/* Tablets (641–1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
  .sk-product-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE TOUCH & INTERACTION IMPROVEMENTS
   ═══════════════════════════════════════════════════════════════ */
/* Ensure tappable targets are at least 44px */
button, a, [role="button"] {
  -webkit-tap-highlight-color: transparent;
}
.sk-add-btn, .btn-brand-primary, .btn-lime {
  min-height: 36px;
}

/* Horizontal scroll container — hide scrollbar on mobile for cleanliness */
.scroll-track {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll-track::-webkit-scrollbar {
  display: none;
}

/* Prevent body zoom on input focus (iOS fix) */
@media (max-width: 640px) {
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px !important; /* prevents iOS auto-zoom */
  }
}

/* ═══════════════════════════════════════════════════════════════
   CHECKOUT DELIVERY MAP & LIVE AREA CHECK STYLES
   ═══════════════════════════════════════════════════════════════ */
@keyframes map-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(27, 94, 53, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 12px rgba(27, 94, 53, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(27, 94, 53, 0);
  }
}

.map-pin-pulse {
  animation: map-pulse 2s infinite;
}

@keyframes radar-scan {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.radar-spinner {
  animation: radar-scan 1.2s linear infinite;
}

.leaflet-container {
  font-family: 'Inter', sans-serif !important;
}

.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}

.leaflet-control-zoom a {
  background-color: #ffffff !important;
  color: #1A2E1A !important;
  border-bottom: 1px solid #E4EFE7 !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  font-weight: bold !important;
  transition: all 0.2s ease !important;
}

.leaflet-control-zoom a:hover {
  background-color: #EFF7F2 !important;
  color: #1B5E35 !important;
}

.map-control-btn {
  background: #ffffff;
  border: 1.5px solid #E4EFE7;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-control-btn:hover {
  background: #EFF7F2;
  border-color: #4CAF70;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(27, 94, 53, 0.18);
}

.map-control-btn:active {
  transform: scale(0.95);
}

/* Hide default browser password reveal buttons to prevent duplicates */
input::-ms-reveal,
input::-ms-clear {
  display: none !important;
}

