/* Linka: mobile-first, right-to-left. One file, no build step (decision D2). */

/* Colours from the owner's logo (static/brand/linka-logo.webp), which replaced the spec's
   section 59 palette on 2026-10-13: violet #6433D7, magenta #903DCF, pink #E04687, navy #1E1955.
   Status colours keep the spec values. Every text colour passes WCAG AA (4.5:1) on its background. */
:root {
  color-scheme: light dark;
  --brand: #6433D7;          /* logo violet: links, outlines, active tab */
  --brand-solid: #6433D7;    /* filled backgrounds with white text, same in both modes */
  --brand-dark: #4F25B8;
  --brand-soft: #EFE9FD;
  --gradient: linear-gradient(135deg, #6433D7 0%, #8E3BCB 100%);   /* violet to magenta, white text stays readable */
  --gradient-full: linear-gradient(135deg, #743BF2 0%, #903DCF 50%, #E04687 100%);   /* the logo's ribbon, decoration only */
  --accent: #C42A6C;         /* logo pink, darkened for text */
  --accent-soft: #FCE7F1;
  --gradient-deep: linear-gradient(135deg, #5B2BD0 0%, #8E3BCB 55%, #C42A6C 100%);   /* white text stays above 4.5:1 */
  --text-gradient: linear-gradient(90deg, #6433D7, #8E3BCB);
  --float-shadow: 0 10px 30px rgba(30, 25, 85, .14);
  --secondary: #3B82F6;      /* spec secondary */
  --text: #1E1955;           /* logo navy */
  --muted: #5E5A78;
  --bg: #F8F7FC;
  --surface: #FFFFFF;
  --surface-hover: #FBFAFE;
  --border: #E6E3F0;
  --muted-bg: #EFEDF6;
  --money: #0B7A5A;          /* spec success #20C997, darkened for text */
  --success: #0B7A5A;
  --success-bg: #DDF7EE;
  --warning: #B4530A;        /* spec orange #F97316, darkened for text */
  --warning-bg: #FFEEDD;
  --danger: #C02626;         /* spec red #EF4444, darkened for text */
  --danger-bg: #FDE6E6;
  --danger-border: #F5B5B5;
  --info: #1D5FD8;
  --info-bg: #E3EDFE;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(30, 25, 85, .05), 0 4px 16px rgba(30, 25, 85, .06);
  --tabbar-h: 64px;
  font-size: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #A98BFF;
    --brand-dark: #C9B8FF;
    --brand-soft: #2A2155;
    --accent: #FF7AAE;
    --accent-soft: #3A1730;
    --text-gradient: linear-gradient(90deg, #A98BFF, #FF7AAE);
    --float-shadow: 0 10px 30px rgba(0, 0, 0, .45);
    --text: #EEECF8;
    --muted: #A5A1C2;
    --bg: #100E22;           /* the logo navy, deepened */
    --surface: #19162F;
    --surface-hover: #201C3A;
    --border: #2D2850;
    --muted-bg: #262145;
    --money: #3DDBA9;
    --success: #3DDBA9;
    --success-bg: #103A2E;
    --warning: #FDBA74;
    --warning-bg: #3A2614;
    --danger: #F87171;
    --danger-bg: #3B1A1D;
    --danger-border: #6B2A2E;
    --info: #93B4FD;
    --info-bg: #172A4D;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Tajawal', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  line-height: 1.6;
}

body.has-tabbar { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px); }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5rem; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }

.container { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 16px; }
.page { padding-top: 20px; padding-bottom: 24px; }
.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.money { color: var(--money); font-weight: 700; }
.negative { color: var(--danger); font-weight: 700; }
.stack > * + * { margin-top: 12px; }
.split { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }


.center { text-align: center; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }

/* Top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
/* The logo is a Latin lockup, so it keeps its left-to-right order on Arabic pages. */
.logo { display: inline-flex; align-items: center; gap: 6px; direction: ltr; }
.logo:hover { text-decoration: none; }
.logo img { width: auto; }
.logo .logo-mark { height: 32px; }
.logo .logo-word { height: 21px; margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-actions form { margin: 0; }
.topbar-actions .btn { white-space: nowrap; }
@media (max-width: 400px) {
  .topbar-actions { gap: 6px; }
  .topbar-actions .btn-sm { padding: 0 10px; }
  /* Visitors get two buttons and the language menu: the symbol alone leaves them room in every language. */
  .is-guest .logo-word { display: none; }
}

/* Language menu: one button in the header, the list opens under it (static/js/app.js closes it). */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--muted); font-weight: 700; font-size: .85rem; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary .icon { width: 18px; height: 18px; }
.lang-menu[open] summary, .lang-menu summary:hover { color: var(--brand); border-color: var(--brand); }
.lang-list { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 40; min-width: 150px; display: grid; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--float-shadow); }
.lang-list button { font: inherit; text-align: start; padding: 9px 12px; border: 0; border-radius: 8px; background: none; color: var(--text); cursor: pointer; }
.lang-list button:hover { background: var(--brand-soft); }
.lang-list button[aria-current] { color: var(--brand); font-weight: 700; background: var(--brand-soft); }
@media (max-width: 400px) { .lang-menu .lang-code { display: none; } }

/* Merchant balance boxes under the header (templates/partials/wallet_strip.html). */
.wallet-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.wallet-box { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid; color: inherit; }
.wallet-box:hover { text-decoration: none; filter: brightness(.98); }
.wallet-label { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; }
.wallet-label .icon { width: 16px; height: 16px; }
.wallet-box strong { font-size: 1.35rem; line-height: 1.3; }
.wallet-note { font-size: .75rem; opacity: .85; }
.wallet-credit { background: var(--success-bg); border-color: color-mix(in srgb, var(--success) 30%, transparent); color: var(--success); }
.wallet-due { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }
.who { color: var(--muted); font-size: .875rem; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Bottom tab bar */
.tabbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 30;
  background: var(--surface); border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar ul { list-style: none; margin: 0 auto; padding: 0; max-width: 720px; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--tabbar-h); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 100%; color: var(--muted); font-size: .72rem; font-weight: 600; }
.tabbar a:hover { text-decoration: none; color: var(--text); }
.tabbar a.active { color: var(--brand); }
.icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Cards and lists */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 12px; }
.card-title { font-weight: 700; margin-bottom: 8px; }
.list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.list-item { display: block; padding: 14px 16px; border-top: 1px solid var(--border); color: inherit; }
.list-item:first-child { border-top: 0; }
a.list-item:hover { background: var(--surface-hover); text-decoration: none; }
.list-item .split { align-items: flex-start; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.kv .kv-sub { font-size: .9em; }
.kv dt.kv-sub { padding-inline-start: 14px; }
.kv dd.kv-sub { font-weight: 500; }
code.utm { white-space: nowrap; unicode-bidi: isolate; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
a.stat, a.card { color: inherit; }
a.stat:hover, a.card:hover { text-decoration: none; border-color: var(--brand); }
.stat .label { color: var(--muted); font-size: .8rem; }
.stat .value { font-size: 1.35rem; font-weight: 700; }
@media (min-width: 560px) { .stats { grid-template-columns: repeat(4, 1fr); } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; text-align: center;
  background: var(--surface); color: var(--text); border-color: var(--border); text-decoration: none;
}
.btn:hover { text-decoration: none; filter: brightness(.97); }
.btn-primary { background: var(--gradient); border-color: transparent; color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-success { background: #0B7A5A; border-color: #0B7A5A; color: #fff; }
.btn-danger { background: var(--surface); border-color: var(--danger-border); color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--brand); }
.btn-outline { background: var(--surface); border-color: var(--brand); color: var(--brand); }
.btn-outline:hover { background: var(--brand-soft); filter: none; }
.btn-light { background: #fff; border-color: #fff; color: #4F25B8; }
.btn-glass { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1rem; border-radius: 14px; }
.btn-lg .icon { width: 18px; height: 18px; }
.btn-primary.btn-lg { box-shadow: 0 10px 24px rgba(100, 51, 215, .28); }
html[dir="rtl"] .icon-forward { transform: scaleX(-1); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .875rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions form { margin: 0; }

/* Forms */
form.form { display: grid; gap: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea, .copy-field input {
  width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .copy-field input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.field input[type="checkbox"], .field input[type="radio"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand); }
.field div[id] > div > label {
  display: flex; align-items: center; gap: 10px; font-weight: 400; margin: 0 0 8px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer;
}
.field div[id] > div > label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.field .help { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.errorlist { list-style: none; margin: 4px 0 0; padding: 0; color: var(--danger); font-size: .85rem; }
.form-errors { background: var(--danger-bg); color: var(--danger); border-radius: var(--radius-sm); padding: 10px 14px; }
.form-errors .errorlist { margin: 0; }
.choice-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-cards label { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; cursor: pointer; display: flex; gap: 8px; align-items: center; font-weight: 600; background: var(--surface); }
.choice-cards input { accent-color: var(--brand); }

/* Badges and alerts */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.tone-info { background: var(--info-bg); color: var(--info); }
.tone-brand { background: var(--brand-soft); color: var(--brand-dark); }
.tone-warning { background: var(--warning-bg); color: var(--warning); }
.tone-success { background: var(--success-bg); color: var(--success); }
.tone-danger { background: var(--danger-bg); color: var(--danger); }
.tone-muted { background: var(--muted-bg); color: var(--muted); }

.messages { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.alert { border-radius: var(--radius-sm); padding: 12px 14px; font-weight: 600; }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-warning { background: var(--warning-bg); color: var(--warning); }
.alert-info { background: var(--info-bg); color: var(--info); }

/* Filter chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.chips a { flex: none; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-weight: 600; font-size: .875rem; }
.chips a:hover { text-decoration: none; color: var(--text); }
.chips a.active { background: var(--brand-solid); border-color: var(--brand-solid); color: #fff; }
.chips .count { opacity: .75; }
.chips-sm a { padding: 4px 12px; font-size: .82rem; }

.empty { text-align: center; padding: 32px 16px; color: var(--muted); }
.empty .icon { width: 36px; height: 36px; margin: 0 auto 8px; }

/* Offers */
.offer-grid { display: grid; gap: 12px; }
@media (min-width: 560px) { .offer-grid { grid-template-columns: 1fr 1fr; } }
.offer-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.offer-card .thumb { aspect-ratio: 4 / 3; background: var(--brand-soft); display: grid; place-items: center; color: var(--brand); }
.offer-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.offer-card .thumb .icon { width: 40px; height: 40px; }
.offer-card .body { padding: 14px; display: grid; gap: 8px; flex: 1; }
.offer-card .title { font-weight: 700; }
.commission-pill { background: var(--success-bg); color: var(--money); border-radius: var(--radius-sm); padding: 6px 10px; font-weight: 700; }

.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; direction: ltr; background: var(--surface-hover); color: var(--text); }

/* Public order page */
.product-hero { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.product-hero .media { aspect-ratio: 1 / 1; background: var(--brand-soft); display: grid; place-items: center; color: var(--brand); }
.product-hero .media img { width: 100%; height: 100%; object-fit: cover; }
.product-hero .media .icon { width: 56px; height: 56px; }
.product-hero .info { padding: 16px; }
.price { font-size: 1.6rem; font-weight: 700; color: var(--text); }
.trust { display: grid; gap: 6px; margin-top: 8px; color: var(--muted); font-size: .9rem; }
.trust span { display: flex; gap: 8px; align-items: center; }
.trust .icon { width: 18px; height: 18px; color: var(--success); }

/* Landing page (templates/core/home.html): wider than the app pages, photos and motion.
   The hero composition is placed with logical insets, so it mirrors itself on left-to-right pages. */
html { scroll-behavior: smooth; }
.is-landing .topbar .container { max-width: 1160px; }
.landing > .messages { max-width: 1160px; margin: 16px auto 0; padding: 0 16px; }
.lp-wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.lp-section { padding-top: 64px; }
.landing [id] { scroll-margin-top: 72px; }

.topnav { display: none; }
@media (min-width: 960px) {
  .topnav { display: flex; gap: 26px; font-weight: 600; font-size: .95rem; }
  .topnav a { color: var(--text); padding: 6px 0; border-bottom: 2px solid transparent; }
  .topnav a:hover { color: var(--brand); text-decoration: none; border-bottom-color: var(--brand); }
}

.lp-hero {
  position: relative; overflow: hidden; padding: 28px 0 44px;
  background:
    radial-gradient(50% 55% at 88% 0%, rgba(116, 59, 242, .13), transparent 70%),
    radial-gradient(40% 50% at 0% 45%, rgba(224, 70, 135, .09), transparent 70%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}
.lp-hero-grid { display: grid; gap: 36px; align-items: center; }
@media (max-width: 959px) {
  .lp-visual { order: -1; }
  .lp-hero { padding-top: 20px; }
}
.landing { padding-bottom: 40px; }
@media (min-width: 960px) {
  .lp-hero { padding: 56px 0 80px; }
  .lp-hero-grid { grid-template-columns: 1.05fr 1fr; gap: 48px; }
}
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; font-size: .85rem; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gradient-full); animation: pulse 2.2s ease-in-out infinite; }
.lp-hero h1 { font-size: clamp(1.9rem, 5.2vw, 3rem); line-height: 1.25; margin: 16px 0 10px; }
.lp-sub { font-size: clamp(1.15rem, 2.6vw, 1.45rem); font-weight: 700; margin-bottom: 14px; background: var(--text-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-hero .lead { color: var(--muted); font-size: 1.05rem; max-width: 34em; }
.lp-cta { display: grid; gap: 10px; margin-top: 22px; }
@media (min-width: 560px) { .lp-cta { display: flex; flex-wrap: wrap; } }
.lp-facts { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lp-facts li { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: .8rem; color: var(--muted); line-height: 1.4; }
.lp-facts strong { display: block; font-size: 1.3rem; color: var(--text); }
.fact-icon { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
@media (min-width: 560px) { .lp-facts li { flex-direction: row; align-items: center; } }

.lp-visual { position: relative; width: 100%; max-width: 540px; margin: 0 auto; aspect-ratio: 1 / 1.1; }
@media (min-width: 560px) { .lp-visual { aspect-ratio: 1 / .95; } }
.glow { position: absolute; border-radius: 50%; filter: blur(40px); }
.glow-a { width: 60%; height: 60%; inset-inline-start: 8%; top: 8%; background: rgba(116, 59, 242, .22); }
.glow-b { width: 45%; height: 45%; inset-inline-end: 0; bottom: 6%; background: rgba(224, 70, 135, .18); }
.lp-paths { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lp-paths path { fill: none; stroke: var(--brand); stroke-opacity: .55; stroke-width: 1.5; stroke-dasharray: 4 6; vector-effect: non-scaling-stroke; animation: dash 1.6s linear infinite; }
html[dir="ltr"] .lp-paths { transform: scaleX(-1); }
.photo { position: absolute; margin: 0; overflow: hidden; box-shadow: 0 20px 50px rgba(30, 25, 85, .2); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-creator { inset-inline-start: 5%; top: 9%; width: 57%; aspect-ratio: 1; border-radius: 46% 54% 48% 52% / 52% 44% 56% 48%; animation: pop .8s ease-out both, morph 12s ease-in-out infinite; }
.photo-merchant { inset-inline-end: 3%; top: 21%; width: 34%; aspect-ratio: 4 / 5; border-radius: 22px; animation: pop .8s .15s ease-out both; }

.float { position: absolute; z-index: 2; animation: pop .7s ease-out both, float 6s ease-in-out infinite; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--float-shadow); font-weight: 700; font-size: .8rem; white-space: nowrap; }
.tag .icon, .social .icon { width: 16px; height: 16px; color: var(--brand); }
.tag-creator { top: 2%; inset-inline-start: 40%; animation-delay: .3s, 0s; animation-duration: .7s, 5.5s; }
.tag-merchant { top: 13%; inset-inline-end: 17%; animation-delay: .4s, 1s; }
.app-tile { top: 0; inset-inline-end: 0; width: 50px; height: 50px; border-radius: 15px; overflow: hidden; box-shadow: var(--float-shadow); animation-delay: .5s, 2s; animation-duration: .7s, 7s; }
.app-tile img { width: 100%; height: 100%; }
.mini { background: var(--surface); border-radius: 16px; box-shadow: var(--float-shadow); padding: 10px; font-size: .78rem; line-height: 1.35; }
.mini-product { bottom: 0; inset-inline-start: 3%; width: 40%; max-width: 190px; display: grid; gap: 4px; justify-items: center; text-align: center; animation-delay: .6s, .5s; animation-duration: .7s, 6.5s; }
.mini-product img { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; }
.mini-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; width: 100%; margin-top: 2px; padding: 6px 8px; border-radius: 8px; background: var(--gradient); color: #fff; font-weight: 700; }
.mini-btn .icon { width: 14px; height: 14px; }
.mini-chart { bottom: 4%; inset-inline-end: 0; width: 47%; max-width: 230px; animation-delay: .7s, 1.5s; animation-duration: .7s, 7s; }
.mini-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.mini-head .icon { width: 16px; height: 16px; color: var(--success); }
.spark { display: block; width: 100%; height: auto; overflow: visible; }
.spark-area { fill: url(#spark-fill); }
.spark-line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 260; animation: draw 2s 1s ease-out both; }
.spark-dot { fill: #E04687; transform-box: fill-box; transform-origin: center; animation: pop .4s 2.8s both; }
.toast { top: 1%; inset-inline-start: 0; display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 10px; border-radius: 14px; background: var(--surface); box-shadow: var(--float-shadow); font-size: .75rem; color: var(--muted); animation-delay: .9s, 2.5s; animation-duration: .7s, 5s; }
.toast strong { display: block; color: var(--text); font-size: .8rem; }
.toast-icon { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--success-bg); color: var(--success); }
.toast-icon .icon { width: 16px; height: 16px; stroke-width: 3; }
.social { top: 63%; inset-inline-start: 20%; display: none; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--float-shadow); font-size: .75rem; font-weight: 700; direction: ltr; animation-delay: 1s, 3s; }
@media (min-width: 560px) { .social { display: inline-flex; } }

@keyframes pop { from { opacity: 0; scale: .85; } to { opacity: 1; scale: 1; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes morph { 0%, 100% { border-radius: 46% 54% 48% 52% / 52% 44% 56% 48%; } 50% { border-radius: 56% 44% 54% 46% / 44% 56% 46% 54%; } }
@keyframes dash { to { stroke-dashoffset: -20; } }
@keyframes draw { from { stroke-dashoffset: 260; } to { stroke-dashoffset: 0; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(116, 59, 242, .45); } 50% { box-shadow: 0 0 0 7px rgba(116, 59, 242, 0); } }

.lp-features { list-style: none; margin: -12px 0 0; padding: 18px; position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }
.lp-features li { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); line-height: 1.4; }
.lp-features li:last-child { grid-column: 1 / -1; }
.lp-features strong { display: block; color: var(--text); font-size: .88rem; }
.f-icon { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; }
.f-violet { background: var(--brand-soft); color: var(--brand); }
.f-amber { background: var(--warning-bg); color: var(--warning); }
.f-green { background: var(--success-bg); color: var(--success); }
.f-blue { background: var(--info-bg); color: var(--info); }
.f-pink { background: var(--accent-soft); color: var(--accent); }
@media (min-width: 960px) {
  .lp-features { grid-template-columns: repeat(5, 1fr); padding: 22px 24px; }
  .lp-features li:last-child { grid-column: auto; }
  .lp-features li + li { border-inline-start: 1px solid var(--border); padding-inline-start: 16px; }
}

.lp-head { text-align: center; margin-bottom: 28px; }
.kicker { color: var(--brand); font-weight: 700; margin-bottom: 6px; }
.lp-title { font-size: clamp(1.5rem, 4vw, 2.2rem); margin: 0; }

.lp-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: step; }
.lp-steps li { counter-increment: step; position: relative; display: grid; gap: 6px; align-content: start; padding: 20px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); }
.lp-steps li::before { content: counter(step); position: absolute; top: 14px; inset-inline-end: 18px; font-size: 2.4rem; font-weight: 700; line-height: 1; color: var(--brand); opacity: .18; }
.step-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 6px; background: var(--gradient); color: #fff; box-shadow: 0 8px 20px rgba(100, 51, 215, .3); }
@media (min-width: 720px) { .lp-steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .lp-steps { grid-template-columns: repeat(4, 1fr); } }

.aud-grid { display: grid; gap: 18px; }
@media (min-width: 900px) { .aud-grid { grid-template-columns: repeat(3, 1fr); } }
.aud-card { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }
.aud-card:hover { box-shadow: 0 16px 40px rgba(30, 25, 85, .12); }
.aud-card > img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.aud-body { position: relative; flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 34px 20px 20px; }
.aud-icon { position: absolute; top: -26px; inset-inline-start: 20px; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface); color: var(--brand); box-shadow: var(--float-shadow); }
.aud-body h3 { font-size: 1.25rem; margin: 0; }
.aud-body p { margin: 0; }
.aud-body .btn, .price-card .btn { margin-top: auto; }
.aud-card.featured, .price-card.featured { border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--gradient-full) border-box; }

.checklist { list-style: none; padding: 0; margin: 6px 0 18px; display: grid; gap: 9px; }
.checklist li { position: relative; padding-inline-start: 28px; font-size: .93rem; }
.checklist li::before, .checklist li::after { content: ""; position: absolute; inset-inline-start: 0; top: .2em; width: 19px; height: 19px; border-radius: 50%; }
.checklist li::before { background: var(--success-bg); }
.checklist li::after {
  background: var(--success);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.price-grid { display: grid; gap: 18px; max-width: 840px; margin: 0 auto; }
@media (min-width: 720px) { .price-grid { grid-template-columns: 1fr 1fr; } }
/* Merchant subscription page (templates/merchant/plan.html): Linka's own tokens only */
.plan-hero { position: relative; overflow: hidden; margin-bottom: 16px; padding: 22px; border-radius: 22px; color: #fff; background: var(--gradient-deep); box-shadow: var(--float-shadow); }
.plan-hero::after { content: ""; position: absolute; width: 240px; height: 240px; top: -110px; inset-inline-end: -70px; border-radius: 50%; background: rgba(255, 255, 255, .1); pointer-events: none; }
.plan-hero > * { position: relative; }
.plan-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.plan-hero-kicker { font-size: .8rem; opacity: .85; }
.plan-hero-name { font-size: 1.9rem; font-weight: 800; line-height: 1.2; }
.plan-hero-tag { font-size: .9rem; opacity: .9; }
.plan-hero-badge { flex: none; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.plan-meters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
@media (min-width: 760px) { .plan-meters { grid-template-columns: repeat(4, 1fr); } }
.plan-meter { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .13); font-size: .85rem; color: #fff; }
.plan-meter strong { font-size: 1rem; }
.plan-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.plan-bar span { display: block; height: 100%; border-radius: inherit; background: #fff; }
.plan-meter.full { background: rgba(255, 255, 255, .24); }
.plan-meter-note { font-size: .75rem; font-weight: 700; opacity: .9; }
a.plan-balance:hover { text-decoration: none; background: rgba(255, 255, 255, .22); }
.plan-balance strong { font-size: 1.15rem; }
.plan-renew { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .2); font-size: .85rem; }
.plan-renew .btn { background: #fff; border-color: #fff; color: var(--brand-solid); }

.plan-head { margin: 26px 0 14px; text-align: center; }
.plan-head h2 { margin: 0 0 4px; font-size: clamp(1.3rem, 3vw, 1.7rem); }
.plan-head p { margin: 0; }
/* Plan cards: each tier climbs Linka's own palette, from plain to the full ribbon gradient. */
@property --plan-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.plan-grid { display: grid; gap: 18px; align-items: stretch; }
@media (min-width: 640px) { .plan-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1180px) { .plan-grid { grid-template-columns: repeat(4, 1fr); align-items: center; } }
.plan-card { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; padding: 20px 18px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow);
  animation: plan-in .6s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 90ms);
  transition: translate .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s; }
.plan-card:hover { translate: 0 -6px; box-shadow: 0 22px 44px -18px color-mix(in srgb, var(--brand) 45%, transparent); }
@keyframes plan-in { from { opacity: 0; translate: 0 26px; scale: .97; } to { opacity: 1; translate: 0 0; scale: 1; } }
.plan-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--border); z-index: -1; }
.plan-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: var(--brand-soft); color: var(--brand); transition: rotate .4s, scale .4s; }
.plan-card:hover .plan-icon { rotate: -8deg; scale: 1.08; }
.plan-icon.sm { flex: none; width: 38px; height: 38px; border-radius: 12px; }
.plan-ribbon { padding: 5px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: .72rem; font-weight: 800; white-space: nowrap; }
.plan-card h3 { margin: 14px 0 2px; font-size: 1.45rem; font-weight: 800; letter-spacing: .3px; unicode-bidi: isolate; }
.plan-tag { margin: 0; min-height: 2.6em; color: var(--muted); font-size: .85rem; }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin: 14px 0 12px; }
.plan-price strong { font-size: 2rem; font-weight: 800; line-height: 1.1; color: var(--text); }
.plan-price span { color: var(--muted); font-size: .85rem; }
.plan-fee { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; padding: 9px 12px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-size: .82rem; }
.plan-fee strong { font-size: .95rem; }
.plan-card form { margin: 0; }
.plan-card .btn { transition: translate .2s, box-shadow .2s; }
.plan-card .btn:not(:disabled):hover { translate: 0 -2px; }
.plan-includes { margin: 16px 0 8px; padding-top: 14px; border-top: 1px dashed var(--border); color: var(--muted); font-size: .75rem; font-weight: 700; }
.plan-card .checklist { margin-bottom: 0; }

/* Starter: the violet band */
.plan-card.tier-starter::before { background: var(--gradient); }
.plan-card.tier-starter .plan-icon { background: var(--gradient); color: #fff; }

/* Business: a slowly turning ribbon frame */
.plan-card.tier-business { border: 2px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              conic-gradient(from var(--plan-angle), var(--brand), var(--accent), var(--brand-dark), var(--brand)) border-box;
  animation: plan-in .6s cubic-bezier(.2, .8, .2, 1) backwards, plan-spin 6s linear infinite; animation-delay: calc(var(--i, 0) * 90ms), 0s; }
.plan-card.tier-business::before { display: none; }
.plan-card.tier-business .plan-icon { background: var(--gradient-full); color: #fff; }
.plan-card.tier-business .plan-ribbon { background: var(--accent-soft); color: var(--accent); }
@keyframes plan-spin { to { --plan-angle: 360deg; } }

/* Pro, the featured plan: Linka's deep gradient, a soft glow and a passing shine */
.plan-card.featured { border: 0; color: #fff; background: var(--gradient-deep); box-shadow: 0 24px 50px -20px color-mix(in srgb, var(--brand) 70%, transparent);
  animation: plan-in .6s cubic-bezier(.2, .8, .2, 1) backwards, plan-glow 3.2s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 90ms), .8s; }
@media (min-width: 1180px) { .plan-card.featured { padding-block: 30px 26px; } }
.plan-card.featured::before { inset: 0; height: auto; width: 45%; background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, .22) 50%, transparent 100%); translate: -160% 0; animation: plan-shine 4.5s ease-in-out infinite 1.2s; z-index: 0; pointer-events: none; }
[dir="rtl"] .plan-card.featured::before { translate: 160% 0; animation-name: plan-shine-rtl; }
.plan-card.featured > * { position: relative; z-index: 1; }
@keyframes plan-shine { 0%, 60% { translate: -160% 0; } 100% { translate: 260% 0; } }
@keyframes plan-shine-rtl { 0%, 60% { translate: 160% 0; } 100% { translate: -260% 0; } }
@keyframes plan-glow { 50% { box-shadow: 0 28px 60px -16px color-mix(in srgb, var(--accent) 65%, transparent); } }
.plan-card.featured .plan-icon { background: rgba(255, 255, 255, .18); color: #fff; }
.plan-card.featured .plan-ribbon { background: #fff; color: var(--brand-solid); box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .35); }
.plan-card.featured .plan-tag, .plan-card.featured .plan-price span, .plan-card.featured .plan-includes { color: rgba(255, 255, 255, .82); }
.plan-card.featured .plan-price strong { color: #fff; }
.plan-card.featured .plan-fee { background: rgba(255, 255, 255, .16); color: #fff; }
.plan-card.featured .plan-includes { border-top-color: rgba(255, 255, 255, .3); }
.plan-card.featured .btn-primary { background: #fff; border-color: #fff; color: var(--brand-solid); }
.plan-card.featured .btn-outline { background: transparent; border-color: rgba(255, 255, 255, .7); color: #fff; }

/* The merchant's own plan */
.plan-card.current:not(.featured) { border: 2px solid var(--brand); }
.plan-ribbon.current { background: var(--brand-solid); color: #fff; }
.plan-card.featured .plan-ribbon.current { background: #fff; color: var(--brand-solid); }

@media (prefers-reduced-motion: reduce) {
  .plan-card, .plan-card.featured, .plan-card.tier-business, .plan-card.featured::before { animation: none; }
  .plan-card:hover, .plan-card:hover .plan-icon { translate: none; rotate: none; scale: none; }
}

.plan-compare th, .plan-compare td { padding: 10px 8px; text-align: center; white-space: nowrap; }
.plan-compare th:first-child, .plan-compare td:first-child { text-align: start; color: var(--muted); }
.plan-compare th { font-size: .85rem; color: var(--text); }
.plan-compare .hl { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.plan-fees { display: grid; gap: 10px; margin-bottom: 10px; }
@media (min-width: 760px) { .plan-fees { grid-template-columns: 1fr 1fr; } }
.plan-fees-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; }
.plan-fees-item > div:nth-child(2) { flex: 1; }
.plan-faq { max-width: none; margin: 16px 0 8px; }
.price-card { display: flex; flex-direction: column; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }
.price-card h3 { margin: 0 0 6px; color: var(--muted); font-size: 1rem; }
.price-amount { margin: 0 0 4px; font-size: 2.3rem; font-weight: 700; color: var(--text); }

.faq { display: grid; gap: 10px; max-width: 840px; margin: 0 auto; }
.faq details { padding: 0 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.faq details[open] { border-color: var(--brand); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--brand); transition: rotate .25s; }
.faq details[open] summary .icon { rotate: 180deg; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

.lp-final { position: relative; overflow: hidden; margin-bottom: 8px; padding: 44px 20px; border-radius: 24px; text-align: center; color: #fff; background: var(--gradient-deep); }
.lp-final::before, .lp-final::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.lp-final::before { width: 220px; height: 220px; top: -90px; inset-inline-start: -60px; }
.lp-final::after { width: 160px; height: 160px; bottom: -70px; inset-inline-end: -40px; }
.lp-final > * { position: relative; }
.lp-final h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); margin-bottom: 6px; }
.lp-final p { margin: 0; }
.lp-final a:not(.btn) { color: #fff; text-decoration: underline; }
.lp-final-cta { display: grid; gap: 10px; max-width: 540px; margin: 22px auto 16px; }
@media (min-width: 560px) { .lp-final-cta { grid-template-columns: 1fr 1fr; } }

/* Sections below the fold slide in once (static/js/app.js adds .js-reveal, never under reduced motion). */
.js-reveal .reveal { opacity: 0; translate: 0 24px; transition: opacity .7s ease, translate .7s ease; }
.js-reveal .reveal.in { opacity: 1; translate: 0 0; }
.js-reveal .aud-grid .reveal:nth-child(2), .js-reveal .price-grid .reveal:nth-child(2) { transition-delay: .12s; }
.js-reveal .aud-grid .reveal:nth-child(3) { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lp-visual *, .eyebrow .dot { animation: none !important; }
}

/* Merchant stores (templates/store/, merchant/store.html) */
.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-link { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); font-weight: 700; }
.quick-link:hover { text-decoration: none; border-color: var(--brand); }
.quick-link .icon { color: var(--brand); }

.store-head { margin: -20px -16px 0; }
.store-cover { aspect-ratio: 16 / 6; overflow: hidden; background: linear-gradient(135deg, var(--brand-soft), var(--accent-soft)); }
.store-cover img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 752px) { .store-head .store-cover { border-radius: 0 0 20px 20px; } }
.store-id { display: flex; align-items: flex-end; gap: 12px; padding: 0 16px; margin-top: -36px; position: relative; }
.store-id > div { margin-top: 40px; }  /* the name sits below the cover, only the logo overlaps it */
.store-id h1 { font-size: 1.4rem; margin: 0; }
.store-id .muted .icon { width: 14px; height: 14px; vertical-align: -2px; margin-inline-end: 3px; }
.store-logo { flex: none; width: 76px; height: 76px; border-radius: 20px; overflow: hidden; display: grid; place-items: center; background: var(--surface); border: 3px solid var(--surface); box-shadow: var(--float-shadow); color: var(--brand); font-size: 2rem; font-weight: 700; }
.store-logo img { width: 100%; height: 100%; object-fit: cover; }
.store-logo.sm { width: 32px; height: 32px; border-radius: 10px; border-width: 1px; font-size: 1rem; box-shadow: none; }
.store-about { margin: 12px 0 0; padding: 0 16px; }
.store-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding: 0 16px; }
.store-actions .icon { width: 16px; height: 16px; }
.store-head .trust { padding: 0 16px; }
.store-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--text); font-weight: 600; }
.store-back .icon { width: 16px; height: 16px; color: var(--muted); }
.store-back:hover { text-decoration: none; color: var(--brand); }
.store-preview { overflow: hidden; margin-bottom: 12px; padding-bottom: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.store-preview .store-cover { aspect-ratio: 16 / 5; }
.store-preview .store-id { margin-top: -28px; }
.store-preview .store-id > div { margin-top: 32px; }
.store-preview .store-logo { width: 64px; height: 64px; font-size: 1.6rem; }
.store-preview .badge { margin-inline-start: auto; align-self: flex-end; }

.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 560px) { .shop-grid { grid-template-columns: repeat(3, 1fr); } }
.shop-card { display: grid; gap: 4px; align-content: start; padding-bottom: 12px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); color: inherit; }
.shop-card:hover { text-decoration: none; border-color: var(--brand); }
.shop-thumb { aspect-ratio: 1; overflow: hidden; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.shop-thumb img { width: 100%; height: 100%; object-fit: cover; }
.shop-thumb .icon { width: 36px; height: 36px; }
.shop-title { padding: 0 10px; font-weight: 600; font-size: .9rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-price { padding: 0 10px; font-weight: 700; color: var(--brand); }

/* Statistics (templates/analytics/). Series colours passed the dataviz palette validator in both modes. */
:root { --series-1: #6433D7; --series-2: #E04687; }
@media (prefers-color-scheme: dark) { :root { --series-1: #8A66F0; --series-2: #E85A97; } }
.stat .hint { color: var(--muted); font-size: .75rem; margin-top: 2px; }
.num { font-variant-numeric: tabular-nums; }
.two-cols { display: grid; gap: 12px; }
.two-cols .card + .card { margin-top: 0; }
@media (min-width: 720px) { .two-cols { grid-template-columns: 1fr 1fr; } }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.data-table th { color: var(--muted); font-weight: 600; font-size: .75rem; }
.data-table th, .data-table td { padding: 7px 4px; border-bottom: 1px solid var(--border); text-align: start; }
.data-table .num { text-align: end; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }

.chart-card .card-title { margin: 0; }
.chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.chart-legend { list-style: none; display: flex; gap: 14px; margin: 0; padding: 0; color: var(--muted); font-size: .8rem; }
.chart-legend li { display: inline-flex; align-items: center; gap: 6px; }
.key { display: inline-block; flex: none; width: 14px; height: 2px; border-radius: 1px; }
.key.s1 { background: var(--series-1); }
.key.s2 { background: var(--series-2); }
.chart { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: 170px auto; outline-offset: 4px; border-radius: 6px; }
.chart-ticks { position: relative; grid-row: 1; grid-column: 1; color: var(--muted); font-size: .7rem; font-variant-numeric: tabular-nums; }
.chart-ticks span { position: absolute; right: 8px; transform: translateY(-50%); }
.chart-plot { position: relative; grid-row: 1; grid-column: 2; touch-action: pan-y; }
.chart-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart-grid { position: absolute; left: 0; right: 0; height: 1px; background: var(--border); }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart .line.s1 { stroke: var(--series-1); }
.chart .line.s2 { stroke: var(--series-2); }
.chart .area.s1 { fill: var(--series-1); opacity: .1; }
.chart-dot { position: absolute; left: 100%; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 2px var(--surface); }
.chart-dot.s1 { background: var(--series-1); }
.chart-dot.s2 { background: var(--series-2); }
.chart-cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--muted); opacity: .6; pointer-events: none; }
.chart-tip { position: absolute; top: 0; z-index: 3; transform: translateX(10px); padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--float-shadow); font-size: .8rem; white-space: nowrap; pointer-events: none; }
.chart-tip.flip { transform: translateX(calc(-100% - 10px)); }
.chart-tip .tip-day { color: var(--muted); margin-bottom: 4px; }
.chart-tip .tip-row { display: flex; align-items: center; gap: 6px; }
.chart-tip strong { color: var(--text); font-variant-numeric: tabular-nums; }
.chart-x { grid-row: 2; grid-column: 2; display: flex; justify-content: space-between; padding-top: 6px; color: var(--muted); font-size: .7rem; }
.chart-table summary { margin-top: 12px; color: var(--brand); font-size: .85rem; font-weight: 600; cursor: pointer; }
.chart-table table { margin-top: 8px; }

/* Desktop app shell for merchants and creators (from 1024px, YouCan-style): a navy sidebar on the
   inline-start side and the balance figures in the top bar. Phones keep the tab bar and the boxes. */
:root { --sidebar-w: 256px; --sidebar-bg: #1E1955; --sidebar-text: rgba(255, 255, 255, .78); }
@media (prefers-color-scheme: dark) { :root { --sidebar-bg: #0B0918; } }
.sidebar, .topbar-wallet { display: none; }
/* App pages fill the screen on tablets too; only the public pages keep the narrow phone column. */
@media (min-width: 720px) {
  body.has-tabbar main.container { max-width: none; padding-inline: 24px; }
  body.has-tabbar .form, body.has-tabbar .card:has(> .form) { max-width: 760px; }
  body.has-tabbar .pdp { max-width: 1280px; }
}
@media (min-width: 1024px) {
  body.has-tabbar { padding-bottom: 0; padding-inline-start: var(--sidebar-w); }
  body.has-tabbar .tabbar, body.has-tabbar .wallet-strip, body.has-tabbar .quick-links, body.has-tabbar .topbar .logo { display: none; }
  body.has-tabbar .topbar .container { max-width: none; padding: 0 28px; }
  body.has-tabbar .topbar-inner { height: 64px; }
  body.has-tabbar main.container { max-width: none; padding: 28px 28px 48px; }
  /* Forms stay at a readable width instead of stretching across the wide content area. */
  body.has-tabbar .form, body.has-tabbar .card:has(> .form) { max-width: 760px; }
  body.has-tabbar .store-preview .store-cover { aspect-ratio: auto; height: 200px; }
  body.has-tabbar .offer-grid { grid-template-columns: repeat(3, 1fr); }
  body.has-tabbar .store-head { margin: 0; }
  body.has-tabbar .store-head .store-cover { border-radius: 20px; }

  /* The sidebar: Linka's night violet lit by two slow glows of the logo's own violet and pink. */
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 30; isolation: isolate; contain: paint; display: flex; flex-direction: column; width: var(--sidebar-w); padding: 18px 14px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; background: var(--sidebar-bg); border-inline-end: 1px solid rgba(255, 255, 255, .06); }
  .sidebar::before, .sidebar::after { content: ""; position: fixed; z-index: -1; width: 300px; height: 300px; border-radius: 50%; filter: blur(70px); pointer-events: none; }
  .sidebar::before { top: -130px; inset-inline-start: -110px; background: color-mix(in srgb, var(--brand-solid) 55%, transparent); animation: sidebar-drift 16s ease-in-out infinite alternate; }
  .sidebar::after { bottom: -150px; inset-inline-start: 40px; background: color-mix(in srgb, #C42A6C 32%, transparent); animation: sidebar-drift 20s ease-in-out infinite alternate-reverse; }
  @keyframes sidebar-drift { to { translate: 40px 60px; scale: 1.2; } }
  .sidebar .sidebar-logo { display: inline-flex; padding: 4px 10px 18px; margin-bottom: 8px; border-bottom: 1px solid transparent; border-image: linear-gradient(90deg, transparent, rgba(255, 255, 255, .18), transparent) 1; }
  .sidebar .sidebar-logo .logo-mark { transition: rotate .5s cubic-bezier(.2, .8, .2, 1), scale .5s; }
  .sidebar .sidebar-logo:hover .logo-mark { rotate: -10deg; scale: 1.1; }
  .sidebar-label { margin: 14px 12px 4px; color: rgba(255, 255, 255, .42); font-size: .7rem; font-weight: 800; letter-spacing: .8px; }
  .sidebar-nav { display: grid; gap: 3px; }
  .sidebar-nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 13px; color: var(--sidebar-text); font-weight: 600; font-size: .93rem; transition: background .25s, color .25s, padding .25s; }
  .sidebar-nav > a > .icon:first-child, .sidebar-group summary > .icon:first-child { flex: none; box-sizing: content-box; padding: 7px; border-radius: 10px; background: rgba(255, 255, 255, .06); transition: background .25s, rotate .35s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; }
  .sidebar-nav a:hover { text-decoration: none; color: #fff; background: rgba(255, 255, 255, .06); padding-inline-start: 14px; }
  .sidebar-nav > a:hover > .icon:first-child, .sidebar-group summary:hover > .icon:first-child { background: rgba(255, 255, 255, .14); rotate: -8deg; }
  .sidebar-nav > a.active { color: #fff; background: linear-gradient(90deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
  [dir="rtl"] .sidebar-nav > a.active { background: linear-gradient(270deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03)); }
  .sidebar-nav > a.active > .icon:first-child { background: var(--gradient-full); box-shadow: 0 6px 16px -4px color-mix(in srgb, #C42A6C 70%, transparent); }
  .sidebar-nav > a.active::before { content: ""; position: absolute; inset-block: 12px; inset-inline-start: -14px; width: 4px; border-radius: 4px; background: var(--gradient-full); box-shadow: 0 0 12px 1px color-mix(in srgb, #C42A6C 70%, transparent); }
  .sidebar-nav .icon { width: 18px; height: 18px; }
  .sidebar-group > a.active { color: #fff; background: rgba(255, 255, 255, .08); }
  .sidebar-group > a.active::after { content: ""; position: absolute; inset-inline-start: 26px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--gradient-full); box-shadow: 0 0 8px color-mix(in srgb, #C42A6C 80%, transparent); }
  .sidebar-group[open] { position: relative; }
  .sidebar-group[open]::before { content: ""; position: absolute; top: 46px; bottom: 6px; inset-inline-start: 29px; width: 1px; background: linear-gradient(rgba(255, 255, 255, .18), transparent); }
  /* The merchant's plan, a small card with the logo's ribbon as its frame. */
  .sidebar-plan { display: grid !important; gap: 2px !important; margin-bottom: 10px; padding: 12px 14px !important; border: 1px solid transparent; border-radius: 16px !important; color: #fff !important;
    background: linear-gradient(var(--sidebar-bg), var(--sidebar-bg)) padding-box, var(--gradient-full) border-box !important; position: relative; overflow: hidden; }
  .sidebar-plan::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .12) 50%, transparent 70%); translate: -120% 0; animation: sidebar-shine 6s ease-in-out infinite 2s; pointer-events: none; }
  @keyframes sidebar-shine { 0%, 70% { translate: -120% 0; } 100% { translate: 120% 0; } }
  .sidebar-plan:hover { padding-inline-start: 14px !important; box-shadow: 0 10px 26px -10px color-mix(in srgb, #C42A6C 70%, transparent); }
  .sidebar-plan-kicker { color: rgba(255, 255, 255, .55); font-size: .7rem; font-weight: 700; }
  .sidebar-plan strong { font-size: 1.05rem; letter-spacing: .3px; }
  .sidebar-plan-cta { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; color: rgba(255, 255, 255, .85); }
  .sidebar-plan-cta .icon { width: 14px !important; height: 14px !important; transition: translate .25s; }
  [dir="rtl"] .sidebar-plan-cta .icon { scale: -1 1; }
  .sidebar-plan:hover .sidebar-plan-cta .icon { translate: 4px 0; }
  [dir="rtl"] .sidebar-plan:hover .sidebar-plan-cta .icon { translate: -4px 0; }
  @media (prefers-reduced-motion: reduce) { .sidebar::before, .sidebar::after, .sidebar-plan::after { animation: none; } }
  .nav-badge { margin-inline-start: auto; min-width: 26px; padding: 1px 8px; border-radius: 999px; background: #C42A6C; color: #fff; font-size: .75rem; font-weight: 700; text-align: center; }
  /* Products and My store open into their pages (merchant nav plan N1). */
  .sidebar-group summary { display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 13px; color: var(--sidebar-text); font-weight: 600; font-size: .93rem; cursor: pointer; list-style: none; transition: background .25s, color .25s; }
  .sidebar-group summary::-webkit-details-marker { display: none; }
  .sidebar-group summary:hover, .sidebar-group summary.current { color: #fff; }
  .sidebar-group summary:hover { background: rgba(255, 255, 255, .06); }
  .sidebar-group summary .chevron { width: 16px; height: 16px; margin-inline-start: auto; opacity: .7; transition: transform .15s; }
  .sidebar-group[open] summary .chevron { transform: rotate(180deg); }
  .sidebar-group > a { padding-block: 7px; padding-inline: 46px 12px; font-size: .88rem; }
  .sidebar-group > a:hover { padding-inline-start: 50px; }
  .sidebar-bottom { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .08); }

  .topbar-wallet { display: flex; align-self: stretch; }
  .topbar-wallet a { display: grid; align-content: center; padding: 0 22px; border-inline-end: 1px solid var(--border); color: var(--muted); font-size: .78rem; line-height: 1.35; }
  .topbar-wallet a:first-child { padding-inline-start: 0; }
  .topbar-wallet a:hover { text-decoration: none; }
  .topbar-wallet strong { font-size: 1.05rem; }
  .topbar-wallet .credit { color: var(--success); }
  .topbar-wallet .due { color: var(--danger); }
}

/* My store section (templates/merchant/_store_header.html and the store tabs; store builder plan). */
.subtabs { display: flex; gap: 4px; margin: -4px 0 18px; overflow-x: auto; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.subtabs a { flex: none; padding: 10px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.subtabs a:hover { color: var(--text); text-decoration: none; }
.subtabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
/* Phones only: the way to the other section, since one tab bar button covers both. */
.subtabs .subtabs-switch { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: auto; color: var(--brand); }
.subtabs .subtabs-switch .icon { width: 16px; height: 16px; }
@media (min-width: 1024px) { body.has-tabbar .subtabs .subtabs-switch { display: none; } }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.search-box { position: relative; flex: 1; margin: 0; }
.search-box .icon { position: absolute; top: 50%; inset-inline-start: 12px; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-box input { width: 100%; min-height: 40px; padding: 8px 12px; padding-inline-start: 38px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.search-box input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }

.prow { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; }
.prow-main { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; min-width: 0; color: inherit; }
.prow-main:hover { text-decoration: none; }
.prow-main:hover strong { color: var(--brand); }
.prow-thumb { flex: none; width: 56px; height: 56px; overflow: hidden; display: grid; place-items: center; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.prow-thumb img { width: 100%; height: 100%; object-fit: cover; }
.prow-thumb .icon { width: 22px; height: 22px; }
.prow-info { display: grid; gap: 3px; min-width: 0; }
.prow-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.prow-actions { display: flex; align-items: center; gap: 6px; margin: 0; justify-self: end; }
@media (min-width: 720px) {
  .prow { grid-template-columns: 1fr auto auto; }
  .prow-main { grid-column: auto; }
}

.dropdown { position: relative; }
.dropdown summary { list-style: none; cursor: pointer; }
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown summary .icon { width: 18px; height: 18px; }
.dropdown-menu { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 25; min-width: 200px; display: grid; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--float-shadow); }
.dropdown-menu a, .dropdown-menu button { display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: .9rem; text-align: start; color: var(--text); cursor: pointer; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--brand-soft); text-decoration: none; }
.dropdown-menu button[value="archive"] { color: var(--danger); }
.dropdown-menu button.danger { color: var(--danger); }

/* Categories and Inventory pages (merchant nav plan N2, N3). */
.cat-add { display: flex; gap: 8px; margin: 0; }
.cat-add input, .cat-rename input, .inv-form input, .variant-table input { min-height: 40px; padding: 8px 12px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.cat-add input:focus, .cat-rename input:focus, .inv-form input:focus, .variant-table input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.cat-add input { flex: 1; min-width: 0; }
.cat-row { display: flex; align-items: center; gap: 12px; }
.cat-name { display: grid; gap: 2px; flex: 1; min-width: 0; color: inherit; }
.cat-name:hover { text-decoration: none; }
.cat-name:hover strong { color: var(--brand); }
.cat-actions { display: flex; align-items: center; gap: 6px; }
.cat-actions form { display: flex; gap: 6px; margin: 0; }
.cat-rename { display: grid; gap: 6px; padding: 6px; }
.dropdown-menu .cat-rename button { width: auto; justify-self: start; }
.inv-row { display: flex; align-items: center; gap: 12px; }
.inv-row .prow-main { flex: 1; }
.inv-form { display: flex; align-items: center; gap: 6px; margin: 0; }
.inv-form input { width: 90px; text-align: center; }

.product-form .card + .card { margin-top: 0; }
/* Fields inside a form card get the same spacing as fields directly in a form. */
.form .card { display: grid; gap: 14px; }
.form .card > .card-title { margin: 0; }
.product-form > h2 { margin: 0; }
details.card > summary { cursor: pointer; list-style: none; margin: 0; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: "+"; float: inline-end; color: var(--brand); font-size: 1.2rem; line-height: 1; }
details.card[open] > summary { margin-bottom: 10px; }
details.card[open] > summary::after { content: "−"; }
.field-grid { display: grid; gap: 14px; }
@media (min-width: 560px) { .field-grid { grid-template-columns: 1fr 1fr; } }
.form-actions { display: flex; gap: 8px; align-items: center; }
.form-actions .btn-primary { flex: 1; }

.toggle { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.toggle input { flex: none; appearance: none; -webkit-appearance: none; position: relative; width: 44px; height: 26px; margin: 2px 0 0; border-radius: 999px; background: var(--border); cursor: pointer; transition: background .2s; }
.toggle input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: inset-inline-start .2s; }
.toggle input:checked { background: var(--brand-solid); }
.toggle input:checked::after { inset-inline-start: 21px; }
.toggle input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.toggle-text { display: grid; gap: 2px; }
.toggle-text small { color: var(--muted); font-size: .8rem; }

.thumb-remove { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.thumb-remove input { width: 16px; height: 16px; accent-color: var(--danger); }

.design-previews { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.design-previews .store-cover { flex: 1; height: 76px; aspect-ratio: auto; border-radius: 12px; }
.design-previews .store-logo { width: 64px; height: 64px; font-size: 1.6rem; box-shadow: none; border: 1px solid var(--border); }

/* Spacing utilities last, so they win over component margins. */


.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.product-hero .media.placeholder, .offer-card .thumb.placeholder { aspect-ratio: 16 / 6; }

/* Store design (store builder plan, steps D and E). Store pages repaint --brand and friends from
   the merchant's chosen colour (store/_meta.html); everything below only uses those variables. */
.announce { padding: 9px 16px; background: var(--brand-solid); color: #fff; font-weight: 600; font-size: .9rem; text-align: center; }
.store-announce { margin: -20px -16px 16px; }
.store-announce + .store-head { margin-top: -16px; }
@media (min-width: 752px) { .store-announce { border-radius: 0 0 var(--radius-sm) var(--radius-sm); } }
@media (min-width: 960px) {
  body:not(.has-tabbar) main.store-wide { max-width: 1080px; }
  .store-wide .store-cover { aspect-ratio: 16 / 4; }
}
.shop-grid.portrait .shop-thumb { aspect-ratio: 4 / 5; }
@media (min-width: 960px) { .shop-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.shop-thumb { position: relative; }
.shop-flag { position: absolute; top: 8px; inset-inline-start: 8px; padding: 3px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.shop-flag.sale { background: var(--danger); color: #fff; }
.shop-flag.sold-out { background: var(--text); color: var(--surface); }
@media (prefers-color-scheme: dark) { .shop-flag.sale { background: #C02626; } }
.was { color: var(--muted); font-weight: 400; font-size: .85em; }
.price-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.price-row .was { font-size: 1rem; }

/* Product photos: a swipeable strip with thumbnails under it. */
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track img { flex: 0 0 100%; scroll-snap-align: center; }
.gallery-thumbs { display: flex; gap: 8px; padding: 10px 16px 0; overflow-x: auto; }
.gallery-thumbs button { flex: none; width: 56px; height: 56px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 10px; background: var(--brand-soft); cursor: pointer; }
.gallery-thumbs button.active { border-color: var(--brand); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* Design tab: colour swatches and the live preview. */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.swatch { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font-weight: 600; }
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch-dot { flex: none; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); }
.swatch:has(input:checked) { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.swatch:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Order confirmation calls ---------- */
.calls { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.call-outcomes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.call-outcomes .btn-primary { grid-column: 1 / -1; }
.calls-count { white-space: nowrap; }

/* ---------- Delivery prices (delivery plan D2) ---------- */
.rate-fill { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 12px; }
.rate-fill input, .rate-table input { width: 100px; min-height: 40px; padding: 6px 10px; font: inherit; text-align: center; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.rate-fill input:focus, .rate-table input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.rate-table td { padding: 5px 4px; }
.rate-table tr.has-error input { border-color: var(--danger); }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; padding: 10px 0; background: var(--bg); }
body.has-tabbar .sticky-actions { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) { body.has-tabbar .sticky-actions { bottom: 0; } }

/* ---------- Product page (delivery plan D4): photos beside the order form on wide screens ---------- */
.pdp { display: grid; gap: 16px; }
.pdp-media { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.pdp-media .gallery { padding-bottom: 12px; }
.pdp-media .media { aspect-ratio: 1 / 1; background: var(--brand-soft); display: grid; place-items: center; color: var(--brand); }
.pdp-media .media img { width: 100%; height: 100%; object-fit: cover; }
.pdp-media .media .icon { width: 56px; height: 56px; }
.pdp-media .media.placeholder { aspect-ratio: 16 / 6; }
/* The strip must stay a row: .pdp-media .media above would otherwise stack the photos (plan order-form-pro F4). */
.pdp-media .gallery-track { display: flex; place-items: normal; }
.pdp-info { display: grid; gap: 16px; align-content: start; }
.pdp-head h1 { margin: 2px 0 8px; font-size: 1.45rem; line-height: 1.35; }
.pdp-perks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.pdp-perks li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); font-size: .9rem; }
.pdp-perks .icon { flex: none; width: 18px; height: 18px; color: var(--success); }
.pdp-order, .pdp-about { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); scroll-margin-top: 80px; }
.pdp-order { border-top: 3px solid var(--brand); }
.pdp-order h2, .pdp-about h2 { margin: 0 0 12px; font-size: 1.15rem; }
.pdp-about p { margin: 0 0 8px; line-height: 1.8; }
.pdp-about .icon { width: 16px; height: 16px; vertical-align: -3px; }
.field .label { display: block; font-weight: 600; margin-bottom: 6px; }
.choice-cards { display: grid; gap: 8px; }
@media (min-width: 560px) { .choice-cards { grid-template-columns: 1fr 1fr; } }
.choice-card { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font-weight: 600; }
.choice-card input { flex: none; }
.choice-card .choice-text { flex: 1; font-size: .9rem; }
.choice-card .choice-price { color: var(--brand); font-weight: 700; white-space: nowrap; }
.choice-card:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: var(--brand-soft); }
.choice-card:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; min-width: 0; text-transform: uppercase; }
.field .help.ok { color: var(--success); }
.stepper .btn { min-width: 44px; padding: 0; font-size: 1.2rem; }
.field .stepper input { width: 72px; text-align: center; }
.pdp-summary { margin: 16px 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-hover); display: grid; gap: 6px; }
.pdp-summary div { display: flex; justify-content: space-between; gap: 12px; }
.pdp-summary dt { color: var(--muted); }
.pdp-summary dd { margin: 0; font-weight: 600; }
.pdp-summary .total { padding-top: 8px; border-top: 1px dashed var(--border); font-size: 1.1rem; }
.pdp-summary .total dt { color: var(--text); font-weight: 700; }
.pdp-summary .total dd { color: var(--brand); font-weight: 700; }

/* Order form steps, option buttons and the summary (plan order-form-pro F2, F3). */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pdp-order > p.muted { margin: -6px 0 14px; }
.order-step { display: grid; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.order-step + .order-step { padding-top: 2px; }
.step-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1rem; }
.step-no { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .85rem; font-weight: 700; }
.stock-low { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 0; padding: 4px 12px; border-radius: 999px; background: var(--danger-bg); color: var(--danger); font-size: .85rem; font-weight: 700; }
.stock-low::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .stock-low::before { animation: none; } }

.opt-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.opt-group legend { padding: 0; margin-bottom: 8px; font-weight: 600; }
.opt-chosen { font-weight: 400; color: var(--muted); }
.opt-values { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.opt-text { min-width: 48px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-weight: 600; }
.opt-text:has(input:checked) { border-color: var(--brand); background: var(--brand); color: #fff; }
.opt-color { width: 44px; height: 44px; border-radius: 50%; border: 2px solid transparent; }
.opt-color .dot { width: 34px; height: 34px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.opt-color:has(input:checked) { border-color: var(--brand); }
.opt-image { flex-direction: column; gap: 4px; width: 76px; padding: 4px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.opt-image img { width: 66px; height: 66px; object-fit: cover; border-radius: 8px; }
.opt-cap { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; font-weight: 600; }
.opt-image:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.opt:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.opt-group.has-error .opt-text, .opt-group.has-error .opt-image { border-color: var(--danger); }
.opt.is-out { opacity: .45; }
.opt.is-out span, .opt.is-out .opt-cap { text-decoration: line-through; }
.opt-color.is-out::after { content: ""; position: absolute; inset: 50% 4px auto; height: 2px; background: var(--muted); rotate: -45deg; pointer-events: none; }
.pdp-order .btn-order.is-out { animation: none; box-shadow: none; }
.pdp-order .btn-order.is-out::after { display: none; }
.qty-field { margin: 0; }

.input-icon { position: relative; }
.input-icon .icon { position: absolute; inset-inline-start: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.field .input-icon input, .field .input-icon select { padding-inline-start: 40px; }
.field .input-icon textarea { padding-inline-start: 40px; }
.input-icon:has(textarea) .icon { top: 14px; transform: none; }
.choice-card > .icon { flex: none; width: 20px; height: 20px; color: var(--muted); }
.choice-card:has(input:checked) > .icon { color: var(--brand); }

.pdp-summary .sum-product { display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding-bottom: 8px; margin-bottom: 2px; border-bottom: 1px dashed var(--border); }
.sum-product img { flex: none; width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.sum-product > div { flex: 1; min-width: 0; display: grid; justify-content: stretch; gap: 2px; }
.sum-product strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sum-qty { color: var(--muted); font-weight: 700; }
.btn-order .btn-total { white-space: nowrap; }

.order-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -6px 20px rgba(20, 16, 50, .08); transition: transform .2s; }
.order-bar.away { transform: translateY(110%); }
body:has(.order-bar) main { padding-bottom: 88px; }
@media (min-width: 900px) {
  body:not(.has-tabbar):not(.store-page) main:has(.pdp) { max-width: 1080px; }
  .pdp { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; gap: 24px; }
  .pdp-media { position: sticky; top: 84px; }
  .order-bar { display: none; }
  body:has(.order-bar) main { padding-bottom: 0; }
}
body.has-tabbar .form.rate-form { max-width: 820px; }
@media (min-width: 900px) { .pdp-media .media.placeholder { aspect-ratio: 1 / 1; } }

/* Product editor, YouCan-style (plan product-form-youcan): a bar with the name and Save, the main column,
   and a side column for status and organisation from 960px. */
html:not([dir="rtl"]) .icon-back { transform: scaleX(-1); }
body.has-tabbar .form.product-form { max-width: none; }
.editor-bar { display: flex; align-items: center; gap: 8px; }
.editor-bar h2 { flex: 1; min-width: 0; margin: 0; font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-bar-actions { display: none; gap: 8px; }
.editor, .editor-main, .editor-side { display: grid; gap: 14px; align-content: start; min-width: 0; }
@media (min-width: 960px) {
  .editor { grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
  .editor-side { position: sticky; top: 140px; }
  .editor-bar { position: sticky; top: 56px; z-index: 6; margin: -8px 0 0; padding: 10px 0; background: var(--bg); border-bottom: 1px solid var(--border); }
  body.has-tabbar .editor-bar { top: 64px; }
  .editor-bar-actions { display: flex; }
  .editor-actions { display: none; }
}

/* Photo uploader: every photo in a grid, the first is the main one; drag or use the arrows to reorder. */
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.photo-grid:empty { display: none; }
/* Option looks in the product editor (plan order-form-pro F1). */
.option-row { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--border); }
.style-pick div[id] { display: flex; flex-wrap: wrap; gap: 8px; }
.style-pick div[id] > div > label { margin: 0; }
.swatch-editor { display: grid; gap: 8px; padding: 10px; border-radius: var(--radius-sm); background: var(--surface-hover); }
.swatch-editor[hidden] { display: none; }
.variant-stock { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.variant-table { display: grid; gap: 6px; padding: 10px; border-radius: var(--radius-sm); background: var(--surface-hover); }
.variant-table[hidden] { display: none; }
.variant-table .help { margin: 0; color: var(--muted); font-size: .85rem; }
.variant-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; }
.variant-line input { width: 110px; flex: none; text-align: center; }
.variant-total { padding-top: 6px; border-top: 1px solid var(--border); color: var(--muted); }
.inv-row:has(.inv-variants) { flex-wrap: wrap; }
.inv-form:has(.inv-variants) { flex: 1 1 100%; flex-direction: column; align-items: stretch; gap: 8px; padding: 10px; border-radius: var(--radius-sm); background: var(--surface-hover); }
.inv-form:has(.inv-variants) .btn { align-self: flex-end; }
.inv-variants { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); column-gap: 24px; }
.inv-variants .variant-line { font-weight: 500; font-size: .9rem; }
.inv-variants .variant-line input { width: 90px; }
.swatch-editor .help { margin: 0; color: var(--muted); font-size: .85rem; }
.swatch-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.swatch-name { min-width: 72px; font-weight: 600; }
.swatch-line input[type="color"] { width: 48px; height: 36px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.swatch-photos { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch-photo { width: 48px; height: 48px; padding: 0; overflow: hidden; border: 2px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--muted); font: inherit; font-size: .7rem; cursor: pointer; }
.swatch-photo img { width: 100%; height: 100%; object-fit: cover; }
.swatch-photo[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.photo { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--brand-soft); }
.photo img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.photo .thumb-remove { position: absolute; inset-inline: 0; bottom: 0; padding: 4px; font-size: .75rem; background: var(--surface); }
.photo-badge { display: none; position: absolute; top: 6px; inset-inline-start: 6px; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; color: #fff; background: var(--brand-solid); }
.photo:first-child { grid-column: span 2; grid-row: span 2; border: 2px solid var(--brand); }
.photo:first-child .photo-badge { display: block; }
.photos.is-live .photo { cursor: grab; touch-action: none; }
.photo.dragging { opacity: .55; cursor: grabbing; outline: 2px dashed var(--brand); }
.photo-tools { position: absolute; bottom: 6px; inset-inline: 6px; display: flex; gap: 4px; justify-content: flex-end; }
.photo-btn { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; color: var(--text); background: rgba(255, 255, 255, .92); box-shadow: 0 1px 4px rgba(0, 0, 0, .2); cursor: pointer; }
.photo-btn .icon { width: 16px; height: 16px; }
.photo-btn.danger { color: var(--danger); }
.photo-btn:disabled { opacity: .35; cursor: default; }
.photo-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.dropzone { position: relative; display: grid; justify-items: center; gap: 6px; margin-top: 10px; padding: 26px 16px; text-align: center; border: 2px dashed var(--border); border-radius: var(--radius); color: var(--text); background: var(--bg); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone .icon { width: 32px; height: 32px; color: var(--brand); }
.dropzone:hover, .dropzone.over, .dropzone:focus-within { border-color: var(--brand); background: var(--brand-soft); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photos.has-error .dropzone { border-color: var(--danger); }

/* Market product page for creators (plan creator-product-page). */
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; font-weight: 600; }
.back-link .icon { width: 18px; height: 18px; }
.offer-card a.title { color: inherit; }
.offer-card a.title:hover { color: var(--brand); text-decoration: none; }
.title-row { display: flex; align-items: flex-start; gap: 10px; }
.title-row h1 { flex: 1; min-width: 0; }
.title-row .btn { flex: none; margin-top: 4px; }
.downloads { margin-top: 12px; display: grid; gap: 10px; }
.downloads .card-title { margin: 0; }
.dl-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.dl-grid a { position: relative; display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.dl-grid img { width: 100%; height: 100%; object-fit: cover; }
.dl-badge { position: absolute; bottom: 6px; inset-inline-end: 6px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--brand); background: rgba(255, 255, 255, .92); box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.dl-badge .icon { width: 16px; height: 16px; }
.dl-grid a:hover .dl-badge, .dl-grid a:focus-visible .dl-badge { color: #fff; background: var(--brand-solid); }

/* Campaigns (plan phase 3, step F) */
.pre-line { white-space: pre-line; }

/* Campaigns for creators as ads (creator/campaigns.html, creator/campaign.html), the bell and the new campaign pop-up. */
.ad-grid { display: grid; gap: 16px; }
@media (min-width: 700px) { .ad-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1280px) { .ad-grid { grid-template-columns: repeat(3, 1fr); } }
.ad-card { display: flex; flex-direction: column; overflow: hidden; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); animation: ad-in .6s calc(var(--i, 0) * 90ms) cubic-bezier(.2, .8, .3, 1) both; transition: translate .25s, box-shadow .25s; }
.ad-card:hover { text-decoration: none; translate: 0 -4px; box-shadow: var(--float-shadow); }
.ad-media { position: relative; aspect-ratio: 16 / 11; overflow: hidden; background: var(--gradient-deep); }
.ad-media > img { width: 100%; height: 100%; object-fit: cover; transition: scale 1.2s ease; }
.ad-card:hover .ad-media > img { scale: 1.07; }
.ad-card.is-over .ad-media > img { filter: grayscale(.8); }
.ad-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: var(--gradient-full); background-size: 200% 200%; animation: ad-flow 6s ease-in-out infinite alternate; }
.ad-placeholder .icon { width: 64px; height: 64px; opacity: .9; }
.ad-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(14, 10, 40, .82) 0%, rgba(14, 10, 40, .25) 45%, rgba(14, 10, 40, 0) 70%); pointer-events: none; }
.ad-ribbon { position: absolute; top: 12px; inset-inline-start: 12px; padding: 4px 12px; border-radius: 999px; background: #C42A6C; color: #fff; font-size: .78rem; font-weight: 800; animation: ad-glow 1.8s ease-in-out infinite; }
.ad-merchant { display: inline-flex; align-items: center; gap: 6px; max-width: 70%; padding-block: 4px; padding-inline: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: #1E1955; font-size: .8rem; font-weight: 700; box-shadow: 0 2px 10px rgba(14, 10, 40, .2); }
.ad-merchant > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-merchant img, .ad-initial { flex: none; width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.ad-initial { display: grid; place-items: center; background: var(--gradient); color: #fff; font-size: .75rem; }
.ad-media .ad-merchant { position: absolute; top: 12px; inset-inline-end: 12px; }
.ad-commission { position: relative; display: grid; overflow: hidden; padding: 8px 14px; border-radius: 14px; color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ad-commission small { font-size: .72rem; opacity: .9; }
.ad-commission strong { font-size: 1.45rem; line-height: 1.2; }
.ad-commission::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: -60%; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-20deg); animation: ad-shine 3.2s ease-in-out infinite; }
.ad-media .ad-commission { position: absolute; bottom: 12px; inset-inline-start: 12px; }
.ad-body { display: grid; gap: 8px; padding: 14px 16px 16px; flex: 1; align-content: start; }
.ad-title { font-size: 1.1rem; line-height: 1.35; }
.ad-goal { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ad-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-soft { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--muted-bg); color: var(--muted); font-size: .78rem; font-weight: 700; }
.chip-soft.is-urgent { background: var(--danger-bg); color: var(--danger); }
.chip-soft.is-urgent::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: ad-blink 1.2s ease-in-out infinite; }
.ad-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.ad-thumbs { display: flex; }
.ad-thumbs img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--surface); }
.ad-thumbs img + img { margin-inline-start: -10px; }
.ad-cta { position: relative; overflow: hidden; margin-inline-start: auto; padding: 8px 16px; border-radius: 999px; background: var(--gradient); color: #fff; font-weight: 800; font-size: .88rem; white-space: nowrap; box-shadow: 0 6px 16px rgba(100, 51, 215, .3); }
.ad-cta::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: -60%; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent); transform: skewX(-20deg); animation: ad-shine 2.6s 1s ease-in-out infinite; }
.ad-cta.is-quiet { background: var(--brand-soft); color: var(--brand-dark); box-shadow: none; }
.ad-cta.is-quiet::after { display: none; }

.ad-hero { position: relative; overflow: hidden; border-radius: 24px; color: #fff; background: var(--gradient-deep); box-shadow: var(--float-shadow); }
.ad-hero-media { position: absolute; inset: 0; }
.ad-hero-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.ad-hero-media > img.is-on { opacity: 1; animation: ad-zoom 9s ease-in-out infinite alternate; }
.ad-hero .ad-shade { background: linear-gradient(to top, rgba(14, 10, 40, .92) 0%, rgba(14, 10, 40, .55) 50%, rgba(14, 10, 40, .15) 100%); }
.ad-hero-body { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; min-height: 380px; padding: 18px; }
.ad-hero-body > * { animation: ad-in .7s cubic-bezier(.2, .8, .3, 1) both; }
.ad-hero-body > :nth-child(2) { animation-delay: .1s; }
.ad-hero-body > :nth-child(3) { animation-delay: .2s; }
.ad-hero-body > :nth-child(4) { animation-delay: .3s; }
.ad-hero-body > :nth-child(5) { animation-delay: .4s; }
.ad-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: auto; }
.ad-hero h1 { margin: 0; color: #fff; font-size: 1.7rem; line-height: 1.25; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.ad-hero-goal { margin: 0; opacity: .92; }
.ad-hero-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.ad-countdown { display: grid; padding: 8px 14px; border-radius: 14px; background: rgba(14, 10, 40, .35); border: 1px solid rgba(255, 255, 255, .2); }
.ad-countdown small { font-size: .72rem; opacity: .85; }
.ad-countdown strong { font-size: 1.45rem; line-height: 1.2; }
.ad-hero-dates { opacity: .8; }
@media (min-width: 720px) { .ad-hero-body { min-height: 420px; padding: 28px; } .ad-hero h1 { font-size: 2.2rem; } }
.ad-product-row { display: flex; align-items: center; gap: 12px; }
.ad-product-photo { flex: none; width: 84px; height: 84px; display: grid; place-items: center; overflow: hidden; border-radius: 16px; background: var(--brand-soft); color: var(--brand); }
.ad-product-photo img { width: 100%; height: 100%; object-fit: cover; }
.ad-product-text { display: grid; gap: 4px; justify-items: start; min-width: 0; }

.bell { position: relative; display: inline-grid; place-items: center; width: 38px; height: 36px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--muted); }
.bell:hover { color: var(--brand); border-color: var(--brand); text-decoration: none; }
.bell .icon { width: 20px; height: 20px; }
.bell.has-news { color: var(--brand); border-color: var(--brand); }
.bell.has-news .icon { transform-origin: 50% 10%; animation: ad-ring 4s ease-in-out infinite; }
.bell-count { position: absolute; top: -7px; inset-inline-end: -7px; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: #C42A6C; color: #fff; font-size: .7rem; font-weight: 800; border: 2px solid var(--surface); animation: pop .5s .3s cubic-bezier(.3, 1.6, .5, 1) both; }
.quick-link .nav-badge { margin-inline-start: auto; min-width: 24px; padding: 1px 8px; border-radius: 999px; background: #C42A6C; color: #fff; font-size: .75rem; text-align: center; }

.campaign-toast { position: fixed; z-index: 50; inset-inline: 12px; bottom: 16px; display: flex; align-items: flex-start; gap: 4px; padding: 10px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 18px 40px rgba(30, 25, 85, .28); opacity: 0; translate: 0 140%; transition: opacity .35s, translate .55s cubic-bezier(.2, 1.2, .4, 1); }
.campaign-toast::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 4px; background: var(--gradient-full); }
.campaign-toast.is-in { opacity: 1; translate: 0 0; }
body.has-tabbar .campaign-toast { bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) { .campaign-toast, body.has-tabbar .campaign-toast { inset-inline: auto 24px; bottom: 24px; width: 380px; } }
.campaign-toast-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--text); }
.campaign-toast-link:hover { text-decoration: none; }
.campaign-toast-photo { flex: none; width: 64px; height: 64px; display: grid; place-items: center; overflow: hidden; border-radius: 14px; background: var(--gradient-full); color: #fff; animation: ad-glow 1.8s ease-in-out infinite; }
.campaign-toast-photo img { width: 100%; height: 100%; object-fit: cover; }
.campaign-toast-text { display: grid; gap: 1px; min-width: 0; }
.campaign-toast-text small { color: var(--accent); font-weight: 800; font-size: .75rem; }
.campaign-toast-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.campaign-toast-text .money { font-size: .85rem; }
.campaign-toast-close { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--muted-bg); color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; }

@keyframes ad-in { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
@keyframes ad-shine { 0%, 55% { inset-inline-start: -60%; } 100% { inset-inline-start: 130%; } }
@keyframes ad-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(196, 42, 108, .55); } 50% { box-shadow: 0 0 0 8px rgba(196, 42, 108, 0); } }
@keyframes ad-blink { 50% { opacity: .25; } }
@keyframes ad-flow { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes ad-zoom { from { scale: 1; } to { scale: 1.09; } }
@keyframes ad-ring { 0%, 80%, 100% { rotate: 0deg; } 84% { rotate: 16deg; } 88% { rotate: -14deg; } 92% { rotate: 10deg; } 96% { rotate: -6deg; } }
@media (prefers-reduced-motion: reduce) {
  .ad-card, .ad-hero-body > *, .ad-placeholder, .ad-ribbon, .ad-commission::after, .ad-cta::after, .chip-soft.is-urgent::before,
  .ad-hero-media > img.is-on, .bell .icon, .bell-count, .campaign-toast-photo { animation: none !important; }
  .campaign-toast { transition: none; }
}

/* ---------- Creators' market (plan market-pro) ---------- */
.mk-hero { position: relative; overflow: hidden; display: grid; gap: 10px; margin-bottom: 16px; padding: 22px 18px; border-radius: 24px; color: #fff; background: var(--gradient-deep); box-shadow: var(--float-shadow); }
.mk-hero h1 { position: relative; margin: 0; color: #fff; font-size: 1.6rem; animation: ad-in .6s cubic-bezier(.2, .8, .3, 1) both; }
.mk-hero p { position: relative; margin: 0; opacity: .9; animation: ad-in .6s .1s cubic-bezier(.2, .8, .3, 1) both; }
.mk-blob { position: absolute; width: 260px; height: 260px; inset-inline-end: -80px; top: -110px; background: var(--gradient-full); opacity: .55; filter: blur(8px); animation: morph 9s ease-in-out infinite, float 7s ease-in-out infinite; pointer-events: none; }
.mk-search { position: relative; display: flex; flex-wrap: wrap; gap: 8px; animation: ad-in .6s .2s cubic-bezier(.2, .8, .3, 1) both; }
.mk-search-field { flex: 1 1 220px; display: flex; align-items: center; gap: 8px; padding-inline: 12px; border-radius: 14px; background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.mk-search-field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.mk-search-field .icon { flex: none; width: 18px; height: 18px; }
.mk-search-field input { flex: 1; min-width: 0; padding: 11px 0; border: 0; background: none; color: var(--text); font: inherit; outline: none; box-shadow: none; }
.mk-search select { flex: 1 1 auto; width: auto; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.mk-search .btn { border-radius: 14px; }
.mm-tabs + .mk-search { margin-bottom: 14px; }
.mk-h2 { margin: 0 0 10px; font-size: 1.05rem; }
.mk-count { margin: 0 0 10px; }
.mk-merchants { margin-bottom: 14px; }
.mk-merchant-row { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; scroll-snap-type: x proximity; }
.mk-merchant { flex: none; width: 86px; display: grid; justify-items: center; gap: 4px; text-align: center; color: var(--text); scroll-snap-align: start; animation: pop .5s calc(var(--i, 0) * 60ms) cubic-bezier(.3, 1.4, .5, 1) both; }
.mk-merchant:hover { text-decoration: none; }
.mk-logo { position: relative; width: 66px; height: 66px; display: grid; place-items: center; padding: 3px; border-radius: 50%; background: var(--border); transition: translate .25s; }
.mk-merchant:hover .mk-logo { translate: 0 -3px; }
.mk-merchant.has-campaign .mk-logo { background: conic-gradient(from 0deg, #C42A6C, #743BF2, #2BB3E8, #C42A6C); animation: pc-spin 4s linear infinite; }
.mk-logo img, .mk-logo .ad-initial { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface); background: var(--surface); }
.mk-merchant.has-campaign .mk-logo img, .mk-merchant.has-campaign .mk-logo .ad-initial { animation: pc-spin 4s linear infinite reverse; }
.mk-logo .ad-initial { font-size: 1.4rem; background: var(--gradient); }
.mk-merchant-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; font-weight: 700; }
.mk-merchant small { color: var(--muted); font-size: .72rem; }
.mk-merchant.has-campaign small { color: #C42A6C; font-weight: 800; }
.mk-more[aria-busy="true"] { opacity: .6; pointer-events: none; }

.pc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .pc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1280px) { .pc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pc { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); transition: translate .25s, box-shadow .25s; animation: ad-in .6s calc(min(var(--i, 0), 8) * 70ms) cubic-bezier(.2, .8, .3, 1) both; }
@supports (animation-timeline: view()) {
  .pc { animation: pc-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
}
.pc:hover { translate: 0 -4px; box-shadow: var(--float-shadow); }
.pc-media { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; overflow: hidden; color: var(--brand); background: linear-gradient(100deg, var(--muted-bg) 30%, var(--surface-hover) 50%, var(--muted-bg) 70%) 0 0 / 300% 100%; animation: pc-skeleton 1.4s linear infinite; }
.pc-media.is-empty { background: var(--brand-soft); animation: none; }
.pc-media.is-empty .icon { width: 44px; height: 44px; }
.pc-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: scale .9s ease, opacity .5s ease; }
.pc-media > .pc-alt { opacity: 0; }
.pc:hover .pc-media > img { scale: 1.06; }
.pc:hover .pc-media.has-alt > .pc-alt, .pc:focus-within .pc-media.has-alt > .pc-alt { opacity: 1; }
.pc-media::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(to top, rgba(14, 10, 40, .7), rgba(14, 10, 40, 0)); pointer-events: none; }
.pc-ribbons { position: absolute; z-index: 1; top: 8px; inset-inline-start: 8px; display: grid; justify-items: start; gap: 4px; }
.pc-ribbon { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; color: #fff; font-size: .72rem; font-weight: 800; box-shadow: 0 2px 8px rgba(14, 10, 40, .25); }
.pc-ribbon .icon { width: 13px; height: 13px; }
.pc-ribbon.is-campaign { background: var(--gradient); }
.pc-ribbon.is-sale { background: var(--danger); }
.pc-ribbon.is-new { background: #C42A6C; animation: ad-glow 1.8s ease-in-out infinite; }
.pc-sold { position: absolute; z-index: 1; top: 8px; inset-inline-end: 8px; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: #1E1955; font-size: .72rem; font-weight: 800; box-shadow: 0 2px 8px rgba(14, 10, 40, .2); }
.pc-commission { position: absolute; z-index: 1; bottom: 8px; inset-inline-start: 8px; display: grid; overflow: hidden; padding: 5px 11px; border-radius: 12px; color: #fff; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pc-commission small { font-size: .68rem; opacity: .92; }
.pc-commission strong { font-size: 1.15rem; line-height: 1.2; }
.pc-commission::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: -60%; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent); transform: skewX(-20deg); animation: ad-shine 3.2s calc(var(--i, 0) * 150ms) ease-in-out infinite; }
.pc-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 10px 12px 12px; }
.pc-merchant { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; color: var(--muted); font-size: .76rem; font-weight: 700; }
.pc-merchant:hover { color: var(--brand); text-decoration: none; }
.pc-merchant > span:not(.ad-initial) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-merchant img, .pc-merchant .ad-initial { flex: none; width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.pc-merchant .ad-initial { font-size: .7rem; }
.pc-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); font-weight: 700; line-height: 1.35; }
.pc-title:hover { color: var(--brand); text-decoration: none; }
.pc-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.pc-price s { color: var(--muted); font-size: .8rem; }
.pc-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.pc-tags .chip-soft { font-size: .7rem; padding: 2px 8px; }
.pc-tags .icon { width: 13px; height: 13px; }
.chip-soft.is-good { background: var(--success-bg); color: var(--success); }
.chip-soft.is-hot { background: var(--warning-bg); color: var(--warning); }
.pc-actions { margin-top: auto; padding-top: 4px; }
.pc-actions .btn { white-space: normal; font-size: .8rem; }
.pc-cta { position: relative; overflow: hidden; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 10px; border: 0; border-radius: 12px; background: var(--gradient); color: #fff; font: inherit; font-weight: 800; font-size: .8rem; white-space: nowrap; cursor: pointer; box-shadow: 0 6px 16px rgba(100, 51, 215, .28); transition: translate .2s, box-shadow .2s; }
.pc-cta:hover { translate: 0 -1px; box-shadow: 0 10px 22px rgba(100, 51, 215, .38); }
.pc-cta .icon { width: 16px; height: 16px; }
.pc-cta::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: -60%; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent); transform: skewX(-20deg); animation: ad-shine 2.8s 1s ease-in-out infinite; }

.pdp-head .pc-merchant { font-size: .85rem; }
.pdp-offer { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--gradient); color: #fff; box-shadow: 0 8px 20px rgba(100, 51, 215, .28); animation: ad-in .6s .2s cubic-bezier(.2, .8, .3, 1) both; }
.pdp-offer:hover { color: #fff; text-decoration: none; translate: 0 -2px; }
.pdp-offer .icon { flex: none; width: 22px; height: 22px; }
.pdp-offer span { flex: 1; }
.pdp-offer strong { flex: none; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .2); font-size: .8rem; }
.pdp-more { margin-top: 24px; }

.mm-hero { overflow: hidden; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow); animation: ad-in .6s cubic-bezier(.2, .8, .3, 1) both; }
.mm-cover { position: relative; height: 150px; overflow: hidden; background: var(--gradient-deep); }
.mm-cover img { width: 100%; height: 100%; object-fit: cover; animation: ad-zoom 12s ease-in-out infinite alternate; }
.mm-cover .ad-shade { background: linear-gradient(to top, rgba(14, 10, 40, .45), rgba(14, 10, 40, 0)); }
.mm-body { display: grid; gap: 12px; padding: 0 16px 16px; }
.mm-id { position: relative; display: flex; align-items: flex-end; gap: 12px; margin-top: -38px; }
.mm-id h1 { margin: 0; font-size: 1.4rem; }
.mm-id .icon { width: 14px; height: 14px; }
.mm-logo { flex: none; width: 84px; height: 84px; border-radius: 22px; overflow: hidden; border: 4px solid var(--surface); background: var(--surface); box-shadow: var(--shadow); animation: pop .6s .2s cubic-bezier(.3, 1.4, .5, 1) both; }
.mm-logo img, .mm-logo .ad-initial { width: 100%; height: 100%; object-fit: cover; border-radius: 0; font-size: 2rem; }
.mm-about { margin: 0; color: var(--muted); }
.mm-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0; }
@media (min-width: 640px) { .mm-stats { grid-template-columns: repeat(4, 1fr); } .mm-cover { height: 200px; } }
.mm-stats > div { padding: 10px 12px; border-radius: 14px; background: var(--muted-bg); animation: ad-in .5s cubic-bezier(.2, .8, .3, 1) both; }
.mm-stats > div:nth-child(2) { animation-delay: .08s; }
.mm-stats > div:nth-child(3) { animation-delay: .16s; }
.mm-stats > div:nth-child(4) { animation-delay: .24s; }
.mm-stats dt { color: var(--muted); font-size: .75rem; }
.mm-stats dd { margin: 0; font-size: 1.25rem; font-weight: 800; }
/* How a merchant pays creators (plan merchant-payment-trust T3) */
.trusted-badge { flex: none; width: 15px; height: 15px; color: var(--success); vertical-align: -2px; }
h1 .trusted-badge { width: 22px; height: 22px; vertical-align: -3px; }
.trust-card { margin-bottom: 16px; }
.trust-numbers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 8px 0; }
@media (min-width: 640px) { .trust-numbers { grid-template-columns: repeat(4, 1fr); } }
.trust-numbers > div { padding: 10px 12px; border-radius: 14px; background: var(--muted-bg); }
.trust-numbers dt { color: var(--muted); font-size: .75rem; }
.trust-numbers dd { margin: 0; font-size: 1.15rem; font-weight: 800; }
.trust-numbers dd.is-bad { color: var(--danger); }
.trust-numbers small { font-size: .7rem; }
.mm-links { display: flex; flex-wrap: wrap; gap: 6px; }
.mm-tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: 6px; margin-bottom: 14px; padding: 5px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.mm-tabs a { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border-radius: 12px; color: var(--muted); font-weight: 700; transition: background .2s, color .2s; }
.mm-tabs a:hover { text-decoration: none; color: var(--text); }
.mm-tabs a.active { background: var(--gradient); color: #fff; box-shadow: 0 6px 16px rgba(100, 51, 215, .25); }
.mm-tabs .icon { width: 18px; height: 18px; }
.mm-tabs .count { min-width: 22px; padding: 0 6px; border-radius: 999px; background: rgba(127, 127, 127, .18); font-size: .75rem; }

@keyframes pc-rise { from { opacity: 0; translate: 0 40px; scale: .96; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes pc-skeleton { to { background-position: -300% 0; } }
@keyframes pc-spin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  .mk-hero h1, .mk-hero p, .mk-blob, .mk-search, .mk-merchant, .mk-merchant.has-campaign .mk-logo, .mk-merchant.has-campaign .mk-logo img,
  .mk-merchant.has-campaign .mk-logo .ad-initial, .pc, .pc-media, .pc-ribbon.is-new, .pc-commission::after, .pc-cta::after,
  .pdp-offer, .mm-hero, .mm-cover img, .mm-logo, .mm-stats > div { animation: none !important; }
}
/* Wide screens: more cards per row now that app pages use the full width. */
@media (min-width: 1600px) { .pc-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } body.has-tabbar .ad-grid { grid-template-columns: repeat(3, 1fr); } }

/* Orders as a YouCan-style table (plan orders-table O1, O2): a table from 1024px, cards on phones. */
.ord-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ord-search { flex: 1 1 240px; display: flex; align-items: center; gap: 8px; padding-inline: 12px; border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.ord-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.ord-search .icon { flex: none; width: 18px; height: 18px; }
.ord-search input { flex: 1; min-width: 0; padding: 9px 0; border: 0; background: none; color: var(--text); font: inherit; outline: none; box-shadow: none; }
.ord-toolbar select { flex: 0 1 200px; width: auto; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.ord-table-wrap { display: none; }
.ord-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (min-width: 1024px) {
  body.has-tabbar .ord-cards { display: none; }
  body.has-tabbar .ord-table-wrap { display: block; overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
}
.ord-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.ord-table th { padding: 12px 14px; background: var(--surface-hover); color: var(--muted); font-size: .78rem; font-weight: 700; text-align: start; white-space: nowrap; }
.ord-table td { padding: 12px 14px; border-top: 1px solid var(--border); vertical-align: middle; }
.ord-table tbody tr { transition: background-color .15s; }
.ord-table tbody tr:hover { background: var(--surface-hover); }
.ord-table .num { text-align: end; white-space: nowrap; }
.ord-table .muted .icon { width: 13px; height: 13px; vertical-align: -2px; }
.ord-table td.muted { white-space: nowrap; }
.ord-ref { font-weight: 800; color: var(--text); white-space: nowrap; }
a.ord-ref:hover { color: var(--brand); }
.ord-product { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.ord-thumb { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; overflow: hidden; background: var(--brand-soft); color: var(--brand); }
.ord-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ord-thumb .icon { width: 18px; height: 18px; }
.ord-opt { display: block; }
.ord-status { margin: 0; }
.ord-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.status-select { width: auto; max-width: 190px; padding: 5px 10px; border: 0; border-radius: 999px; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.status-select:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.status-select option { background: var(--surface); color: var(--text); font-weight: 600; }
.ord-actions { display: flex; gap: 6px; justify-content: flex-end; }
.ord-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); }
.ord-btn:hover { color: var(--brand); border-color: var(--brand); text-decoration: none; }
.ord-btn .icon { width: 16px; height: 16px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.pager [aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* Wide app pages (plan orders-table O3). ".list-item" is declared after ".split", so rows marked
   "list-item split" lost their flex layout: amounts and badges sat in the middle of the row. */
.list-item.split { display: flex; }
@media (min-width: 1024px) {
  body.has-tabbar .list:has(.inv-row) { max-width: 960px; }
}

/* ---------- Creator profiles and social account verification ---------- */
.badge-verified { display: inline-flex; align-items: center; gap: 4px; background: var(--info-bg); color: var(--info); }
.badge-verified .icon { width: 14px; height: 14px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; background: var(--muted-bg); color: var(--muted); display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; }
.avatar-lg { width: 88px; height: 88px; font-size: 2rem; }
.profile-head { display: flex; gap: 14px; align-items: center; }
.profile-head h1 { margin: 0; }
.progress { height: 8px; border-radius: 999px; background: var(--muted-bg); overflow: hidden; margin: 8px 0; }
.progress > span { display: block; height: 100%; background: var(--brand-solid); border-radius: inherit; }
.account-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.account-row .actions { margin: 0; }
.creator-grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .creator-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .creator-grid { grid-template-columns: repeat(3, 1fr); } }
.choice-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }

/* Privacy policy and terms */
.legal { max-width: 760px; margin: 0 auto; }
.legal h1 { font-size: 1.4rem; margin: 0 0 4px; }
.legal h2 { font-size: 1.05rem; margin: 18px 0 6px; }
.legal ul { padding-inline-start: 20px; }
.legal li { margin-bottom: 6px; }
.lp-legal { text-align: center; color: var(--muted); margin: 8px 0 24px; }

/* Sign-in and sign-up (templates/identity/auth_base.html). Phones: the form in the 720px column, as before.
   From 960px the page fills the screen: the brand panel on the reading-start side, the form centred beside it. */
main.auth { width: 100%; max-width: 720px; margin: 0 auto; padding: 20px 16px 24px; }
.auth-side { display: none; }
@media (min-width: 960px) {
  .is-auth .topbar .container { max-width: none; padding: 0 28px; }
  main.auth {
    max-width: none; padding: 0; min-height: calc(100vh - 57px); min-height: calc(100dvh - 57px);
    display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); grid-template-rows: auto 1fr;
  }
  .auth-side {
    grid-column: 1; grid-row: 1 / span 2; align-self: start; position: sticky; top: 57px; height: calc(100vh - 57px); height: calc(100dvh - 57px); display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
    overflow: hidden; padding: clamp(32px, 4vw, 56px); background: var(--gradient-deep); color: #fff;
  }
  .auth-side::after { content: ""; position: absolute; inset-block-start: -120px; inset-inline-end: -120px; width: 360px; height: 360px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
  .auth-side-text { position: relative; z-index: 1; max-width: 32em; }
  .auth-side h2 { font-size: clamp(1.6rem, 2.3vw, 2.3rem); line-height: 1.25; margin-bottom: 10px; }
  .auth-side p { font-size: 1.1rem; opacity: .92; margin: 0; }
  .auth > .messages { grid-column: 2; width: min(520px, 100% - 48px); justify-self: center; margin-top: 32px; }
  .auth-main { grid-column: 2; grid-row: 2; align-self: center; justify-self: center; width: min(520px, 100% - 48px); padding: 40px 0; }
  .auth-main h1 { font-size: 1.9rem; }
  .auth-main .card { padding: 32px; }
  .auth-main .form input, .auth-main .form select { padding-block: 12px; }
  .auth-main .btn-block { padding-block: 13px; font-size: 1.05rem; }
  .auth-main.auth-choose { width: min(720px, 100% - 48px); }
  .auth-choose .list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; background: none; border: 0; box-shadow: none; overflow: visible; }
  .auth-choose .list-item { padding: 28px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
  .auth-choose .list-item:hover { border-color: var(--brand); transform: translateY(-2px); text-decoration: none; }
  .auth-choose .list-item strong { font-size: 1.2rem; }
  .auth-choose .list-item .icon { width: 32px; height: 32px; color: var(--brand); }
}

/* Sign-in and sign-up animations: the form and the brand panel come in one piece after another, the panel's
   light circles drift, and the main button shines now and then. A form sent back with errors shakes instead. */
.auth-main > *, .auth-main .form > *, .auth-choose .list-item { animation: auth-rise .55s cubic-bezier(.2, .7, .3, 1) both; }
.auth-main > :nth-child(2) { animation-delay: .35s; }
.auth-main .form > :nth-child(2), .auth-choose .list-item:nth-child(1) { animation-delay: .12s; }
.auth-main .form > :nth-child(3), .auth-choose .list-item:nth-child(2) { animation-delay: .19s; }
.auth-main .form > :nth-child(4) { animation-delay: .26s; }
.auth-main .form > :nth-child(5) { animation-delay: .33s; }
.auth-main .form > :nth-child(n+6) { animation-delay: .4s; }
.auth-main .card:has(.has-error, .form-errors) { animation: auth-shake .45s ease-in-out both; }
.auth-main .card:has(.has-error, .form-errors) .form > * { animation: none; }
.auth-main .field input, .auth-main .field select { transition: border-color .2s, box-shadow .2s; }
.auth-main .field input:focus, .auth-main .field select:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.auth-main .field:focus-within label { color: var(--brand); transition: color .2s; }
.auth-main .btn-primary { position: relative; overflow: hidden; transition: translate .15s, box-shadow .15s; }
.auth-main .btn-primary:hover { translate: 0 -2px; box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 35%, transparent); }
.auth-main .btn-primary::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: -60%; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); animation: ad-shine 3.6s 1.4s ease-in-out infinite; }
@media (min-width: 960px) {
  .auth-side { background-size: 200% 200%; animation: ad-flow 14s ease-in-out infinite alternate; }
  .auth-side::after { animation: auth-drift 11s ease-in-out infinite alternate; }
  .auth-side::before { content: ""; position: absolute; inset-block-end: -140px; inset-inline-start: -100px; width: 320px; height: 320px; border-radius: 50%;
    background: rgba(255, 79, 135, .16); animation: auth-drift 13s -4s ease-in-out infinite alternate-reverse; }
  .auth-side h2, .auth-side p, .auth-side li { animation: auth-slide .6s cubic-bezier(.2, .7, .3, 1) both; }
  .auth-side p { animation-delay: .12s; }
  .auth-side li:nth-child(1) { animation-delay: .24s; }
  .auth-side li:nth-child(2) { animation-delay: .34s; }
  .auth-side li:nth-child(3) { animation-delay: .44s; }
  .auth-side li .icon { animation: pop .4s cubic-bezier(.3, 1.6, .5, 1) both; }
  .auth-side li:nth-child(1) .icon { animation-delay: .5s; }
  .auth-side li:nth-child(2) .icon { animation-delay: .6s; }
  .auth-side li:nth-child(3) .icon { animation-delay: .7s; }
}
@keyframes auth-rise { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }
@keyframes auth-slide { from { opacity: 0; translate: 24px 0; } to { opacity: 1; translate: 0 0; } }
[dir="ltr"] .auth-side h2, [dir="ltr"] .auth-side p, [dir="ltr"] .auth-side li { animation-name: auth-slide-ltr; }
@keyframes auth-slide-ltr { from { opacity: 0; translate: -24px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes auth-drift { from { translate: 0 0; scale: 1; } to { translate: -60px 50px; scale: 1.2; } }
@keyframes auth-shake { 0%, 100% { translate: 0 0; } 20% { translate: -8px 0; } 40% { translate: 7px 0; } 60% { translate: -5px 0; } 80% { translate: 3px 0; } }
@media (prefers-reduced-motion: reduce) {
  .auth-main > *, .auth-main .form > *, .auth-choose .list-item, .auth-main .card, .auth-main .btn-primary::after,
  .auth-side, .auth-side::before, .auth-side::after, .auth-side h2, .auth-side p, .auth-side li, .auth-side li .icon { animation: none; }
  .auth-main .btn-primary:hover { translate: none; }
}

/* «Linka Connection» in the sign-in panel (templates/identity/auth_base.html, static/js/auth-scene.js): the Linka hub,
   then the merchant, the creator and the product, joined by white light trails over the usual brand gradient.
   The stage keeps a 5:4 box (as the SVG's 1000×800 view), so the cards placed in % sit on the trails' ends. */
@media (min-width: 960px) {
  .auth-side-word { display: block; width: 104px; height: auto; margin-bottom: 18px; }
  .lk-scene { position: relative; z-index: 1; flex: 1 1 auto; min-height: 280px; container-type: size; display: grid; place-items: center; }
  .lk-stage { position: relative; width: min(100cqw, 125cqh, 760px); aspect-ratio: 5 / 4; container-type: inline-size; font-size: clamp(11px, 1.9cqi, 15px); }
  .lk-net { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; pointer-events: none; }
  .lk-line, .lk-glow { stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-width .3s, opacity .3s; }
  .lk-line { stroke-width: 3; opacity: .85; }
  .lk-glow { stroke-width: 16; opacity: .2; filter: blur(6px); }
  .lk-pulse { stroke: #fff; stroke-width: 7; stroke-linecap: round; stroke-dasharray: .12 1.2; stroke-dashoffset: .12; opacity: 0; filter: drop-shadow(0 0 6px #fff); }
  .lk-dot { opacity: 0; filter: drop-shadow(0 0 5px #fff); }
  .lk-ring { fill: none; stroke: #fff; stroke-width: 3; opacity: 0; transform-box: fill-box; transform-origin: center; }
  .lk-stage[data-hot="merchant"] [data-lk-link="merchant"] .lk-line, .lk-stage[data-hot="creator"] [data-lk-link="creator"] .lk-line,
  .lk-stage[data-hot="product"] [data-lk-link="product"] .lk-line { stroke-width: 5; opacity: 1; }
  .lk-stage[data-hot="merchant"] [data-lk-link="merchant"] .lk-glow, .lk-stage[data-hot="creator"] [data-lk-link="creator"] .lk-glow,
  .lk-stage[data-hot="product"] [data-lk-link="product"] .lk-glow { opacity: .55; }

  .lk-node { position: absolute; z-index: 1; transform: translate(-50%, -50%); }
  .lk-hub { left: 50%; top: 45%; width: 22%; z-index: 2; }
  .lk-merchant { left: 17.5%; top: 23.75%; width: 31%; }
  .lk-creator { left: 82.5%; top: 23.75%; width: 31%; }
  .lk-product { left: 50%; top: 83.1%; width: 42%; }
  .lk-tilt { transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--s, 1)); transform-style: preserve-3d;
    transition: transform .35s cubic-bezier(.2, .7, .3, 1), filter .3s, box-shadow .3s; }
  .lk-stage[data-hot="merchant"] .lk-merchant .lk-tilt, .lk-stage[data-hot="creator"] .lk-creator .lk-tilt,
  .lk-stage[data-hot="product"] .lk-product .lk-tilt { --s: 1.06; filter: brightness(1.1); }

  .lk-card { padding: .9em; border-radius: 1.1em; color: #fff; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .32);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 18px 40px rgba(30, 10, 70, .3), inset 0 1px 0 rgba(255, 255, 255, .35); }
  .lk-merchant .lk-card { box-shadow: 0 18px 40px rgba(30, 10, 70, .3), 0 0 32px rgba(217, 203, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .35); }
  .lk-creator .lk-card { box-shadow: 0 18px 40px rgba(30, 10, 70, .3), 0 0 32px rgba(235, 200, 255, .4), inset 0 1px 0 rgba(255, 255, 255, .35); }
  .lk-product .lk-card { box-shadow: 0 18px 40px rgba(30, 10, 70, .3), 0 0 32px rgba(255, 79, 135, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
    display: flex; align-items: center; gap: .8em; }
  .lk-card-head { display: flex; align-items: center; gap: .55em; }
  .lk-card strong { font-size: 1.15em; }
  .lk-chip { flex: none; display: grid; place-items: center; width: 2.1em; height: 2.1em; border-radius: .65em; background: #fff; color: #6433D7; }
  .lk-chip .icon { width: 1.2em; height: 1.2em; }
  .lk-thumb { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: .7em; margin: .7em 0; }
  .lk-product .lk-thumb { flex: none; width: 38%; aspect-ratio: 1; margin: 0; }
  .lk-card-text { min-width: 0; }
  .auth-side .lk-card p { margin: 0; font-size: .9em; line-height: 1.45; opacity: .92; }
  .auth-side .lk-product .lk-card p { margin-top: .5em; }
  .lk-avatar { width: 2.6em; height: 2.6em; border-radius: 50%; object-fit: cover; border: 2px solid #fff; }
  .lk-socials { display: flex; gap: .45em; margin: .75em 0; }
  .lk-socials svg { width: 1.95em; height: 1.95em; padding: .4em; border-radius: 50%; background: rgba(255, 255, 255, .2); color: #fff;
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  @container (max-width: 470px) { .lk-merchant .lk-thumb, .lk-socials { display: none; } .auth-side .lk-creator p { margin-top: .6em; } }

  .lk-cube { position: relative; display: grid; place-content: center; justify-items: center; gap: .5em; aspect-ratio: 1; border-radius: 1.6em; cursor: pointer;
    background: linear-gradient(145deg, #fff, #F3EEFF); box-shadow: 0 0 0 1px rgba(255, 255, 255, .7), 0 0 44px rgba(255, 255, 255, .45), 0 26px 50px rgba(30, 10, 70, .38); }
  .lk-cube::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: rgba(255, 255, 255, .35); transform: translate3d(.7em, .7em, -30px); }
  .lk-cube img { width: 58%; height: auto; }
  .lk-cube .lk-cube-word { width: 52%; }
  .lk-hub::before { content: ""; position: absolute; inset: -45%; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(255, 255, 255, .42), rgba(255, 79, 135, .14) 45%, transparent 70%); }
  .lk-hub:hover .lk-tilt { --s: 1.05; }

  .lk-features { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; font-size: .88rem; font-weight: 600; }
  .lk-features li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); }
  .lk-features .icon { width: 20px; height: 20px; flex: none; }

  /* The order: the hub, the merchant from the left, the creator from the right, the product from below, the trails,
     then particles and a pulse (auth-scene.js), then a calm float. */
  .lk-hub { animation: lk-hub-in .8s .1s cubic-bezier(.3, 1.4, .5, 1) both; }
  .lk-merchant { animation: lk-from-left .7s .7s cubic-bezier(.2, .7, .3, 1) both; }
  .lk-creator { animation: lk-from-right .7s .9s cubic-bezier(.2, .7, .3, 1) both; }
  .lk-product { animation: lk-from-below .7s 1.1s cubic-bezier(.2, .7, .3, 1) both; }
  .lk-line, .lk-glow { animation: lk-draw .8s 1.5s cubic-bezier(.6, 0, .3, 1) forwards; }
  [data-lk-link="creator"] .lk-line, [data-lk-link="creator"] .lk-glow { animation-delay: 1.7s; }
  [data-lk-link="product"] .lk-line, [data-lk-link="product"] .lk-glow { animation-delay: 1.9s; }
  .lk-dot { animation: lk-show .4s 2.3s forwards; }
  .lk-tilt { animation: float 6s 2s ease-in-out infinite; }
  .lk-merchant .lk-tilt { animation-delay: .5s; }
  .lk-creator .lk-tilt { animation-delay: 3.5s; }
  .lk-product .lk-tilt { animation-delay: 1.4s; }
  .lk-hub::before { animation: lk-breathe 4s ease-in-out infinite alternate; }
  .lk-link.is-pulse .lk-pulse { animation: lk-run 1.1s ease-out; }
  .lk-stage.is-ring .lk-ring { animation: lk-ring 1s ease-out; }
  .lk-stage.is-ring .lk-cube { animation: lk-bump .5s ease-out; }
}
@keyframes lk-hub-in { from { opacity: 0; scale: .5; } to { opacity: 1; scale: 1; } }
@keyframes lk-from-left { from { opacity: 0; translate: -120px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes lk-from-right { from { opacity: 0; translate: 120px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes lk-from-below { from { opacity: 0; translate: 0 100px; } to { opacity: 1; translate: 0 0; } }
@keyframes lk-draw { to { stroke-dashoffset: 0; } }
@keyframes lk-show { to { opacity: 1; } }
@keyframes lk-run { 0% { stroke-dashoffset: .12; opacity: 1; } 85% { opacity: 1; } 100% { stroke-dashoffset: -1.05; opacity: 0; } }
@keyframes lk-ring { from { opacity: .9; scale: .9; } to { opacity: 0; scale: 2.4; } }
@keyframes lk-bump { 40% { scale: 1.08; } }
@keyframes lk-breathe { from { opacity: .7; scale: .92; } to { opacity: 1; scale: 1.06; } }
@media (prefers-reduced-motion: reduce) {
  .lk-node, .lk-tilt, .lk-line, .lk-glow, .lk-hub::before, .lk-link.is-pulse .lk-pulse, .lk-stage.is-ring .lk-ring, .lk-stage.is-ring .lk-cube { animation: none; }
  .lk-line, .lk-glow { stroke-dashoffset: 0; }
  .lk-dot { display: none; }
}

/* Sign in with Google, «نسيت كلمة السر» and the «الدخول وكلمة السر» page. */
.btn-google { background: var(--surface); border-color: var(--border); color: var(--text); gap: 10px; }
.btn-google:hover { background: var(--surface-hover); border-color: var(--brand); }
.google-g { width: 20px; height: 20px; flex: none; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: .875rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.google-pending { display: flex; align-items: flex-start; gap: 12px; padding: 12px; margin: 12px 0 16px; border-radius: var(--radius-sm); background: var(--success-bg); color: var(--text); }
.google-pending > .icon { color: var(--success); flex: none; margin-top: 2px; }
.google-pending > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.forgot-sent { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--radius-sm); background: var(--success-bg); }
.forgot-sent .icon { color: var(--success); flex: none; }
.forgot-sent p { margin: 0; }
.forgot-help { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.forgot-help p { margin: 6px 0 12px; }
.btn-whatsapp { background: #128C4B; border-color: transparent; color: #fff; }
.btn-whatsapp:hover { background: #0E7340; }
.security-cards { max-width: 760px; }

/* Landing page on large PC screens: the 1160px column left wide empty margins, so it grows with the screen
   and the hero fills the first view. */
@media (min-width: 1280px) {
  .is-landing .topbar .container, .lp-wrap { max-width: 1560px; padding-inline: clamp(32px, 3vw, 56px); }
  .landing > .messages { max-width: 1560px; padding-inline: clamp(32px, 3vw, 56px); }
  .lp-hero { min-height: calc(100vh - 57px); min-height: calc(100dvh - 57px); display: flex; align-items: center; padding: 40px 0 64px; }
  .lp-hero-grid { gap: 72px; }
  .lp-hero h1 { font-size: clamp(3rem, 3.3vw, 4.1rem); }
  .lp-sub { font-size: clamp(1.5rem, 1.6vw, 1.95rem); }
  .lp-hero .lead { font-size: 1.2rem; }
  .lp-visual { max-width: 680px; }
  .lp-section { padding-top: 88px; }
  .price-grid { max-width: 1040px; }
  .faq { max-width: 960px; }
}

/* Professional store (store-pro plan): the merchant's top bar, header, slider, sections and footer.
   Colours come from --s-* (store/_meta.html, apps/stores/colors.py): any colour, with the text colour chosen
   for contrast, so nothing here puts fixed white or black text on a merchant colour. */
body.store-page { background: var(--s-bg); color: var(--s-text); }
.sf-wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 1024px) { .sf-wrap { padding-inline: clamp(24px, 3vw, 48px); } }
.sf-main { padding-bottom: 32px; }
.sf-main > .messages { max-width: 1320px; margin: 16px auto 0; padding-inline: 16px; }
.store-page .btn-primary { background: var(--s-primary); color: var(--s-on-primary); }
.store-page .btn-primary.btn-lg { box-shadow: none; }
.store-page .chips a.active { background: var(--s-primary); border-color: var(--s-primary); color: var(--s-on-primary); }
.sf-main a:not(.btn), .sf-header a, .sf-footer a, .sf-topbar a { color: inherit; }

.sf-topbar { background: var(--s-top); color: var(--s-on-top); font-size: .85rem; }
.sf-topbar-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; min-height: 38px; }
.sf-announce { margin: 0; text-align: center; font-weight: 600; }
.sf-top-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.sf-top-link .icon { width: 16px; height: 16px; }
.sf-topbar .lang-menu { justify-self: end; }
.sf-topbar .lang-menu summary { color: inherit; }
@media (max-width: 700px) {
  .sf-topbar-inner { grid-template-columns: 1fr auto; padding-block: 6px; }
  .sf-top-link { display: none; }
  .sf-announce { text-align: start; font-size: .8rem; }
}

.sf-header { background: var(--s-surface); border-bottom: 1px solid var(--s-border); position: sticky; top: 0; z-index: 20; }
.sf-header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; min-height: 72px; }
.sf-brand { justify-self: center; display: inline-flex; align-items: center; gap: 10px; font-size: 1.35rem; font-weight: 700; color: var(--s-text); }
.sf-brand:hover { text-decoration: none; }
.sf-brand img { height: 48px; width: auto; max-width: 160px; object-fit: contain; border-radius: 10px; }
.sf-search { justify-self: end; display: flex; align-items: center; width: min(320px, 100%); border: 1px solid var(--s-border); border-radius: 999px; background: var(--s-bg); }
.sf-search input { flex: 1; min-width: 0; border: 0; background: none; padding: 9px 16px; font: inherit; color: var(--s-text); outline: none; }
.sf-search button { border: 0; background: none; padding: 8px 12px; color: var(--s-muted); cursor: pointer; }
.sf-search button .icon { width: 18px; height: 18px; }
.sf-search:focus-within { border-color: var(--s-accent); }
.sf-menu { justify-self: start; }
.sf-menu summary { list-style: none; cursor: pointer; padding: 8px; border-radius: 10px; }
.sf-menu summary::-webkit-details-marker { display: none; }
.sf-menu-list { position: absolute; inset-inline: 0; top: 100%; display: grid; background: var(--s-surface); border-bottom: 1px solid var(--s-border); box-shadow: var(--float-shadow); padding: 8px 16px 16px; }
.sf-menu-list a { padding: 12px 4px; border-bottom: 1px solid var(--s-border); font-weight: 600; }
.sf-nav { border-top: 1px solid var(--s-border); }
.sf-nav .sf-wrap { display: flex; justify-content: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.sf-nav a { flex: none; padding: 12px 14px; font-weight: 600; border-bottom: 2px solid transparent; }
.sf-nav a:hover, .sf-nav a[aria-current] { text-decoration: none; color: var(--s-accent); border-bottom-color: var(--s-primary); }
@media (min-width: 861px) { .sf-menu { visibility: hidden; } }
@media (max-width: 860px) {
  .sf-nav { display: none; }
  .sf-header-inner { grid-template-columns: auto 1fr; grid-template-areas: "menu brand" "search search"; min-height: 0; padding-block: 10px; row-gap: 10px; }
  .sf-menu { grid-area: menu; }
  .sf-brand { grid-area: brand; justify-self: center; margin-inline-end: 40px; font-size: 1.15rem; }
  .sf-brand img { height: 38px; }
  .sf-search { grid-area: search; width: 100%; }
}

.sf-slider { position: relative; overflow: hidden; background: var(--s-soft); }
.sf-slides { display: grid; }
.sf-slide { grid-area: 1 / 1; position: relative; display: grid; align-items: center; min-height: clamp(260px, 40vw, 560px); opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }
.sf-slide.is-active { opacity: 1; visibility: visible; }
.sf-slide picture, .sf-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sf-slide-text { position: relative; z-index: 1; padding-block: 40px; }
.sf-slide:not(.no-image) .sf-slide-text { color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .45); }
.sf-slide:not(.no-image)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(270deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .05) 70%); pointer-events: none; }
[dir="ltr"] .sf-slide:not(.no-image)::after { background: linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .05) 70%); }
.sf-slide.no-image { background: var(--s-primary); color: var(--s-on-primary); }
.sf-slide-text h2 { margin: 0 0 10px; font-size: clamp(1.7rem, 4vw, 3.4rem); line-height: 1.15; max-width: 16ch; }
.sf-slide-text p { margin: 0 0 20px; font-size: clamp(1rem, 1.6vw, 1.3rem); max-width: 38ch; }
.sf-slide-btn { background: var(--s-primary); color: var(--s-on-primary); border-color: transparent; padding: 12px 28px; font-weight: 700; text-shadow: none; }
.sf-slide.no-image .sf-slide-btn { background: var(--s-on-primary); color: var(--s-primary); }
.sf-arrow { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .85); color: #14122B; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }
.sf-arrow.prev { inset-inline-start: 16px; }
.sf-arrow.next { inset-inline-end: 16px; }
.sf-arrow .icon, .sf-arrow-sm .icon { width: 20px; height: 20px; }
.sf-arrow.prev .icon, .sf-arrow-sm.prev .icon { rotate: 90deg; }
.sf-arrow.next .icon, .sf-arrow-sm.next .icon { rotate: -90deg; }
[dir="rtl"] .sf-arrow.prev .icon, [dir="rtl"] .sf-arrow-sm.prev .icon { rotate: -90deg; }
[dir="rtl"] .sf-arrow.next .icon, [dir="rtl"] .sf-arrow-sm.next .icon { rotate: 90deg; }
.sf-dots { position: absolute; bottom: 14px; inset-inline: 0; z-index: 2; display: flex; justify-content: center; gap: 8px; }
.sf-dots button { width: 10px; height: 10px; padding: 0; border-radius: 999px; border: 2px solid #fff; background: rgba(255, 255, 255, .3); cursor: pointer; transition: width .3s; }
.sf-dots button[aria-current] { width: 28px; background: #fff; }
@media (max-width: 700px) {
  .sf-arrow { display: none; }
  .sf-slide { min-height: 0; aspect-ratio: 4 / 5; align-items: end; }
  .sf-slide.no-image { aspect-ratio: auto; min-height: 280px; }
  .sf-slide:not(.no-image)::after, [dir="ltr"] .sf-slide:not(.no-image)::after { background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .65)); }
  .sf-slide-text { padding-block: 24px 44px; }
}

.sf-trust { border-bottom: 1px solid var(--s-border); background: var(--s-surface); }
.sf-trust ul { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; padding-block: 22px; }
.sf-trust li { display: flex; align-items: center; gap: 12px; }
.sf-trust-icon { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--s-soft); color: var(--s-accent); }
.sf-trust strong { display: block; }
.sf-trust small { color: var(--s-muted); }
@media (max-width: 700px) {
  .sf-trust ul { grid-template-columns: 1fr 1fr; gap: 14px 10px; padding-block: 16px; }
  .sf-trust li { flex-direction: column; text-align: center; gap: 6px; font-size: .85rem; }
  .sf-trust-icon { width: 40px; height: 40px; }
  .sf-trust small { display: none; }
}

.sf-section { padding-top: clamp(28px, 4vw, 56px); }
.sf-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sf-section-head h2 { margin: 0; font-size: clamp(1.3rem, 2.2vw, 1.85rem); }
.sf-section-head a { color: var(--s-accent); font-weight: 600; }
.sf-section-sub { margin: -8px 0 16px; color: var(--s-muted); }
.sf-chips { margin-bottom: 16px; }

.sf-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 210px)); justify-content: center; gap: 20px; }
.sf-cat { display: grid; gap: 10px; text-align: center; font-weight: 700; }
.sf-cat:hover { text-decoration: none; }
.sf-cat-photo { aspect-ratio: 1; border-radius: 18px; overflow: hidden; display: grid; place-items: center; background: var(--s-soft); color: var(--s-accent); }
.sf-cat-photo img { width: 100%; height: 100%; object-fit: cover; transition: scale .4s ease; }
.sf-cat:hover img { scale: 1.06; }
@media (max-width: 700px) {
  .sf-cats { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 12px; }
  .sf-cat { flex: 0 0 34%; scroll-snap-align: start; font-size: .9rem; }
}

.sf-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .sf-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1100px) { .sf-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.sf-row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 12px) / 2.15); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 4px; }
.sf-row::-webkit-scrollbar { display: none; }
.sf-row > * { scroll-snap-align: start; }
@media (min-width: 700px) { .sf-row { grid-auto-columns: calc((100% - 40px) / 3); gap: 20px; } }
@media (min-width: 1100px) { .sf-row { grid-auto-columns: calc((100% - 60px) / 4); } }
.sf-row-arrows { display: flex; gap: 8px; }
.sf-arrow-sm { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--s-border); background: var(--s-surface); color: var(--s-text); display: grid; place-items: center; cursor: pointer; }
.sf-arrow-sm:hover { border-color: var(--s-primary); }
.sf-arrow-sm:disabled { opacity: .35; cursor: default; }

.sf-card { display: flex; flex-direction: column; background: var(--s-surface); border: 1px solid var(--s-border); border-radius: 16px; overflow: hidden; transition: box-shadow .25s, translate .25s; }
.sf-card:hover { box-shadow: 0 12px 30px rgba(20, 18, 43, .12); translate: 0 -2px; }
.sf-card-photo { position: relative; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; background: var(--s-soft); color: var(--s-accent); }
.sf-card.portrait .sf-card-photo { aspect-ratio: 4 / 5; }
.sf-card-photo img { width: 100%; height: 100%; object-fit: cover; transition: scale .4s ease; }
.sf-card:hover .sf-card-photo img { scale: 1.05; }
.sf-badges { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.sf-badge { padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; line-height: 1.3; }
.sf-badge.sale { background: #C02626; color: #fff; }
.sf-badge.best { background: var(--s-primary); color: var(--s-on-primary); }
.sf-badge.new { background: #fff; color: #14122B; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.sf-badge.sold-out { background: #14122B; color: #fff; }
.sf-card-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 12px; }
.sf-card-title { font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.sf-card-title:hover { text-decoration: none; color: var(--s-accent); }
.sf-card-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.sf-card-price strong { font-size: 1.1rem; color: var(--s-accent); }
.sf-card-price s { color: var(--s-muted); font-size: .85rem; }
.sf-card-note { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--success); font-weight: 600; }
.sf-card-note .icon { width: 14px; height: 14px; }
.sf-card form, .sf-card-btn { margin-top: auto; }
.sf-card-btn .icon { width: 16px; height: 16px; }
@media (max-width: 700px) {
  .sf-card-body { padding: 10px; }
  .sf-card-title { font-size: .9rem; }
  .sf-card-price strong { font-size: 1rem; }
}

.sf-banner { position: relative; display: grid; align-items: center; min-height: clamp(200px, 26vw, 360px); border-radius: 20px; overflow: hidden; background: var(--s-primary); }
.sf-main a.sf-banner { color: var(--s-on-primary); }
.sf-banner:hover { text-decoration: none; }
.sf-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sf-banner:not(.no-image)::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .38); }
.sf-main a.sf-banner:not(.no-image) { color: #fff; }
.sf-banner-text { position: relative; z-index: 1; display: grid; justify-items: start; gap: 10px; padding: 28px clamp(20px, 5vw, 64px); }
.sf-banner-text strong { font-size: clamp(1.5rem, 3vw, 2.6rem); line-height: 1.2; }
.sf-banner-text > span:not(.btn) { font-size: 1.1rem; max-width: 46ch; }
.sf-banner.no-image .sf-slide-btn { background: var(--s-on-primary); color: var(--s-primary); }

.sf-product { padding-top: 16px; max-width: 1200px; }
.sf-crumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--s-muted); font-size: .9rem; }
.sf-crumbs .icon { width: 14px; height: 14px; }
.sf-crumbs span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 1024px) { .sf-product .pdp { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: start; } }

.sf-footer { margin-top: 48px; background: var(--s-top); color: var(--s-on-top); }
.sf-footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; padding-block: 40px 28px; }
.sf-footer-name { font-size: 1.3rem; }
.sf-footer p { margin: 10px 0 0; opacity: .85; line-height: 1.7; }
.sf-footer h2 { margin: 0 0 12px; font-size: 1rem; }
.sf-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sf-footer li, .sf-footer li a { display: inline-flex; align-items: center; gap: 8px; }
.sf-footer .icon { width: 16px; height: 16px; }
.sf-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-block: 16px; border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent); font-size: .85rem; opacity: .85; }

/* Store editor (store-pro plan, step C): settings on one side, the real store in a frame on the other. */
.editor { display: grid; gap: 16px; align-items: start; }
.editor-side { display: grid; gap: 16px; min-width: 0; }
.editor-side .design-form { display: grid; gap: 16px; }
.editor-preview { display: none; }
@media (min-width: 1100px) {
  .editor { grid-template-columns: 420px minmax(0, 1fr); }
  .editor-preview { display: flex; flex-direction: column; position: sticky; top: 84px; height: calc(100vh - 100px); min-height: 520px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
  .editor-save { position: sticky; bottom: 12px; z-index: 2; }
  .editor-save .btn { box-shadow: var(--float-shadow); }
}
.editor-preview-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.editor-preview-bar strong { margin-inline-end: auto; }
.editor-frame-wrap { position: relative; flex: 1; overflow: hidden; background: var(--muted-bg); }
.editor-frame { position: absolute; top: 0; inset-inline-start: 0; width: 1280px; border: 0; background: #fff; transform-origin: top right; }
[dir="ltr"] .editor-frame { transform-origin: top left; }
.editor-preview.phone .editor-frame { inset-inline-start: calc(50% - 195px); width: 390px; transform: none !important; height: 100% !important;
  border-inline: 1px solid var(--border); }
.segmented { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--muted-bg); }
.segmented button { border: 0; background: none; padding: 5px 12px; border-radius: 999px; font: inherit; font-size: .85rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

.section-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.section-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.section-row.is-hidden .section-name { opacity: .55; }
.section-row.dragging { opacity: .5; border-style: dashed; }
.section-grip { display: grid; color: var(--muted); cursor: grab; }
.section-grip .icon { width: 18px; height: 18px; }
.section-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: inherit; }
.section-name:hover { text-decoration: none; }
.section-name > .icon { flex: none; width: 20px; height: 20px; color: var(--brand); }
.section-name > span { display: grid; min-width: 0; }
.section-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-tools { display: flex; align-items: center; gap: 2px; }
.section-arrows { display: contents; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.icon-btn:hover { background: var(--muted-bg); color: var(--text); }
.icon-btn.danger:hover { color: var(--danger); background: var(--danger-bg); }
.icon-btn .icon { width: 18px; height: 18px; }
.section-add { display: flex; flex-wrap: wrap; gap: 8px; }
.slide-thumb { flex: none; width: 72px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--muted-bg); }

.colour-fields { display: grid; gap: 8px; margin-bottom: 12px; }
.colour-field { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; }
.colour-field input[type="color"] { flex: none; width: 40px; height: 40px; padding: 0; border: 1px solid var(--border); border-radius: 10px; background: none; cursor: pointer; }
.colour-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
.colour-field input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 7px; }
.colour-field span { display: grid; }
.colour-field small { font-weight: 400; }
.quick-colours { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.quick-colour { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.quick-colour.dark { background: conic-gradient(#111 0 50%, #E9C46A 0); }
.quick-colour:hover { transform: scale(1.1); }

.editor-page { max-width: 720px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; margin-bottom: 8px; }
.back-link .icon { width: 16px; height: 16px; }
.editor-title { margin: 0 0 8px; font-size: 1.3rem; }
.trust-row { border: 0; border-bottom: 1px solid var(--border); margin: 0 0 12px; padding: 0 0 4px; display: grid; gap: 0 12px; }
.trust-row legend { font-weight: 700; margin-bottom: 6px; }
@media (min-width: 700px) { .trust-row { grid-template-columns: 150px 1fr 1.5fr; } }
.banner-thumb { width: 100%; max-height: 180px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 12px; }
.category-photo { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.category-photo > div { flex: 1; display: grid; gap: 4px; min-width: 0; }
.category-photo input[type="file"] { font-size: .85rem; max-width: 100%; }
.category-photo-img { flex: none; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--muted-bg); color: var(--muted); }
.category-photo-img img { width: 100%; height: 100%; object-fit: cover; }
.slide-images { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 12px; }
.image-drop { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 6; border: 2px dashed var(--border); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--muted-bg); color: var(--muted); cursor: pointer; text-align: center; font-size: .85rem; font-weight: 600; }
.image-drop.tall { aspect-ratio: auto; }
.image-drop.has-error { border-color: var(--danger); }
.image-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.image-drop-hint { position: relative; display: grid; justify-items: center; gap: 4px; padding: 6px 10px; border-radius: 8px; background: color-mix(in srgb, var(--surface) 85%, transparent); }
.image-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.image-drop:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.mb-0 { margin-bottom: 0; }
.quick-colours { margin-top: 6px; }

/* Support tickets (plan support-tickets T2, T3). The conversation itself is in chat.css. */
.ticket-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.list-item.is-unread strong { color: var(--brand); }

/* Page loader (templates/base.html): the logo in a turning ring while the next page loads; static/js/app.js
   shows it only when the page takes more than a moment. */
.page-loader { position: fixed; inset: 0; z-index: 1000; display: grid; place-content: center; justify-items: center; gap: 14px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s; }
.page-loader.is-on { opacity: 1; visibility: visible; transition: opacity .2s ease; }
.page-loader-mark { position: relative; width: 104px; height: 104px; display: grid; place-items: center; }
.page-loader-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: loader-spin 1.1s linear infinite; }
.page-loader-ring circle { fill: none; stroke: url(#page-loader-gradient); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 190 290; }
.page-loader-mark img { display: block; animation: loader-beat 1.1s ease-in-out infinite; }
.page-loader-word { display: block; animation: loader-fade 1.1s ease-in-out infinite; }
@keyframes loader-spin { to { rotate: 360deg; } }
@keyframes loader-beat { 0%, 100% { scale: 1; } 50% { scale: .9; } }
@keyframes loader-fade { 0%, 100% { opacity: 1; } 50% { opacity: .7; } }
@media (prefers-reduced-motion: reduce) {
  .page-loader-ring { animation-duration: 3s; }
  .page-loader-mark img, .page-loader-word { animation: none; }
}

/* «روابطي» (templates/creator/links.html): each link as a card with its product's photo, the link to copy and share,
   and its numbers with icons. Only the usual tokens and the brand gradient. */
.lc-list { display: grid; gap: 16px; }
.lc { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: start; margin: 0; padding: 16px;
  transition: box-shadow .25s, border-color .25s; animation: ad-in .5s calc(var(--i, 0) * 60ms) cubic-bezier(.2, .7, .3, 1) both; }
.lc:hover { box-shadow: var(--float-shadow); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); }
.lc-media { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px var(--border); }
.lc-media img { width: 100%; height: 100%; object-fit: cover; transition: scale .4s cubic-bezier(.2, .7, .3, 1); }
.lc:hover .lc-media img { scale: 1.06; }
.lc-media .icon { width: 36px; height: 36px; opacity: .6; }
.lc.is-off .lc-media img { filter: grayscale(1); opacity: .6; }
.lc-body { display: grid; gap: 12px; min-width: 0; }
.lc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lc-name { display: grid; gap: 4px; min-width: 0; }
.lc-merchant { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .8rem; font-weight: 600; min-width: 0; }
.lc-merchant img, .lc-merchant .ad-initial { flex: none; width: 20px; height: 20px; border-radius: 50%; object-fit: cover; font-size: .65rem; }
.lc-merchant > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-title { color: var(--text); font-weight: 800; font-size: 1.05rem; line-height: 1.35; text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-title:hover { color: var(--brand); }
.lc-commission { flex: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: .9rem; }
.lc-commission .icon { width: 16px; height: 16px; }
.lc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.lc-tags .chip-soft .icon { width: 14px; height: 14px; }
.chip-soft.is-campaign { background: var(--brand-soft); color: var(--brand); }
.lc-copy { display: flex; align-items: center; gap: 8px; padding: 5px; padding-inline-start: 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface-hover); }
.lc-copy:focus-within { border-color: var(--brand); }
.lc-copy > .icon { flex: none; width: 18px; height: 18px; color: var(--brand); }
.lc-copy input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: .88rem; color: var(--text); direction: ltr; outline: none; }
.lc-copy .btn { flex: none; }
.lc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lc-wa .icon { color: #1DA851; }
.lc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.lc-stats > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--muted-bg); min-width: 0; }
.lc-stats dt { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .76rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-stats dt .icon { flex: none; width: 15px; height: 15px; color: var(--brand); }
.lc-stats dd { margin: 0; font-size: 1.15rem; font-weight: 800; color: var(--text); }
.lc-stats .is-money { background: var(--success-bg); }
.lc-stats .is-money dt .icon, .lc-stats .is-money dd { color: var(--money); }
.lc .alert { margin: 0; }
@media (max-width: 640px) {
  .lc { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .lc-head { flex-direction: column; gap: 8px; }
  .lc-copy, .lc-actions, .lc-stats, .lc .alert { grid-column: 1 / -1; }
  .lc-body { display: contents; }
  .lc-head, .lc-tags { grid-column: 2; }
  .lc-head { grid-row: 1; }
  .lc-tags { grid-row: 2; }
  .lc-media { grid-row: 1 / span 2; }
  .lc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lc-actions .btn { flex: 1; justify-content: center; }
  .lc-actions .lc-wa { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .lc { animation: none; }
  .lc-media img { transition: none; }
}

/* ---------- Pixels tab of My store (pixels plan), YouCan-style: one card per platform in its own colour ---------- */
.pixel-card { padding: 0; overflow: hidden; border-width: 2px; }
.card.pixel-card + .card.pixel-card { margin-top: 18px; }
.pixel-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; }
.pixel-head h2 { margin: 0; font-size: 1.02rem; }
.pixel-facebook { border-color: #4267B2; }
.pixel-facebook .pixel-head { background: #4267B2; color: #fff; }
.pixel-snapchat { border-color: #FFFC00; }
.pixel-snapchat .pixel-head { background: #FFFC00; color: #111; }
.pixel-tiktok { border-color: #161616; }
.pixel-tiktok .pixel-head { background: #161616; color: #fff; }
.pixel-body { padding: 16px 18px 18px; }
.pixel-label { display: block; font-weight: 600; margin-bottom: 6px; }
.pixel-add { display: flex; gap: 8px; }
.pixel-add input { flex: 1; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; }
.pixel-add input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.pixel-add .btn { flex: none; }
.pixel-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.pixel-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow-wrap: anywhere; }
[dir="rtl"] .pixel-list li { padding: 8px 12px 8px 8px; }
.pixel-list form { margin: 0; flex: none; }
.pixel-remove { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--danger); color: #fff; cursor: pointer; }
.pixel-remove .icon { width: 16px; height: 16px; }
.pixel-empty { margin: 10px 0 0; }
body.has-tabbar .pixel-setup { max-width: none; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--border); }
.pixel-setup .btn { justify-self: start; min-width: 140px; }

/* Apps (apps/integrations): a card per app, and the Google Sheets page. */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.app-card { display: flex; gap: 14px; align-items: flex-start; color: var(--text); transition: border-color .15s, transform .15s; }
.app-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.app-card p { margin: 6px 0 0; }
.app-card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 800; }
.app-logo { width: 44px; height: 44px; flex: none; }
.app-head { display: flex; gap: 14px; align-items: center; }
.app-head h1 { margin: 0; }
.app-steps { margin: 0; padding-inline-start: 22px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.app-steps li { line-height: 1.7; }
.copy-field { display: flex; gap: 8px; margin-top: 8px; }
.copy-field input { flex: 1; min-width: 0; width: auto; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Google Sheets: the list of sheets and the column editor */
.sheets-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sheets-head .card-title { margin: 0; }
.sheets-head .row-actions form { margin: 0; }
.sheets-table td { vertical-align: middle; }
.sheets-table tr.is-off strong { opacity: .55; }
.sheets-table .section-tools form { display: contents; }
@media (max-width: 700px) {
  .sheets-table thead { display: none; }
  .sheets-table, .sheets-table tbody { display: block; }
  .sheets-table tr { display: grid; grid-template-columns: 24px 1fr auto; gap: 6px 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .sheets-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .sheets-table td:nth-child(1) { grid-column: 1; grid-row: 1; align-self: start; }
  .sheets-table td:nth-child(2) { grid-column: 2 / 4; grid-row: 1; overflow-wrap: anywhere; }
  .sheets-table td:nth-child(3) { grid-column: 2; grid-row: 2; }
  .sheets-table td:nth-child(4) { grid-column: 3; grid-row: 2; }
  .sheets-table td:nth-child(5) { grid-column: 2 / 4; grid-row: 3; }
}
.text-danger { color: var(--danger); }
.switch { display: inline-flex; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; position: relative; width: 44px; height: 26px; margin: 0; border-radius: 999px; background: var(--border); cursor: pointer; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: inset-inline-start .2s; }
.switch input:checked { background: var(--brand-solid); }
.switch input:checked::after { inset-inline-start: 21px; }
.switch input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sheet-form > .card { display: grid; gap: 14px; }
.sheet-form .card-title { margin: 0; }
.sheet-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; max-height: 320px; overflow-y: auto; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.check-row input { width: 18px; height: 18px; flex: none; accent-color: var(--brand); }
.check-row:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.column-list { counter-reset: column; margin: 0; }
.column-row::before { counter-increment: column; content: counter(column, upper-alpha); flex: none; width: 26px; text-align: center; font-weight: 700; color: var(--muted); font-size: .8rem; }
.column-fields { flex: 1; min-width: 0; display: grid; gap: 2px; }
.column-fields input { width: 100%; min-height: 38px; padding: 6px 10px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.column-fields input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.column-add { display: flex; gap: 8px; flex-wrap: wrap; }
.column-add select { flex: 1; min-width: 160px; min-height: 36px; padding: 0 10px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }

/* Delivery companies tab (plan v3-phase4b-couriers C1): one card per company, its logo first */
.courier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; border: 0; padding: 0; margin: 0 0 4px; min-width: 0; }
.courier-card { position: relative; display: grid; justify-items: center; gap: 8px; padding: 14px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; text-align: center; font-weight: 600; }
.courier-card input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.courier-card:hover { background: var(--surface-hover); }
.courier-card:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.courier-card:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.courier-card.is-soon { cursor: default; opacity: .6; }
.courier-logo { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; overflow: hidden; background: var(--muted-bg); color: var(--muted); font-size: 1.3rem; font-weight: 800; }
.courier-logo img { width: 100%; height: 100%; object-fit: contain; }
.courier-name { font-size: .88rem; line-height: 1.3; }
.courier-id, .courier-domain { display: none; }
.courier-form:has(input[value="other"]:checked) .courier-domain { display: block; }
.courier-connected { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.courier-connected .card-title { margin: 0; }

/* Landing pages tab (landing plan): a deep-violet hero with the totals, then one card per page,
   its link shown as an address bar framed by the brand gradient. Only Linka's own tokens. */
.lnd-hero { position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 18px; padding: 22px; border-radius: 24px; color: #fff; background: var(--gradient-deep); box-shadow: 0 24px 50px -24px color-mix(in srgb, var(--brand) 70%, transparent); }
.lnd-hero::before, .lnd-hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(50px); pointer-events: none; }
.lnd-hero::before { width: 260px; height: 260px; top: -120px; inset-inline-end: -60px; background: color-mix(in srgb, var(--accent) 55%, transparent); animation: lnd-float 12s ease-in-out infinite alternate; }
.lnd-hero::after { width: 200px; height: 200px; bottom: -110px; inset-inline-start: 10%; background: rgba(255, 255, 255, .18); animation: lnd-float 15s ease-in-out infinite alternate-reverse; }
@keyframes lnd-float { to { translate: -40px 30px; scale: 1.15; } }
.lnd-hero-text { display: flex; gap: 14px; align-items: flex-start; }
.lnd-hero h2 { margin: 0 0 4px; font-size: 1.25rem; color: #fff; }
.lnd-hero p { margin: 0; max-width: 760px; color: rgba(255, 255, 255, .82); font-size: .9rem; line-height: 1.7; }
.lnd-hero-icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); color: #fff; }
.lnd-hero-icon .icon { width: 22px; height: 22px; }
.lnd-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lnd-btn-new { background: #fff; border-color: #fff; color: var(--brand-solid); box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .45); transition: translate .2s; }
.lnd-btn-new:hover { translate: 0 -2px; color: var(--brand-solid); background: #fff; }
.lnd-btn-ghost { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .35); color: #fff; }
.lnd-btn-ghost:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.lnd-hero-full { padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-size: .85rem; font-weight: 700; }
.lnd-totals { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .lnd-totals { grid-template-columns: repeat(4, 1fr); } }
.lnd-totals > div { display: grid; gap: 2px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.lnd-totals span { color: rgba(255, 255, 255, .72); font-size: .75rem; font-weight: 700; }
.lnd-totals strong { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.lnd-totals small { font-size: .8rem; font-weight: 700; opacity: .7; }

.lnd-grid { display: grid; gap: 18px; }
@media (min-width: 700px) { .lnd-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .lnd-grid { grid-template-columns: repeat(3, 1fr); } }
.lnd-card { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow);
  animation: lnd-in .55s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 80ms); transition: translate .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s, border-color .3s; }
.lnd-card:hover { translate: 0 -5px; border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); box-shadow: 0 22px 44px -20px color-mix(in srgb, var(--brand) 45%, transparent); }
@keyframes lnd-in { from { opacity: 0; translate: 0 22px; } }
.lnd-cover { position: relative; height: 140px; overflow: hidden; background: var(--gradient); }
.lnd-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: scale .6s cubic-bezier(.2, .8, .2, 1); }
.lnd-card:hover .lnd-cover img { scale: 1.06; }
.lnd-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, .3), transparent 50%); pointer-events: none; }
/* No product photo: a tiny page in a browser window, drawn in white glass. */
.lnd-mock { position: absolute; inset: 22px 18% -10px; display: grid; align-content: start; gap: 7px; padding: 0 12px 12px; border-radius: 12px 12px 0 0; background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 16px 30px -12px rgba(0, 0, 0, .35); transition: translate .5s cubic-bezier(.2, .8, .2, 1); }
.lnd-card:hover .lnd-mock { translate: 0 -6px; }
.lnd-mock-bar { display: flex; direction: ltr; gap: 4px; margin: 0 -12px; padding: 7px 10px; border-bottom: 1px solid rgba(255, 255, 255, .2); }
.lnd-mock-bar i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.lnd-mock-hero { height: 34px; border-radius: 8px; background: rgba(255, 255, 255, .28); }
.lnd-mock-line { height: 6px; width: 80%; border-radius: 6px; background: rgba(255, 255, 255, .35); }
.lnd-mock-line.short { width: 55%; }
.lnd-mock-btn { width: 40%; height: 14px; border-radius: 7px; background: #fff; box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--accent) 80%, transparent); }
.lnd-status { position: absolute; z-index: 1; top: 12px; inset-inline-start: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--success); font-size: .72rem; font-weight: 800; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .4); }
.lnd-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: lnd-pulse 2s ease-out infinite; }
@keyframes lnd-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 60%, transparent); } 100% { box-shadow: 0 0 0 8px transparent; } }
.lnd-status .icon { width: 13px; height: 13px; }
.lnd-card.is-hidden .lnd-status { color: #6b7280; }
.lnd-card.is-hidden .lnd-cover { filter: grayscale(.9); opacity: .8; }
.lnd-open { position: absolute; z-index: 1; top: 10px; inset-inline-end: 10px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: rgba(255, 255, 255, .94); color: var(--brand-solid); transition: rotate .3s, scale .3s; }
.lnd-open:hover { rotate: -10deg; scale: 1.08; }
.lnd-open .icon { width: 16px; height: 16px; }
.lnd-body { display: flex; flex: 1; flex-direction: column; gap: 12px; padding: 16px; }
.lnd-body h3 { margin: 0; font-size: 1.1rem; font-weight: 800; }
.lnd-product { display: flex; align-items: center; gap: 6px; margin-top: -8px; color: var(--muted); font-size: .84rem; }
.lnd-product .icon { width: 14px; height: 14px; flex: none; }

/* The link: an address bar framed by the brand gradient, the page's own slug in bold. */
.lnd-link { display: flex; align-items: stretch; padding: 2px; border-radius: 15px; background: var(--gradient-full); box-shadow: 0 8px 20px -12px color-mix(in srgb, var(--accent) 70%, transparent); }
.lnd-url { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 13px; background: var(--surface); color: var(--text); font-size: .82rem; white-space: nowrap; overflow: hidden; }
.lnd-url:hover { text-decoration: none; background: var(--surface-hover); }
.lnd-url .icon { flex: none; width: 15px; height: 15px; color: var(--brand); }
.lnd-url-base { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.lnd-url strong { flex: none; color: var(--brand); font-weight: 800; }
.lnd-copy { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border: 0; border-radius: 13px; background: transparent; color: #fff; font: inherit; font-size: .82rem; font-weight: 800; cursor: pointer; transition: background .2s; }
.lnd-copy:hover { background: rgba(255, 255, 255, .16); }
.lnd-copy[data-busy] { background: var(--success); }
.lnd-copy .icon { width: 15px; height: 15px; }
.lnd-view { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; border-radius: 13px; color: #fff; transition: background .2s; }
.lnd-view:hover { background: rgba(255, 255, 255, .16); text-decoration: none; }
.lnd-view .icon { width: 18px; height: 18px; }
.lnd-share { display: flex; gap: 8px; margin-top: -4px; }
.lnd-share-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.lnd-share-btn:hover { text-decoration: none; border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.lnd-share-btn.wa:hover { border-color: var(--success); color: var(--success); background: var(--success-bg); }
.lnd-share-btn .icon { width: 15px; height: 15px; }

.lnd-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lnd-stats > div { display: grid; justify-items: center; gap: 1px; padding: 10px 6px; border-radius: 14px; background: var(--muted-bg); text-align: center; }
.lnd-stats .icon { width: 16px; height: 16px; color: var(--brand); }
.lnd-stats strong { font-size: 1.1rem; font-weight: 800; line-height: 1.3; }
.lnd-stats span { color: var(--muted); font-size: .72rem; font-weight: 700; }
.lnd-stats .lnd-rate { background: var(--accent-soft); }
.lnd-stats .lnd-rate .icon, .lnd-stats .lnd-rate strong { color: var(--accent); }
.lnd-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--border); }
.lnd-actions .btn-primary { flex: 1; }
.lnd-actions form { margin: 0; }
.lnd-delete { color: var(--danger); }
.lnd-delete:hover { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }

.lnd-card-new { align-items: center; justify-content: center; gap: 8px; min-height: 260px; border: 2px dashed color-mix(in srgb, var(--brand) 35%, var(--border)); background: transparent; box-shadow: none; color: var(--text); text-align: center; }
.lnd-card-new:hover { text-decoration: none; background: var(--brand-soft); }
.lnd-card-new .lnd-hero-icon, .lnd-empty .lnd-hero-icon { background: var(--gradient-full); box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--accent) 70%, transparent); transition: rotate .35s; }
.lnd-card-new:hover .lnd-hero-icon { rotate: 90deg; }
.lnd-empty { display: grid; justify-items: center; gap: 12px; padding: 40px 16px; border: 2px dashed var(--border); border-radius: 22px; text-align: center; }
/* Product folders: the landing tab groups pages by product; opening a folder shows that product's pages. */
.lnd-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .84rem; font-weight: 700; color: rgba(255, 255, 255, .78); }
.lnd-crumbs a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff; }
.lnd-crumbs a:hover { text-decoration: none; background: rgba(255, 255, 255, .2); }
.lnd-crumbs .icon { width: 14px; height: 14px; }
.lnd-crumb-sep { opacity: .5; }
.lnd-hero-thumb { overflow: hidden; width: 56px; height: 56px; }
.lnd-hero-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lnd-folders { padding-top: 12px; }
.lnd-folder { position: relative; display: flex; flex-direction: column; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 6px 22px 22px 22px; box-shadow: var(--shadow);
  animation: lnd-in .55s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 80ms); transition: translate .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s, border-color .3s; }
[dir="rtl"] .lnd-folder { border-radius: 22px 6px 22px 22px; }
.lnd-folder:hover { text-decoration: none; translate: 0 -5px; border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); box-shadow: 0 22px 44px -20px color-mix(in srgb, var(--brand) 45%, transparent); }
.lnd-folder-tab { position: absolute; top: -12px; inset-inline-start: -1px; width: 42%; height: 14px; border: 1px solid var(--border); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--gradient-full); }
.lnd-folder-cover { position: relative; height: 140px; overflow: hidden; border-radius: 5px 21px 0 0; background: var(--gradient); }
[dir="rtl"] .lnd-folder-cover { border-radius: 21px 5px 0 0; }
.lnd-folder-cover img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; transition: scale .6s cubic-bezier(.2, .8, .2, 1); }
.lnd-folder:hover .lnd-folder-cover img { scale: 1.06; }
.lnd-folder-cover::after { content: ""; position: absolute; z-index: 1; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .45), transparent 55%); pointer-events: none; }
.lnd-folder-glyph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .9); }
.lnd-folder-glyph .icon { width: 56px; height: 56px; stroke-width: 1.4; }
.lnd-folder-sheets { position: absolute; inset: 0; }
.lnd-folder-sheets i { position: absolute; top: 18px; inset-inline-end: 18px; width: 70px; height: 90px; border-radius: 8px; background: rgba(255, 255, 255, .22); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); transition: rotate .4s, translate .4s; }
.lnd-folder-sheets i:nth-child(2) { rotate: 8deg; translate: -10px 4px; }
.lnd-folder-sheets i:nth-child(3) { rotate: 16deg; translate: -20px 10px; }
.lnd-folder:hover .lnd-folder-sheets i:nth-child(2) { rotate: 14deg; }
.lnd-folder:hover .lnd-folder-sheets i:nth-child(3) { rotate: 26deg; }
.lnd-folder-count { position: absolute; z-index: 2; bottom: 12px; inset-inline-start: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .95); color: var(--brand-solid); font-size: .78rem; font-weight: 800; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .45); }
.lnd-folder-count .icon { width: 14px; height: 14px; }
.lnd-folder.is-hidden .lnd-folder-cover { filter: grayscale(.9); opacity: .8; }
.lnd-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: lnd-pulse 2s ease-out infinite; }
.lnd-folder-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.lnd-folder-list li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 10px; border-radius: 12px; background: var(--muted-bg); font-size: .84rem; font-weight: 700; }
.lnd-folder-list li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lnd-folder-list li small { flex: none; color: var(--muted); font-weight: 600; }
.lnd-folder-list .icon { flex: none; width: 14px; height: 14px; color: var(--brand); }
.lnd-folder-list li.more { justify-content: center; background: transparent; color: var(--muted); font-size: .78rem; padding: 2px; }
.lnd-folder-open { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: auto; padding: 10px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: .88rem; transition: background .2s, color .2s; }
.lnd-folder-open .icon { width: 16px; height: 16px; transition: translate .25s; }
.lnd-folder:hover .lnd-folder-open { background: var(--gradient-full); color: #fff; }
.lnd-folder:hover .lnd-folder-open .icon { translate: 4px 0; }
[dir="rtl"] .lnd-folder:hover .lnd-folder-open .icon { translate: -4px 0; }
@media (prefers-reduced-motion: reduce) {
  .lnd-hero::before, .lnd-hero::after, .lnd-card, .lnd-folder, .lnd-dot, .lnd-status i { animation: none; }
  .lnd-card:hover, .lnd-card:hover .lnd-cover img { translate: none; scale: none; }
}
.landing-form-grid { display: grid; gap: 16px; }
.landing-help ol { padding-inline-start: 20px; margin: 0 0 12px; }
.landing-help li { margin-bottom: 8px; }
.landing-help code { display: inline-block; background: var(--bg-soft, #f3f4f6); padding: 2px 6px; border-radius: 6px; font-size: 13px; }
@media (min-width: 960px) { .landing-form-grid { grid-template-columns: minmax(0, 760px) minmax(0, 380px); align-items: start; } }

/* ---------- Store templates (Design tab): body.sf-t-<key>, see STORE_TEMPLATES in apps/merchants/themes.py ---------- */
/* Elegant: a refined font, square corners, cards without frames. */
body.sf-t-elegant { font-family: 'El Messiri', 'Tajawal', serif; --radius: 4px; --radius-sm: 2px; }
.sf-t-elegant .btn, .sf-t-elegant .sf-search, .sf-t-elegant .sf-badge, .sf-t-elegant .sf-banner, .sf-t-elegant .sf-cat-photo { border-radius: 0; }
.sf-t-elegant .sf-brand { font-size: 1.6rem; font-weight: 600; letter-spacing: .04em; }
.sf-t-elegant .sf-nav a { font-weight: 500; letter-spacing: .05em; }
.sf-t-elegant .sf-section-head { flex-direction: column; text-align: center; }
.sf-t-elegant .sf-section-head h2 { font-weight: 500; font-size: clamp(1.5rem, 2.6vw, 2.2rem); }
.sf-t-elegant .sf-section-head h2::after { content: ""; display: block; width: 48px; height: 1px; margin: 12px auto 0; background: var(--s-primary); }
.sf-t-elegant .sf-card { border: 0; border-radius: 0; background: transparent; }
.sf-t-elegant .sf-card:hover { box-shadow: none; translate: none; }
.sf-t-elegant .sf-card-body { padding: 14px 0 0; align-items: center; text-align: center; }
.sf-t-elegant .sf-card-price { justify-content: center; }
.sf-t-elegant .sf-card .btn-primary { background: transparent; color: var(--s-text); border-color: var(--s-text); }
.sf-t-elegant .sf-card .btn-primary:hover { background: var(--s-text); color: var(--s-bg); }
.sf-t-elegant .sf-trust-icon { background: transparent; border: 1px solid var(--s-primary); }

/* Bold: the header in the top bar's colour, heavy type, a coloured frame on hover. */
body.sf-t-bold { font-family: 'Cairo', 'Tajawal', sans-serif; --radius: 10px; --radius-sm: 8px; }
.sf-t-bold .sf-header { background: var(--s-top); color: var(--s-on-top); border-bottom: 0; }
.sf-t-bold .sf-brand { color: inherit; font-weight: 800; }
.sf-t-bold .sf-nav { border-top-color: color-mix(in srgb, var(--s-on-top) 14%, transparent); }
.sf-t-bold .sf-nav a:hover, .sf-t-bold .sf-nav a[aria-current] { color: inherit; }
.sf-t-bold .sf-search { background: color-mix(in srgb, var(--s-on-top) 10%, transparent); border-color: color-mix(in srgb, var(--s-on-top) 22%, transparent); }
.sf-t-bold .sf-search input, .sf-t-bold .sf-search button { color: inherit; }
.sf-t-bold .sf-menu-list { color: var(--s-text); }
.sf-t-bold .sf-section-head h2 { font-weight: 800; }
.sf-t-bold .sf-section-head h2::before { content: ""; display: inline-block; width: 6px; height: 1em; margin-inline-end: 10px; vertical-align: -.12em; border-radius: 2px; background: var(--s-primary); }
.sf-t-bold .sf-card { border-radius: 10px; }
.sf-t-bold .sf-card:hover { box-shadow: 0 0 0 2px var(--s-primary); }
.sf-t-bold .btn-primary, .sf-t-bold .sf-card-price strong { font-weight: 800; }
.sf-t-bold .sf-badge { border-radius: 4px; }

/* Soft: round corners everywhere, light shadows in the main colour, pill buttons. */
body.sf-t-soft { font-family: 'Almarai', 'Tajawal', sans-serif; --radius: 22px; --radius-sm: 16px; }
.sf-t-soft .btn { border-radius: 999px; }
.sf-t-soft .sf-header { border-bottom: 0; box-shadow: 0 4px 18px color-mix(in srgb, var(--s-primary) 10%, transparent); }
.sf-t-soft .sf-nav { border-top: 0; }
.sf-t-soft .sf-nav a { border-bottom: 0; border-radius: 999px; padding: 8px 16px; margin-block: 6px; }
.sf-t-soft .sf-nav a:hover, .sf-t-soft .sf-nav a[aria-current] { background: var(--s-soft); }
.sf-t-soft .sf-slider { margin: 12px; border-radius: 28px; }
.sf-t-soft .sf-section-head h2 { color: var(--s-accent); }
.sf-t-soft .sf-card { border: 0; border-radius: 24px; box-shadow: 0 6px 20px color-mix(in srgb, var(--s-primary) 12%, transparent); }
.sf-t-soft .sf-card-photo { margin: 8px 8px 0; border-radius: 18px; }
.sf-t-soft .sf-cat-photo { border-radius: 50%; }
.sf-t-soft .sf-banner { border-radius: 28px; }

/* Minimal: black and white, small headings, no frames: the photos lead. */
body.sf-t-minimal { font-family: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif; --radius: 6px; --radius-sm: 4px; }
.sf-t-minimal .sf-topbar { font-size: .78rem; letter-spacing: .03em; }
@media (min-width: 861px) {
  .sf-t-minimal .sf-menu { display: none; }
  .sf-t-minimal .sf-header-inner { grid-template-columns: auto 1fr; }
  .sf-t-minimal .sf-brand { justify-self: start; }
  .sf-t-minimal .sf-nav .sf-wrap { justify-content: flex-start; }
}
.sf-t-minimal .sf-section-head h2 { font-weight: 600; font-size: clamp(1.1rem, 1.8vw, 1.4rem); }
.sf-t-minimal .sf-card { border: 0; border-radius: 0; background: transparent; }
.sf-t-minimal .sf-card:hover { box-shadow: none; translate: none; }
.sf-t-minimal .sf-card-photo, .sf-t-minimal .sf-cat-photo, .sf-t-minimal .sf-banner { border-radius: 6px; }
.sf-t-minimal .sf-card-body { padding: 10px 0 0; }
.sf-t-minimal .sf-card-price strong { color: var(--s-text); font-weight: 600; }
.sf-t-minimal .sf-badge { border-radius: 2px; }
.sf-t-minimal .sf-trust, .sf-t-minimal .sf-trust-icon { background: transparent; }

/* Market: a wide search, the categories bar in the main colour, five products a row on wide screens. */
body.sf-t-market { font-family: 'Cairo', 'Tajawal', sans-serif; --radius: 12px; --radius-sm: 10px; }
@media (min-width: 861px) {
  .sf-t-market .sf-menu { display: none; }
  .sf-t-market .sf-header-inner { grid-template-columns: auto minmax(0, 1fr); gap: 32px; }
  .sf-t-market .sf-brand { justify-self: start; }
  .sf-t-market .sf-search { justify-self: stretch; width: auto; max-width: 720px; border-radius: 10px; border: 2px solid var(--s-primary); }
}
.sf-t-market .sf-nav { border-top: 0; background: var(--s-primary); color: var(--s-on-primary); }
.sf-t-market .sf-nav .sf-wrap { justify-content: flex-start; }
.sf-t-market .sf-nav a:hover, .sf-t-market .sf-nav a[aria-current] { color: inherit; border-bottom-color: var(--s-on-primary); }
.sf-t-market .sf-section-head { padding-bottom: 8px; border-bottom: 2px solid var(--s-border); }
.sf-t-market .sf-section-head h2 { font-weight: 800; font-size: clamp(1.15rem, 1.8vw, 1.45rem); }
.sf-t-market .sf-grid { gap: 10px; }
@media (min-width: 1100px) { .sf-t-market .sf-grid.cols-4 { grid-template-columns: repeat(5, 1fr); } }
.sf-t-market .sf-card { border-radius: 12px; }
.sf-t-market .sf-card-body { padding: 10px; gap: 4px; }
.sf-t-market .sf-card-title { font-size: .92rem; }
.sf-t-market .sf-card-price strong { font-weight: 800; }

/* The template gallery of the Design tab: a small drawing of each template in its colours. */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tpl-card { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.tpl-card.is-current { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.tpl-mock { display: grid; grid-template-rows: 8px 18px 1fr; height: 104px; border-radius: 8px; overflow: hidden; background: var(--tpl-bg); color: var(--tpl-ink); border: 1px solid var(--border); }
.tpl-mock-top { background: var(--tpl-top); }
.tpl-mock-head { display: flex; align-items: center; justify-content: center; }
.tpl-mock-head::before { content: ""; width: 34%; height: 5px; border-radius: 3px; background: currentColor; opacity: .55; }
.tpl-mock-cards { display: grid; grid-template-columns: repeat(var(--tpl-cols, 4), 1fr); gap: 4px; padding: 4px 6px 6px; }
.tpl-mock-cards i { position: relative; border-radius: var(--tpl-r, 3px); background: color-mix(in srgb, var(--tpl-primary) 22%, var(--tpl-bg)); }
.tpl-mock-cards i::after { content: ""; position: absolute; inset-inline: 3px; bottom: 3px; height: 4px; border-radius: 2px; background: var(--tpl-primary); }
.tpl-mock.t-bold .tpl-mock-head { background: var(--tpl-top); color: #fff; }
.tpl-mock.t-market .tpl-mock-head { background: var(--tpl-primary); color: #fff; }
.tpl-name { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tpl-desc { margin: 0; font-size: .8rem; color: var(--muted); min-height: 2.6em; }
.tpl-actions { display: flex; gap: 6px; }
.tpl-actions .btn, .tpl-actions form { flex: 1; }
.tpl-actions form .btn { width: 100%; }
.tpl-actions .btn { white-space: nowrap; padding-inline: 8px; }
.tpl-current { font-size: .75rem; font-weight: 700; color: var(--brand); }
.tpl-mock-cards.cols-3 { grid-template-columns: repeat(3, 1fr); }
.tpl-mock-cards.cols-3 i:nth-child(4) { display: none; }

/* ---------- Product page, finishing layer (partials/product_order.html: stores and creator links) ---------- */
/* Gallery: the photos slide by themselves (static/js/app.js); arrows, dots and the discount over the photo. */
.gallery-stage { position: relative; }
.gallery-badge { position: absolute; top: 14px; inset-inline-start: 14px; z-index: 1; padding: 6px 12px; border-radius: 999px; background: var(--danger); color: #fff; font-weight: 800; font-size: .9rem; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.gallery-nav { position: absolute; top: 50%; z-index: 1; translate: 0 -50%; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .94); color: #17132E; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); cursor: pointer; opacity: 0; transition: opacity .2s, scale .2s; }
.gallery-nav.prev { inset-inline-start: 12px; }
.gallery-nav.next { inset-inline-end: 12px; }
.gallery-nav .icon { width: 20px; height: 20px; }
.gallery-nav:hover { scale: 1.08; }
.gallery-stage:hover .gallery-nav, .gallery-nav:focus-visible { opacity: 1; }
@media (hover: none) { .gallery-nav { opacity: .85; width: 36px; height: 36px; } }
.gallery-dots { position: absolute; bottom: 12px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.gallery-dots span { width: 8px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .6); box-shadow: 0 0 0 1px rgba(0, 0, 0, .14); transition: width .3s, background .3s; }
.gallery-dots span.active { width: 22px; background: #fff; }
.gallery-thumbs button { transition: border-color .2s, opacity .2s; opacity: .65; }
.gallery-thumbs button.active, .gallery-thumbs button:hover { opacity: 1; }

/* Title, price and what the customer saves. */
.pdp-head h1 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 800; line-height: 1.35; }
.pdp-head .price-row .price { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; color: var(--brand); }
.pdp-save { display: inline-flex; margin: 10px 0 0; padding: 4px 12px; border-radius: 999px; background: var(--success-bg); color: var(--success); font-size: .85rem; font-weight: 700; }
.pdp-head .stock-low { margin-inline-start: 6px; }
.pdp-perks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pdp-perks li { flex-direction: column; justify-content: center; gap: 6px; padding: 12px 8px; text-align: center; font-size: .8rem; font-weight: 600; line-height: 1.45; }
.pdp-perks .icon { width: 22px; height: 22px; color: var(--brand); }

/* The order form: a coloured head, roomy fields, a clear total and a big button. */
.pdp-order { padding: 0; overflow: hidden; border: 2px solid color-mix(in srgb, var(--brand) 32%, var(--border)); box-shadow: 0 18px 40px -20px color-mix(in srgb, var(--brand) 55%, transparent); }
.pdp-order > form, .pdp-order > .empty { padding: 18px; }
.pdp-order-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--brand-solid); color: var(--s-on-primary, #fff); }
.pdp-order-head h2 { margin: 0; color: inherit; font-size: 1.3rem; font-weight: 800; }
.pdp-order-head p { margin: 2px 0 0; font-size: .88rem; opacity: .9; }
.pdp-order-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, currentColor 16%, transparent); }
.pdp-order-icon .icon { width: 24px; height: 24px; }
.pdp-order .order-step { padding-block: 4px 18px; }
.pdp-order .order-step + .order-step { padding-top: 16px; }
.pdp-order .step-title { font-size: 1.05rem; font-weight: 800; }
.pdp-order .step-no { width: 30px; height: 30px; background: var(--brand-solid); color: var(--s-on-primary, #fff); box-shadow: 0 0 0 4px var(--brand-soft); }
.pdp-order .field input, .pdp-order .field select { min-height: 50px; border-radius: 12px; font-size: 1rem; transition: border-color .2s, box-shadow .2s; }
.pdp-order .field input:focus, .pdp-order .field select:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.pdp-order .field input[type="radio"], .pdp-order .field input[type="checkbox"] { min-height: 0; box-shadow: none; }
.pdp-order .choice-card { min-height: 56px; border-radius: 12px; transition: border-color .2s, background .2s; }
.pdp-order .stepper .btn { width: 46px; height: 46px; border-radius: 12px; font-size: 1.2rem; }
.pdp-order .stepper input { min-height: 46px; font-weight: 800; text-align: center; }
.pdp-order .pdp-summary { margin: 18px 0; padding: 14px 16px; border: 1px dashed color-mix(in srgb, var(--brand) 35%, var(--border)); border-radius: 14px; }
.pdp-order .pdp-summary .total { font-size: 1.2rem; }
.pdp-order .pdp-summary .total dd { font-weight: 800; }
.pdp-order .btn-order { position: relative; overflow: hidden; min-height: 58px; border-radius: 14px; font-size: 1.15rem; font-weight: 800; box-shadow: 0 12px 26px -10px color-mix(in srgb, var(--brand-solid) 75%, transparent); }
.pdp-order .btn-order::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .32) 50%, transparent 65%); translate: -110% 0; animation: cta-shine 3.4s ease-in-out infinite; pointer-events: none; }
@keyframes cta-shine { 55%, 100% { translate: 110% 0; } }
.order-assure { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 14px 0 6px; padding: 0; font-size: .82rem; font-weight: 700; }
.order-assure li { display: flex; align-items: center; gap: 6px; }
.order-assure .icon { width: 16px; height: 16px; color: var(--success); }
.order-bar .btn-primary { min-width: 130px; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .pdp-order .btn-order::after { animation: none; display: none; } }
@media (max-width: 420px) { .pdp-perks li { font-size: .74rem; padding: 10px 6px; } }

/* ---------- Product page layers (Product.page_layout): the order chosen in the product form's advanced options ---------- */
/* Title and price are two layers now; side by side in the default order they read as one block. */
.pdp-title h1 { margin-bottom: 0; }
.pdp-title + .pdp-price { margin-top: -6px; }
.pdp-price .price-row { margin-top: 0; }
/* Anything but the photos first: one column, the layers one under the other, the photos not sticky. */
.pdp.pdp-stack { display: block; max-width: 760px; margin-inline: auto; }
.pdp.pdp-stack .pdp-media { position: static; }
@media (min-width: 900px) { .pdp.pdp-stack .pdp-info { gap: 22px; } }

/* The layer list in the product form. */
.advanced-card .layer-heading { margin: 4px 0 4px; font-size: 1rem; }
.layer-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.layer-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: grab; user-select: none; transition: box-shadow .15s, border-color .15s; }
.layer-row.dragging { cursor: grabbing; border-color: var(--brand); box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--brand) 55%, transparent); }
.layer-grip { display: grid; place-items: center; width: 28px; height: 36px; margin-inline: -6px 0; color: var(--muted); letter-spacing: -3px; font-weight: 800; touch-action: none; }
.layer-no { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: .8rem; font-weight: 800; }
.layer-name { flex: 1; font-weight: 700; }
.layer-moves { display: flex; gap: 4px; }
.layer-moves .btn { min-width: 36px; padding: 0; font-size: 1rem; }
.layer-moves .btn:disabled { opacity: .35; }

/* Card payments with Chargily (plan chargily-pay): wallet amounts, plan card button, result page. */
.pay-card { border-color: var(--brand); }
.pay-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.pay-amount { position: relative; cursor: pointer; }
.pay-amount input { position: absolute; opacity: 0; pointer-events: none; }
.pay-amount span { display: block; padding: 10px 4px; text-align: center; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font-weight: 800; font-size: .88rem; transition: border-color .2s, background .2s, color .2s; }
.pay-amount input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.pay-amount input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.plan-card-pay { margin-top: 8px; }
.pay-result { max-width: 440px; margin: 40px auto; text-align: center; }
.pay-result h1 { font-size: 1.4rem; margin: 12px 0 8px; }
.pay-result-icon { width: 64px; height: 64px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; font-size: 1.8rem; font-weight: 800; background: var(--brand-soft); color: var(--brand); }
@media (max-width: 420px) { .pay-amounts { grid-template-columns: repeat(2, 1fr); } }
