/* FAYOUMY — mobile-first RTL design system
   Primary: petroleum teal. Accents: orange + golden yellow. Surface: light cream. */

:root {
  --teal-900: #062f37;
  --teal-800: #0a414b;
  --teal: #0d5563;
  --teal-600: #136a7a;
  --teal-100: #dcecee;
  --teal-50: #eef6f6;
  --orange: #ee7d22;
  --orange-600: #d4680f;
  --orange-100: #fde9d6;
  --gold: #f4b324;
  --gold-100: #fdf1cf;
  --cream: #fbf6ec;
  --cream-200: #f3ead8;
  --surface: #ffffff;
  --ink: #17282c;
  --muted: #5d7176;
  --line: #e7dfcf;
  --danger: #c0392b;
  --danger-100: #fbe3e0;
  --success: #1e8a5a;
  --success-100: #dcf3e8;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 10px rgba(6, 47, 55, .07);
  --shadow-lg: 0 8px 28px rgba(6, 47, 55, .12);
  --font: "Cairo", "Tajawal", "Segoe UI", Tahoma, sans-serif;
  --bottom-nav: 66px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  padding-bottom: calc(var(--bottom-nav) + env(safe-area-inset-bottom));
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-600); }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .5rem; color: var(--teal-900); }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: middle; }

/* ---------------------------------------------------------------- header */
.site-header {
  background: #fff;
  color: var(--teal-900);
  border-bottom: 1px solid var(--line);
  padding: 8px 0 12px;
  position: sticky; top: 0; z-index: 40;
  box-shadow: var(--shadow);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.location-picker { display: flex; align-items: center; gap: 4px; color: var(--teal); font-size: .85rem; min-width: 0; }
.location-picker select {
  appearance: none; background: transparent; border: 0; color: var(--teal-900); font: inherit; font-weight: 700;
  padding: 4px 2px 4px 18px; max-width: 150px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ee7d22' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left center;
}
.location-picker select option { color: var(--ink); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--teal-900); font-weight: 800; font-size: 1.45rem; letter-spacing: -.5px; }
.brand:hover { color: var(--teal-900); }
.brand img { height: 46px; width: auto; }
.brand .brand-text { line-height: 1; }
.brand .brand-text b { color: var(--gold); }
.header-action { color: var(--teal); display: inline-flex; padding: 6px; border-radius: 50%; }
.header-action:hover { color: var(--orange); background: var(--teal-50); }
.desktop-nav { display: none; }

.search-form { margin-top: 10px; position: relative; }
.search-form input[type="search"] {
  width: 100%; border: 1.5px solid var(--line); border-radius: 999px; padding: 12px 18px 12px 54px;
  font: inherit; font-size: 1rem; color: var(--ink); background: #f6f4ef;
}
.search-form button {
  position: absolute; left: 5px; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: var(--orange); color: #fff; display: grid; place-items: center; cursor: pointer;
}
.search-form button:hover { background: var(--orange-600); }
.search-hints { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; padding-bottom: 2px; scrollbar-width: none; }
.search-hints::-webkit-scrollbar { display: none; }
.search-hints a {
  flex: none; font-size: .8rem; color: var(--teal); background: var(--teal-50);
  padding: 3px 12px; border-radius: 999px; border: 1px solid var(--teal-100);
}
.search-hints a:hover { background: var(--teal-100); color: var(--teal-800); }

/* ---------------------------------------------------------------- bottom nav */
.bottom-nav {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 50;
  background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--bottom-nav) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 16px rgba(6,47,55,.06);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: .75rem; font-weight: 600;
}
.bottom-nav a .icon { width: 24px; height: 24px; }
.bottom-nav a.active { color: var(--teal); }
.bottom-nav a.active .icon { color: var(--orange); }

