:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #0d9488;
  --accent-soft: #ccfbf1;
  --warn: #b45309;
  --warn-soft: #ffedd5;
  --ref: #6366f1;
  --ref-soft: #e0e7ff;
  --danger-soft: #fee2e2;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 14px;
  --font-ar: "IBM Plex Sans Arabic", "Tahoma", sans-serif;
  --font-en: "IBM Plex Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ar);
  line-height: 1.6;
  min-height: 100vh;
}

html[lang="en"] body,
html[dir="ltr"] body {
  font-family: var(--font-en);
}

.container {
  width: min(1200px, calc(100% - 2rem));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100px;
  background: var(--accent);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #0d9488, #0369a1);
  color: white;
  font-size: 1.1rem;
}

.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.brand-tag {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.btn:active {
  transform: scale(0.98);
}
.btn-ghost {
  background: transparent;
}
.btn-sm {
  padding: 0.3rem 0.7rem;
  font-size: 0.85rem;
}

.hero {
  padding: 2rem 0 1rem;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0;
  color: var(--muted);
  max-width: 52rem;
}

.meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.82rem;
  color: var(--muted);
  box-shadow: var(--shadow);
}

.coming-soon,
.filters-panel,
.notes-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin: 1rem 0;
  box-shadow: var(--shadow);
}

.coming-soon h2,
.filters-panel h2,
.notes-panel h2 {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
}

.coming-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}

.coming-card {
  border: 1px dashed #fdba74;
  background: linear-gradient(180deg, #fff7ed, #ffffff);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}

.coming-card .badge {
  display: inline-block;
  background: var(--warn-soft);
  color: var(--warn);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.45rem;
}

.coming-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.coming-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.coming-card a {
  color: var(--accent);
  font-size: 0.85rem;
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.filters-header h2 {
  margin: 0;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.field select,
.field input[type="text"] {
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  background: #f8fafc;
}

.field select[multiple] {
  min-height: 2.6rem;
  height: 2.6rem;
}

.checkbox-field {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1.4rem;
}

.checkbox-field input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.result-count {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
  font-size: 0.9rem;
}

.price-table th,
.price-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border);
  text-align: start;
  vertical-align: top;
}

.price-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  white-space: nowrap;
}

.price-table tbody tr:hover {
  background: #f8fafc;
}

.price-table tbody tr:last-child td {
  border-bottom: none;
}

.provider-cell {
  font-weight: 700;
}

.region-cell .name {
  display: block;
}

.pill {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
}

.pill-ksa {
  background: var(--accent-soft);
  color: #0f766e;
}

.pill-ref {
  background: var(--ref-soft);
  color: #4338ca;
}

.pill-vat {
  display: block;
  width: fit-content;
  margin-top: 0.35rem;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  max-width: 11rem;
  line-height: 1.3;
  white-space: normal;
}

.sku-cell .sku {
  font-weight: 600;
}

.sku-cell .meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.price {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.price .unit {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.72rem;
}

.unavailable {
  color: var(--muted);
  font-style: italic;
  font-weight: 500;
}

.source-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  word-break: break-word;
}
.source-link:hover {
  text-decoration: underline;
}

.updated {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin-top: 1rem;
}

.hidden {
  display: none !important;
}

.notes-panel ul {
  margin: 0;
  padding-inline-start: 1.2rem;
  color: var(--muted);
}

.disclaimer {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer {
  margin-top: 2rem;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.muted {
  color: #94a3b8;
}

@media (max-width: 720px) {
  .checkbox-field {
    padding-top: 0.4rem;
  }
  .hero {
    padding-top: 1.4rem;
  }
  .coming-soon,
  .filters-panel,
  .notes-panel {
    padding: 1rem;
  }
}
