:root {
  --emerald: #059669;
  --emerald-dark: #047857;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Cairo", system-ui, sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.narrow { width: min(720px, calc(100% - 32px)); }

.site-header { position: sticky; top: 0; z-index: 20; background: white; box-shadow: 0 4px 18px rgb(15 23 42 / .08); }
.nav-wrap { width: min(1180px, calc(100% - 32px)); margin: auto; min-height: 70px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-icon { font-size: 28px; }
.brand strong { display: block; color: var(--emerald-dark); font-size: 20px; line-height: 1; }
.brand small { color: var(--gray-500); font-size: 12px; }
.nav-search { flex: 1; display: flex; max-width: 460px; }
.nav-search input { flex: 1; border: 1px solid #d1d5db; border-radius: 999px; padding: 10px 18px; font-family: inherit; }
.nav-search button { margin-inline-start: -64px; border: 0; background: transparent; color: var(--emerald); font-family: inherit; font-weight: 700; padding: 0 16px; cursor: pointer; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { padding: 10px 12px; border-radius: 10px; color: var(--gray-700); font-size: 14px; }
.nav-links a:hover { color: var(--emerald); background: #ecfdf5; }

.hero { position: relative; min-height: 520px; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: url(/images/hero-bg.jpg) center/cover no-repeat; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(270deg, rgb(6 78 59 / .88), rgb(6 95 70 / .74), rgb(0 0 0 / .62)); }
.hero-content { position: relative; z-index: 1; color: white; padding-block: 80px; }
.pill { display: inline-block; color: #a7f3d0; border: 1px solid rgb(52 211 153 / .35); background: rgb(16 185 129 / .18); padding: 8px 16px; border-radius: 999px; margin-bottom: 22px; }
.hero h1 { font-size: clamp(38px, 5vw, 58px); line-height: 1.15; margin: 0 0 16px; font-weight: 900; }
.hero h1 span { display: block; color: #34d399; }
.hero p { max-width: 680px; color: #e5e7eb; font-size: 18px; line-height: 1.9; }
.hero-search { display: flex; gap: 10px; max-width: 560px; margin-top: 28px; }
.hero-search input, .filters input, .filters select, .form-card input, .form-card select, .form-card textarea, .login-card input {
  width: 100%; border: 1px solid #d1d5db; border-radius: 14px; padding: 13px 16px; font-family: inherit; background: white;
}
.hero-search button, .btn {
  border: 0; border-radius: 14px; padding: 12px 20px; font-family: inherit; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.primary, .hero-search button { background: var(--emerald); color: white; }
.primary:hover, .hero-search button:hover { background: var(--emerald-dark); }
.whatsapp { background: #22c55e; color: white; }
.ghost { background: white; color: var(--gray-700); border: 1px solid var(--gray-200); }
.cta { background: var(--emerald); color: white; font-size: 17px; }
.light { background: white; color: var(--emerald-dark); }
.warn { background: #ffedd5; color: #c2410c; }
.danger { background: #fee2e2; color: #dc2626; }
.wide { width: 100%; }

.stats { background: white; box-shadow: 0 1px 0 var(--gray-200); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-grid div { text-align: center; padding: 26px 10px; border-inline-start: 1px solid var(--gray-100); }
.stats-grid strong { display: block; font-size: 28px; }
.stats-grid span { color: var(--gray-500); font-size: 14px; }

.section { padding-block: 56px; }
.muted-band { background: var(--gray-100); }
.section-title { text-align: center; margin-bottom: 30px; }
.section h2, .section-title h2 { margin: 0 0 6px; font-size: 30px; font-weight: 900; }
.section p, .section-title p { color: var(--gray-500); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head a { color: var(--emerald); font-weight: 700; }
.category-grid, .vendor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.category-tile, .city-tile, .vendor-card, .panel, .contact-panel, .form-card, .success-card, .filters, .admin-vendor, .admin-stats div {
  background: white; border: 1px solid var(--gray-200); border-radius: 18px; box-shadow: 0 8px 24px rgb(15 23 42 / .05);
}
.category-tile { min-height: 170px; padding: 22px; text-align: center; display: flex; flex-direction: column; justify-content: center; transition: .2s ease; }
.category-tile:hover, .city-tile:hover, .vendor-card:hover { transform: translateY(-4px); box-shadow: 0 18px 34px rgb(15 23 42 / .10); }
.category-tile b { font-size: 44px; }
.category-tile strong { font-size: 20px; }
.category-tile span, .city-tile span { color: var(--gray-500); font-size: 13px; }
.pink { background: linear-gradient(135deg, #fce7f3, #fff1f2); }
.amber { background: linear-gradient(135deg, #fef3c7, #fffbeb); }
.orange { background: linear-gradient(135deg, #ffedd5, #fef3c7); }
.purple { background: linear-gradient(135deg, #f3e8ff, #f5f3ff); }
.city-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.city-tile { padding: 18px 12px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.city-tile b { font-size: 30px; }

.vendor-card { overflow: hidden; }
.vendor-image { position: relative; height: 190px; overflow: hidden; }
.vendor-image img { width: 100%; height: 100%; object-fit: cover; transition: .35s ease; }
.vendor-card:hover .vendor-image img { transform: scale(1.05); }
.vendor-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgb(0 0 0 / .45), transparent 45%); }
.badge { position: relative; display: inline-block; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; z-index: 1; }
.vendor-image .badge { position: absolute; top: 12px; right: 12px; }
.badge-pink { background: #fce7f3; color: #be185d; }
.badge-amber { background: #fef3c7; color: #b45309; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-purple { background: #f3e8ff; color: #7e22ce; }
.badge-gray { background: #f3f4f6; color: #4b5563; }
.rating { position: absolute; z-index: 1; left: 12px; bottom: 12px; background: rgb(255 255 255 / .92); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; }
.vendor-body { padding: 18px; }
.vendor-body h3 { margin: 0 0 4px; font-size: 20px; }
.muted, .meta { margin: 0 0 8px; color: var(--gray-500); }
.desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 52px; line-height: 1.7; }
.actions { display: flex; gap: 8px; }
.actions .btn { flex: 1; padding: 10px 12px; font-size: 14px; }
.center { text-align: center; margin-top: 28px; }

.register-cta { text-align: center; color: white; background: linear-gradient(270deg, #047857, #059669); padding-block: 64px; }
.register-cta h2 { font-size: 36px; margin: 8px 0; }
.register-cta p { max-width: 720px; margin: 0 auto 24px; color: #d1fae5; line-height: 1.9; }
.chef { font-size: 48px; }
.site-footer { background: #111827; color: #d1d5db; padding-top: 44px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 34px; }
.site-footer a, .site-footer p { display: block; color: #9ca3af; margin: 8px 0; }
.footer-brand { font-size: 22px; color: white; }
.footer-bottom { border-top: 1px solid #1f2937; margin-top: 30px; padding: 18px; text-align: center; color: #6b7280; }

.page-hero { background: linear-gradient(270deg, #047857, #059669); color: white; padding-block: 44px; }
.page-hero h1 { margin: 0 0 8px; font-size: 34px; font-weight: 900; }
.page-hero p { margin: 0; color: #d1fae5; }
.centered { text-align: center; }
.filters { padding: 18px; margin-bottom: 24px; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 12px; margin-top: 14px; }
.results-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; color: var(--gray-500); }
.results-head strong { color: var(--emerald-dark); }
.empty { background: white; border-radius: 18px; padding: 70px 20px; text-align: center; }
.empty div { font-size: 56px; }
.full { min-height: 70vh; display: grid; place-content: center; }

.breadcrumbs { background: white; border-bottom: 1px solid var(--gray-200); padding-block: 12px; color: var(--gray-500); }
.profile-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; align-items: start; }
.profile-image { border-radius: 18px; overflow: hidden; background: #111; aspect-ratio: 16 / 9; box-shadow: 0 14px 28px rgb(15 23 42 / .12); }
.profile-image img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 10px; margin: 14px 0 22px; }
.thumbs img { width: 86px; height: 70px; object-fit: cover; border-radius: 12px; border: 2px solid var(--gray-200); }
.panel { padding: 22px; margin-top: 20px; }
.panel p { color: var(--gray-700); line-height: 1.9; }
.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.info-grid div { background: white; border: 1px solid var(--gray-200); border-radius: 16px; text-align: center; padding: 18px; font-size: 24px; }
.info-grid span { display: block; color: var(--gray-500); font-size: 12px; margin-top: 6px; }
.info-grid strong { display: block; font-size: 15px; }
.contact-panel { padding: 24px; position: sticky; top: 92px; }
.contact-panel h1 { margin: 16px 0 6px; line-height: 1.25; }
.stars { background: #fffbeb; padding: 12px; border-radius: 14px; color: #eab308; margin: 18px 0; }
.contact-panel small { display: block; text-align: center; color: var(--gray-500); margin-top: 12px; }

.form-card, .success-card { padding: 28px; }
.form-card label, .login-card label { display: block; font-weight: 800; color: var(--gray-700); margin-top: 14px; }
.form-card label span { color: #ef4444; }
.form-card input, .form-card select, .form-card textarea, .login-card input { margin-top: 6px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.validation { color: #dc2626; font-size: 13px; }
.validation.box { background: #fef2f2; border: 1px solid #fecaca; border-radius: 12px; padding: 10px; margin-top: 12px; }
.note { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; padding: 14px; border-radius: 14px; margin: 18px 0; }
.note.blue { background: #eff6ff; border-color: #bfdbfe; color: #2563eb; text-align: center; }
.success-card { text-align: center; }
.success-icon { width: 78px; height: 78px; display: grid; place-content: center; margin: auto; border-radius: 999px; color: var(--emerald); background: #d1fae5; font-size: 42px; font-weight: 900; }
.image-upload-status { color: var(--gray-500); font-size: 13px; margin: 8px 0 12px; }
.image-preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.image-preview-item { position: relative; min-width: 0; border: 1px solid var(--gray-200); border-radius: 14px; overflow: hidden; background: white; }
.image-preview-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.image-preview-item span { display: block; padding: 7px 9px; color: var(--gray-500); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; }
.image-preview-remove {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #dc2626;
  color: white;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgb(0 0 0 / .22);
}
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 12px 0 20px; }
.check-grid label { margin: 0; display: flex; align-items: center; gap: 8px; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 12px; padding: 10px; }
.check-grid input { width: auto; margin: 0; }
.rating-form { display: grid; gap: 10px; }
.rating-form select, .rating-form textarea, .notification-form select, .notification-form input {
  width: 100%; border: 1px solid #d1d5db; border-radius: 12px; padding: 11px 12px; font-family: inherit; background: white;
}
.review { border-top: 1px solid var(--gray-200); padding-top: 12px; margin-top: 12px; }
.review strong { color: #eab308; }
.review span { color: var(--gray-500); margin-inline-start: 10px; font-size: 13px; }
.avatar { width: 64px; height: 64px; border-radius: 999px; background: #d1fae5; color: var(--emerald-dark); display: grid; place-content: center; font-weight: 900; font-size: 24px; }
.visitor-row { grid-template-columns: 80px 1fr; }
.notification-form { display: grid; grid-template-columns: 120px 1fr 2fr auto; gap: 8px; margin-top: 12px; align-items: center; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(135deg, #ecfdf5, white, #f9fafb); }
.login-card { width: min(430px, 100%); background: white; padding: 34px; border-radius: 26px; box-shadow: 0 24px 60px rgb(15 23 42 / .18); }
.login-card h1, .login-card p { text-align: center; }
.shield { width: 68px; height: 68px; border-radius: 18px; display: grid; place-content: center; margin: auto; background: var(--emerald); color: white; font-size: 30px; }

.admin-body { background: var(--gray-100); }
.admin-header { background: var(--gray-900); color: white; }
.admin-top { min-height: 74px; display: flex; align-items: center; justify-content: space-between; }
.admin-top small { display: block; color: #9ca3af; }
.admin-actions { display: flex; align-items: center; gap: 16px; }
.admin-actions button { background: #dc2626; color: white; border: 0; border-radius: 10px; padding: 9px 14px; font-family: inherit; cursor: pointer; }
.admin-tabs { background: white; border-bottom: 1px solid var(--gray-200); }
.admin-tabs .container { display: flex; gap: 4px; overflow-x: auto; }
.admin-tabs a { padding: 16px; border-bottom: 3px solid transparent; color: var(--gray-500); white-space: nowrap; }
.admin-tabs a.active { color: var(--emerald-dark); border-color: var(--emerald); }
.admin-tabs b { background: var(--gray-100); border-radius: 999px; padding: 0 8px; margin-inline-start: 4px; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.admin-stats div { padding: 22px; }
.admin-stats b { display: block; font-size: 34px; }
.admin-stats span { color: var(--gray-500); }
.admin-list { display: grid; gap: 14px; }
.admin-vendor { display: grid; grid-template-columns: 90px 1fr; gap: 18px; padding: 16px; }
.admin-vendor img { width: 90px; height: 90px; object-fit: cover; border-radius: 14px; }
.admin-vendor h3, .admin-vendor p { margin: 0 0 6px; }
.admin-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.admin-buttons form { margin: 0; }

@media (max-width: 900px) {
  .nav-wrap { flex-wrap: wrap; padding-block: 12px; }
  .nav-search { order: 3; max-width: none; flex-basis: 100%; }
  .nav-links { overflow-x: auto; width: 100%; }
  .category-grid, .vendor-grid { grid-template-columns: repeat(2, 1fr); }
  .city-grid { grid-template-columns: repeat(3, 1fr); }
  .profile-grid, .footer-grid { grid-template-columns: 1fr; }
  .contact-panel { position: static; }
  .filter-row, .admin-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .stats-grid, .category-grid, .vendor-grid, .city-grid, .two, .info-grid, .filter-row, .admin-stats { grid-template-columns: 1fr; }
  .hero-search, .actions, .section-head, .results-head { flex-direction: column; align-items: stretch; }
  .hero { min-height: 560px; }
  .hero-content { padding-block: 54px; }
  .admin-vendor { grid-template-columns: 1fr; }
  .notification-form, .visitor-row { grid-template-columns: 1fr; }
  .check-grid, .image-preview-grid { grid-template-columns: 1fr; }
}