/* ---------------------------------------------------------------- sections */
main { padding: 16px 0 28px; }
.section { margin-top: 22px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.section-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.section-head h2::before { content: ""; width: 6px; height: 20px; border-radius: 3px; background: var(--orange); }
.section-head a { font-size: .85rem; font-weight: 700; }

/* ---------------------------------------------------------------- banner */
.promo-banner {
  position: relative; border-radius: var(--radius); overflow: hidden; min-height: 168px;
  background: linear-gradient(120deg, rgba(6,47,55,.92) 10%, rgba(13,85,99,.65) 60%, rgba(238,125,34,.45)),
              var(--banner-image, linear-gradient(135deg, #0d5563, #136a7a));
  background-size: cover; background-position: center;
  color: #fff; padding: 48px 20px 22px; display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: var(--shadow-lg);
}
.promo-banner h1 { color: #fff; font-size: 1.35rem; margin-bottom: 4px; }
.promo-banner p { margin: 0 0 12px; color: var(--gold-100); }
.promo-banner .btn { align-self: flex-start; }
.promo-banner .banner-tag { position: absolute; top: 14px; inset-inline-start: 16px; background: var(--gold); color: var(--teal-900); font-weight: 800; font-size: .75rem; padding: 2px 10px; border-radius: 999px; }

/* ---------------------------------------------------------------- category grid */
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 8px; }
.category-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; color: var(--ink); font-size: .78rem; font-weight: 700; line-height: 1.3; position: relative; }
.category-tile .tile-icon {
  width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  background: var(--tile-bg, var(--teal-50)); color: var(--tile-fg, var(--teal));
  border: 2px solid #fff; box-shadow: var(--shadow); transition: transform .15s;
}
.category-tile .tile-icon .icon { width: 30px; height: 30px; }
.category-tile:hover .tile-icon { transform: translateY(-2px); }
.category-tile.is-soon { opacity: .6; }
.category-tile .soon { position: absolute; top: -4px; inset-inline-end: 2px; background: var(--gold); color: var(--teal-900); font-size: .62rem; padding: 0 6px; border-radius: 999px; }

/* ---------------------------------------------------------------- provider cards */
.card-row { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
.card-row > * { scroll-snap-align: start; }
.card-list { display: grid; gap: 12px; }
.provider-card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column; border: 1px solid var(--line); position: relative;
}
.provider-card .cover { aspect-ratio: 16/7; background: linear-gradient(135deg, var(--teal-100), var(--cream-200)); position: relative; }
.provider-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.provider-card .logo {
  position: absolute; bottom: -22px; inset-inline-start: 14px; width: 52px; height: 52px; border-radius: 14px;
  background: #fff; border: 2px solid #fff; box-shadow: var(--shadow); display: grid; place-items: center; overflow: hidden; color: var(--teal);
}
.provider-card .logo img { width: 100%; height: 100%; object-fit: cover; }
.provider-card .logo .icon { width: 26px; height: 26px; }
.provider-card .body { padding: 28px 14px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.provider-card h3 { margin: 0; font-size: 1rem; }
.provider-card h3 a { color: var(--teal-900); }
.provider-card .meta { font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.provider-card .actions { display: flex; gap: 8px; padding: 0 14px 14px; }
.provider-card.compact { flex-direction: row; align-items: center; padding: 12px; gap: 12px; }
.provider-card.compact .logo { position: static; flex: none; }
.provider-card.compact .body { padding: 0; }
.provider-card.compact .actions { padding: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { font-size: .72rem; font-weight: 700; padding: 1px 9px; border-radius: 999px; background: var(--teal-50); color: var(--teal); border: 1px solid var(--teal-100); white-space: nowrap; }
.chip.mode-buy { background: var(--orange-100); color: var(--orange-600); border-color: #f9d3b0; }
.chip.mode-book { background: var(--gold-100); color: #8a6100; border-color: #f6df9f; }
.chip.mode-request { background: var(--teal-50); color: var(--teal); }
.chip.mode-contact { background: #f1f1ef; color: var(--muted); border-color: #e3e3de; }
.chip.demo { background: #ffe7e3; color: #a3341f; border-color: #f7c6bd; }
.badge-verified { display: inline-flex; align-items: center; gap: 3px; color: var(--success); font-size: .75rem; font-weight: 800; }
.badge-verified .icon { width: 16px; height: 16px; }
.badge-unverified { color: var(--muted); font-size: .75rem; }
.open-now { color: var(--success); font-weight: 700; }
.closed-now { color: var(--danger); font-weight: 700; }

/* ---------------------------------------------------------------- buttons & forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 700; font-size: .9rem; border-radius: 999px; padding: 8px 18px;
  border: 1.5px solid transparent; cursor: pointer; background: var(--teal); color: #fff; text-align: center;
  transition: background .15s;
}
.btn:hover { background: var(--teal-600); color: #fff; }
.btn-accent { background: var(--orange); }
.btn-accent:hover { background: var(--orange-600); }
.btn-gold { background: var(--gold); color: var(--teal-900); }
.btn-gold:hover { background: #e6a611; color: var(--teal-900); }
.btn-outline { background: transparent; color: var(--teal); border-color: var(--teal-100); }
.btn-outline:hover { background: var(--teal-50); color: var(--teal); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #a12f23; }
.btn-sm { padding: 4px 12px; font-size: .8rem; }
.btn-block { width: 100%; }
.btn-whatsapp { background: #1fa855; }
.btn-whatsapp:hover { background: #178a45; }

.form-grid { display: grid; gap: 14px; }
.field label, .field .label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 4px; color: var(--teal-900); }
.field .hint { font-size: .78rem; color: var(--muted); margin-top: 3px; }
.input, select.input, textarea.input {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px 12px; min-height: 42px;
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { border-color: var(--teal-600); outline: none; box-shadow: 0 0 0 3px var(--teal-100); }
.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--teal); }
.error { color: var(--danger); font-size: .8rem; margin-top: 3px; }
.input.is-invalid { border-color: var(--danger); }

.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: .9rem; border: 1px solid; }
.alert-success { background: var(--success-100); border-color: #bfe6d2; color: #145c3c; }
.alert-danger { background: var(--danger-100); border-color: #f3c3bd; color: #8a271c; }
.alert-info { background: var(--teal-50); border-color: var(--teal-100); color: var(--teal-800); }
.alert-warning { background: var(--gold-100); border-color: #f2dc9c; color: #6f4e00; }
.alert ul { margin: 0; padding-inline-start: 18px; }

.panel { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 16px; }
.panel + .panel { margin-top: 14px; }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.panel-title h2, .panel-title h3 { margin: 0; }

.empty-state { text-align: center; padding: 30px 16px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-state .icon { width: 42px; height: 42px; color: var(--teal-100); margin: 0 auto 8px; display: block; }

/* ---------------------------------------------------------------- search page */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: .85rem; font-weight: 700; }
.tabs a.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.tabs a .count { font-size: .72rem; opacity: .75; margin-inline-start: 4px; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.filters .checks { grid-column: 1 / -1; display: flex; gap: 14px; flex-wrap: wrap; }
.result-note { font-size: .85rem; color: var(--muted); margin: 8px 0 12px; }

/* ---------------------------------------------------------------- provider profile */
.profile-hero { border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); }
.profile-hero .cover { aspect-ratio: 16/6; background: linear-gradient(135deg, var(--teal), var(--teal-600) 60%, var(--orange)); }
.profile-hero .cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-hero .head { padding: 0 16px 16px; display: flex; gap: 14px; align-items: flex-end; margin-top: -36px; }
.profile-hero .logo { width: 84px; height: 84px; border-radius: 20px; background: #fff; border: 3px solid #fff; box-shadow: var(--shadow); overflow: hidden; display: grid; place-items: center; color: var(--teal); flex: none; }
.profile-hero .logo img { width: 100%; height: 100%; object-fit: cover; }
.profile-hero .logo .icon { width: 40px; height: 40px; }
.profile-hero h1 { margin: 0; }
.profile-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; padding: 0 16px 16px; }
.trust-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.trust-list li { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.trust-list .ok { color: var(--success); }
.trust-list .no { color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: .92rem; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; }
.hours-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.hours-table td { padding: 5px 0; border-bottom: 1px dashed var(--line); }
.hours-table tr.today td { font-weight: 800; color: var(--teal); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery img { aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); width: 100%; }
.map-frame { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: var(--radius-sm); }
.preview-banner { background: var(--gold); color: var(--teal-900); padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 700; margin-bottom: 12px; }
.notice-medical { font-size: .82rem; color: var(--muted); border-inline-start: 3px solid var(--gold); padding-inline-start: 10px; }
.breadcrumb { font-size: .82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb span::after { content: "‹"; margin-inline-start: 4px; }
.breadcrumb span:last-child::after { content: ""; }

.subcat-list { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.subcat-list a { padding: 4px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .82rem; font-weight: 700; color: var(--ink); }
.subcat-list a.active { background: var(--orange); color: #fff; border-color: var(--orange); }

/* ---------------------------------------------------------------- pagination */
.pagination { display: flex; justify-content: center; gap: 6px; margin: 18px 0 4px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 38px; height: 38px; display: grid; place-items: center; padding: 0 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: .85rem; color: var(--ink); }
.pagination .current { background: var(--teal); color: #fff; border-color: var(--teal); }
.pagination .disabled { opacity: .45; }

.site-footer { padding: 18px 0 8px; text-align: center; color: var(--muted); font-size: .8rem; }
.auth-card { max-width: 420px; margin: 10px auto; }

/* ---------------------------------------------------------------- desktop */
@media (min-width: 640px) {
  .category-grid { grid-template-columns: repeat(7, 1fr); }
  .card-row { grid-auto-columns: 46%; }
  .card-list.grid { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 992px) {
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
  .desktop-nav { display: flex; gap: 18px; align-items: center; }
  .desktop-nav a { color: var(--teal-800); font-weight: 700; font-size: .9rem; }
  .desktop-nav a:hover { color: var(--orange); }
  .search-form { max-width: 720px; margin-inline: auto; }
  .search-hints { justify-content: center; }
  .card-row { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; }
  .card-list.grid { grid-template-columns: repeat(3, 1fr); }
  .promo-banner { min-height: 230px; padding: 34px; }
  .promo-banner h1 { font-size: 1.9rem; }
  .profile-layout { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
}

/* ================================================================ ADMIN */
.admin-body { padding-bottom: 0; background: #f4f1ea; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 250px; flex: none; background: var(--teal-900); color: #cfe3e5; padding: 16px 12px;
  position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 60; overflow-y: auto;
  transform: translateX(100%); transition: transform .2s;
}
.admin-sidebar.open { transform: none; }
.admin-sidebar .brand { margin-bottom: 18px; padding-inline: 8px; }
.admin-sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: #cfe3e5; font-weight: 600; font-size: .9rem; }
.admin-sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-sidebar nav a.active { background: var(--teal); color: #fff; }
.admin-sidebar nav a.active .icon { color: var(--gold); }
.admin-sidebar .nav-group { font-size: .72rem; color: #7fa3a8; margin: 14px 10px 4px; font-weight: 700; }
.admin-main { flex: 1; min-width: 0; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--line); padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 30; }
.admin-topbar h1 { margin: 0; font-size: 1.1rem; }
.admin-content { padding: 16px; }
.menu-toggle { background: none; border: 0; padding: 6px; cursor: pointer; color: var(--teal); }
@media (min-width: 992px) {
  .admin-sidebar { position: sticky; top: 0; height: 100vh; transform: none; }
  .menu-toggle { display: none; }
  .admin-content { padding: 22px 26px; }
}

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 14px; }
.stat .num { font-size: 1.6rem; font-weight: 800; color: var(--teal-900); line-height: 1.2; }
.stat .lbl { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat.accent { border-top: 4px solid var(--orange); }
.stat.gold { border-top: 4px solid var(--gold); }
.stat.teal { border-top: 4px solid var(--teal); }
@media (min-width: 768px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }

.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
table.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { padding: 10px 12px; text-align: start; border-bottom: 1px solid #f0ebe0; vertical-align: middle; }
.table th { background: #faf7f0; font-size: .78rem; color: var(--muted); font-weight: 800; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fcfaf5; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.toolbar form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar .input { min-height: 38px; padding: 6px 10px; width: auto; }
.status { font-size: .72rem; font-weight: 800; padding: 2px 9px; border-radius: 999px; white-space: nowrap; display: inline-block; }
.status-draft, .status-not_requested, .status-unverified, .status-pending { background: #eeeeea; color: #5b5b52; }
.status-pending_review, .status-requested { background: var(--gold-100); color: #7a5600; }
.status-published, .status-owner_approved, .status-verified, .status-accepted, .status-completed, .status-approved { background: var(--success-100); color: #145c3c; }
.status-public_source_only { background: var(--teal-50); color: var(--teal); }
.status-suspended, .status-owner_refused, .status-withdrawn, .status-rejected, .status-failed, .status-refused, .status-expired { background: var(--danger-100); color: #8a271c; }
.status-archived, .status-completed_with_errors { background: #f0e6dc; color: #7a4a1e; }
.grid-2 { display: grid; gap: 14px; }
.grid-3 { display: grid; gap: 14px; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .span-2 { grid-column: span 2; }
}
.repeat-row { display: grid; grid-template-columns: 130px 1fr 110px auto auto; gap: 6px; align-items: center; margin-bottom: 6px; }
@media (max-width: 640px) { .repeat-row { grid-template-columns: 1fr 1fr; } }
.tree { list-style: none; margin: 0; padding: 0; }
.tree li { padding: 8px 0; border-bottom: 1px solid #f0ebe0; }
.tree .children { padding-inline-start: 20px; margin-top: 6px; font-size: .9rem; }
.inline-form { display: inline; }
details.box { background: #faf7f0; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 8px; }
details.box summary { cursor: pointer; font-weight: 700; }
.hours-grid { display: grid; grid-template-columns: 90px 1fr 1fr auto auto; gap: 6px; align-items: center; font-size: .88rem; }
@media (max-width: 640px) { .hours-grid { grid-template-columns: 70px 1fr 1fr; } }
.diff { font-size: .78rem; color: var(--muted); max-width: 520px; word-break: break-word; }

/* ================================================================ MARKETPLACE */
.badge-wrap { position: relative; }
.dot-badge { position: absolute; top: 0; inset-inline-end: -2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--orange); color: #fff; font-size: .68rem; font-weight: 800; display: grid; place-items: center; line-height: 1; }
.bottom-nav { grid-template-columns: repeat(5, 1fr); }
.price { font-weight: 800; color: var(--teal-900); white-space: nowrap; }
.price-old { text-decoration: line-through; color: var(--muted); font-size: .8rem; margin-inline-start: 4px; }
.prototype-note { font-size: .78rem; color: #7a5600; background: var(--gold-100); border: 1px dashed #e8c96b; border-radius: 8px; padding: 4px 10px; display: inline-block; }

.menu-section { margin-top: 16px; }
.menu-section h3 { position: sticky; top: 0; background: var(--cream); padding: 6px 0; z-index: 2; }
.menu-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; position: sticky; top: 0; background: var(--cream); z-index: 5; }
.menu-tabs::-webkit-scrollbar { display: none; }
.menu-tabs a { flex: none; padding: 5px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .85rem; font-weight: 700; color: var(--ink); }
.product-row { display: grid; grid-template-columns: 1fr 88px; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin-bottom: 8px; }
.product-row img, .product-row .ph { width: 88px; height: 88px; border-radius: 12px; object-fit: cover; background: var(--teal-50); display: grid; place-items: center; color: var(--teal); }
.product-row h4 { margin: 0 0 2px; font-size: .95rem; }
.product-row h4 a { color: var(--ink); }
.product-row .desc { font-size: .8rem; color: var(--muted); margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-row .buy { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.product-row.unavailable { opacity: .55; }
.add-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--orange); color: #fff; font-size: 1.3rem; font-weight: 800; cursor: pointer; display: grid; place-items: center; line-height: 1; }
.add-btn:hover { background: var(--orange-600); }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.qty button { width: 34px; height: 34px; border: 0; background: transparent; font-size: 1.1rem; font-weight: 800; cursor: pointer; color: var(--teal); }
.qty span, .qty input { min-width: 30px; width: 40px; text-align: center; font-weight: 800; border: 0; font: inherit; }
.cart-bar { position: fixed; inset-inline: 12px; bottom: calc(var(--bottom-nav) + 10px + env(safe-area-inset-bottom)); z-index: 45; background: var(--teal); color: #fff; border-radius: 16px; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow-lg); font-weight: 800; }
.cart-bar:hover { color: #fff; background: var(--teal-600); }
@media (min-width: 992px) { .cart-bar { bottom: 20px; max-width: 420px; inset-inline-start: auto; } }
.summary-table { width: 100%; font-size: .92rem; border-collapse: collapse; }
.summary-table td { padding: 6px 0; }
.summary-table td:last-child { text-align: end; font-weight: 700; }
.summary-table tr.total td { border-top: 1.5px dashed var(--line); font-size: 1.05rem; font-weight: 800; color: var(--teal-900); padding-top: 10px; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: #fff; cursor: pointer; margin-bottom: 8px; }
.radio-card:has(input:checked) { border-color: var(--teal); background: var(--teal-50); }
.radio-card input { margin-top: 4px; accent-color: var(--teal); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 28px 16px 0; font-size: .9rem; color: var(--muted); }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); background: #fff; }
.timeline li::after { content: ""; position: absolute; inset-inline-start: 6px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.done { color: var(--teal-900); font-weight: 700; }
.timeline li.done::before { background: var(--teal); border-color: var(--teal); }
.timeline li.current::before { background: var(--orange); border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-100); }
.stars { color: var(--gold); letter-spacing: 1px; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.star-input input { display: none; }
.star-input label { font-size: 1.6rem; color: #d9d3c4; cursor: pointer; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--gold); }
.offer-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.offer-card .img { aspect-ratio: 16/8; background: linear-gradient(120deg, var(--orange), var(--gold)); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.3rem; position: relative; }
.offer-card .img img { width: 100%; height: 100%; object-fit: cover; }
.offer-card .badge { position: absolute; top: 10px; inset-inline-start: 10px; background: var(--teal); color: #fff; font-size: .75rem; padding: 2px 10px; border-radius: 999px; }
.offer-card .body { padding: 10px 12px; }
.money { font-variant-numeric: tabular-nums; }
.kpi-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 768px) { .kpi-row { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.kpi .v { font-weight: 800; font-size: 1.15rem; color: var(--teal-900); }
.kpi .l { font-size: .75rem; color: var(--muted); }
.side-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: none; }
.side-nav a { flex: none; padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: .85rem; color: var(--ink); }
.side-nav a.active { background: var(--teal); border-color: var(--teal); color: #fff; }
