/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Roboto:wght@300;400;500;700&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --primary: #2E7D32;
  --primary-light: #4CAF50;
  --primary-pale: #E8F5E9;
  --primary-dark: #1B5E20;
  --white: #FFFFFF;
  --text-dark: #212121;
  --text-gray: #757575;
  --text-light: #BDBDBD;
  --border: #E0E0E0;
  --success: #43A047;
  --danger: #E53935;
  --warning: #FB8C00;
  --pending: #FFF8E1;
  --accepted: #E8F5E9;
  --rejected: #FFEBEE;
  --completed: #E3F2FD;
  --whatsapp: #25D366;
  --shadow: 0 2px 15px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 25px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-full: 50px;
}

/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', sans-serif;
  background: #F5F5F5;
  color: var(--text-dark);
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5 {
  font-family: 'Poppins', sans-serif;
  color: var(--text-dark);
}

p {
  color: var(--text-gray);
  line-height: 1.6;
}

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

/* ===== BUTTONS ===== */
.btn {
  display: block;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius-full);
  font-size: 16px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
}

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

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

.btn-outline:hover {
  background: var(--primary-pale);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 14px;
  width: auto;
  display: inline-block;
}

/* ===== INPUT FIELDS ===== */
.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 6px;
  font-family: 'Poppins', sans-serif;
}

.input-field {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: 'Roboto', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color 0.3s ease;
  outline: none;
}

.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.input-field::placeholder {
  color: var(--text-light);
}

/* Mobile number input with +91 */
.mobile-input {
  display: flex;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  transition: border-color 0.3s ease;
}

.mobile-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.mobile-prefix {
  padding: 14px 12px;
  background: var(--primary-pale);
  color: var(--primary);
  font-weight: 600;
  font-size: 15px;
  border-right: 2px solid var(--border);
  white-space: nowrap;
}

.mobile-input input {
  flex: 1;
  padding: 14px 16px;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: 'Roboto', sans-serif;
  color: var(--text-dark);
}

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

/* ===== TOP BAR ===== */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-bar .logo {
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  color: var(--primary);
  font-size: 18px;
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--white);
  display: flex;
  box-shadow: 0 -2px 15px rgba(0,0,0,0.1);
  z-index: 100;
}

.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  color: var(--text-gray);
  font-size: 11px;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  transition: color 0.3s ease;
  text-decoration: none;
}

.bottom-nav a i {
  font-size: 22px;
  margin-bottom: 4px;
}

.bottom-nav a.active {
  color: var(--primary);
}

.bottom-nav a.active i {
  color: var(--primary);
}

/* ===== WHATSAPP FLOATING BUTTON ===== */
.whatsapp-btn {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: var(--whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 999;
  animation: bounce 2s infinite;
  text-decoration: none;
}

.whatsapp-btn i {
  color: white;
  font-size: 28px;
}

/* Bounce animation for WhatsApp button */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ===== PAGE WRAPPER ===== */
.page {
  min-height: 100vh;
  padding-bottom: 80px;
}

.page-content {
  padding: 20px;
}

/* ===== SPLASH SCREEN ===== */
.splash-screen {
  min-height: 100vh;
  background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 50%, #4CAF50 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.splash-logo {
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.15);
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.3);
}

.splash-logo i {
  font-size: 60px;
  color: white;
}

.splash-title {
  font-size: 36px;
  font-weight: 800;
  color: white;
  font-family: 'Poppins', sans-serif;
  margin-bottom: 8px;
}

.splash-subtitle {
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 60px;
}

.splash-loader {
  width: 50px;
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 20px;
}

.splash-loader-bar {
  height: 100%;
  background: white;
  border-radius: 2px;
  animation: loading 2.5s ease forwards;
}

@keyframes loading {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* ===== PERMISSION SCREENS ===== */
.permission-screen {
  min-height: 100vh;
  background: var(--white);
  display: flex;
  flex-direction: column;
  padding: 40px 24px;
}

.permission-illustration {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}

.permission-illustration img {
  width: 80%;
  max-width: 280px;
}

.permission-illustration i {
  font-size: 120px;
  color: var(--primary);
  opacity: 0.8;
}

.permission-content {
  padding-bottom: 20px;
}

.permission-content h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.permission-content p {
  font-size: 15px;
  margin-bottom: 30px;
  line-height: 1.6;
}

.permission-features {
  margin-bottom: 30px;
}

.permission-feature {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon i {
  color: var(--primary);
  font-size: 20px;
}

.feature-text h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-dark);
}

.feature-text p {
  font-size: 13px;
  color: var(--text-gray);
  margin: 0;
}

/* ===== BANNER CAROUSEL ===== */
.banner-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 20px;
  height: 160px;
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.banner-slide.active {
  opacity: 1;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

.banner-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: all 0.3s ease;
}

.banner-dot.active {
  background: white;
  width: 20px;
  border-radius: 4px;
}

/* ===== CATEGORY GRID ===== */
.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.category-card {
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
  box-shadow: var(--shadow);
}

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

.category-card img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 12px;
}

.category-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

/* ===== ITEMS LIST ===== */
.items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.item-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.item-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.item-card.selected {
  border-color: var(--primary);
  background: var(--primary-pale);
}

.item-card img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 10px;
}

.item-card h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-dark);
}

.item-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.item-unit {
  font-size: 11px;
  color: var(--text-gray);
}

/* ===== STATUS BADGES ===== */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
}

.badge-pending {
  background: #FFF3E0;
  color: #E65100;
}

.badge-accepted {
  background: var(--primary-pale);
  color: var(--primary-dark);
}

