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

:root {
  --green-dark: #1a3d2b;
  --green-mid: #2d6a4f;
  --green-light: #52b788;
  --green-pale: #d8f3dc;
  --gold: #c9a84c;
  --gold-light: #e8c96a;
  --gold-pale: #fdf6e3;
  --cream: #faf8f2;
  --cream-dark: #f0ebe0;
  --red-forbidden: #8b1a1a;
  --red-mid: #c0392b;
  --red-light: #e74c3c;
  --red-pale: #fdecea;
  --text-dark: #1c1c1c;
  --text-mid: #3d3d3d;
  --text-light: #6b6b6b;
  --white: #ffffff;
  --shadow-sm: 0 2px 8px rgba(26,61,43,0.08);
  --shadow-md: 0 4px 20px rgba(26,61,43,0.12);
  --shadow-lg: 0 8px 40px rgba(26,61,43,0.18);
  --shadow-gold: 0 4px 20px rgba(201,168,76,0.25);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 40px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Tajawal', sans-serif;
  background-color: var(--cream);
  color: var(--text-dark);
  direction: rtl;
  line-height: 1.7;
  min-height: 100vh;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--cream-dark); }
::-webkit-scrollbar-thumb { background: var(--green-mid); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--green-dark); }

/* ===== HEADER ===== */
.site-header {
  background: linear-gradient(135deg, var(--green-dark) 0%, #0f2a1c 50%, var(--green-dark) 100%);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.header-top {
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  text-align: center;
  padding: 6px 20px;
  font-size: 13px;
  color: var(--green-dark);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.logo-emblem {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 0 20px rgba(201,168,76,0.4);
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.2);
}

.logo-text-area {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: 'Amiri', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.2;
  letter-spacing: 0.3px;
}

.logo-subtitle {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.5px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: var(--radius-xl);
  transition: var(--transition);
  border: 1px solid transparent;
  position: relative;
}

.nav-link:hover {
  color: var(--gold-light);
  background: rgba(255,255,255,0.08);
  border-color: rgba(201,168,76,0.3);
}

.nav-link.active {
  background: rgba(201,168,76,0.15);
  color: var(--gold-light);
  border-color: rgba(201,168,76,0.4);
}

.nav-link.nav-admin {
  background: rgba(201,168,76,0.2);
  color: var(--gold-light);
  border-color: var(--gold);
  font-weight: 700;
}

.nav-link.nav-admin:hover {
  background: var(--gold);
  color: var(--green-dark);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
}

/* ===== PAGE HERO ===== */
.page-hero {
  background: linear-gradient(160deg, var(--green-dark) 0%, var(--green-mid) 60%, var(--green-light) 100%);
  padding: 60px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='10'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--cream);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201,168,76,0.2);
  border: 1px solid rgba(201,168,76,0.5);
  color: var(--gold-light);
  padding: 6px 18px;
  border-radius: var(--radius-xl);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: 'Amiri', serif;
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-desc {
  font-size: 16px;
  color: rgba(255,255,255,0.75);
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ===== SECTION ===== */
.section {
  padding: 60px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.section-icon.green { background: var(--green-pale); }
.section-icon.red { background: var(--red-pale); }

.section-title {
  font-family: 'Amiri', serif;
  font-size: 26px;
  font-weight: 700;
}

.section-title.green { color: var(--green-dark); }
.section-title.red { color: var(--red-forbidden); }

.section-count {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 400;
}

/* ===== SEARCH + FILTER ===== */
.search-filter-bar {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.06);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.search-input-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 16px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 44px 10px 16px;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-md);
  font-family: 'Tajawal', sans-serif;
  font-size: 14px;
  background: var(--cream);
  color: var(--text-dark);
  transition: var(--transition);
  outline: none;
}

.search-input:focus {
  border-color: var(--green-mid);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.1);
}

.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 8px 16px;
  border-radius: var(--radius-xl);
  font-family: 'Tajawal', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--cream-dark);
  background: var(--cream);
  color: var(--text-mid);
  transition: var(--transition);
}

