/* TradeVault — design tokens + components. Uses logical properties so RTL works automatically. */
:root {
  --bg: #0b1020;
  --bg-2: #0f1630;
  --surface: #131b36;
  --surface-2: #19223f;
  --border: #253055;
  --text: #e7ecf7;
  --muted: #8f9bbd;
  --brand: #22c58b;
  --brand-2: #16a374;
  --brand-ink: #04140d;
  --accent: #6c7cff;
  --warn: #f5b84a;
  --danger: #ef5d6c;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .55);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color-scheme: dark;
}
:lang(ar) { --font: "Cairo", "Inter", system-ui, sans-serif; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 80% -10%, #18245a 0%, transparent 60%), var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 15px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); font-weight: 800; letter-spacing: -.01em; }
h2, .h2 { font-size: 1.4rem; font-weight: 700; }
.h3, h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 .8em; }
.container { width: min(1200px, 100%); margin-inline: auto; padding-inline: 16px; }
.main { flex: 1; padding-block: 28px 56px; display: flex; flex-direction: column; gap: 28px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
.ellipsis { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos { color: var(--brand); font-weight: 600; }
.neg { color: var(--danger); font-weight: 600; }
.danger-text { color: var(--danger); cursor: pointer; font-weight: 600; }

/* ---------- top bar */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(11, 16, 32, .82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.search { flex: 1; max-width: 420px; }
.search input { width: 100%; background: var(--surface); }
.nav { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.nav > a, .menu > summary { color: var(--text); padding: 8px 12px; border-radius: var(--radius-sm); font-weight: 500; white-space: nowrap; }
.nav > a:hover, .menu > summary:hover { background: var(--surface); text-decoration: none; }
.nav > a.on { background: var(--surface-2); }
.nav .pill { border: 1px solid var(--border); background: var(--surface); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-sm); padding: 6px 10px; font-size: 1.1rem; cursor: pointer; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); min-width: 190px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; z-index: 60; }
.menu-list a, .menu-list .linklike { padding: 9px 12px; border-radius: 8px; color: var(--text); text-align: start; }
.menu-list a:hover, .menu-list .linklike:hover { background: var(--surface-2); text-decoration: none; }
.menu-list a.on { color: var(--brand); }
.linklike { background: none; border: 0; font: inherit; cursor: pointer; width: 100%; }

/* ---------- buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand); color: var(--brand-ink); border: 1px solid transparent; padding: 10px 18px; border-radius: var(--radius-sm); font: inherit; font-weight: 700; cursor: pointer; transition: background .15s, transform .05s; white-space: nowrap; }
.btn:hover { background: var(--brand-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 14%, transparent); }
.btn-sm { padding: 6px 12px; font-size: .86rem; }
.btn-lg { padding: 13px 24px; font-size: 1.02rem; }
.btn-block { width: 100%; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; width: 100%; font-weight: 400; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 1px; border-color: var(--brand); }
textarea { resize: vertical; }
.hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.span-2 { grid-column: span 2; }
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.choice { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; gap: 20px; flex-wrap: wrap; }
.choice legend { font-weight: 600; font-size: .9rem; padding-inline: 6px; }
.radio { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.radio input { width: auto; }
.inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.w-sm { width: 90px; } .w-md { width: 160px; }

/* ---------- cards & layout */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; border: 1px dashed var(--border); border-radius: var(--radius); }
td.empty { border: 0; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid; font-weight: 500; }
.flash-ok { background: color-mix(in srgb, var(--brand) 12%, transparent); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.flash-err { background: color-mix(in srgb, var(--danger) 12%, transparent); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.crumbs { color: var(--muted); font-size: .9rem; }

/* ---------- hero */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; align-items: center; padding-block: 24px 8px; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); padding: 5px 12px; border-radius: 99px; margin-bottom: 16px; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); margin-bottom: 14px; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 46ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero-card { background: linear-gradient(160deg, var(--surface-2), var(--surface)); border: 1px solid var(--border); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.mock-row { display: flex; justify-content: space-between; align-items: center; }
.mock-steps { display: flex; flex-direction: column; gap: 8px; }
.mock-step { padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
.mock-step.done { color: var(--text); border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.mock-shield { text-align: center; font-weight: 700; color: var(--brand); }

/* ---------- categories & features */
.cats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.cat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; color: var(--text); transition: border-color .15s, transform .15s; }
.cat:hover { border-color: var(--brand); transform: translateY(-2px); text-decoration: none; }
.cat-name { font-weight: 700; }
.cat-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 1.2rem; background: var(--surface-2); }
.cat-icon-gift_cards::after { content: "🎁"; } .cat-icon-game_items::after { content: "💎"; }
.cat-icon-game_keys::after { content: "🔑"; } .cat-icon-game_accounts::after { content: "🎮"; }
.cat-icon-subscriptions::after { content: "⭐"; } .cat-icon-other::after { content: "📦"; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.feature-icon { font-size: 1.6rem; margin-bottom: 8px; }
.how .steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.how .steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; font-weight: 600; display: flex; gap: 12px; align-items: center; }
.how .steps span { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-weight: 800; }

/* ---------- listing cards */
.listing-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px; color: var(--text); transition: border-color .15s, transform .15s; }
.listing-card:hover { border-color: var(--brand); transform: translateY(-2px); text-decoration: none; }
.card-top { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.card-title { font-size: 1rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-bottom { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: end; gap: 8px; border-top: 1px solid var(--border); }
.price { font-weight: 800; font-size: 1.15rem; color: var(--text); }
.price small { color: var(--muted); font-weight: 600; font-size: .75rem; }
.price.big { font-size: 2rem; }
.seller { color: var(--muted); }
.soldout { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; background: var(--danger); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.tag-instant { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.tag-gift_cards { color: #ff9ecb; } .tag-game_items { color: #7fd6ff; } .tag-game_keys { color: #ffd479; }
.tag-game_accounts { color: #a99bff; } .tag-subscriptions { color: #7ff0c0; }

/* ---------- badges */
.badge { display: inline-block; font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; border: 1px solid; white-space: nowrap; }
.badge-paid, .badge-pending { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.badge-delivered { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.badge-completed, .badge-approved { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.badge-paid.badge, .badge-paid { }
.badge-disputed, .badge-rejected { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.badge-refunded, .badge-cancelled { color: var(--muted); border-color: var(--border); }
td .badge-paid { color: var(--warn); }

/* ---------- browse */
.browse { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; }
.filters { position: sticky; top: 84px; }

/* ---------- detail pages */
.detail { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
.detail-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 16px 0; }
.facts div { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.facts dt { color: var(--muted); font-size: .78rem; font-weight: 600; }
.facts dd { margin: 2px 0 0; font-weight: 600; word-break: break-word; }
.prose { white-space: pre-wrap; color: #cdd5ea; }
.buybox { display: flex; flex-direction: column; gap: 16px; }
.note { font-size: .84rem; color: var(--muted); background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin: 0; }
.note.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.seller-box { display: flex; flex-direction: column; gap: 4px; }
.seller-name { font-size: 1.15rem; font-weight: 800; }
.review { padding-block: 12px; border-bottom: 1px solid var(--border); }
.review:last-child { border-bottom: 0; }
.stars { color: var(--warn); letter-spacing: 2px; }
.info-row { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }

/* ---------- orders */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 4px; }
.tabs a, .tabs button { padding: 8px 14px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 600; background: none; border: 0; font: inherit; cursor: pointer; }
.tabs a:hover, .tabs button:hover { background: var(--surface); text-decoration: none; color: var(--text); }
.tabs .on { background: var(--surface-2); color: var(--text); }
.count { background: var(--danger); color: #fff; border-radius: 99px; padding: 0 7px; font-size: .75rem; margin-inline-start: 4px; }
.progress { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0; margin: 0; counter-reset: s; }
.progress li { counter-increment: s; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-weight: 600; font-size: .9rem; }
.progress li::before { content: counter(s) " · "; }
.progress li.done { color: var(--text); border-color: color-mix(in srgb, var(--brand) 50%, transparent); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.codebox { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, Consolas, monospace; color: var(--brand); margin: 0; direction: ltr; text-align: left; }
.delivered { border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.notice { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.notice-warn { border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; padding: 4px; margin-bottom: 14px; }
.msg { max-width: 80%; align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; }
.msg.mine { align-self: flex-end; background: color-mix(in srgb, var(--brand) 14%, var(--surface)); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.msg.from-admin { border-color: var(--warn); }
.msg-meta { font-size: .74rem; color: var(--muted); }
.msg-body { white-space: pre-wrap; word-break: break-word; }
.chat-form { display: flex; gap: 8px; }
.rating-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
[dir="rtl"] .rating-input { flex-direction: row-reverse; }
.rating-input input { display: none; }
.rating-input label { font-size: 1.8rem; color: var(--border); cursor: pointer; }
.rating-input input:checked ~ label, .rating-input label:hover, .rating-input label:hover ~ label { color: var(--warn); }

/* ---------- tables */
.table-wrap { overflow-x: auto; padding: 0; }
.card.table-wrap { padding: 4px 0; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 12px 14px; text-align: start; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: 0; }
td.actions { display: flex; gap: 6px; flex-wrap: wrap; }
td.actions form { margin: 0; }

/* ---------- wallet / admin */
.balance-hero { display: flex; flex-direction: column; gap: 4px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 18%, var(--surface)), var(--surface)); }
.balance-amount { font-size: 2.4rem; font-weight: 800; }
.balance-amount small { font-size: 1rem; color: var(--muted); }
.addresses { display: flex; flex-direction: column; gap: 8px; }
.address { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; }
.address code { font-size: .82rem; word-break: break-all; flex: 1; direction: ltr; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat strong { font-size: 1.5rem; }
.stat.link { color: var(--text); }
.stat.link:hover { border-color: var(--brand); text-decoration: none; }
.dispute { display: flex; flex-direction: column; gap: 6px; }

/* ---------- auth, profile, terms, errors */
.auth { display: grid; place-items: center; padding-block: 24px; }
.auth form { width: min(440px, 100%); }
.seller-hero { display: flex; gap: 20px; align-items: center; }
.avatar { flex: none; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--accent)); color: var(--brand-ink); font-size: 2rem; font-weight: 800; }
.prose-page { max-width: 820px; margin-inline: auto; }
.prose-page h2 { margin-top: 1.4em; }
.rules li { margin-bottom: 8px; }
.big-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-block: 64px; }
.err-code { font-size: 4rem; font-weight: 800; color: var(--brand); }

/* ---------- footer */
.footer { border-top: 1px solid var(--border); background: var(--bg-2); padding-block: 28px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; }

/* ---------- responsive */
@media (max-width: 1000px) {
  .cats { grid-template-columns: repeat(3, 1fr); }
  .detail, .browse { grid-template-columns: 1fr; }
  .detail-side, .filters { position: static; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; margin-inline-start: auto; }
  .search { display: none; }
  .nav { display: none; position: absolute; inset-inline: 0; top: 64px; background: var(--bg-2); border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch; padding: 12px 16px; }
  .nav.open { display: flex; }
  .menu-list { position: static; box-shadow: none; margin-top: 6px; }
  .hero, .two-col, .features { grid-template-columns: 1fr; }
  .how .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .cats { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .how .steps, .progress { grid-template-columns: 1fr; }
  .card { padding: 16px; }
}

/* ---------- automatic crypto deposits */
.badge-pay-awaiting, .badge-pay-verifying { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.badge-pay-credited { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.badge-pay-review, .badge-pay-rejected { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.badge-pay-expired { color: var(--muted); border-color: var(--border); }
.pay-box { display: flex; flex-direction: column; gap: 12px; }
.pay-amount { font-size: 2.2rem; font-weight: 800; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; direction: ltr; justify-content: flex-start; }
[dir="rtl"] .pay-amount { justify-content: flex-end; }
.pay-amount small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.big-address code { font-size: .95rem; }
.pay-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding-block: 40px; }
.pay-state.ok { border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.pay-state.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.big-icon { font-size: 3rem; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--border); border-top-color: var(--brand); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.facts.one-col { grid-template-columns: 1fr; margin: 0; }
.manual-deposit { border-top: 1px solid var(--border); padding-top: 12px; }
.manual-deposit summary { cursor: pointer; color: var(--muted); margin-bottom: 12px; }

/* =====================================================================
   Refined layer: brand tiles + motion (subtle, fast, respects reduced motion)
   ===================================================================== */
:root { --ease: cubic-bezier(.2, .7, .2, 1); --ring: 0 0 0 1px color-mix(in srgb, var(--brand) 55%, transparent); }

/* page entrance */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
body { animation: fadeIn .45s var(--ease) both; overflow-x: clip; }
.fade-in { animation: rise .7s var(--ease) both; }
.d1 { animation-delay: .08s; } .d2 { animation-delay: .16s; } .d3 { animation-delay: .24s; } .d4 { animation-delay: .32s; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* header */
.topbar { transition: box-shadow .3s var(--ease), background .3s var(--ease); }
.topbar.scrolled { box-shadow: 0 8px 30px -12px rgba(0, 0, 0, .7); background: rgba(11, 16, 32, .94); }
.nav > a, .menu > summary { transition: background .2s var(--ease), color .2s var(--ease); }
.menu-list { animation: rise .22s var(--ease) both; transform-origin: top; }

/* buttons */
.btn { position: relative; overflow: hidden; transition: background .2s var(--ease), transform .15s var(--ease), box-shadow .25s var(--ease); }
.btn:not(.btn-ghost):not(.btn-danger):hover { box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--brand) 70%, transparent); transform: translateY(-1px); }
.btn-shine::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s var(--ease); }
.btn-shine:hover::after { transform: translateX(120%); }
.link-arrow span { display: inline-block; transition: transform .25s var(--ease); }
.link-arrow:hover { text-decoration: none; }
.link-arrow:hover span { transform: translateX(4px); }
[dir="rtl"] .link-arrow span, [dir="rtl"] .card-cta { transform: scaleX(-1); }
[dir="rtl"] .link-arrow:hover span { transform: scaleX(-1) translateX(4px); }

/* hero */
.hero { position: relative; isolation: isolate; padding-block: 40px 16px; }
html { overflow-x: hidden; }
.hero-glow { position: absolute; inset: -80px 0 auto; height: 520px; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 50% at 20% 30%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%),
              radial-gradient(35% 45% at 80% 20%, color-mix(in srgb, var(--accent) 25%, transparent), transparent 70%);
  filter: blur(10px); animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate3d(0, 24px, 0) scale(1.05); } }
.trust { list-style: none; display: flex; gap: 18px; flex-wrap: wrap; padding: 0; margin: 26px 0 0; color: var(--muted); font-size: .9rem; font-weight: 500; }
.hero-stack { position: relative; height: 340px; }
.float-card { position: absolute; width: 230px; aspect-ratio: 16 / 10; border-radius: 18px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(135deg, var(--c1), var(--c2)); color: var(--fg); box-shadow: 0 30px 60px -20px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.18);
  animation: float 7s ease-in-out infinite; }
.float-card span { font-weight: 800; font-size: 1.35rem; letter-spacing: .08em; }
.float-card small { font-weight: 600; opacity: .85; }
.float-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(120% 80% at 0% 0%, rgba(255,255,255,.22), transparent 55%); }
.fc-1 { inset-inline-start: 4%; top: 30px; --r: -8deg; transform: rotate(var(--r)); }
.fc-2 { inset-inline-end: 2%; top: 0; --r: 6deg; animation-delay: -2.3s; }
.fc-3 { inset-inline-start: 26%; top: 170px; --r: -2deg; animation-delay: -4.6s; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(var(--r)); } 50% { transform: translateY(-12px) rotate(var(--r)); } }

/* brand tiles */
.tile { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--c1, #334155), var(--c2, #0f172a)); color: var(--fg, #fff); isolation: isolate; }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background: radial-gradient(90% 70% at 15% 10%, rgba(255,255,255,.28), transparent 55%),
              repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 14px); }
.tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -40px 60px -30px rgba(0,0,0,.45); }
.tile-name { font-weight: 800; font-size: clamp(1.05rem, 2.2vw, 1.45rem); letter-spacing: .1em; text-transform: uppercase; text-align: center; padding: 0 12px;
  text-shadow: 0 2px 18px rgba(0,0,0,.25); transition: transform .5s var(--ease); }
:lang(ar) .tile-name { letter-spacing: .04em; }
.tile-big { aspect-ratio: 21 / 9; margin-bottom: 18px; }
.tile-big .tile-name { font-size: clamp(1.6rem, 4vw, 2.6rem); }
.tile-img { background: var(--bg-2); }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }

/* product cards */
.listing-card { padding: 0; overflow: hidden; gap: 0; transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease); }
.listing-card .tile { border-radius: 0; }
.listing-card .card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.listing-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand) 60%, var(--border)); box-shadow: 0 24px 50px -24px rgba(0,0,0,.8), var(--ring); }
.listing-card:hover .tile-name, .listing-card:hover .tile-img img { transform: scale(1.06); }
.card-cta { color: var(--brand); font-weight: 800; transition: transform .3s var(--ease); }
.listing-card:hover .card-cta { transform: translateX(4px); }
[dir="rtl"] .listing-card:hover .card-cta { transform: scaleX(-1) translateX(4px); }
.soldout { position: static; }
.grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }

/* categories, features, steps */
.cat, .feature, .how .steps li { transition: transform .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease); }
.cat:hover, .feature:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 50%, var(--border)); }
.how .steps li:hover { background: var(--surface-2); }

/* store box, inputs, misc */
.store-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.total-row strong { font-size: 1.15rem; }
input, select, textarea { transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.flash { animation: rise .45s var(--ease) both; transition: opacity .5s var(--ease), transform .5s var(--ease); }
.flash.out { opacity: 0; transform: translateY(-8px); }
.image-field { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.image-field:not(:has(.image-preview)) { grid-template-columns: 1fr; }
.mini-steps { margin: 0; padding-inline-start: 20px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.badge-paid { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 14%, transparent); } }

@media (max-width: 860px) {
  .hero-stack { height: 240px; }
  .float-card { width: 170px; }
  .fc-3 { top: 120px; }
  .image-field { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
