/* OPS-115 (D-045, stage C): the card store — home tiles, section brand grid, platform page,
   group product page, search, deals. Dark by default, html.light-theme for light. Tajawal,
   pink → purple. Two clicks to anything: home → section → platform/product. */
:root {
  --azc-bg: #0b1020; --azc-card: #121a2e; --azc-card2: #1a2340; --azc-line: rgba(255,255,255,.08); --azc-text: #fff; --azc-muted: #a7b0cc;
  --azc-accent: #a855f7; --azc-grad: linear-gradient(90deg, #ec4899, #7c3aed); --azc-good: #22c55e; --azc-warn: #f59e0b;
}
html.light-theme { --azc-bg: #f5f3ff; --azc-card: #fff; --azc-card2: #faf9ff; --azc-line: #ede9fe; --azc-text: #1e1b4b; --azc-muted: #64748b; }
.azc { font-family: Tajawal, system-ui, sans-serif; color: var(--azc-text); max-width: 1180px; margin: 0 auto; padding: 14px 14px 90px; direction: rtl; }
.azc a { color: inherit; text-decoration: none; }
/* OPS-154: English pages read left to right (the store sets <html dir="ltr">). */
html[dir="ltr"] .azc, html[dir="ltr"] .azc-drawer__panel { direction: ltr; }
.azc h1 { font-size: 22px; font-weight: 800; margin: 6px 0 12px; color: var(--azc-text); }
.azc h2 { font-size: 18px; font-weight: 800; margin: 22px 0 10px; display: flex; align-items: center; justify-content: space-between; color: var(--azc-text); }
.azc h2 a { font-size: 13px; font-weight: 700; color: var(--azc-accent); }
.azc-crumbs { font-size: 12.5px; color: var(--azc-muted); margin-bottom: 4px; }
.azc-crumbs a { color: var(--azc-muted); }

/* home: section tiles */
.azc-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 768px) { .azc-tiles { grid-template-columns: repeat(4, 1fr); } }
.azc-tile { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 18px; background: var(--azc-card); border: 1px solid var(--azc-line); min-height: 104px; }
.azc-tile:hover { border-color: rgba(168,85,247,.5); }
.azc-tile__icon { font-size: 26px; line-height: 1; }
.azc-tile__title { font-weight: 800; font-size: 16px; }
.azc-tile__sub { color: var(--azc-muted); font-size: 12px; line-height: 1.5; }
.azc-tile.is-locked { opacity: .65; }
.azc-tile__soon { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(245,158,11,.18); color: #fbbf24; border: 1px solid rgba(245,158,11,.45); }

/* horizontal rails (popular, deals) */
.azc-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 46%); gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
@media (min-width: 768px) { .azc-rail { grid-auto-columns: minmax(170px, 19%); } }
.azc-rail > * { scroll-snap-align: start; }