.filter-chip:hover {
  border-color: var(--green-mid);
  color: var(--green-mid);
}

.filter-chip.active {
  background: var(--green-mid);
  color: var(--white);
  border-color: var(--green-mid);
}

.filter-chip.active.red-chip {
  background: var(--red-mid);
  border-color: var(--red-mid);
}

/* ===== PRODUCT GRID ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

/* ===== PRODUCT CARD ===== */
.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1.5px solid transparent;
  cursor: pointer;
  position: relative;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.product-card.allowed {
  border-color: rgba(82,183,136,0.2);
}

.product-card.allowed:hover {
  border-color: var(--green-light);
  box-shadow: 0 12px 40px rgba(45,106,79,0.15);
}

.product-card.forbidden {
  border-color: rgba(192,57,43,0.15);
}

.product-card.forbidden:hover {
  border-color: var(--red-mid);
  box-shadow: 0 12px 40px rgba(192,57,43,0.15);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-xl);
  font-size: 11px;
  font-weight: 700;
  z-index: 2;
}

.card-badge.allowed { background: var(--green-mid); color: white; }
.card-badge.forbidden { background: var(--red-mid); color: white; }

.card-img-wrap {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .card-img-wrap img {
  transform: scale(1.08);
}

.card-img-placeholder {
  font-size: 60px;
  opacity: 0.3;
}

.card-img-wrap.allowed { background: linear-gradient(135deg, var(--green-pale), #f0faf4); }
.card-img-wrap.forbidden { background: linear-gradient(135deg, var(--red-pale), #fff5f5); }

.card-body {
  padding: 16px 18px 18px;
}

.card-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.card-category.allowed { color: var(--green-mid); }
.card-category.forbidden { color: var(--red-mid); }

.card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.4;
}

.card-note {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  padding: 12px 18px;
  border-top: 1px solid rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-footer-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.card-footer-icon.allowed { background: var(--green-pale); }
.card-footer-icon.forbidden { background: var(--red-pale); }

.card-status-text {
  font-size: 12px;
  font-weight: 600;
}
.card-status-text.allowed { color: var(--green-mid); }
.card-status-text.forbidden { color: var(--red-mid); }

/* ===== EMPTY STATE ===== */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-light);
}

.empty-state-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.4; }
.empty-state-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--text-mid); }
.empty-state-desc { font-size: 14px; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.75);
  padding: 40px;
  text-align: center;
  margin-top: 60px;
}

.footer-logo {
  font-family: 'Amiri', serif;
  font-size: 24px;
  color: var(--gold-light);
  margin-bottom: 10px;
}

.footer-quote {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  max-width: 500px;
  margin: 0 auto 20px;
  line-height: 1.8;
}

.footer-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 20px auto;
}

.footer-bottom {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-xl);
  font-family: 'Tajawal', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--green-mid), var(--green-dark));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--green-dark);
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201,168,76,0.4);
}

.btn-danger {
  background: linear-gradient(135deg, var(--red-mid), var(--red-forbidden));
  color: white;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--cream-dark);
  color: var(--text-mid);
}

.btn-outline:hover {
  border-color: var(--green-mid);
  color: var(--green-mid);
}

.btn-sm { padding: 7px 16px; font-size: 13px; }

/* ===== STATS BAR ===== */
.stats-bar {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.stat-card {
  flex: 1;
  min-width: 150px;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(0,0,0,0.05);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon.green { background: var(--green-pale); }
.stat-icon.red { background: var(--red-pale); }
.stat-icon.gold { background: var(--gold-pale); }

.stat-num {
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 2px;
}

.stat-num.green { color: var(--green-mid); }
.stat-num.red { color: var(--red-mid); }
.stat-num.gold { color: var(--gold); }

.stat-label {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--green-dark);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease forwards;
  border-right: 4px solid var(--gold);
}

.toast.error { background: var(--red-forbidden); border-right-color: #ff6b6b; }

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

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

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: 'Amiri', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--green-dark);
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--cream);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--text-mid);
}

