/* ============================================================
   Ghar Ka Swad Tiffin – Design System
   Strict adherence to specified tokens
   ============================================================ */

:root {
  --primary: #F97316;
  --primary-dark: #EA580C;
  --secondary: #22C55E;
  --bg-light: #FFFBF5;
  --bg-white: #FFFFFF;
  --text-dark: #1F2937;
  --text-gray: #6B7280;
  --border: #E5E7EB;
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --radius: 12px;
  --font-en: 'Poppins', sans-serif;
  --font-hi: 'Noto Sans Devanagari', 'Poppins', sans-serif;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-en);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-dark);
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
ul, ol { list-style: none; }

/* Typography */
h1, .h1 { font-size: 40px; font-weight: 600; line-height: 1.2; }
h2, .h2 { font-size: 32px; font-weight: 600; line-height: 1.2; }
h3, .h3 { font-size: 20px; font-weight: 600; line-height: 1.2; }
.small, small { font-size: 14px; }
.text-gray { color: var(--text-gray); }
.text-center { text-align: center; }
.hindi { font-family: var(--font-hi); }

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}
@media (min-width: 768px) {
  .container { padding-left: 24px; padding-right: 24px; }
}
@media (min-width: 1024px) {
  .container { padding-left: 32px; padding-right: 32px; }
}

.section { padding-top: 64px; padding-bottom: 64px; }
.section-sm { padding-top: 32px; padding-bottom: 32px; }

/* 12-column Grid */
.grid {
  display: grid;
  gap: 24px;
}
.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Cards – ALL identical */
.card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 16px;
  background: var(--border);
}
.card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
}
.card-desc {
  font-size: 14px;
  color: var(--text-gray);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}
.card-price {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 16px;
  color: var(--text-dark);
}
.card-price .sep { color: var(--text-gray); margin: 0 4px; }
.card-footer { margin-top: auto; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  min-height: 44px;
  border-radius: 8px;
  font-family: var(--font-en);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-align: center;
  line-height: 1.2;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}
.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-secondary:hover {
  background: var(--primary);
  color: #fff;
}
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; min-height: 36px; font-size: 14px; }
.btn-whatsapp {
  background: #25D366;
  color: #fff;
}
.btn-whatsapp:hover { background: #1da851; color: #fff; }

/* Badge */
.badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 20px;
  background: var(--primary);
  color: #fff;
}
.badge-popular {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

/* Header / Nav */
.header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}
.logo {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo span { color: var(--primary); }
.nav { display: none; }
.nav a {
  color: var(--text-dark);
  font-weight: 500;
  font-size: 14px;
  padding: 8px 12px;
}
.nav a:hover, .nav a.active { color: var(--primary); }
.nav-toggle {
  display: flex;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
}
@media (min-width: 768px) {
  .nav { display: flex; align-items: center; gap: 4px; }
  .nav-toggle { display: none; }
}
/* Mobile menu */
.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 16px;
  background: var(--bg-white);
  border-top: 1px solid var(--border);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 12px 0;
  color: var(--text-dark);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.nav-mobile a:last-child { border-bottom: none; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
  padding: 48px 0 64px;
  text-align: center;
}
.hero h1 { margin-bottom: 16px; }
.hero p {
  font-size: 16px;
  color: var(--text-gray);
  max-width: 560px;
  margin: 0 auto 32px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

/* Steps / How it works */
.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

/* Testimonials */
.testimonial-text {
  font-size: 16px;
  font-style: italic;
  color: var(--text-gray);
  margin-bottom: 16px;
  flex-grow: 1;
}
.testimonial-author { font-weight: 500; }

/* Forms */
.form-section {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  border: 1px solid var(--border);
  margin-bottom: 24px;
}
.form-section h3 { margin-bottom: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-dark);
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  font-family: var(--font-en);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 44px;
  background: var(--bg-white);
  color: var(--text-dark);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.15);
}
textarea.form-control { min-height: 96px; resize: vertical; }
.form-row {
  display: grid;
  gap: 16px;
}
@media (min-width: 768px) {
  .form-row-2 { grid-template-columns: 1fr 1fr; }
}

/* Toggle */
.toggle-group {
  display: flex;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.toggle-group input { display: none; }
.toggle-group label {
  flex: 1;
  text-align: center;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 500;
  background: var(--bg-white);
  color: var(--text-gray);
  transition: all 0.2s;
  margin: 0;
}
.toggle-group input:checked + label {
  background: var(--primary);
  color: #fff;
}

/* Tables */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  font-weight: 600;
  background: var(--bg-light);
  color: var(--text-dark);
}
tr:hover td { background: #FFF7ED; }

/* Accordion FAQ */
.accordion-item {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.accordion-header {
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  text-align: left;
  font-size: 16px;
  font-weight: 500;
  font-family: var(--font-en);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dark);
}
.accordion-header::after {
  content: '+';
  font-size: 20px;
  color: var(--primary);
}
.accordion-item.open .accordion-header::after { content: '−'; }
.accordion-body {
  display: none;
  padding: 0 20px 16px;
  font-size: 14px;
  color: var(--text-gray);
}
.accordion-item.open .accordion-body { display: block; }

/* Footer */
.footer {
  background: var(--text-dark);
  color: #fff;
  padding: 48px 0 24px;
}
.footer a { color: #D1D5DB; }
.footer a:hover { color: var(--primary); }
.footer-grid {
  display: grid;
  gap: 32px;
  margin-bottom: 32px;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 24px;
  text-align: center;
  font-size: 14px;
  color: #9CA3AF;
}

/* Utility */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.relative { position: relative; }
.hidden { display: none !important; }
.text-primary { color: var(--primary); }
.bg-white { background: var(--bg-white); }

/* Plan popular card highlight */
.card.popular {
  border: 2px solid var(--primary);
  position: relative;
}

/* Order summary box */
.summary-box {
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  border-radius: var(--radius);
  padding: 20px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}
.summary-row.total {
  font-weight: 600;
  font-size: 18px;
  border-top: 1px solid #FED7AA;
  margin-top: 8px;
  padding-top: 12px;
}

/* QR / Payment */
.qr-box {
  text-align: center;
  padding: 24px;
}
.qr-box img {
  max-width: 200px;
  margin: 0 auto 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.upi-id {
  font-family: monospace;
  font-size: 16px;
  background: var(--bg-light);
  padding: 8px 16px;
  border-radius: 8px;
  display: inline-block;
}

/* Status badges */
.status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}
.status-pending { background: #FEF3C7; color: #92400E; }
.status-paid { background: #D1FAE5; color: #065F46; }
.status-failed { background: #FEE2E2; color: #991B1B; }
.status-new { background: #DBEAFE; color: #1E40AF; }
.status-confirmed { background: #D1FAE5; color: #065F46; }

/* Admin overrides (shared) */
.admin-sidebar { /* defined in admin CSS if needed */ }

/* Alert */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}
.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-error { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.alert-info { background: #DBEAFE; color: #1E40AF; border: 1px solid #BFDBFE; }

/* Lazy image placeholder */
img[loading="lazy"] { background: var(--border); }

/* Print / small screens */
@media (max-width: 359px) {
  h1, .h1 { font-size: 32px; }
  h2, .h2 { font-size: 24px; }
}
