:root {
  --purple: #5a2d8a;
  --purple-dark: #35174f;
  --purple-deep: #28103d;
  --purple-soft: #f1e9f7;
  --gold: #f5a623;
  --gold-light: #ffc85a;
  --cream: #fffaf0;
  --paper: #fffdf9;
  --ink: #312a36;
  --muted: #827788;
  --line: #e9e0ec;
  --green: #45a366;
  --shadow: 0 22px 60px rgba(53, 23, 79, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Alexandria", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.skip-link { position: fixed; top: 12px; right: 12px; z-index: 100; transform: translateY(-150%); background: white; color: var(--purple); padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow); }
.skip-link:focus { transform: translateY(0); }

.site-header { height: 82px; background: rgba(255, 253, 249, 0.95); border-bottom: 1px solid var(--line); position: relative; z-index: 10; }
.nav-wrap { width: min(1120px, calc(100% - 40px)); height: 100%; margin: auto; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; color: white; background: var(--purple); border-radius: 15px 15px 15px 4px; box-shadow: 0 8px 20px rgba(90, 45, 138, 0.18); }
.brand-mark svg { width: 36px; height: 36px; stroke: none; fill: currentColor; }
.brand-mark svg path:last-child { fill: none; stroke: var(--gold-light); stroke-width: 3; }
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { color: var(--purple-dark); font: 700 22px "Reem Kufi", sans-serif; }
.brand-copy small { color: var(--muted); font-size: 9px; letter-spacing: 0.03em; }
.main-nav { align-self: stretch; display: flex; align-items: center; gap: 30px; font-size: 12px; font-weight: 600; }
.main-nav > a:not(.nav-contact) { height: 100%; display: flex; align-items: center; border-bottom: 3px solid transparent; padding-top: 3px; }
.main-nav > a:hover, .main-nav > a.active { color: var(--purple); border-bottom-color: var(--gold); }
.nav-contact { display: inline-flex; align-items: center; gap: 8px; color: white; background: var(--purple); padding: 12px 17px; border-radius: 10px; box-shadow: 0 8px 20px rgba(90, 45, 138, 0.14); transition: transform 0.2s ease, background 0.2s ease; }
.nav-contact:hover { background: var(--purple-dark); transform: translateY(-2px); }
.nav-contact svg { width: 16px; height: 16px; }

.prices-hero { background: var(--purple-dark); color: white; position: relative; overflow: hidden; }
.prices-hero::before { content: ""; position: absolute; width: 470px; height: 470px; border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 50%; left: -150px; top: -225px; box-shadow: 0 0 0 60px rgba(255, 255, 255, 0.018), 0 0 0 130px rgba(255, 255, 255, 0.012); }
.hero-pattern { position: absolute; inset: 0; opacity: 0.22; background-image: linear-gradient(30deg, transparent 48%, rgba(255,255,255,.08) 49%, rgba(255,255,255,.08) 51%, transparent 52%); background-size: 36px 62px; mask-image: linear-gradient(to left, black, transparent 62%); }
.prices-hero-inner { width: min(1120px, calc(100% - 40px)); min-height: 350px; margin: auto; display: flex; align-items: center; justify-content: space-between; position: relative; }
.hero-copy { padding: 52px 0 58px; animation: rise 0.65s ease both; }
.back-link { width: fit-content; margin-bottom: 34px; color: #c8b5d5; display: flex; align-items: center; gap: 8px; font-size: 11px; transition: color .2s ease, transform .2s ease; }
.back-link:hover { color: white; transform: translateX(4px); }
.back-link svg { width: 18px; height: 18px; }
.eyebrow { display: block; color: var(--gold-light); font-size: 10px; font-weight: 700; letter-spacing: 0.04em; }
.prices-hero h1 { font: 700 clamp(42px, 6vw, 68px) "Reem Kufi", sans-serif; margin: 7px 0 10px; line-height: 1.15; }
.prices-hero p { color: #d3c4dc; max-width: 520px; margin: 0; line-height: 1.9; font-size: 14px; }
.live-source { margin-top: 24px; display: flex; align-items: center; gap: 9px; color: #af9cbb; font-size: 10px; }
.live-source span { width: 8px; height: 8px; border-radius: 50%; background: #6cd68c; box-shadow: 0 0 0 4px rgba(108, 214, 140, .12); animation: breathe 1.8s infinite; }
.hero-stamp { width: 148px; height: 148px; margin-left: 52px; display: grid; place-content: center; justify-items: center; color: var(--purple-dark); background: var(--gold); border: 7px solid rgba(255,255,255,.12); outline: 1px dashed rgba(53,23,79,.35); outline-offset: -13px; border-radius: 50%; transform: rotate(-5deg); box-shadow: 0 26px 60px rgba(23, 5, 37, .3); animation: stamp 0.7s 0.15s cubic-bezier(.2,.8,.2,1.2) both; }
.hero-stamp span, .hero-stamp small { font-size: 10px; font-weight: 700; }
.hero-stamp strong { font: 700 52px/0.95 "Reem Kufi", sans-serif; min-width: 70px; text-align: center; }

.prices-content { width: min(1120px, calc(100% - 40px)); margin: 0 auto 100px; position: relative; }
.search-panel { position: relative; z-index: 2; margin-top: -38px; padding: 20px 24px; display: grid; grid-template-columns: 230px 1fr; align-items: center; gap: 20px; background: white; border: 1px solid rgba(90,45,138,.08); border-radius: 17px; box-shadow: var(--shadow); animation: rise .6s .15s ease both; }
.search-panel label { display: block; color: var(--purple-dark); font-size: 13px; font-weight: 700; }
.search-panel > div > small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.search-field { height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 15px; background: #faf7fb; border: 1px solid var(--line); border-radius: 11px; transition: border-color .2s, box-shadow .2s, background .2s; }
.search-field:focus-within { background: white; border-color: var(--purple); box-shadow: 0 0 0 4px var(--purple-soft); }
.search-field > svg { width: 21px; color: var(--purple); }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.search-field input::placeholder { color: #a69daa; }
.search-field input:disabled { cursor: wait; }
.search-field button { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--muted); background: var(--line); }
.search-field button:hover { color: white; background: var(--purple); }
.search-field button svg { width: 15px; }

.status-message { min-height: 64px; margin: 26px 0 0; padding: 15px 18px; display: flex; align-items: center; gap: 15px; color: var(--purple-dark); background: var(--purple-soft); border: 1px solid #e5d7ef; border-radius: 14px; }
.status-message[hidden] { display: none; }
.status-message strong, .status-message small { display: block; }
.status-message strong { font-size: 11px; }
.status-message small { color: var(--muted); margin-top: 4px; font-size: 9px; }
.status-pulse { width: 20px; height: 20px; border: 3px solid rgba(90,45,138,.18); border-top-color: var(--purple); border-radius: 50%; animation: spin .8s linear infinite; }

.region-tabs { margin-top: 38px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: stretch; gap: 8px; }
.region-tabs[hidden] { display: none; }
.region-tabs button { min-height: 68px; padding: 11px 14px; display: grid; place-content: center; gap: 4px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 13px; transition: color .2s, background .2s, border-color .2s, transform .2s; }
.region-tabs button:hover { color: var(--purple); background: var(--purple-soft); transform: translateY(-2px); }
.region-tabs button.active { color: white; background: var(--purple); border-color: var(--purple); box-shadow: 0 10px 26px rgba(90,45,138,.2); }
.region-tabs button span { font-size: 11px; font-weight: 700; white-space: nowrap; }
.region-tabs button small { color: inherit; opacity: .7; font-size: 8px; }

.table-card { margin-top: 38px; background: white; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.region-tabs + .table-card { margin-top: 12px; }
.table-heading { min-height: 91px; padding: 20px 30px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.table-heading > div > span { color: var(--gold); font-size: 9px; font-weight: 700; }
.table-heading h2 { color: var(--purple-dark); font: 700 24px "Reem Kufi", sans-serif; margin: 3px 0 0; }
.result-count { min-width: 75px; padding: 8px 12px; text-align: center; color: var(--purple); background: var(--purple-soft); border-radius: 30px; font-size: 10px; font-weight: 700; }
table { width: 100%; border-collapse: collapse; text-align: right; }
.desktop-table th { padding: 14px 30px; color: var(--muted); background: #f8f4f9; font-size: 10px; font-weight: 600; }
.desktop-table td { padding: 18px 30px; color: #625969; border-top: 1px solid #f1ebf3; font-size: 12px; }
.desktop-table tbody tr { transition: background .16s; }
.desktop-table tbody tr:hover { background: #fffbf4; }
.desktop-table td strong { color: var(--purple-dark); font-size: 13px; }
.price-value { color: var(--purple); font-size: 16px; font-weight: 800; white-space: nowrap; }
.price-value small { font-size: 8px; }
.daily-dot { display: inline-block; width: 7px; height: 7px; margin-left: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 3px #e4f3e8; }
.region-label { display: inline-block; padding: 6px 9px; color: var(--purple); background: var(--purple-soft); border-radius: 20px; font-size: 9px; white-space: nowrap; }
.mobile-prices { display: none; }

.loading-skeleton { padding: 17px 30px 28px; display: grid; gap: 13px; }
.loading-skeleton div { height: 38px; border-radius: 8px; background: linear-gradient(90deg, #f4eff6 25%, #fbf9fc 45%, #f4eff6 65%); background-size: 240% 100%; animation: shimmer 1.3s infinite; }
.empty-state, .error-state { min-height: 330px; padding: 48px 20px; display: grid; place-content: center; justify-items: center; text-align: center; }
.empty-state[hidden], .error-state[hidden] { display: none; }
.empty-state svg { width: 58px; color: #bcaac8; }
.empty-state h3, .error-state h3 { margin: 20px 0 7px; color: var(--purple-dark); font: 700 20px "Reem Kufi", sans-serif; }
.empty-state p, .error-state p { max-width: 390px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.empty-state button, .error-state button { margin-top: 18px; padding: 10px 16px; color: white; background: var(--purple); border: 0; border-radius: 9px; font-size: 10px; font-weight: 700; }
.error-icon { width: 52px; height: 52px; display: grid; place-items: center; color: #a24646; background: #faeaea; border: 1px solid #efc8c8; border-radius: 50%; font: 700 24px "Reem Kufi", sans-serif; }

.prices-bottom { margin-top: 22px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 18px; }
.price-note { padding: 29px; color: white; background: var(--purple); border-radius: 18px; position: relative; overflow: hidden; }
.price-note::after { content: "د.ل"; position: absolute; left: -12px; bottom: -34px; font: 700 96px "Reem Kufi", sans-serif; opacity: .07; }
.price-note > span { color: var(--gold-light); font-size: 9px; font-weight: 700; }
.price-note h2 { margin: 8px 0 15px; font: 700 21px "Reem Kufi", sans-serif; }
.price-note p { max-width: 470px; margin: 0; color: #dfd3e7; font-size: 11px; line-height: 1.9; }
.freshness-card { padding: 23px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; background: #f3ead7; border: 1px solid #eadcc1; border-radius: 18px; }
.freshness-icon { width: 55px; height: 55px; display: grid; place-items: center; color: var(--purple); background: var(--cream); border-radius: 14px; box-shadow: 0 7px 18px rgba(53,23,79,.08); }
.freshness-icon svg { width: 27px; }
.freshness-card > div > span { color: var(--purple); font-size: 9px; font-weight: 700; }
.freshness-card h3 { margin: 4px 0; color: var(--purple-dark); font: 700 17px "Reem Kufi", sans-serif; }
.freshness-card p { margin: 0; color: var(--muted); font-size: 9px; }
.freshness-card button { padding: 10px 13px; display: inline-flex; align-items: center; gap: 7px; color: white; background: var(--purple); border: 0; border-radius: 9px; font-size: 9px; font-weight: 700; }
.freshness-card button:hover:not(:disabled) { background: var(--purple-dark); }
.freshness-card button:disabled { cursor: wait; opacity: .55; }
.freshness-card button svg { width: 15px; }
.freshness-card button.loading svg { animation: spin .8s linear infinite; }

.site-footer { padding: 42px max(20px, calc((100% - 1120px) / 2)) 0; color: white; background: var(--purple-deep); }
.footer-wrap { padding-bottom: 36px; display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.site-footer .brand-copy strong { color: white; }
.site-footer .brand-copy small, .footer-wrap p { color: #bca9c9; }
.footer-wrap p { max-width: 390px; margin: 0; font-size: 10px; line-height: 1.8; }
.footer-bottom { min-height: 59px; display: flex; align-items: center; justify-content: space-between; color: #9f8bae; border-top: 1px solid rgba(255,255,255,.1); font-size: 9px; }
.footer-bottom a { color: var(--gold-light); }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes stamp { from { opacity: 0; transform: scale(.65) rotate(-13deg); } to { opacity: 1; transform: scale(1) rotate(-5deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { opacity: .45; transform: scale(.8); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

@media (max-width: 760px) {
  .site-header { height: 72px; }
  .nav-wrap { width: calc(100% - 28px); }
  .brand-mark { width: 40px; height: 40px; }
  .brand-mark svg { width: 30px; height: 30px; }
  .brand-copy strong { font-size: 19px; }
  .brand-copy small { display: none; }
  .main-nav { gap: 12px; }
  .main-nav > a:not(.nav-contact) { font-size: 10px; }
  .main-nav > a:first-child { display: none; }
  .nav-contact { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 12px; font-size: 0; }
  .prices-hero-inner { width: calc(100% - 28px); min-height: 300px; }
  .hero-copy { padding: 41px 0 55px; }
  .back-link { margin-bottom: 26px; }
  .prices-hero h1 { font-size: 42px; }
  .prices-hero p { max-width: 225px; font-size: 11px; }
  .live-source { max-width: 210px; line-height: 1.6; }
  .hero-stamp { width: 103px; height: 103px; position: absolute; left: -2px; top: 93px; margin: 0; border-width: 5px; outline-offset: -10px; }
  .hero-stamp strong { min-width: 53px; font-size: 38px; }
  .hero-stamp span, .hero-stamp small { font-size: 7px; }
  .prices-content { width: calc(100% - 28px); margin-bottom: 70px; }
  .search-panel { grid-template-columns: 1fr; gap: 12px; margin-top: -31px; padding: 17px; }
  .search-panel > div > small { display: none; }
  .status-message { margin-top: 17px; }
  .region-tabs { margin: 28px -14px 0; padding: 0 14px 8px; display: flex; overflow-x: auto; scrollbar-width: none; }
  .region-tabs::-webkit-scrollbar { display: none; }
  .region-tabs button { min-width: 112px; }
  .table-card { margin-top: 25px; border-radius: 17px; }
  .region-tabs + .table-card { margin-top: 4px; }
  .table-heading { min-height: 82px; padding: 17px 18px; }
  .table-heading h2 { font-size: 19px; }
  .result-count { min-width: 64px; padding: 7px 9px; font-size: 8px; }
  .desktop-table { display: none !important; }
  .mobile-prices { padding: 11px; display: grid; gap: 9px; background: #faf7fb; }
  .mobile-prices[hidden] { display: none; }
  .mobile-prices article { padding: 15px; background: white; border: 1px solid var(--line); border-radius: 12px; }
  .mobile-price-head { padding-bottom: 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
  .mobile-price-head > div { display: grid; gap: 4px; }
  .mobile-price-head strong { color: var(--purple-dark); font-size: 12px; }
  .mobile-price-head > div small { color: var(--muted); font-size: 8px; }
  .mobile-price-head > span { color: var(--purple); font-size: 15px; font-weight: 800; }
  .mobile-price-head > span small { font-size: 7px; }
  .mobile-prices dl { margin: 12px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .mobile-prices dl div { display: grid; gap: 5px; }
  .mobile-prices dt { color: var(--muted); font-size: 8px; }
  .mobile-prices dd { margin: 0; font-size: 10px; }
  .prices-bottom { grid-template-columns: 1fr; }
  .freshness-card { grid-template-columns: auto 1fr; gap: 14px; }
  .freshness-card button { grid-column: 1 / -1; justify-content: center; }
  .footer-wrap { align-items: flex-start; flex-direction: column; gap: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  .site-header, .site-footer, .search-panel, .status-message, .region-tabs, .prices-bottom, .back-link, .live-source { display: none !important; }
  .prices-hero-inner { min-height: 150px; }
  .prices-content { width: 100%; margin: 20px 0; }
  .table-card { box-shadow: none; }
  .desktop-table { display: block !important; }
  .mobile-prices { display: none !important; }
}