.modal-close:hover { background: var(--red-pale); color: var(--red-mid); }

.modal-body {
  padding: 24px 28px;
}

.modal-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  background: var(--cream);
}

.modal-img-placeholder {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.modal-img-placeholder.allowed { background: linear-gradient(135deg, var(--green-pale), #e8f5ee); }
.modal-img-placeholder.forbidden { background: linear-gradient(135deg, var(--red-pale), #fff0f0); }

.modal-product-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.modal-product-category {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-product-category.allowed { color: var(--green-mid); }
.modal-product-category.forbidden { color: var(--red-mid); }

.modal-note-box {
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 20px;
}

.modal-note-box.allowed {
  background: var(--green-pale);
  color: var(--green-dark);
  border-right: 4px solid var(--green-mid);
}

.modal-note-box.forbidden {
  background: var(--red-pale);
  color: var(--red-forbidden);
  border-right: 4px solid var(--red-mid);
}

.modal-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-xl);
  font-size: 15px;
  font-weight: 700;
}

.modal-status-badge.allowed { background: var(--green-mid); color: white; }
.modal-status-badge.forbidden { background: var(--red-mid); color: white; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .header-main { padding: 14px 20px; }
  .main-nav { display: none; flex-direction: column; }
  .main-nav.open { display: flex; position: absolute; top: 100%; right: 0; left: 0; background: var(--green-dark); padding: 16px; gap: 4px; }
  .mobile-menu-btn { display: block; }
  .logo-title { font-size: 18px; }
  .page-hero { padding: 40px 20px; }
  .section { padding: 40px 20px; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
  .card-img-wrap { height: 140px; }
  .stats-bar { flex-direction: column; }
}

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

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

.animate-in { animation: fadeInUp 0.5s ease forwards; }


/* ============================================================
   MOBILE & RESPONSIVE — CLEAN REBUILD
   ============================================================ */

/* ===== BOTTOM NAV — hidden on desktop, visible only on mobile ===== */
.bottom-nav {
  display: none !important; /* Force hidden on desktop */
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #ffffff;
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 6px 0 6px;
  z-index: 9990;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.1);
}

.bottom-nav-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px 4px;
  text-decoration: none;
  color: #6b6b6b;
  font-family: 'Tajawal', sans-serif;
  font-size: 10px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.bottom-nav-item.active { color: #2d6a4f; }
.bottom-nav-item.active .bnav-icon { background: #d8f3dc; border-radius: 10px; }

.bnav-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

/* ===== CHAT FAB ===== */
.chat-fab {
  display: none; /* hidden on desktop by default — show on mobile */
  position: fixed;
  bottom: 80px;
  left: 16px;
  width: 52px; height: 52px;
  background: linear-gradient(135deg, #2d6a4f, #1a3d2b);
  border-radius: 50%;
  align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 20px rgba(45,106,79,0.4);
  cursor: pointer;
  text-decoration: none;
  z-index: 9980;
  border: 2px solid rgba(255,255,255,0.2);
}

.chat-fab-label { display: none; }

/* ===== DESKTOP NAV (keep normal) ===== */
@media (min-width: 769px) {
  .mobile-menu-btn { display: none; }
  .main-nav { display: flex !important; }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  /* Show bottom nav & FAB on mobile */
  .bottom-nav { display: block !important; }
  .chat-fab { display: flex; }

  /* Body padding for bottom nav */
  body { padding-bottom: 68px; }

  /* Header */
  .header-top { font-size: 11px; padding: 5px 12px; }
  .header-main { padding: 10px 16px; }
  .logo-emblem { width: 40px; height: 40px; font-size: 19px; }
  .logo-title { font-size: 15px; }
  .logo-subtitle { font-size: 10px; }

  /* Mobile nav overlay */
  .main-nav {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,42,28,0.97);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    z-index: 9995;
    padding: 40px 20px;
  }
  .main-nav.open { display: flex !important; }
  .main-nav .nav-link {
    font-size: 17px;
    padding: 13px 36px;
    width: 100%;
    text-align: center;
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.1);
  }
  .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }

  /* Page hero */
  .page-hero { padding: 28px 16px 56px; }
  .page-hero::after { height: 36px; }
  .hero-title { font-size: 24px; }
  .hero-desc { font-size: 14px; }

  /* Section */
  .section { padding: 22px 16px; }
  .section-title { font-size: 20px; }

  /* Stats */
  .stats-bar { flex-direction: row; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
  .stat-card { flex: 1; min-width: calc(50% - 5px); padding: 12px 14px; gap: 10px; }
  .stat-icon { width: 36px; height: 36px; font-size: 16px; }
  .stat-num { font-size: 22px; }
  .stat-label { font-size: 11px; }

  /* Search */
  .search-filter-bar { padding: 12px 14px; gap: 10px; border-radius: 14px; margin-bottom: 16px; }
  .filter-chip { padding: 7px 12px; font-size: 12px; }

  /* Grid */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* Cards */
  .card-img-wrap { height: 120px; }
  .card-body { padding: 10px 11px 11px; }
  .card-name { font-size: 13px; line-height: 1.3; }
  .card-note { font-size: 11px; -webkit-line-clamp: 2; }
  .card-footer { padding: 8px 11px; }
  .card-badge { font-size: 10px; padding: 3px 8px; top: 6px; left: 6px; }
  .card-img-placeholder { font-size: 44px; }

  /* Modal slides up from bottom */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal { border-radius: 20px 20px 0 0; max-height: 88vh; }
  .modal-header { padding: 14px 18px; }
  .modal-body { padding: 14px 18px 28px; }
  .modal-img { height: 180px; }

  /* Footer */
  .site-footer { padding: 28px 16px; margin-top: 32px; }
  .footer-logo { font-size: 18px; }
  .footer-quote { font-size: 13px; }

  /* Home page */
  .hero-home { padding: 36px 16px 72px; }
  .hero-emblem { width: 70px; height: 70px; font-size: 32px; margin-bottom: 18px; }
  .hero-home h1 { font-size: 28px; }
  .hero-home .hero-tagline { font-size: 15px; }
  .hero-home .hero-quote { font-size: 13px; }
  .hero-cta { gap: 8px; }
  .hero-cta .btn { padding: 10px 16px; font-size: 13px; }

  .tribute-section { padding: 24px 16px; }
  .tribute-card { padding: 24px 18px; }
  .tribute-name { font-size: 20px; }
  .tribute-quote { font-size: 15px; padding: 14px 16px; }

  .rules-grid { padding: 0 16px 28px; grid-template-columns: 1fr; gap: 10px; }
  .rule-card { padding: 16px; gap: 12px; }
  .rule-icon { width: 42px; height: 42px; font-size: 20px; }

  .quick-access { padding: 0 16px 56px; }
  .quick-grid { grid-template-columns: 1fr; gap: 10px; }
  .quick-card { padding: 20px 18px; gap: 16px; }
  .quick-icon { font-size: 34px; }
  .quick-text h3 { font-size: 19px; }
  .quick-text p { font-size: 13px; }

  .fasting-banner { padding: 0 16px; margin-bottom: 40px; }
  .fasting-card { padding: 16px 18px; gap: 12px; flex-wrap: wrap; }

  /* Stats on home page use row */
  div[style*="max-width:900px"] .stats-bar { flex-direction: row; }
  div[style*="max-width:900px"] .stat-card { min-width: auto; flex: 1; }
}

/* ===== VERY SMALL ===== */
@media (max-width: 360px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .card-img-wrap { height: 100px; }
  .card-name { font-size: 12px; }
}

/* ===== SAFE AREA (iPhone notch) ===== */
.bottom-nav {
  padding-bottom: max(6px, env(safe-area-inset-bottom, 6px));
}