/* product / choice cards */
.azc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 768px) { .azc-grid { grid-template-columns: repeat(4, 1fr); } }
.azc-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 16px; background: var(--azc-card); border: 1px solid var(--azc-line); }
.azc-card__top { display: flex; align-items: center; gap: 8px; }
.azc-card__logo { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; background: #fff; flex: 0 0 38px; }
.azc-card__logo--text { display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: #6d28d9; }
.azc-card__name { font-weight: 700; font-size: 13px; line-height: 1.35; color: var(--azc-muted); }
.azc-card__face { font-size: 22px; font-weight: 900; direction: ltr; text-align: right; color: var(--azc-text); }
.azc-card__price { font-size: 15px; font-weight: 800; color: var(--azc-text); }
.azc-card__price small { color: var(--azc-muted); font-weight: 600; }
.azc-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.azc-badge { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(34,197,94,.15); color: #4ade80; border: 1px solid rgba(34,197,94,.35); }
.azc-badge--best { background: var(--azc-grad); color: #fff; border: 0; }
.azc-badge--cheap { background: rgba(245,158,11,.15); color: #fbbf24; border-color: rgba(245,158,11,.4); }
html.light-theme .azc-badge { color: #15803d; }
html.light-theme .azc-badge--cheap { color: #b45309; }

/* brand grid */
.azc-brands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 768px) { .azc-brands { grid-template-columns: repeat(6, 1fr); } }
.azc-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 16px; background: var(--azc-card); border: 1px solid var(--azc-line); text-align: center; }
.azc-brand img, .azc-brand .azc-brand__text { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; background: #fff; }
.azc-brand__text { display: flex; align-items: center; justify-content: center; font-weight: 900; color: #6d28d9; font-size: 18px; }
.azc-brand__name { font-weight: 700; font-size: 13px; line-height: 1.3; }
.azc-brand__from { font-size: 11.5px; color: var(--azc-muted); }

/* filters */
.azc-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; }
.azc-chip { flex: 0 0 auto; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--azc-line); background: var(--azc-card); font-size: 13px; font-weight: 700; color: var(--azc-text); white-space: nowrap; }
.azc-chip.is-on { background: var(--azc-grad); color: #fff; border-color: transparent; }
.azc-chip small { color: inherit; opacity: .75; margin-inline-start: 4px; }
.azc-note { font-size: 12.5px; color: #fbbf24; margin: -2px 0 8px; }
html.light-theme .azc-note { color: #b45309; }
.azc-label { font-size: 12.5px; color: var(--azc-muted); margin: 8px 0 4px; font-weight: 700; }
.azc-more { display: block; width: 100%; margin-top: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--azc-line); background: var(--azc-card); color: var(--azc-text); font: 700 14px Tajawal, sans-serif; }
.azc-empty { color: var(--azc-muted); padding: 24px 0; text-align: center; }

/* group product page */
.azc-product { display: grid; gap: 14px; }
@media (min-width: 900px) { .azc-product { grid-template-columns: 320px 1fr; align-items: start; } }
.azc-product__art { border-radius: 20px; overflow: hidden; background: var(--azc-card); border: 1px solid var(--azc-line); aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; }
.azc-product__art img { width: 100%; height: 100%; object-fit: cover; }
.azc-product__box { padding: 14px; border-radius: 20px; background: var(--azc-card); border: 1px solid var(--azc-line); }
.azc-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 768px) { .azc-values { grid-template-columns: repeat(4, 1fr); } }
.azc-value { position: relative; padding: 10px 6px; border-radius: 14px; border: 1px solid var(--azc-line); background: var(--azc-card2); text-align: center; cursor: pointer; color: var(--azc-text); font-family: Tajawal, sans-serif; }
.azc-value b { display: block; font-size: 15px; unicode-bidi: plaintext; } /* OPS-306: each label reads in its own language («2 دولار», «$10») — ltr showed «دولار 2» */
.azc-value span { display: block; font-size: 12px; color: var(--azc-muted); margin-top: 2px; }
.azc-value.is-on { border: 2px solid #a855f7; background: rgba(124,58,237,.14); }
.azc-value[disabled] { opacity: .45; cursor: not-allowed; }
.azc-value .azc-value__save { position: absolute; top: -8px; left: 6px; font-size: 10px; padding: 1px 6px; border-radius: 999px; background: var(--azc-grad); color: #fff; font-weight: 800; }
.azc-plan-desc { font-size: 13px; color: var(--azc-muted); line-height: 1.8; margin: 10px 0 0; }
.azc-buy { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 14px; }
.azc-buy__sum { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.azc-buy__face { font-size: 28px; font-weight: 900; direction: ltr; }
.azc-buy__price { font-size: 22px; font-weight: 900; }
.azc-buy__btn { width: 100%; min-height: 50px; border: 0; border-radius: 16px; background: var(--azc-grad); color: #fff; font: 800 17px Tajawal, sans-serif; cursor: pointer; }
.azc-buy__btn[disabled] { opacity: .5; }
.azc-buy__msg { font-size: 13px; text-align: center; min-height: 18px; }
.azc-facts { margin: 12px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--azc-muted); line-height: 1.9; }

/* search box (header and page) */
.azc-search { position: relative; }
.azc-search input { width: 100%; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--azc-line); background: var(--azc-card); color: var(--azc-text); font: 600 15px Tajawal, sans-serif; }
.azc-suggest { position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 50; background: var(--azc-card); border: 1px solid var(--azc-line); border-radius: 14px; overflow: hidden; box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.azc-suggest a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--azc-line); font-size: 14px; color: var(--azc-text); }
.azc-suggest a:last-child { border-bottom: 0; }
.azc-suggest small { color: var(--azc-muted); }

/* coming soon */
.azc-soon { padding: 40px 16px; text-align: center; border-radius: 20px; background: var(--azc-card); border: 1px dashed rgba(245,158,11,.45); }
.azc-soon b { display: block; font-size: 22px; margin-bottom: 6px; }

/* header menu (C9) */
.azc-nav { display: flex; align-items: center; gap: 4px; }
.azc-nav > li { position: relative; list-style: none; }
.azc-nav > li > a { display: block; padding: 8px 10px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.azc-nav__drop { display: none; position: absolute; top: 100%; inset-inline-start: 0; z-index: 60; min-width: 220px; max-height: 70vh; overflow: auto; padding: 8px; border-radius: 14px; background: var(--azc-card); border: 1px solid var(--azc-line); box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.azc-nav > li:hover > .azc-nav__drop, .azc-nav > li:focus-within > .azc-nav__drop { display: block; }
.azc-nav__drop a { display: block; padding: 7px 10px; border-radius: 10px; font-size: 14px; }
.azc-nav__drop a:hover { background: rgba(124,58,237,.12); }
.azc-drawer-btn { display: none; }
@media (max-width: 991px) {
  .azc-nav { display: none; }
  .azc-drawer-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--azc-line); background: transparent; color: inherit; font-size: 18px; }
}
.azc-drawer { position: fixed; inset: 0; z-index: 1000; display: none; }
.azc-drawer.is-open { display: block; }
.azc-drawer__bg { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.azc-drawer__panel { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: min(86vw, 340px); overflow: auto; padding: 14px; background: var(--azc-bg); border-inline-start: 1px solid var(--azc-line); font-family: Tajawal, sans-serif; color: var(--azc-text); direction: rtl; }
.azc-drawer details { border-bottom: 1px solid var(--azc-line); }
.azc-drawer summary, .azc-drawer__link { display: block; padding: 12px 4px; font-weight: 800; cursor: pointer; color: var(--azc-text); }
.azc-drawer details a { display: block; padding: 8px 14px; color: var(--azc-text); }
/* the buy box stays in view while many values are listed (phone) */
@media (max-width: 899px) {
  .azc-buy { position: sticky; bottom: 64px; z-index: 5; margin: 14px -14px -14px; padding: 12px 14px; background: var(--azc-card); border-top: 1px solid var(--azc-line); border-radius: 0 0 20px 20px; }
}
.azc-values { max-height: 340px; overflow: auto; padding: 8px 2px 2px; }
/* OPS-179 (D-080): «اشحن بالآيدي» game page — a small picture on the phone, so the packages show at once. */
@media (max-width: 899px) { .azt .azc-product__art { width: 132px; margin: 0 auto; border-radius: 22px; } }
.azt-en { margin: -4px 0 8px; font-size: 13px; color: var(--azc-muted); }
.azt-regions { display: flex; flex-wrap: wrap; gap: 6px; }
.azt-region { padding: 8px 12px; border-radius: 12px; border: 1px solid var(--azc-line); background: transparent; color: inherit; font-size: 13.5px; font-weight: 700; text-decoration: none !important; }
.azt-region.is-on { border-color: #a855f7; background: #a855f71f; }
.azt-packages .azc-value b { font-size: 14px; line-height: 1.35; }
.azt-fields { display: grid; gap: 8px; }
.azt-field { display: grid; gap: 4px; font-size: 13px; font-weight: 700; }
.azt-field input, .azt-field select { height: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--azc-line); background: transparent; color: inherit; font: inherit; font-size: 16px; }
.azt-field input[disabled], .azt-field select[disabled] { opacity: .7; }
/* OPS-180: a card brand's page — the card picture wide, the country as one list. */
.azt--card .azc-product__art { aspect-ratio: 25 / 16; background: #fff; } /* OPS-182: the YouGotaGift card shape */
@media (max-width: 899px) { .azt--card .azc-product__art { width: 100%; max-width: 250px; border-radius: 18px; } }
/* the iPhone draws its own light box for a select: our own colours and arrow instead */
.azt-country { -webkit-appearance: none; appearance: none; width: 100%; height: 50px; padding: 0 16px 0 44px; border-radius: 14px; border: 1px solid #a855f7; background: #0f172a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23c4b5fd' stroke-width='2'/%3E%3C/svg%3E") no-repeat 16px 50%; color: #f1f5f9; font: 700 16px Tajawal, sans-serif; }
[dir="ltr"] .azt-country { padding: 0 44px 0 16px; background-position: calc(100% - 16px) 50%; }
.azt-country option { color: #0f172a; background: #fff; }
html.light-theme .azt-country { background-color: #fff; color: #1e1b4b; }
/* OPS-182 (owner: the yellow warning was crowding the country box): its own soft box, a little space under the select. */
.azt-warn { margin: 10px 0 16px; padding: 10px 12px; border-radius: 12px; background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.35); line-height: 1.75; font-size: 13px; }
html.light-theme .azt-warn { background: #fffbeb; border-color: #fcd34d; }
/* OPS-245: «طريقة الاستخدام» of a Daleel Store card, folded under the buy box. */
.azt-how { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(167,139,250,.3); background: rgba(167,139,250,.06); font-size: 13.5px; line-height: 1.8; color: var(--azc-muted); }
.azt-how summary { cursor: pointer; font-weight: 800; color: inherit; }
.azt-how ol { margin: 8px 0 0; padding-inline-start: 20px; }
html.light-theme .azt-how { background: #faf5ff; border-color: #e9d5ff; }
/* OPS-245: «شحن جوال» — a network's card types (شحن سوا، باقات سوا، كويك نت) as clear buttons above the values. */
.azt-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; margin: 0 0 16px; }
.azt-type { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px; padding: 9px 8px; border-radius: 14px; border: 1px solid var(--azc-line); background: var(--azc-card2); color: var(--azc-text); text-align: center; text-decoration: none; font-family: Tajawal, sans-serif; }
.azt-type b { font-size: 15px; font-weight: 800; line-height: 1.3; }
.azt-type span { font-size: 12px; color: var(--azc-muted); }
.azt-type.is-on { border: 2px solid #a855f7; background: rgba(124,58,237,.18); }
.azt-type:hover, .azt-type:focus-visible { border-color: #a855f7; outline: none; color: var(--azc-text); text-decoration: none; }
#azt-types { scroll-margin-top: 140px; } /* OPS-245: after a tap the buttons stay in view under the sticky header */