.badge-rejected {
  background: #FFEBEE;
  color: var(--danger);
}

.badge-completed {
  background: #E3F2FD;
  color: #1565C0;
}

/* ===== ORDER CARDS ===== */
.order-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--border);
}

.order-card.pending { border-left-color: var(--warning); }
.order-card.accepted { border-left-color: var(--success); }
.order-card.rejected { border-left-color: var(--danger); }
.order-card.completed { border-left-color: #1565C0; }

/* ===== PROFILE MENU ===== */
.profile-menu {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.profile-menu-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s ease;
  text-decoration: none;
  color: var(--text-dark);
}

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

.profile-menu-item:hover {
  background: var(--primary-pale);
}

.menu-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  flex-shrink: 0;
}

.menu-icon i {
  color: var(--primary);
  font-size: 18px;
}

.menu-text {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
}

.menu-arrow {
  color: var(--text-light);
  font-size: 18px;
}

.menu-item-logout .menu-icon {
  background: #FFEBEE;
}

.menu-item-logout .menu-icon i {
  color: var(--danger);
}

.menu-item-logout .menu-text {
  color: var(--danger);
}

/* ===== PHOTO UPLOAD ===== */
.photo-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.photo-upload-box {
  aspect-ratio: 1;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.photo-upload-box:hover {
  border-color: var(--primary);
  background: var(--primary-pale);
}

.photo-upload-box.has-photo {
  border-style: solid;
  border-color: var(--primary);
}

.photo-upload-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-upload-box i {
  font-size: 28px;
  color: var(--text-light);
  margin-bottom: 6px;
}

.photo-upload-box span {
  font-size: 11px;
  color: var(--text-light);
}

/* ===== SERVICE NOT AVAILABLE ===== */
.service-unavailable {
  background: #FFF8E1;
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  margin: 20px;
}

.service-unavailable i {
  font-size: 60px;
  color: var(--warning);
  margin-bottom: 16px;
}

.service-unavailable h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--text-dark);
  color: white;
  padding: 14px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  transition: transform 0.4s ease;
  white-space: nowrap;
  max-width: 90%;
  text-align: center;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--primary-pale);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}

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

/* ===== OTP INPUT ===== */
.otp-input {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 30px 0;
}

.otp-box {
  width: 50px;
  height: 56px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  color: var(--primary);
  outline: none;
  transition: border-color 0.3s ease;
}

.otp-box:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* ===== AVATAR ===== */
.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Poppins', sans-serif;
  margin: 0 auto 12px;
  border: 3px solid var(--primary);
}

/* ===== SECTION TITLE ===== */
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
  font-family: 'Poppins', sans-serif;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state i {
  font-size: 80px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 20px;
  color: var(--text-gray);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-light);
}

/* ===== LOCATION BAR ===== */
.location-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.location-bar i {
  color: var(--primary);
  font-size: 18px;
}

.location-bar span {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-bar .dropdown-icon {
  color: var(--text-gray);
  font-size: 16px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--primary-pale);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 2px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.slide-up {
  animation: slideUp 0.4s ease forwards;
}

/* ===== TERMS TEXT ===== */
.terms-text {
  font-size: 12px;
  color: var(--text-gray);
  text-align: center;
  margin-top: 16px;
  line-height: 1.6;
}

.terms-text a {
  color: var(--primary);
  font-weight: 500;
}

/* ===== MAP CONTAINER ===== */
#map {
  width: 100%;
  height: 60vh;
  z-index: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 360px) {
  .otp-box {
    width: 42px;
    height: 48px;
    font-size: 20px;
  }

  .category-grid {
    gap: 10px;
  }

  .items-grid {
    gap: 8px;
  }
}
/* ===== LANGUAGE SWITCHER GLOBE ===== */
.lang-globe-btn {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  font-size: 18px;
  transition: all 0.3s ease;
  position: relative;
  flex-shrink: 0;
  backdrop-filter: blur(10px);
}

.lang-globe-btn:hover {
  background: rgba(255,255,255,0.25);
  border-color: white;
}

/* Dark version for white background pages */
.lang-globe-btn.dark {
  background: var(--primary-pale);
  border-color: var(--primary);
  color: var(--primary);
}

.lang-globe-btn.dark:hover {
  background: var(--primary);
  color: white;
}

/* Language popup */
.lang-popup {
  position: absolute;
  top: 48px;
  right: 0;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  min-width: 180px;
  z-index: 9999;
  overflow: hidden;
  display: none;
  animation: popupIn 0.2s ease forwards;
}

.lang-popup.show {
  display: block;
}

@keyframes popupIn {
  from { opacity: 0; transform: scale(0.9) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.lang-popup-header {
  padding: 12px 16px;
  background: var(--primary-pale);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'Poppins', sans-serif;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-popup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid #F5F5F5;
  font-family: 'Poppins', sans-serif;
}

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

.lang-popup-item:hover {
  background: var(--primary-pale);
}

.lang-popup-flag {
  font-size: 20px;
  flex-shrink: 0;
}

.lang-popup-info {
  flex: 1;
}

.lang-popup-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.lang-popup-native {
  font-size: 11px;
  color: var(--text-gray);
  margin-top: 1px;
}

.lang-popup-check {
  color: var(--primary);
  font-size: 16px;
  flex-shrink: 0;
  display: none;
}

.lang-popup-item.active .lang-popup-check {
  display: block;
}

.lang-popup-item.active .lang-popup-name {
  color: var(--primary);
}

/* Overlay to close popup */
.lang-popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 9998;
  display: none;
}

.lang-popup-overlay.show {
  display: block;
}