/* ===== App Negar — clean lightweight Persian RTL UI ===== */

:root {
  --bg: #f6f7fb;
  --bg-alt: #eef1f8;
  --surface: #ffffff;
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-mute: #94a3b8;
  --line: #e6e9f2;
  --line-soft: #eef1f8;

  --brand: #0b3aa8;
  --brand-2: #3b82f6;
  --brand-tint: #eaf0ff;
  --accent: #06b6d4;
  --price: #047857;
  --warn: #f59e0b;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow-md: 0 6px 18px -6px rgba(15, 23, 42, .12), 0 2px 6px rgba(15, 23, 42, .05);
  --shadow-lg: 0 24px 60px -24px rgba(11, 58, 168, .25), 0 2px 8px rgba(15, 23, 42, .06);
  --shadow-pop: 0 30px 60px -20px rgba(11, 58, 168, .35);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;

  --gap: 16px;
  --wrap-max: 1200px;

  --t-fast: 160ms cubic-bezier(.2,.7,.3,1);
  --t-med: 280ms cubic-bezier(.2,.7,.3,1);
  --t-slow: 480ms cubic-bezier(.2,.7,.3,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Vazirmatn', ui-sans-serif, system-ui, 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; padding: 0; }
ul { list-style: none; padding: 0; margin: 0; }

.wrap { max-width: var(--wrap-max); margin: 0 auto; padding: 0 18px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: .2px;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast);
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(11, 58, 168, .55);
}
.btn--primary:hover { background: #0a2f8a; transform: translateY(-1px); box-shadow: 0 12px 24px -8px rgba(11, 58, 168, .6); }
.btn--ghost {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn--ghost:hover { background: var(--bg-alt); }
.btn--sm { padding: 9px 16px; font-size: 13.5px; }
.btn--block { width: 100%; padding: 14px 20px; }

/* ===== Topbar ===== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 247, 251, .82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar__inner {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--brand); }
.brand__mark { color: var(--brand); flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-weight: 800; letter-spacing: .4px; font-size: 17px; color: var(--ink); }
.brand__tag { font-size: 11.5px; color: var(--ink-mute); font-weight: 500; }

.topbar__nav { display: flex; gap: 22px; margin-inline-start: auto; }
.topbar__nav a {
  font-size: 14px; color: var(--ink-soft); font-weight: 500;
  padding: 6px 4px; position: relative;
  transition: color var(--t-fast);
}
.topbar__nav a:hover { color: var(--brand); }
.topbar__cta { margin-inline-start: 6px; }

@media (max-width: 720px) {
  .topbar__nav { display: none; }
  .brand__tag { display: none; }
}

/* ===== Stories ===== */
.stories { padding: 16px 0 4px; }
.stories__rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 6px 2px 14px;
  scroll-snap-type: x proximity;
}
.stories__rail::-webkit-scrollbar { display: none; }

.story {
  flex: none;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: var(--story-card-w, 80px);
  scroll-snap-align: start;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--t-fast);
}
.story:active { transform: scale(.96); }
.story__ring {
  width: var(--story-thumb-w, 72px); height: var(--story-thumb-h, 72px); border-radius: 999px;
  padding: 2.5px;
  background: conic-gradient(from 180deg, #0b3aa8, #06b6d4, #3b82f6, #06b6d4, #0b3aa8);
  position: relative;
  transition: filter var(--t-med);
}
.story--seen .story__ring {
  background: conic-gradient(from 180deg, #cbd5e1, #cbd5e1);
}
.story__avatar {
  display: block;
  width: 100%; height: 100%; border-radius: 50%;
  background-color: #fff;
  background-size: var(--story-fit, cover); background-repeat: no-repeat; background-position: var(--story-pos, center);
  border: 2px solid #fff;
  box-sizing: border-box;
}
.story__ring { display: block; box-sizing: border-box; }
.story__label { display: block; }
.story__label {
  font-size: 12px; color: var(--ink-soft); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: var(--story-card-w, 80px); text-align: center;
}
.story--seen .story__label { color: var(--ink-mute); }

/* small "live" indicator for stories with real video */
.story__live {
  position: absolute; bottom: 0; inset-inline-end: 0;
  background: #ef4444; color: #fff; font-size: 9px; font-weight: 700;
  padding: 1px 6px; border-radius: 999px; border: 2px solid #fff;
  letter-spacing: .3px;
}

/* ===== Hero ===== */
.hero { padding: 32px 0 56px; }
.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1.1fr .9fr; gap: 60px; }
}

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--brand-tint); color: var(--brand);
  font-size: 12.5px; font-weight: 600;
  margin-bottom: 18px;
}
.pill__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, .55);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(22,163,74,.55); }
  70% { box-shadow: 0 0 0 8px rgba(22,163,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}

.hero__title {
  font-size: clamp(28px, 4.4vw, 46px);
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 18px;
  color: var(--ink);
  letter-spacing: -.3px;
}
.grad-text {
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.hero__sub {
  color: var(--ink-soft);
  font-size: 16px;
  margin: 0 0 26px;
  max-width: 56ch;
}
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.hero__metrics {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-soft);
}
.hero__metrics li {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.hero__metrics strong {
  font-size: 22px; font-weight: 800; color: var(--ink);
  font-feature-settings: "tnum";
}
.hero__metrics span { font-size: 12px; color: var(--ink-mute); }

/* Hero visual: primary Lottie animation */
.hero__visual {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
@media (min-width: 900px) {
  .hero__visual { min-height: 480px; }
}
.hero__glow {
  position: absolute;
  inset: 12% 2% 4%;
  background:
    radial-gradient(42% 50% at 50% 48%, rgba(59,130,246,.18), transparent 72%),
    radial-gradient(38% 44% at 54% 58%, rgba(6,182,212,.14), transparent 74%);
  filter: blur(24px);
  pointer-events: none;
}
.hero__animation-card {
  position: relative;
  width: min(118%, 690px);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  overflow: visible;
  isolation: isolate;
  filter: drop-shadow(0 28px 32px rgba(15,23,42,.16));
  animation: floaty 5.8s ease-in-out infinite;
}
.hero__animation-card::before { content: none; }
.hero__animation-card dotlottie-wc {
  position: relative;
  z-index: 1;
  width: 118%;
  height: 118%;
  transform: scale(1.08) translateY(-1%);
  transform-origin: center;
}
@media (max-width: 899px) {
  .hero__visual { order: -1; min-height: 300px; margin-bottom: 4px; }
  .hero__animation-card { width: min(120vw, 480px); }
  .hero__animation-card dotlottie-wc { width: 116%; height: 116%; transform: scale(1.04); }
}

/* Legacy mini-card styles are kept for backward-compatible custom content. */
.hero__card {
  position: absolute;
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line-soft);
  width: 220px;
  animation: floaty 5s ease-in-out infinite;
}
.hero__card--1 { top: 8%; inset-inline-end: 8%; }
.hero__card--2 { top: 40%; inset-inline-start: 4%; animation-delay: .8s; }
.hero__card--3 { bottom: 6%; inset-inline-end: 18%; animation-delay: 1.6s; }
@keyframes floaty {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.mini-row { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.mini-dot { width: 9px; height: 9px; border-radius: 50%; }
.mini-dot--g { background: #16a34a; }
.mini-dot--b { background: var(--brand-2); }
.mini-dot--y { background: var(--warn); }
.mini-bar { height: 6px; background: var(--bg-alt); border-radius: 99px; margin: 10px 0 6px; overflow: hidden; }
.mini-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: 99px;
  animation: barGrow 1.4s ease-out both;
}
@keyframes barGrow { from { width: 0 !important; } }
.mini-meta { font-size: 11.5px; color: var(--ink-mute); }

/* ===== Sections ===== */
.section { padding: 64px 0; }
.section--alt { background: var(--surface); border-block: 1px solid var(--line-soft); }
.section__head { margin-bottom: 36px; max-width: 640px; }
.section__head--center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px;
  color: var(--brand); text-transform: uppercase;
  margin-bottom: 10px;
}
.section__head h2 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800; margin: 0 0 10px; color: var(--ink);
  letter-spacing: -.2px;
}
.section__head p { color: var(--ink-soft); margin: 0; font-size: 15px; }

/* ===== Products ===== */
.products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 600px) { .products { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .products { grid-template-columns: repeat(3, 1fr); } }

.product {
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  display: flex; flex-direction: column;
  transition: transform var(--t-med), box-shadow var(--t-med);
  position: relative;
  box-shadow: var(--shadow-sm);
}
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product__media {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--bg-alt), #fff);
  overflow: hidden;
  position: relative;
}
.product__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.7,.3,1);
}
.product:hover .product__media img { transform: scale(1.04); }
.product__badge {
  position: absolute; top: 12px; inset-inline-end: 12px;
  background: rgba(255,255,255,.92);
  color: var(--brand);
  font-size: 11.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 99px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.product__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.product__title { font-size: 17px; font-weight: 700; margin: 0 0 6px; color: var(--ink); }
.product__desc { color: var(--ink-soft); font-size: 13.5px; margin: 0 0 16px; line-height: 1.7; flex: 1; }
.product__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 14px; border-top: 1px dashed var(--line);
}
.product__price {
  display: flex; flex-direction: column; line-height: 1.2;
}
.product__price-main {
  font-size: 18px; font-weight: 800; color: var(--ink);
  font-feature-settings: "tnum";
  display: flex; align-items: baseline; gap: 4px;
}
.product__price-main em { font-size: 11.5px; color: var(--ink-mute); font-weight: 500; font-style: normal; }
.product__price-sub { font-size: 11.5px; color: var(--ink-mute); }

.product__btn {
  background: var(--brand-tint); color: var(--brand);
  padding: 9px 14px; border-radius: 99px;
  font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
  transition: background var(--t-fast), color var(--t-fast);
}
.product__btn:hover { background: var(--brand); color: #fff; }
.product__btn svg { width: 14px; height: 14px; }

/* ===== Features ===== */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 600px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feature {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 22px 20px;
  border: 1px solid var(--line-soft);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feature__icon {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--brand-tint); color: var(--brand);
  display: grid; place-items: center;
  margin-bottom: 14px;
}
.feature h3 { font-size: 15.5px; font-weight: 700; margin: 0 0 6px; color: var(--ink); }
.feature p { font-size: 13.5px; color: var(--ink-soft); margin: 0; line-height: 1.75; }

/* ===== CTA / Contact ===== */
.cta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  background: linear-gradient(135deg, #0b3aa8 0%, #1e40af 50%, #0e7490 100%);
  color: #fff;
  border-radius: var(--r-xl);
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(40% 40% at 80% 20%, rgba(255,255,255,.15), transparent 60%),
    radial-gradient(40% 40% at 20% 80%, rgba(6,182,212,.25), transparent 60%);
  pointer-events: none;
}
.cta > * { position: relative; z-index: 1; }
@media (min-width: 900px) { .cta { grid-template-columns: 1fr 1fr; padding: 48px; gap: 56px; } }

.cta__copy h2 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800; margin: 8px 0 12px; line-height: 1.3;
}
.cta__copy .eyebrow { color: rgba(255,255,255,.85); }
.cta__copy p { color: rgba(255,255,255,.85); margin: 0 0 22px; }
.cta__channels { display: flex; flex-direction: column; gap: 12px; }
.cta__channels li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: rgba(255,255,255,.95); }
.cta__channels a { transition: color var(--t-fast); }
.cta__channels a:hover { color: #67e8f9; }

.cta__form {
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 22px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(255,255,255,.18);
  display: flex; flex-direction: column; gap: 12px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; color: rgba(255,255,255,.85); font-weight: 500; }
.field input, .field select, .field textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,.96);
  border: 1px solid transparent;
  color: var(--ink);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field textarea { resize: vertical; min-height: 76px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(6,182,212,.18);
}
.cta__form .btn--primary {
  background: #fff; color: var(--brand);
  box-shadow: 0 6px 16px rgba(0,0,0,.15);
}
.cta__form .btn--primary:hover { background: #eaf0ff; }
.cta__note { font-size: 13px; color: #a5f3fc; min-height: 18px; }

/* ===== Footer ===== */
.footer { padding: 36px 0 18px; background: var(--surface); border-top: 1px solid var(--line-soft); }
.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding-bottom: 28px;
}
@media (min-width: 700px) { .footer__inner { grid-template-columns: 1fr 1.4fr; gap: 40px; } }
.footer__brand .brand__name { font-size: 20px; color: var(--brand); display: block; margin-bottom: 6px; }
.footer__brand p { color: var(--ink-soft); font-size: 13.5px; margin: 0; }
.footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.footer__cols h4 { font-size: 13px; font-weight: 700; color: var(--ink); margin: 0 0 12px; letter-spacing: .3px; }
.footer__cols a { display: block; padding: 4px 0; font-size: 13px; color: var(--ink-soft); transition: color var(--t-fast); }
.footer__cols a:hover { color: var(--brand); }
.footer__bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px 0 !important;
  border-top: 1px solid var(--line-soft);
  font-size: 12px; color: var(--ink-mute);
}
@media (max-width: 540px) { .footer__bar { flex-direction: column; gap: 6px; text-align: center; } }

/* ===== Story Viewer (Instagram-style) ===== */
.story-viewer {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  animation: fadeIn .25s ease both;
}
.story-viewer[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.story-viewer__bg {
  position: absolute; inset: 0;
  background: rgba(8, 11, 22, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.story-viewer__stage {
  position: relative;
  width: min(96vw, 420px);
  height: min(92vh, 750px);
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column;
  z-index: 1;
}
@media (max-width: 540px) {
  .story-viewer__stage { width: 100vw; height: 100vh; border-radius: 0; }
}

.story-viewer__bars {
  position: absolute; top: 8px; inset-inline: 8px;
  display: flex; gap: 4px; z-index: 3;
}
.bar {
  flex: 1; height: 3px; background: rgba(255,255,255,.32);
  border-radius: 99px; overflow: hidden;
}
.bar__fill {
  display: block; height: 100%; width: 0;
  background: #fff;
  transition: width 80ms linear;
}
.bar.is-done .bar__fill { width: 100%; }

.story-viewer__head {
  position: absolute; top: 22px; inset-inline: 16px;
  display: flex; align-items: center; justify-content: space-between;
  color: #fff; z-index: 3;
}
.story-viewer__who { display: flex; align-items: center; gap: 10px; }
.story-viewer__avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background-size: var(--story-fit, cover); background-repeat: no-repeat; background-position: var(--story-pos, center);
  border: 2px solid #fff;
  flex: none;
}
.story-viewer__title { font-size: 13.5px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.story-viewer__close {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0,0,0,.35); color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background var(--t-fast);
}
.story-viewer__close:hover { background: rgba(0,0,0,.55); }

.story-viewer__media {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: #000;
}
/* Top gradient overlay so progress bars + header controls are readable on light photos */
.story-viewer__stage::before {
  content: "";
  position: absolute; top: 0; inset-inline: 0; height: 110px;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 100%);
  z-index: 2;
  pointer-events: none;
}
.story-viewer__media video,
.story-viewer__media img {
  width: 100%; height: 100%; object-fit: var(--story-fit, cover); object-position: var(--story-pos, center);
}
.story-viewer__media .poster-fallback {
  width: 100%; height: 100%;
  background-size: var(--story-fit, cover); background-repeat: no-repeat; background-position: var(--story-pos, center);
  position: relative;
}
.story-viewer__media .poster-fallback::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.55) 100%);
}
.poster-caption {
  position: absolute; bottom: 80px; inset-inline: 22px;
  color: #fff;
  font-size: 15.5px; font-weight: 600;
  text-shadow: 0 2px 6px rgba(0,0,0,.5);
  z-index: 2;
  line-height: 1.6;
}
.poster-cta {
  position: absolute; bottom: 28px; inset-inline: 22px;
  background: rgba(255,255,255,.95); color: var(--ink);
  font-size: 13.5px; font-weight: 600;
  padding: 11px 16px;
  border-radius: 99px;
  text-align: center;
  z-index: 2;
}

.story-viewer__nav {
  position: absolute; top: 0; bottom: 0;
  width: 36%;
  z-index: 2;
}
.story-viewer__nav--prev { inset-inline-end: 0; }
.story-viewer__nav--next { inset-inline-start: 0; }
/* (In RTL, "prev" sits on the right side of the viewer; this matches Persian reading.) */

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.3,1); }
.reveal.is-in { opacity: 1; transform: translateY(0); }

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

/* ===== Persian numerals for prices ===== */
.num-fa { font-feature-settings: "tnum"; }


/* ===== Data-rich product cards merged from source web ===== */
.product__points {
  margin: 0 0 14px;
  padding: 0 18px 0 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.85;
}
.product__points li { margin-bottom: 3px; }
.product__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}
.product__chips span {
  font-size: 10.5px;
  color: var(--brand);
  background: var(--brand-tint);
  border: 1px solid rgba(11,58,168,.08);
  border-radius: 999px;
  padding: 4px 8px;
  direction: ltr;
  unicode-bidi: plaintext;
}
.product__price--text { max-width: calc(100% - 84px); }
.product__price-main--text {
  font-size: 12.5px;
  line-height: 1.6;
  font-weight: 700;
  color: var(--ink);
}

/* ===== Portfolio ===== */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 700px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .portfolio-grid { grid-template-columns: repeat(3, 1fr); } }
.portfolio-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-fast);
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.portfolio-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(11,58,168,.18); }
.portfolio-card__cat {
  display: inline-block;
  direction: ltr;
  color: var(--brand);
  background: var(--brand-tint);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 10.5px;
  font-weight: 700;
  margin-bottom: 12px;
}
.portfolio-card h3 { margin: 0 0 8px; font-size: 17px; color: var(--ink); }
.portfolio-card p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.8; }
.portfolio-card__features {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}
.portfolio-card__features span {
  font-size: 11px;
  background: #f8fafc;
  border: 1px solid var(--line-soft);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 5px 9px;
}


/* ===== Complete merge v3: richer source-web sections without changing base UX ===== */
@media (min-width: 721px) and (max-width: 1060px) {
  .topbar__nav { gap: 10px; }
  .topbar__nav a { font-size: 12.5px; }
}
.section__head--split { max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 18px; }
@media (max-width: 720px) { .section__head--split { display: block; } }
.section--stats { background: linear-gradient(180deg, #f6f7fb 0%, #eef3fb 100%); position: relative; overflow: hidden; }
.stats-layout { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: stretch; }
@media (min-width: 980px) { .stats-layout { grid-template-columns: .9fr 1.25fr; } }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
@media (max-width: 560px) { .stats-grid { grid-template-columns: 1fr; } }
.stat-card, .quality-card, .chart-card, .tech-card, .adv-card, .about-card, .portal-card {
  background: var(--surface); border: 1px solid var(--line-soft); box-shadow: var(--shadow-sm); border-radius: var(--r-lg);
}
.stat-card { padding: 18px; min-height: 145px; display: flex; flex-direction: column; justify-content: space-between; transition: transform var(--t-med), box-shadow var(--t-med); }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card__num { font-size: 31px; font-weight: 800; color: var(--brand); letter-spacing: -.6px; }
.stat-card h3 { margin: 6px 0 4px; font-size: 13.5px; color: var(--ink); }
.stat-card p { margin: 0; color: #059669; font-size: 11.5px; font-weight: 700; }
.chart-card { padding: 20px; min-height: 360px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.chart-card__head { display: flex; align-items: start; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line-soft); padding-bottom: 14px; margin-bottom: 10px; }
.chart-card__head h3 { margin: 0 0 4px; font-size: 17px; }
.chart-card__head p { margin: 0; color: var(--ink-mute); font-size: 12px; }
.chart-card__head span { direction: ltr; color: var(--brand); background: var(--brand-tint); border-radius: 99px; padding: 5px 9px; font-size: 10px; font-weight: 800; }
.chart-card svg { width: 100%; height: 260px; overflow: visible; }
.chart-card circle { fill: #fff; stroke: var(--brand-2); stroke-width: 4; }
.chart-card text { fill: var(--ink-mute); font-size: 12px; font-weight: 700; }
.chart-gridlines line { stroke: #e5e7eb; stroke-dasharray: 4 6; }
.quality-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
@media (max-width: 760px) { .quality-grid { grid-template-columns: 1fr; } }
.quality-card { padding: 16px; display: grid; gap: 5px; }
.quality-card strong { color: var(--brand); font-size: 26px; font-weight: 800; }
.quality-card span { font-size: 13px; color: var(--ink); font-weight: 700; }
.quality-card p { margin: 0; color: var(--ink-mute); font-size: 12px; }
.product__actions { display: flex; gap: 8px; flex-wrap: nowrap; }
.product__foot--double { align-items: end; }
.product__btn--ghost { background: #f8fafc; color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--line-soft); }
.product__btn--ghost:hover { color: var(--brand); background: var(--brand-tint); }
.portfolio-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -10px 0 24px; }
.filter-chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); border-radius: 99px; padding: 8px 13px; font-size: 12px; font-weight: 700; transition: all var(--t-fast); }
.filter-chip:hover, .filter-chip.is-active { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 8px 18px -12px rgba(11,58,168,.8); }
.section--tech { background: #f8fafc; }
.tech-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
@media (min-width: 720px) { .tech-grid { grid-template-columns: repeat(5, minmax(0,1fr)); } }
.tech-card { padding: 16px; display: flex; align-items: center; gap: 10px; transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-fast); }
.tech-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(11,58,168,.20); }
.tech-card__icon { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand); font-weight: 800; font-size: 10px; direction: ltr; }
.tech-card strong { font-size: 13px; color: var(--ink); direction: ltr; unicode-bidi: plaintext; }
.tech-card small { display: block; color: var(--ink-mute); font-size: 10.5px; margin-top: 2px; }
.section--about { background: linear-gradient(180deg, #fff 0%, #f6f7fb 100%); }
.about-layout { display: grid; gap: 28px; align-items: center; }
@media (min-width: 960px) { .about-layout { grid-template-columns: .9fr 1.1fr; } }
.about-list { display: grid; gap: 14px; }
.about-card { padding: 18px; display: flex; align-items: flex-start; gap: 14px; transition: transform var(--t-med), box-shadow var(--t-med); }
.about-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.about-card > span { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: var(--brand-tint); color: var(--brand); font-weight: 800; }
.about-card h3 { margin: 0 0 4px; font-size: 15px; }
.about-card p, .about-copy p { margin: 0; color: var(--ink-soft); font-size: 13.5px; line-height: 1.9; }
.about-copy h2 { margin: 8px 0 12px; font-size: clamp(26px, 3.8vw, 44px); line-height: 1.25; }
.about-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.about-chips span { background: #fff; border: 1px solid var(--line-soft); border-radius: 99px; padding: 7px 10px; font-size: 12px; color: var(--ink-soft); }
.about-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; border-top: 1px solid var(--line-soft); padding-top: 18px; margin-top: 20px; }
.about-metrics strong { display: grid; gap: 3px; color: var(--brand); font-size: 24px; }
.about-metrics span { color: var(--ink-mute); font-size: 11px; font-weight: 600; }
.advantages-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
@media (min-width: 920px) { .advantages-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 560px) { .advantages-grid { grid-template-columns: 1fr; } }
.adv-card { min-height: 170px; padding: 20px; position: relative; overflow: hidden; transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-fast); }
.adv-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(11,58,168,.18); }
.adv-card__idx { position: absolute; inset-inline-end: 16px; top: 14px; color: #cbd5e1; font-size: 12px; font-weight: 800; }
.adv-card h3 { margin: 28px 0 8px; font-size: 16px; }
.adv-card p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.8; }
.section--portal { background: #f8fafc; }
.portal-card { padding: 22px; display: grid; gap: 22px; align-items: center; overflow: hidden; }
@media (min-width: 900px) { .portal-card { grid-template-columns: .9fr 1.1fr; padding: 30px; } }
.portal-copy h2 { margin: 8px 0 10px; font-size: clamp(23px, 3vw, 36px); }
.portal-copy p { margin: 0; color: var(--ink-soft); font-size: 13.5px; line-height: 1.9; }
.portal-preview { display: grid; gap: 12px; }
.portal-preview div { background: #fff; border: 1px solid var(--line-soft); border-radius: 16px; padding: 14px; box-shadow: var(--shadow-sm); }
.portal-preview span { color: var(--brand); font-size: 11px; font-weight: 800; direction: ltr; }
.portal-preview strong { display: block; margin: 4px 0 10px; font-size: 14px; }
.portal-preview i { display: block; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.portal-preview small { display: block; margin-top: 8px; color: var(--ink-mute); font-size: 11px; }
body.modal-open { overflow: hidden; }
.service-modal[hidden] { display: none; }
.service-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 18px; }
.service-modal__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.68); backdrop-filter: blur(10px); }
.service-modal__dialog { position: relative; z-index: 1; width: min(980px, 100%); max-height: min(86vh, 760px); overflow: auto; border-radius: 28px; background: #fff; box-shadow: 0 30px 70px -20px rgba(0,0,0,.45); }
.service-detail__head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); }
.service-detail__head span { color: var(--brand); font-weight: 800; font-size: 12px; }
.service-detail__close { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #f8fafc; color: var(--ink); font-size: 24px; line-height: 1; }
.service-detail { display: grid; gap: 24px; padding: 24px; }
@media (min-width: 900px) { .service-detail { grid-template-columns: .8fr 1.2fr; } }
.service-detail__media { border-radius: 22px; overflow: hidden; background: #f8fafc; border: 1px solid var(--line-soft); align-self: start; }
.service-detail__media img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; }
.service-detail__copy h2 { margin: 0 0 8px; font-size: clamp(22px, 4vw, 34px); line-height: 1.35; }
.service-detail__sub { color: var(--ink-soft); margin: 0 0 14px; font-size: 14px; line-height: 1.9; }
.service-detail__meta { display: inline-flex; gap: 8px; align-items: center; background: var(--brand-tint); color: var(--brand); padding: 8px 12px; border-radius: 99px; font-size: 12px; margin-bottom: 18px; }
.service-detail__meta strong { color: var(--ink); }
.service-detail__copy h3 { margin: 18px 0 9px; font-size: 14px; color: var(--ink); }
.service-detail__copy ul { list-style: disc; padding-inline-start: 22px; color: var(--ink-soft); font-size: 13px; line-height: 1.9; }
.service-detail__highlights, .service-detail__tech { display: flex; flex-wrap: wrap; gap: 8px; }
.service-detail__highlights span { background: #f8fafc; border: 1px solid var(--line-soft); color: var(--ink-soft); border-radius: 12px; padding: 8px 10px; font-size: 12px; line-height: 1.6; }
.service-detail__tech span { direction: ltr; unicode-bidi: plaintext; color: var(--brand); background: var(--brand-tint); border-radius: 99px; padding: 6px 9px; font-size: 11px; font-weight: 700; }
.service-detail__note { margin: 14px 0; padding: 10px 12px; border-radius: 14px; background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; font-size: 11.5px; line-height: 1.8; }
.ai-widget { position: fixed; inset-inline-start: 18px; bottom: 18px; z-index: 70; direction: rtl; }
.ai-widget__fab { width: 64px; height: 64px; border-radius: 22px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: var(--shadow-pop); display: grid; place-items: center; align-content: center; }
.ai-widget__fab span { font-size: 17px; font-weight: 800; direction: ltr; }
.ai-widget__fab small { font-size: 9px; font-weight: 700; }
.ai-widget__panel { position: absolute; inset-inline-start: 0; bottom: 76px; width: min(360px, calc(100vw - 36px)); background: #fff; border: 1px solid var(--line-soft); border-radius: 24px; box-shadow: var(--shadow-pop); overflow: hidden; }
.ai-widget__panel header { display: flex; align-items: center; justify-content: space-between; padding: 13px 14px; border-bottom: 1px solid var(--line-soft); }
.ai-widget__panel header strong { color: var(--brand); direction: ltr; }
.ai-widget__panel header button { width: 30px; height: 30px; border-radius: 50%; background: #f8fafc; font-size: 20px; }
.ai-widget__messages { max-height: 320px; overflow: auto; padding: 12px; background: #f8fafc; }
.ai-msg { width: fit-content; max-width: 88%; padding: 10px 12px; border-radius: 16px; font-size: 12px; line-height: 1.75; margin: 0 0 9px; }
.ai-msg--bot { background: #fff; color: var(--ink-soft); border: 1px solid var(--line-soft); margin-inline-start: auto; }
.ai-msg--user { background: var(--brand); color: #fff; margin-inline-end: auto; }
.ai-widget__quick { display: grid; gap: 7px; margin-top: 8px; }
.ai-widget__quick button { text-align: right; background: #fff; border: 1px solid var(--line-soft); border-radius: 12px; padding: 8px 10px; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.ai-widget__form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line-soft); background: #fff; }
.ai-widget__form input { flex: 1; min-width: 0; border: 1px solid var(--line-soft); border-radius: 12px; padding: 9px 10px; font-family: inherit; font-size: 12px; outline: none; }
.ai-widget__form button { background: var(--brand); color: #fff; border-radius: 12px; padding: 0 12px; font-weight: 700; font-size: 12px; }
@media (max-width: 560px) { .ai-widget { inset-inline-start: 12px; bottom: 12px; } .ai-widget__fab { width: 58px; height: 58px; border-radius: 20px; } }


/* ===== Admin-driven public sections ===== */
.banner-zone { padding: 28px 0 8px; background: #f6f7fb; }
.banner-zone.is-empty, .section.is-empty { display: none; }
.banner-rail { display: grid; gap: 16px; }
.home-banner { position: relative; min-height: 320px; border-radius: 32px; overflow: hidden; background: #071a43; color: #fff; box-shadow: var(--shadow-lg); isolation: isolate; }
.home-banner__media { position: absolute; inset: 0; z-index: -2; }
.home-banner__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,26,67,.92), rgba(7,26,67,.58), rgba(7,26,67,.12)); z-index: 1; }
.home-banner__media img, .home-banner__media video, .home-banner__media picture { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-banner__copy { width: min(620px, 100%); padding: clamp(26px, 6vw, 56px); }
.home-banner__copy h2 { margin: 8px 0 10px; font-size: clamp(25px, 4vw, 48px); line-height: 1.25; }
.home-banner__copy p { margin: 0 0 18px; color: rgba(255,255,255,.82); line-height: 1.9; }
.section--digital { background: linear-gradient(180deg,#fff 0%,#f6f7fb 100%); }
.digital-products-grid { display: grid; gap: 18px; }
@media (min-width: 760px) { .digital-products-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (min-width: 1100px) { .digital-products-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
.digital-card { background: #fff; border: 1px solid var(--line-soft); border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform var(--t-med), box-shadow var(--t-med); }
.digital-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.digital-card__media { position: relative; aspect-ratio: 16/10; background: #eef2ff; overflow: hidden; }
.digital-card__media img, .digital-card__media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.digital-card__media span { position: absolute; inset-inline-start: 12px; top: 12px; background: rgba(255,255,255,.92); color: var(--brand); border: 1px solid rgba(11,58,168,.18); border-radius: 99px; padding: 6px 10px; font-weight: 800; font-size: 11px; }
.digital-card__body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.digital-card__body h3 { margin: 0; font-size: 17px; }
.digital-card__body p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.85; }
.digital-card__body ul { margin: 0; padding-inline-start: 20px; color: var(--ink-soft); font-size: 12.5px; line-height: 1.8; }
.digital-card__foot { margin-top: auto; display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.digital-card__foot strong { color: var(--brand); font-size: 18px; }
.digital-card__foot div { display: flex; flex-wrap: wrap; gap: 8px; }
.product__media video, .service-detail__media video { width: 100%; height: 100%; min-height: 230px; object-fit: cover; display: block; background: #020617; }
.service-detail__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.section--articles { background: #fff; }
.articles-grid { display: grid; gap: 16px; }
@media (min-width: 800px) { .articles-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
.article-card { background: #fff; border: 1px solid var(--line-soft); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-sm); }
.article-card > img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; background: #f1f5f9; }
.article-card > div { padding: 16px; }
.article-card span { color: var(--brand); font-size: 11px; font-weight: 800; }
.article-card h3 { margin: 7px 0 8px; font-size: 16px; }
.article-card p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.85; }
.article-card details { margin-top: 10px; }
.article-card summary { cursor: pointer; color: var(--brand); font-weight: 800; font-size: 12px; }
.cart-widget { position: fixed; inset-inline-end: 18px; bottom: 18px; z-index: 72; direction: rtl; }
.cart-widget__fab { width: 64px; height: 64px; border-radius: 22px; background: linear-gradient(135deg, #16a34a, #0f766e); color: #fff; box-shadow: var(--shadow-pop); display: grid; place-items: center; align-content: center; }
.cart-widget__fab span { font-weight: 800; font-size: 12px; }
.cart-widget__fab strong { font-size: 18px; }
.cart-widget__panel { position: absolute; inset-inline-end: 0; bottom: 76px; width: min(390px, calc(100vw - 36px)); background: #fff; border: 1px solid var(--line-soft); border-radius: 24px; box-shadow: var(--shadow-pop); overflow: hidden; }
.cart-widget__panel header { display: flex; justify-content: space-between; align-items: center; padding: 13px 14px; border-bottom: 1px solid var(--line-soft); }
.cart-widget__panel header button { width: 30px; height: 30px; border-radius: 50%; background: #f8fafc; font-size: 20px; }
.cart-widget__items { max-height: 330px; overflow: auto; padding: 12px; background: #f8fafc; }
.cart-item { display: flex; justify-content: space-between; gap: 12px; padding: 11px; border-radius: 16px; background: #fff; border: 1px solid var(--line-soft); margin-bottom: 8px; }
.cart-item strong { display: block; font-size: 13px; }
.cart-item span, .cart-item a { display: block; color: var(--ink-soft); font-size: 11px; margin-top: 3px; }
.cart-item a { color: var(--brand); font-weight: 800; }
.cart-item button { align-self: start; color: #b91c1c; background: #fff1f2; border-radius: 10px; padding: 6px 9px; font-size: 11px; font-weight: 800; }
.cart-empty { margin: 0; color: var(--ink-soft); font-size: 13px; text-align: center; padding: 18px; }
.cart-widget__panel footer { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 12px; border-top: 1px solid var(--line-soft); }
.cart-widget__panel footer span { color: var(--brand); font-weight: 900; }
@media (max-width: 560px) { .cart-widget { inset-inline-end: 12px; bottom: 84px; } .home-banner { min-height: 360px; } .home-banner__media::after { background: linear-gradient(0deg, rgba(7,26,67,.92), rgba(7,26,67,.45)); } .home-banner__copy { padding: 28px 20px; position: absolute; bottom: 0; } }

.cart-item__actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:flex-end}
.cart-item__actions b{min-width:24px;text-align:center;color:var(--brand);font-size:13px}
.cart-item__actions button{align-self:center;color:#0b3aa8;background:#eef2ff;border-radius:10px;padding:6px 9px;font-size:12px;font-weight:900}
.cart-item__actions button[data-remove-cart]{color:#b91c1c;background:#fff1f2}
.product__price small,.digital-card__foot small{display:block;color:var(--ink-soft);font-size:11px;font-weight:700;margin-top:3px}

/* ===== App Negar uploaded logo ===== */
.boot-logo-img{width:64px;height:64px;object-fit:contain;filter:drop-shadow(0 12px 28px rgba(11,58,168,.22))}
.brand__logo{width:44px;height:44px;object-fit:contain;border-radius:14px;filter:drop-shadow(0 8px 18px rgba(11,58,168,.18));flex:none}
.footer-logo{width:72px;height:72px;object-fit:contain;margin-bottom:8px;filter:drop-shadow(0 12px 28px rgba(11,58,168,.18))}
.story__count{position:absolute;top:-4px;inset-inline-start:-4px;min-width:22px;height:22px;border-radius:999px;display:grid;place-items:center;background:#0b3aa8;color:#fff;border:2px solid #fff;font-size:10px;font-weight:900;line-height:1}
.story__ring{position:relative}

/* Dynamic banner carousel: one banner location, auto-rotates every 3 seconds */
.banner-rail--slider{display:block}
.home-banner--single{animation:bannerFade .28s ease both}
.banner-dots{position:absolute;z-index:3;left:clamp(18px,4vw,42px);bottom:clamp(16px,3vw,28px);display:flex;gap:8px;align-items:center;direction:ltr}
.banner-dot{width:9px;height:9px;border-radius:999px;background:rgba(255,255,255,.48);border:1px solid rgba(255,255,255,.35);padding:0;transition:.25s ease}
.banner-dot.is-active{width:28px;background:#fff}
@keyframes bannerFade{from{opacity:.55;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media (max-width:560px){.banner-dots{left:20px;bottom:16px}.banner-dot.is-active{width:22px}}

/* ===== Final banner slider fix: one fixed location, 3s auto-rotation ===== */
.banner-zone { padding: 24px 0 10px; }
.banner-rail--slider { display: block; }
.home-banner--slider {
  position: relative;
  min-height: clamp(260px, 32vw, 390px);
  border-radius: 32px;
  overflow: hidden;
  background: #071a43;
  color: #fff;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}
.home-banner__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity .55s ease, transform .7s ease, visibility .55s ease;
}
.home-banner__slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
}
.home-banner__slide .home-banner__media { position: absolute; inset: 0; z-index: -2; }
.home-banner__slide .home-banner__copy { position: relative; z-index: 2; }
.banner-dots { z-index: 5; }
@media (max-width: 560px) {
  .home-banner--slider { min-height: 360px; border-radius: 26px; }
  .home-banner__slide .home-banner__copy { position: absolute; bottom: 0; inset-inline: 0; }
}

/* ===== Topbar cart: responsive header placement instead of floating bottom widget ===== */
.topbar__cart-mount { position: relative; display: flex; align-items: center; margin-inline-start: 6px; }
.cart-widget,
.cart-widget.cart-widget--topbar {
  position: relative;
  inset: auto;
  bottom: auto;
  z-index: 80;
  direction: rtl;
}
.cart-widget__fab {
  width: auto;
  min-width: 106px;
  height: 40px;
  padding: 0 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0b3aa8, #06b6d4);
  color: #fff;
  box-shadow: 0 12px 24px -16px rgba(11,58,168,.75);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  align-content: center;
  white-space: nowrap;
}
.cart-widget__fab span { font-weight: 900; font-size: 12.5px; }
.cart-widget__fab .cart-widget__icon { font-size: 15px; line-height: 1; }
.cart-widget__fab strong {
  min-width: 23px;
  height: 23px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.96);
  color: #0b3aa8;
  font-size: 13px;
  line-height: 1;
}
.cart-widget__panel {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 12px);
  bottom: auto;
  width: min(390px, calc(100vw - 28px));
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}
.cart-item { align-items: flex-start; }
@media (max-width: 920px) {
  .topbar__inner { gap: 8px; }
  .topbar__cta { padding-inline: 11px; }
}
@media (max-width: 720px) {
  .topbar__inner { flex-wrap: wrap; padding: 10px 14px; }
  .brand { flex: 1 1 auto; min-width: 150px; }
  .topbar__cart-mount { order: 3; margin-inline-start: 0; }
  .topbar__cta { order: 4; font-size: 12px; padding: 8px 10px; }
  .cart-widget__fab { min-width: 92px; height: 38px; padding-inline: 9px; }
  .cart-widget__fab span:not(.cart-widget__icon) { display: none; }
  .cart-widget__fab strong { min-width: 22px; height: 22px; }
  .cart-widget__panel { inset-inline-end: auto; left: 0; right: auto; top: calc(100% + 10px); }
}
@media (max-width: 430px) {
  .topbar__inner { row-gap: 9px; }
  .topbar__cta:last-child { display: none; }
  .cart-widget__panel { width: calc(100vw - 24px); }
}

/* ===== Order/contact and product detail slides ===== */
.footer__cols{grid-template-columns:repeat(3,minmax(0,1fr));}
@media (max-width:760px){.footer__cols{grid-template-columns:1fr 1fr;}}
@media (max-width:520px){.footer__cols{grid-template-columns:1fr;}}
.product-detail-slides{margin-top:12px;padding:12px;background:#fff;border-top:1px solid var(--line-soft);}
.product-detail-slides h3{margin:0 0 10px;color:var(--ink);font-size:13px;}
.product-detail-slides__rail{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(180px,72%);gap:10px;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:inline mandatory;padding-bottom:4px;}
.product-detail-slide{scroll-snap-align:start;border:1px solid var(--line-soft);border-radius:16px;overflow:hidden;background:#f8fafc;}
.product-detail-slide>div{aspect-ratio:16/10;background:#020617;display:grid;place-items:center;}
.product-detail-slide img,.product-detail-slide video{width:100%;height:100%;object-fit:cover;display:block;}
.product-detail-slide p{display:grid;gap:4px;margin:0;padding:9px 10px;color:var(--ink-soft);font-size:12px;line-height:1.7;}
.product-detail-slide strong{color:var(--ink);font-size:12px;}
.product-detail-slide span{display:block;}
.cta__note{min-height:24px;}
.product-detail-slide img,.product-detail-slide video{min-height:0!important;}

/* ============================================================
   Lottie feature sections (App Negar) — added integration
   ============================================================ */
.lottie-feature { padding: 64px 0; }
.lottie-feature + .lottie-feature { border-top: 1px solid var(--line-soft); }
.lottie-feature__inner {
  display: flex; align-items: center; gap: 48px; justify-content: space-between;
}
.lottie-feature--reverse .lottie-feature__inner { flex-direction: row-reverse; }
.lottie-feature__media {
  flex: 1 1 0; max-width: 460px; width: 100%;
  aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
}
.lottie-feature__media dotlottie-wc { width: 100%; height: 100%; }
.lottie-feature__media--card {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg, 28px); box-shadow: var(--shadow-lg);
  padding: 22px; position: relative; overflow: hidden;
}
.lottie-feature__media--card::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(15,23,42,.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,23,42,.02) 1px, transparent 1px);
  background-size: 22px 22px; pointer-events: none;
}
.lottie-feature__copy { flex: 1 1 0; text-align: right; }
.lottie-feature__copy h2 {
  font-size: clamp(26px, 4vw, 40px); font-weight: 800; line-height: 1.25;
  color: var(--ink); margin: 14px 0 14px; letter-spacing: -.3px;
}
.lottie-feature__copy h2 .hl { color: var(--brand-2); }
.lottie-feature__copy h2 .hl--amber { color: #d97706; }
.lottie-feature__lead {
  font-size: 14.5px; color: var(--ink-soft); line-height: 2; max-width: 560px;
}
.lottie-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; padding: 7px 14px; border-radius: 999px;
  background: var(--brand-tint); color: var(--brand); border: 1px solid var(--line-soft);
}
.lottie-pill--amber { background: #fef6e7; color: #b45309; border-color: #fbe3b8; }
.lottie-feature__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line-soft);
}
.lottie-mini { display: flex; align-items: flex-start; gap: 12px; }
.lottie-mini__icon {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-tint); color: var(--brand);
}
.lottie-mini__icon--amber { background: #fef6e7; color: #d97706; }
.lottie-mini__icon--green { background: #e7f8ef; color: #059669; }
.lottie-mini__icon--pink { background: #fdeef4; color: #db2777; }
.lottie-mini h4 { font-size: 13px; font-weight: 800; color: var(--ink); margin: 0; }
.lottie-mini p { font-size: 12px; color: var(--ink-mute); margin: 4px 0 0; line-height: 1.7; }

@media (max-width: 860px) {
  .lottie-feature { padding: 44px 0; }
  .lottie-feature__inner,
  .lottie-feature--reverse .lottie-feature__inner { flex-direction: column; gap: 28px; }
  .lottie-feature__media { max-width: 340px; }
  .lottie-feature__grid { grid-template-columns: 1fr; gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .lottie-feature__media dotlottie-wc { opacity: .9; }
}


/* ===== FINAL HERO FLOATING TRANSPARENT FIX V3 ===== */
@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr) !important;
    gap: 38px !important;
  }
}

.hero__visual,
.hero__visual--lottie,
.hero__visual * {
  box-sizing: border-box;
}

.hero__visual,
.hero__visual--lottie {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

@media (min-width: 900px) {
  .hero__visual,
  .hero__visual--lottie {
    min-height: 560px !important;
    margin-inline-start: -22px !important;
  }
}

.hero__glow,
.hero__visual::before,
.hero__visual::after,
.hero__visual--lottie::before,
.hero__visual--lottie::after,
.hero__animation-card::before,
.hero__animation-card::after {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.hero__animation-card {
  position: relative !important;
  width: min(60vw, 900px) !important;
  max-width: none !important;
  aspect-ratio: 1 / 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  isolation: auto !important;
  filter: drop-shadow(0 30px 30px rgba(15, 23, 42, .18)) !important;
  animation: heroFloatingAnimationV3 5.4s ease-in-out infinite !important;
}

.hero__animation-card dotlottie-wc,
.hero__animation-card dotlottie-wc canvas,
.hero__animation-card dotlottie-wc svg {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.hero__animation-card dotlottie-wc {
  position: relative !important;
  z-index: 2 !important;
  display: block !important;
  width: 150% !important;
  height: 150% !important;
  max-width: none !important;
  max-height: none !important;
  overflow: visible !important;
  transform: scale(1.18) translateY(-2%) !important;
  transform-origin: center center !important;
}

@keyframes heroFloatingAnimationV3 {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -22px, 0); }
}

@media (max-width: 899px) {
  .hero__visual,
  .hero__visual--lottie {
    order: -1 !important;
    min-height: 330px !important;
    margin: 10px 0 0 !important;
  }

  .hero__animation-card {
    width: min(126vw, 560px) !important;
  }

  .hero__animation-card dotlottie-wc {
    width: 138% !important;
    height: 138% !important;
    transform: scale(1.08) translateY(-1%) !important;
  }
}

/* ============================================================
   UX RESPONSIVE POLISH V4 — desktop/tablet/mobile final pass
   هدف: حذف اسکرول افقی، کوچک‌تر شدن انیمیشن هیرو و چیدمان تمیز موبایل
   ============================================================ */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-width: 320px;
}

main,
section,
header,
footer,
.wrap {
  max-width: 100%;
}

.wrap {
  width: min(100%, var(--wrap-max));
  padding-inline: clamp(14px, 4vw, 24px);
}

.btn,
.product__btn,
.filter-chip,
.story,
.story-viewer__close,
.ai-widget__fab,
.cart-widget__fab {
  -webkit-tap-highlight-color: transparent;
}

input,
select,
textarea,
button {
  min-height: 44px;
}

/* Header: stable on desktop and clean on mobile */
.brand,
.brand__text,
.topbar__inner,
.topbar__nav,
.topbar__cart-mount {
  min-width: 0;
}

.brand__logo,
.footer-logo,
.boot-logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex: none;
}

.topbar__nav {
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}

@media (min-width: 721px) and (max-width: 1180px) {
  .topbar__inner {
    gap: 10px;
  }
  .topbar__nav {
    gap: 12px;
  }
  .topbar__nav a {
    font-size: 12.5px;
  }
  .topbar__cta {
    padding-inline: 12px;
  }
}

@media (max-width: 720px) {
  .topbar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
  }

  .brand {
    flex: 1 1 calc(100% - 120px);
    min-width: 0;
  }

  .brand__logo {
    width: 38px;
    height: 38px;
  }

  .brand__name {
    font-size: 15px;
    white-space: nowrap;
  }

  .topbar__nav {
    display: none !important;
  }

  .topbar__cart-mount {
    flex: 0 0 auto;
    order: 2;
    margin-inline-start: 0 !important;
  }

  .topbar__cta {
    order: 3;
    flex: 1 1 calc(50% - 5px);
    margin: 0 !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
    min-height: 38px;
    white-space: nowrap;
  }

  .topbar__cta:last-child {
    display: inline-flex !important;
  }

  .cart-widget__panel {
    width: min(390px, calc(100vw - 24px)) !important;
    max-height: calc(100vh - 140px);
    overflow: auto;
  }
}

@media (max-width: 380px) {
  .brand__name {
    font-size: 14px;
  }
  .topbar__cta {
    font-size: 11.5px !important;
    padding-inline: 8px !important;
  }
}

/* Hero: smaller floating transparent animation + balanced copy */
.hero {
  padding: clamp(20px, 4vw, 42px) 0 clamp(38px, 6vw, 62px) !important;
  overflow: hidden;
}

.hero__inner,
.hero__copy,
.hero__visual,
.hero__animation-card,
.hero__sub,
.hero__title {
  min-width: 0;
}

.hero__copy {
  position: relative;
  z-index: 2;
}

.hero__sub {
  font-size: clamp(14px, 1.45vw, 16px);
  line-height: 2;
}

.hero__actions {
  align-items: center;
}

.hero__metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.hero__metrics li {
  min-width: 0;
  text-align: center;
}

.hero__metrics span {
  line-height: 1.55;
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.04fr) minmax(320px, .96fr) !important;
    gap: clamp(28px, 4vw, 54px) !important;
  }

  .hero__visual,
  .hero__visual--lottie {
    min-height: 470px !important;
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
  }

  .hero__animation-card {
    width: min(45vw, 560px) !important;
    max-width: 100% !important;
    aspect-ratio: 1 / 1 !important;
  }

  .hero__animation-card dotlottie-wc {
    width: 124% !important;
    height: 124% !important;
    transform: scale(1.02) translateY(-1%) !important;
  }
}

@media (max-width: 899px) {
  .hero__inner {
    gap: 20px !important;
  }

  .hero__visual,
  .hero__visual--lottie {
    order: -1 !important;
    min-height: clamp(235px, 62vw, 320px) !important;
    margin: 4px 0 0 !important;
  }

  .hero__animation-card {
    width: min(88vw, 420px) !important;
    max-width: 100% !important;
  }

  .hero__animation-card dotlottie-wc {
    width: 118% !important;
    height: 118% !important;
    transform: scale(1) translateY(-1%) !important;
  }

  .hero__copy {
    text-align: center;
  }

  .pill,
  .hero__actions {
    justify-content: center;
  }

  .hero__sub {
    margin-inline: auto;
  }
}

@media (max-width: 720px) {
  .stories {
    padding-top: 12px;
  }

  .hero__title {
    font-size: clamp(27px, 8.1vw, 34px) !important;
    line-height: 1.33;
  }

  .hero__sub {
    max-width: 42em;
    margin-bottom: 20px;
  }

  .hero__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 22px;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .hero__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    padding: 14px !important;
    border-radius: 18px !important;
  }

  .hero__metrics strong {
    font-size: 20px;
  }
}

@media (max-width: 430px) {
  .hero__visual,
  .hero__visual--lottie {
    min-height: 232px !important;
  }

  .hero__animation-card {
    width: min(90vw, 360px) !important;
  }

  .hero__animation-card dotlottie-wc {
    width: 116% !important;
    height: 116% !important;
  }
}

/* Grids/cards: prevent overflow and improve touch UX */
.section {
  padding: clamp(44px, 8vw, 70px) 0;
}

.section__head,
.section__head p,
.product__desc,
.portfolio-card p,
.about-copy p,
.cta__copy p,
.lottie-feature__lead {
  overflow-wrap: anywhere;
}

.products,
.features,
.portfolio-grid,
.digital-products-grid,
.tech-grid,
.advantages-grid,
.stats-grid,
.quality-grid,
.about-layout,
.footer__inner,
.footer__cols {
  min-width: 0;
}

.product,
.feature,
.portfolio-card,
.digital-card,
.tech-card,
.adv-card,
.stat-card,
.quality-card,
.about-card,
.portal-card,
.cta,
.chart-card,
.home-banner {
  min-width: 0;
}

.product__foot,
.product__foot--double,
.digital-card__foot div,
.service-detail__actions {
  flex-wrap: wrap !important;
}

.product__actions {
  flex-wrap: wrap !important;
}

.product__btn,
.product__actions .product__btn,
.digital-card__foot .btn {
  min-height: 38px;
}

@media (max-width: 600px) {
  .section__head,
  .section__head--center,
  .section__head--split {
    text-align: center;
    margin-bottom: 26px;
  }

  .section__head--split .btn {
    margin-top: 14px;
    width: 100%;
  }

  .products,
  .features,
  .portfolio-grid,
  .digital-products-grid,
  .advantages-grid,
  .about-list {
    gap: 14px;
  }

  .product__body,
  .digital-card__body {
    padding: 16px;
  }

  .product__foot,
  .product__foot--double {
    display: grid !important;
    grid-template-columns: 1fr;
    align-items: stretch !important;
  }

  .product__actions,
  .digital-card__foot div {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .product__btn,
  .digital-card__foot .btn {
    width: 100%;
    justify-content: center;
  }

  .product__price--text {
    max-width: 100% !important;
  }

  .chart-card {
    min-height: 300px;
    padding: 16px;
  }

  .chart-card__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-card svg {
    height: 210px;
  }
}

/* Animated sections below landing */
@media (min-width: 861px) {
  .lottie-feature__inner,
  .lottie-feature--reverse .lottie-feature__inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(30px, 4.5vw, 56px);
  }

  .lottie-feature__media {
    justify-self: center;
    max-width: min(40vw, 430px) !important;
  }
}

@media (max-width: 860px) {
  .lottie-feature {
    padding: 38px 0 !important;
  }

  .lottie-feature__inner,
  .lottie-feature--reverse .lottie-feature__inner {
    gap: 22px !important;
  }

  .lottie-feature__media {
    max-width: min(78vw, 330px) !important;
    margin-inline: auto;
  }

  .lottie-feature__copy {
    text-align: center;
  }

  .lottie-pill {
    justify-content: center;
    max-width: 100%;
  }

  .lottie-feature__grid {
    text-align: right;
  }
}

@media (max-width: 480px) {
  .lottie-feature__copy h2 {
    font-size: clamp(24px, 7vw, 30px) !important;
  }

  .lottie-feature__media {
    max-width: min(82vw, 300px) !important;
  }

  .lottie-pill {
    font-size: 11px;
    padding: 7px 11px;
  }
}

/* Banner/CTA/footer mobile cleanup */
@media (max-width: 560px) {
  .home-banner,
  .home-banner--slider {
    min-height: 330px !important;
    border-radius: 24px !important;
  }

  .home-banner__copy,
  .home-banner__slide .home-banner__copy {
    padding: 26px 18px !important;
  }

  .cta {
    padding: 22px 18px !important;
    border-radius: 24px !important;
  }

  .cta__channels li {
    align-items: flex-start;
  }

  .footer__inner,
  .footer__cols {
    text-align: center;
  }

  .footer-logo {
    margin-inline: auto;
  }
}

/* Modals and floating widgets */
.service-modal,
.story-viewer,
.ai-widget,
.cart-widget {
  max-width: 100vw;
}

.service-modal__dialog {
  width: min(980px, calc(100vw - 28px)) !important;
}

.service-detail,
.service-detail__copy,
.service-detail__media {
  min-width: 0;
}

@media (max-width: 640px) {
  .service-modal {
    padding: 8px !important;
    place-items: end center;
  }

  .service-modal__dialog {
    width: 100% !important;
    max-height: 94vh !important;
    border-radius: 22px 22px 0 0 !important;
  }

  .service-detail {
    padding: 16px !important;
  }

  .ai-widget {
    inset-inline-start: 12px !important;
    bottom: 12px !important;
  }

  .ai-widget__panel {
    width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 110px);
  }

  .cart-widget__panel {
    width: calc(100vw - 24px) !important;
  }
}

/* Better reduced motion while preserving layout */
@media (prefers-reduced-motion: reduce) {
  .hero__animation-card,
  .hero__card,
  .reveal {
    animation: none !important;
    transform: none !important;
  }
}

/* Order/request modal — added without changing page layout */
.order-modal[hidden] { display: none; }
.order-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  max-width: 100vw;
}
.order-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .62);
  backdrop-filter: blur(12px);
}
.order-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 28px));
  max-height: min(90vh, 720px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(226, 232, 240, .92);
  border-radius: 28px;
  background:
    radial-gradient(circle at 90% 0%, rgba(14, 165, 233, .10), transparent 36%),
    #fff;
  box-shadow: 0 34px 80px -28px rgba(15, 23, 42, .55);
}
.order-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.order-modal__head span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
}
.order-modal__head strong {
  display: block;
  color: var(--ink);
  font-size: clamp(19px, 4vw, 25px);
  line-height: 1.5;
}
.order-modal__close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f8fafc;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}
.order-modal__project {
  padding: 13px 14px;
  border: 1px solid rgba(14, 165, 233, .16);
  border-radius: 18px;
  background: rgba(14, 165, 233, .06);
}
.order-modal__project span {
  display: block;
  margin-bottom: 4px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
}
.order-modal__project strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.8;
}
.order-modal__project p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.9;
}
.order-modal__grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.order-modal label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}
.order-modal input,
.order-modal textarea {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
  font: inherit;
  outline: none;
  box-shadow: none;
}
.order-modal textarea {
  resize: vertical;
  min-height: 118px;
  line-height: 1.9;
}
.order-modal input:focus,
.order-modal textarea:focus {
  border-color: rgba(14, 165, 233, .55);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, .10);
}
.order-modal__note {
  min-height: 22px;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.8;
}
.order-modal__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
@media (max-width: 640px) {
  .order-modal {
    padding: 8px;
    place-items: end center;
  }
  .order-modal__dialog {
    width: 100%;
    max-height: 94vh;
    border-radius: 24px 24px 0 0;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  }
  .order-modal__grid {
    grid-template-columns: 1fr;
  }
  .order-modal__actions .btn {
    flex: 1 1 150px;
    justify-content: center;
  }
}


/* ===== Cart checkout v6: reliable open panel and clean mobile flow ===== */
.cart-widget__panel {
  z-index: 130;
}
.cart-widget__panel[hidden] {
  display: none !important;
}
.cart-widget__items {
  overscroll-behavior: contain;
}
.cart-item__actions button {
  cursor: pointer;
}
#cart-checkout {
  white-space: nowrap;
}
@media (max-width: 640px) {
  .cart-widget__panel footer {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .cart-widget__panel footer .btn,
  .cart-widget__panel footer span {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* ===== Cart checkout v7: hard fix for add-to-cart click + visible cart panel ===== */
#cart-widget.cart-widget--topbar {
  z-index: 220 !important;
}
#cart-widget .cart-widget__fab,
.product__btn[data-cart],
.product__btn[data-digital-cart],
.btn[data-cart] {
  pointer-events: auto !important;
  cursor: pointer !important;
  touch-action: manipulation;
}
#cart-widget.cart-widget--topbar .cart-widget__panel {
  position: fixed !important;
  top: max(78px, env(safe-area-inset-top, 0px) + 72px) !important;
  right: 16px !important;
  left: auto !important;
  bottom: auto !important;
  width: min(410px, calc(100vw - 32px)) !important;
  max-height: calc(100vh - 110px) !important;
  z-index: 260 !important;
  overflow: hidden !important;
}
#cart-widget.cart-widget--topbar .cart-widget__panel[hidden] {
  display: none !important;
}
#cart-widget .cart-widget__items {
  max-height: min(390px, calc(100vh - 270px)) !important;
  overflow-y: auto !important;
}
#cart-widget .cart-widget__panel footer {
  background: #fff;
}
@media (max-width: 640px) {
  #cart-widget.cart-widget--topbar .cart-widget__panel {
    top: auto !important;
    right: 8px !important;
    left: 8px !important;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    width: auto !important;
    max-height: min(78vh, 620px) !important;
    border-radius: 24px !important;
  }
  #cart-widget .cart-widget__items {
    max-height: 46vh !important;
  }
}

/* ============================================================
   v8 — mobile cart, add-to-cart feedback and animated header
   ============================================================ */
html,
body {
  overflow-x: hidden;
}

.topbar {
  z-index: 120;
  overflow: visible;
  isolation: isolate;
  background:
    radial-gradient(circle at 18% 0%, rgba(59,130,246,.18), transparent 34%),
    radial-gradient(circle at 84% 15%, rgba(6,182,212,.16), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,.88), rgba(239,246,255,.78), rgba(255,255,255,.88));
  background-size: 160% 160%, 150% 150%, 220% 220%;
  animation: topbarAura 9s ease-in-out infinite alternate;
  box-shadow: 0 12px 36px -32px rgba(11,58,168,.55);
}

.topbar::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(11,58,168,.18), rgba(6,182,212,.42), rgba(11,58,168,.18), transparent);
  transform-origin: center;
  animation: topbarLine 4.6s ease-in-out infinite;
  pointer-events: none;
}

.topbar.is-scrolled {
  background:
    radial-gradient(circle at 18% 0%, rgba(59,130,246,.22), transparent 34%),
    radial-gradient(circle at 84% 15%, rgba(6,182,212,.18), transparent 32%),
    rgba(255,255,255,.92);
  box-shadow: 0 18px 45px -34px rgba(11,58,168,.7);
}

.topbar__inner {
  position: relative;
  z-index: 2;
}

.brand__logo {
  animation: brandFloat 4.8s ease-in-out infinite;
}

.brand__name {
  background: linear-gradient(90deg, #0f172a, #0b3aa8, #06b6d4, #0f172a);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  animation: brandTextFlow 7s ease-in-out infinite;
}

.topbar__nav a::after {
  content: "";
  position: absolute;
  inset-inline: 8px;
  bottom: 1px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .28s ease;
}

.topbar__nav a:hover::after {
  transform: scaleX(1);
}

.cart-toast {
  position: fixed;
  z-index: 2600;
  top: calc(78px + env(safe-area-inset-top, 0px));
  inset-inline-end: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(330px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  padding: 12px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(22,163,74,.22);
  color: #0f172a;
  box-shadow: 0 24px 60px -24px rgba(11,58,168,.38), 0 12px 28px -20px rgba(22,163,74,.6);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  opacity: 0;
  transform: translate3d(0, -16px, 0) scale(.96);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}

.cart-toast.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.cart-toast__icon {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #16a34a, #0f766e);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 22px -14px rgba(22,163,74,.85);
}

.cart-toast strong {
  display: block;
  font-size: 13.5px;
  font-weight: 900;
  color: #14532d;
  line-height: 1.45;
}

.cart-toast small {
  display: block;
  margin-top: 1px;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.55;
}

.cart-widget__fab.is-pulsing {
  animation: cartPulse .74s ease both;
}

.product__btn.is-added,
.btn.is-added {
  background: linear-gradient(135deg, #16a34a, #0f766e) !important;
  color: #fff !important;
  box-shadow: 0 12px 28px -18px rgba(22,163,74,.85) !important;
  transform: translateY(-1px) scale(1.02);
}

.cart-widget__panel {
  box-sizing: border-box;
}

.cart-item > div:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.cart-widget__panel footer .btn {
  min-height: 40px;
}

@keyframes topbarAura {
  0% { background-position: 0% 50%, 100% 50%, 0% 50%; }
  100% { background-position: 100% 50%, 0% 50%, 100% 50%; }
}

@keyframes topbarLine {
  0%, 100% { opacity: .55; transform: scaleX(.72); }
  50% { opacity: 1; transform: scaleX(1); }
}

@keyframes brandFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); filter: drop-shadow(0 8px 18px rgba(11,58,168,.18)); }
  50% { transform: translateY(-3px) rotate(-1.5deg); filter: drop-shadow(0 14px 24px rgba(6,182,212,.26)); }
}

@keyframes brandTextFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes cartPulse {
  0% { transform: scale(1); box-shadow: 0 12px 24px -16px rgba(11,58,168,.75); }
  35% { transform: scale(1.12); box-shadow: 0 18px 36px -16px rgba(22,163,74,.78), 0 0 0 8px rgba(22,163,74,.13); }
  100% { transform: scale(1); box-shadow: 0 12px 24px -16px rgba(11,58,168,.75); }
}

@media (max-width: 720px) {
  .topbar {
    border-bottom-color: rgba(11,58,168,.08);
  }

  .topbar__inner {
    padding: 9px 12px 10px !important;
    gap: 8px !important;
  }

  .brand {
    flex: 1 1 calc(100% - 72px) !important;
  }

  .brand__text {
    max-width: 100%;
  }

  .brand__name {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar__cart-mount,
  .cart-widget,
  .cart-widget.cart-widget--topbar {
    position: static !important;
    z-index: 2500 !important;
  }

  .cart-widget__fab {
    min-width: 48px !important;
    width: 48px !important;
    height: 42px !important;
    padding: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 26px -18px rgba(11,58,168,.85) !important;
  }

  .cart-widget__fab .cart-widget__icon {
    font-size: 17px;
  }

  .cart-widget__fab span:not(.cart-widget__icon) {
    display: none !important;
  }

  .cart-widget__fab strong {
    position: absolute;
    transform: translate(-13px, -13px);
    min-width: 21px !important;
    height: 21px !important;
    font-size: 11.5px !important;
    border: 2px solid #fff;
  }

  .cart-widget__panel {
    position: fixed !important;
    left: max(12px, env(safe-area-inset-left, 0px)) !important;
    right: max(12px, env(safe-area-inset-right, 0px)) !important;
    inset-inline-start: max(12px, env(safe-area-inset-left, 0px)) !important;
    inset-inline-end: max(12px, env(safe-area-inset-right, 0px)) !important;
    top: auto !important;
    bottom: max(12px, env(safe-area-inset-bottom, 0px)) !important;
    width: auto !important;
    max-width: none !important;
    max-height: min(74vh, 560px) !important;
    border-radius: 26px 26px 22px 22px !important;
    overflow: hidden !important;
    z-index: 2550 !important;
  }

  .cart-widget__panel header {
    padding: 13px 14px !important;
    background: #fff;
  }

  .cart-widget__items {
    max-height: calc(min(74vh, 560px) - 128px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .cart-item {
    flex-direction: column;
    gap: 10px !important;
    padding: 12px !important;
  }

  .cart-item__actions {
    width: 100%;
    justify-content: space-between !important;
    background: #f8fafc;
    border-radius: 14px;
    padding: 6px;
  }

  .cart-item__actions button {
    min-height: 38px;
    flex: 1 1 auto;
  }

  .cart-widget__panel footer {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px !important;
    background: #fff;
  }

  .cart-widget__panel footer span {
    grid-column: 1 / -1;
    text-align: center;
  }

  .cart-widget__panel footer .btn {
    width: 100%;
    padding-inline: 10px !important;
    font-size: 12px !important;
  }

  .cart-toast {
    top: calc(82px + env(safe-area-inset-top, 0px));
    left: 12px;
    right: 12px;
    inset-inline: 12px;
    min-width: 0;
    width: auto;
    max-width: none;
    padding: 11px 12px;
  }

  .cart-toast small {
    max-width: calc(100vw - 98px);
  }
}

@media (max-width: 420px) {
  .topbar__cta {
    flex-basis: 100% !important;
  }

  .topbar__cta:last-child {
    display: none !important;
  }

  .cart-widget__panel {
    left: 10px !important;
    right: 10px !important;
    inset-inline-start: 10px !important;
    inset-inline-end: 10px !important;
    bottom: 10px !important;
    border-radius: 24px 24px 20px 20px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topbar,
  .topbar::after,
  .brand__logo,
  .brand__name,
  .cart-widget__fab.is-pulsing {
    animation: none !important;
  }
}

/* ============================================================
   v9 — final cart portal, no mobile overflow, stronger feedback, animated header
   ============================================================ */
html, body { max-width: 100%; overflow-x: hidden !important; }
body.cart-open { overscroll-behavior: contain; }

/* Keep the cart trigger in the header, but render the panel through body so it never
   gets clipped by the sticky/blurred header on mobile browsers. */
#topbar-cart-mount { display: flex !important; align-items: center !important; justify-content: flex-end !important; min-width: 0 !important; }
#topbar-cart-mount #cart-widget.cart-widget--topbar {
  position: static !important;
  inset: auto !important;
  right: auto !important;
  left: auto !important;
  top: auto !important;
  bottom: auto !important;
  z-index: 3 !important;
  display: flex !important;
  align-items: center !important;
  direction: rtl !important;
  min-width: 0 !important;
}
#cart-widget .cart-widget__fab {
  position: relative !important;
  border: 1px solid rgba(255,255,255,.55) !important;
  background: linear-gradient(135deg, #16a34a 0%, #0891b2 55%, #0b3aa8 100%) !important;
  background-size: 170% 170% !important;
  animation: cartFabFlow 5.6s ease-in-out infinite !important;
  box-shadow: 0 16px 36px -22px rgba(11,58,168,.95), inset 0 1px 0 rgba(255,255,255,.28) !important;
  overflow: visible !important;
}
#cart-widget .cart-widget__fab::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(22,163,74,.28), rgba(6,182,212,.2), rgba(11,58,168,.22));
  opacity: .75;
  filter: blur(10px);
  z-index: -1;
  animation: cartHalo 2.8s ease-in-out infinite;
}
#cart-widget .cart-widget__fab strong {
  display: grid !important;
  place-items: center !important;
  background: #fff !important;
  color: #0b3aa8 !important;
  border-radius: 999px !important;
  min-width: 24px !important;
  height: 24px !important;
  padding: 0 6px !important;
  line-height: 1 !important;
}

/* Body-level cart sheet/panel */
#cart-panel.cart-widget__panel--portal {
  position: fixed !important;
  z-index: 5000 !important;
  box-sizing: border-box !important;
  background: rgba(255,255,255,.98) !important;
  border: 1px solid rgba(226,232,240,.95) !important;
  border-radius: 26px !important;
  box-shadow: 0 34px 80px -28px rgba(11,58,168,.46), 0 10px 30px -24px rgba(15,23,42,.65) !important;
  overflow: hidden !important;
  direction: rtl !important;
  max-width: none !important;
  transform: translateZ(0) !important;
}
#cart-panel.cart-widget__panel--portal[hidden] { display: none !important; }
#cart-panel.cart-widget__panel--portal header,
#cart-panel.cart-widget__panel--portal footer { flex: 0 0 auto !important; background: #fff !important; }
#cart-panel.cart-widget__panel--portal .cart-widget__items {
  min-height: 80px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
}
#cart-panel .cart-item { width: 100% !important; max-width: 100% !important; }
#cart-panel .cart-item > div:first-child { min-width: 0 !important; overflow-wrap: anywhere !important; }
#cart-panel .cart-widget__panel footer .btn,
#cart-panel.cart-widget__panel--portal footer .btn { white-space: nowrap !important; }

@media (min-width: 721px) {
  #cart-panel.cart-widget__panel--portal {
    top: calc(82px + env(safe-area-inset-top, 0px)) !important;
    inset-inline-end: max(18px, env(safe-area-inset-right, 0px)) !important;
    inset-inline-start: auto !important;
    left: auto !important;
    right: max(18px, env(safe-area-inset-right, 0px)) !important;
    bottom: auto !important;
    width: min(420px, calc(100dvw - 36px)) !important;
    max-height: calc(100dvh - 104px) !important;
    display: flex !important;
    flex-direction: column !important;
  }
  #cart-panel.cart-widget__panel--portal .cart-widget__items { max-height: calc(100dvh - 270px) !important; }
}

@media (max-width: 720px) {
  .topbar {
    overflow: visible !important;
  }
  .topbar__inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "brand cart"
      "admin order" !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 9px 12px 10px !important;
  }
  .topbar .brand {
    grid-area: brand !important;
    min-width: 0 !important;
    width: 100% !important;
    flex: none !important;
  }
  .topbar .brand__logo { width: 40px !important; height: 40px !important; border-radius: 13px !important; }
  .topbar .brand__text { min-width: 0 !important; }
  .topbar .brand__name { font-size: 15.5px !important; max-width: 100% !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
  .topbar .brand__tag { display: block !important; font-size: 10px !important; max-width: 100% !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
  .topbar__cart-mount { grid-area: cart !important; margin: 0 !important; justify-self: end !important; min-width: 48px !important; }
  .topbar__cta[href="/admin"] { grid-area: admin !important; }
  .topbar__cta[href="#contact"] { grid-area: order !important; }
  .topbar__cta {
    display: inline-flex !important;
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    min-height: 36px !important;
    border-radius: 14px !important;
    background: rgba(255,255,255,.78) !important;
    box-shadow: inset 0 0 0 1px rgba(11,58,168,.1), 0 10px 24px -22px rgba(11,58,168,.65) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
  }
  .topbar__cta:last-child { display: inline-flex !important; }
  #cart-widget .cart-widget__fab {
    width: 48px !important;
    min-width: 48px !important;
    height: 42px !important;
    padding: 0 !important;
    border-radius: 16px !important;
  }
  #cart-widget .cart-widget__fab .cart-widget__icon { font-size: 18px !important; }
  #cart-widget .cart-widget__fab span:not(.cart-widget__icon) { display: none !important; }
  #cart-widget .cart-widget__fab strong {
    position: absolute !important;
    top: -7px !important;
    inset-inline-start: -7px !important;
    transform: none !important;
    min-width: 22px !important;
    height: 22px !important;
    font-size: 11px !important;
    border: 2px solid #fff !important;
  }

  #cart-panel.cart-widget__panel--portal {
    display: flex !important;
    flex-direction: column !important;
    left: max(10px, env(safe-area-inset-left, 0px)) !important;
    right: max(10px, env(safe-area-inset-right, 0px)) !important;
    inset-inline-start: max(10px, env(safe-area-inset-left, 0px)) !important;
    inset-inline-end: max(10px, env(safe-area-inset-right, 0px)) !important;
    top: auto !important;
    bottom: max(10px, env(safe-area-inset-bottom, 0px)) !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100dvw - 20px) !important;
    max-height: min(76dvh, calc(100dvh - 24px)) !important;
    border-radius: 24px 24px 20px 20px !important;
  }
  #cart-panel.cart-widget__panel--portal .cart-widget__items {
    flex: 1 1 auto !important;
    max-height: none !important;
    padding: 10px !important;
  }
  #cart-panel .cart-item {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 11px !important;
    margin-bottom: 8px !important;
  }
  #cart-panel .cart-item__actions {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr auto 1fr 1.2fr !important;
    align-items: center !important;
    gap: 6px !important;
    justify-content: stretch !important;
    background: #f8fafc !important;
    border-radius: 14px !important;
    padding: 6px !important;
  }
  #cart-panel .cart-item__actions button {
    min-height: 38px !important;
    padding: 6px 7px !important;
    font-size: 12px !important;
  }
  #cart-panel.cart-widget__panel--portal footer {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 11px !important;
  }
  #cart-panel.cart-widget__panel--portal footer span {
    grid-column: 1 / -1 !important;
    text-align: center !important;
    font-size: 14px !important;
  }
  #cart-panel.cart-widget__panel--portal footer .btn {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 40px !important;
    padding-inline: 8px !important;
    font-size: 11.8px !important;
  }
  .cart-toast {
    top: calc(94px + env(safe-area-inset-top, 0px)) !important;
    left: 10px !important;
    right: 10px !important;
    inset-inline: 10px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    z-index: 5200 !important;
  }
}

@media (max-width: 380px) {
  .topbar__inner { padding-inline: 10px !important; gap: 7px !important; }
  .topbar .brand__name { font-size: 14.5px !important; }
  .topbar .brand__tag { font-size: 9.5px !important; }
  .topbar__cta { font-size: 11px !important; padding-inline: 6px !important; }
  #cart-panel.cart-widget__panel--portal footer .btn { font-size: 11px !important; }
}

@keyframes cartFabFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes cartHalo {
  0%, 100% { opacity: .45; transform: scale(.98); }
  50% { opacity: .85; transform: scale(1.05); }
}

/* ============================================================
   v11 — lottie hero, header effects, projects, social, builder
   ============================================================ */

/* --- Self-hosted Lottie mounts (replace dotlottie-wc) --- */
.lottie-mount { width: 100%; height: 100%; display: block; }
.lottie-mount svg { width: 100% !important; height: 100% !important; display: block; }
.hero__animation-card { overflow: hidden; }
.hero__animation-card .lottie-mount {
  width: 100%; height: 100%;
  transform: none;
}
.hero__animation-card .lottie-mount svg { transform: scale(1.02); transform-origin: center; }
.lottie-feature__media .lottie-mount { width: 100%; height: 100%; min-height: 230px; }

/* --- Topbar: richer, sticky with effect, hidden during stories --- */
.topbar {
  box-shadow: 0 1px 0 rgba(15,23,42,0);
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-med), transform var(--t-med);
}
.topbar.is-scrolled {
  background: rgba(255,255,255,.86);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -18px rgba(11,58,168,.35);
}
.topbar__nav a::after {
  content: ""; position: absolute; inset-inline: 4px; bottom: -2px; height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: 99px; transform: scaleX(0); transform-origin: center;
  transition: transform var(--t-fast);
}
.topbar__nav a:hover::after { transform: scaleX(1); }
.topbar__cta--login { box-shadow: inset 0 0 0 1px var(--brand); color: var(--brand); }
.topbar__cta--login:hover { background: var(--brand-tint); }
.brand__logo { transition: transform var(--t-med); }
.brand:hover .brand__logo { transform: rotate(-6deg) scale(1.05); }

/* Hide the sticky header while a story is open */
body.story-open .topbar { transform: translateY(-110%); pointer-events: none; }

/* Desktop cart placement: clean cluster with a divider */
@media (min-width: 721px) {
  .topbar__cart-mount {
    display: flex; align-items: center; margin-inline-start: 12px;
  }
  .topbar__cart-mount::before {
    content: ""; width: 1px; height: 26px; background: var(--line);
    margin-inline-end: 12px; border-radius: 2px;
  }
  .cart-widget__fab { height: 38px; }
  .topbar__cta { height: 38px; }
}

/* --- Projects section --- */
.section--projects { background: linear-gradient(180deg, #fff, var(--bg)); }
.projects-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.project-card {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm); transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--brand-tint); }
.project-card__media { position: relative; aspect-ratio: 16/10; background: var(--bg-alt); overflow: hidden; }
.project-card__media img, .project-card__media video { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.project-card:hover .project-card__media img { transform: scale(1.06); }
.project-card__placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-weight: 900; font-size: 30px; color: var(--brand); background: var(--brand-tint); }
.project-card__code-badge {
  position: absolute; top: 10px; inset-inline-end: 10px;
  background: rgba(11,58,168,.92); color: #fff; font-weight: 800; font-size: 12px;
  padding: 5px 10px; border-radius: 99px; direction: ltr; letter-spacing: 1px;
}
.project-card__body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.project-card__body h3 { margin: 0; font-size: 17.5px; font-weight: 800; color: var(--ink); }
.project-card__subtitle { margin: 0; font-size: 13px; color: var(--brand); font-weight: 600; }
.project-card__desc { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.project-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project-card__tags span { font-size: 11px; font-weight: 700; color: var(--ink-soft); background: var(--bg-alt); border-radius: 99px; padding: 3px 9px; direction: ltr; }
.project-card__foot { margin-top: auto; display: flex; gap: 8px; padding-top: 6px; }
.project-card__foot .btn { flex: 1; }

/* --- Project detail modal --- */
.project-modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 18px; }
.project-modal[hidden] { display: none; }
.project-modal__backdrop { position: absolute; inset: 0; background: rgba(8,11,22,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.project-modal__dialog {
  position: relative; z-index: 1; width: min(680px, 100%); max-height: 92vh; overflow: auto;
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-pop); padding: 22px;
  animation: fadeIn .25s ease both;
}
.project-modal__close { position: absolute; top: 12px; inset-inline-start: 12px; width: 36px; height: 36px; border-radius: 50%; background: var(--bg-alt); font-size: 22px; color: var(--ink-soft); display: grid; place-items: center; }
.project-modal__close:hover { background: var(--line); }
.project-detail { display: flex; flex-direction: column; gap: 14px; }
.project-detail__media { border-radius: var(--r-md); overflow: hidden; aspect-ratio: 16/9; background: var(--bg-alt); }
.project-detail__media img, .project-detail__media video { width: 100%; height: 100%; object-fit: cover; }
.project-detail__head h2 { margin: 0; font-size: 22px; font-weight: 900; color: var(--ink); }
.project-detail__subtitle { margin: 4px 0 0; color: var(--brand); font-weight: 600; font-size: 14px; }
.project-detail__desc { margin: 0; color: var(--ink-soft); line-height: 1.9; font-size: 14.5px; }
.project-detail__tags { display: flex; flex-wrap: wrap; gap: 7px; }
.project-detail__tags span { font-size: 12px; font-weight: 700; color: var(--brand); background: var(--brand-tint); border-radius: 99px; padding: 4px 11px; direction: ltr; }
.project-detail__features h4 { margin: 0 0 8px; font-size: 14px; font-weight: 800; }
.project-detail__features ul { display: grid; gap: 6px; }
.project-detail__features li { position: relative; padding-inline-start: 20px; font-size: 13.5px; color: var(--ink-soft); }
.project-detail__features li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--price); font-weight: 900; }
/* Code block: LTR, monospace, dark, like an IDE */
.project-detail__code { border-radius: var(--r-md); overflow: hidden; border: 1px solid #1e293b; }
.project-detail__code-head { display: flex; align-items: center; justify-content: space-between; background: #0f172a; color: #cbd5e1; padding: 8px 14px; font-size: 12.5px; font-weight: 700; }
.project-detail__code-head small { direction: ltr; color: #38bdf8; font-weight: 700; text-transform: lowercase; }
.project-detail__code pre {
  margin: 0; background: #0b1120; color: #e2e8f0; padding: 16px;
  direction: ltr; text-align: left; overflow-x: auto;
  font-family: 'SFMono-Regular', ui-monospace, 'JetBrains Mono', 'Cascadia Code', Consolas, 'Courier New', monospace;
  font-size: 13px; line-height: 1.7; tab-size: 2;
}
.project-detail__code pre code { white-space: pre; font-family: inherit; }
.project-detail__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.project-detail__actions .btn { flex: 1; min-width: 150px; }

/* --- Footer social icons + eNamad --- */
.footer__social-zone {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; padding: 18px 0 6px; margin-top: 8px;
  border-top: 1px solid var(--line-soft);
}
.footer__social { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.footer__social-label { font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-inline-end: 4px; }
.footer__social-link {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface); color: var(--brand); border: 1px solid var(--line);
  transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}
a.footer__social-link:hover { transform: translateY(-3px); background: var(--brand); color: #fff; box-shadow: 0 12px 22px -12px rgba(11,58,168,.7); }
.footer__social-link.is-disabled {
  opacity: .42; filter: grayscale(.6); cursor: not-allowed; color: var(--ink-mute);
  background: var(--bg-alt); border-style: dashed;
}
.footer__enamad { display: flex; align-items: center; }
.enamad-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line); color: var(--price); font-weight: 700; font-size: 12.5px;
}
.enamad-badge b { color: var(--ink); font-weight: 800; }
.enamad-badge small { color: var(--ink-mute); font-weight: 600; }
.enamad-badge.is-disabled { opacity: .55; filter: grayscale(.5); border-style: dashed; }
@media (max-width: 540px) {
  .footer__social-zone { justify-content: center; flex-direction: column; text-align: center; }
  .footer__social { justify-content: center; }
}

/* ============================================================
   HERO LOTTIE FIX V12 — prevent cropped/too-small hero visual
   فقط اصلاح بخش انیمیشن/تصویر هیرو، بدون دست‌زدن به ساختار موبایل/دسکتاپ
   ============================================================ */
.hero {
  overflow: hidden !important;
}

.hero__visual,
.hero__visual--lottie {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: visible !important;
}

.hero__animation-card {
  position: relative !important;
  flex: none !important;
  width: min(44vw, 540px) !important;
  max-width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  margin: 0 auto !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 30px 32px rgba(15, 23, 42, .16)) !important;
}

.hero__animation-card .lottie-mount {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  overflow: visible !important;
  transform: none !important;
  transform-origin: center center !important;
}

.hero__animation-card .lottie-mount svg,
.hero__animation-card .lottie-mount canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  display: block !important;
  overflow: visible !important;
  transform-origin: center center !important;
}

.hero__animation-card .lottie-mount svg {
  transform: scale(1.72) translateY(1%) !important;
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.04fr) minmax(300px, .96fr) !important;
    gap: clamp(28px, 4vw, 54px) !important;
    align-items: center !important;
  }

  .hero__visual,
  .hero__visual--lottie {
    min-height: clamp(390px, 38vw, 500px) !important;
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
  }
}

@media (max-width: 899px) {
  .hero__inner {
    gap: 18px !important;
  }

  .hero__visual,
  .hero__visual--lottie {
    order: -1 !important;
    width: 100% !important;
    min-height: clamp(245px, 61vw, 330px) !important;
    margin: 6px auto 0 !important;
    overflow: visible !important;
  }

  .hero__animation-card {
    width: min(84vw, 410px) !important;
  }

  .hero__animation-card .lottie-mount svg {
    transform: scale(1.58) translateY(0) !important;
  }
}

@media (max-width: 430px) {
  .hero__visual,
  .hero__visual--lottie {
    min-height: clamp(220px, 64vw, 278px) !important;
  }

  .hero__animation-card {
    width: min(86vw, 348px) !important;
  }

  .hero__animation-card .lottie-mount svg {
    transform: scale(1.52) translateY(0) !important;
  }
}


/* ============================================================
   HERO VISUAL FIX V13 — کامل شدن تصویر هیرو بدون تغییر ساختار دسکتاپ/موبایل
   ============================================================ */
.hero {
  overflow: hidden !important;
}

.hero__visual,
.hero__visual--lottie {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: visible !important;
}

.hero__animation-card {
  position: relative !important;
  flex: none !important;
  width: min(42vw, 520px) !important;
  max-width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 28px 30px rgba(15, 23, 42, .14)) !important;
}

.hero__animation-card .lottie-mount {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  overflow: visible !important;
  transform: none !important;
  transform-origin: center center !important;
}

.hero__animation-card .lottie-mount svg,
.hero__animation-card .lottie-mount canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block !important;
  overflow: visible !important;
  transform: none !important;
  transform-origin: center center !important;
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.04fr) minmax(300px, .96fr) !important;
    gap: clamp(28px, 4vw, 54px) !important;
    align-items: center !important;
  }

  .hero__visual,
  .hero__visual--lottie {
    min-height: clamp(390px, 38vw, 500px) !important;
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
  }
}

@media (max-width: 899px) {
  .hero__inner {
    gap: 18px !important;
  }

  .hero__visual,
  .hero__visual--lottie {
    order: -1 !important;
    width: 100% !important;
    min-height: clamp(245px, 61vw, 330px) !important;
    margin: 6px auto 0 !important;
    overflow: visible !important;
  }

  .hero__animation-card {
    width: min(84vw, 410px) !important;
  }
}

@media (max-width: 430px) {
  .hero__visual,
  .hero__visual--lottie {
    min-height: clamp(220px, 64vw, 278px) !important;
  }

  .hero__animation-card {
    width: min(86vw, 348px) !important;
  }
}

/* ============================================================
   v14 — polished banner controls + cart dropdown anchored under button
   ============================================================ */
.home-banner--slider {
  border: 1px solid rgba(255,255,255,.18) !important;
  box-shadow: 0 28px 70px -38px rgba(7,26,67,.68) !important;
}
.home-banner__slide .home-banner__media::after,
.home-banner__media::after {
  background: linear-gradient(90deg, rgba(7,26,67,.93) 0%, rgba(7,26,67,.64) 42%, rgba(7,26,67,.18) 100%) !important;
}
.banner-controls {
  position: absolute;
  z-index: 8;
  left: clamp(18px, 4vw, 46px);
  bottom: clamp(16px, 3vw, 30px);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.24);
  box-shadow: 0 18px 36px -24px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  direction: ltr;
}
.banner-controls .banner-dots {
  position: static !important;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  direction: ltr;
}
.banner-controls .banner-dot {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,.28) !important;
  background: rgba(255,255,255,.13) !important;
  color: rgba(255,255,255,.82) !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  font-weight: 900 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  transition: transform .2s ease, background .2s ease, color .2s ease, width .2s ease !important;
}
.banner-controls .banner-dot span { display: block; transform: translateY(1px); }
.banner-controls .banner-dot.is-active {
  width: 48px !important;
  background: #fff !important;
  color: #0b3aa8 !important;
  box-shadow: 0 10px 26px -18px rgba(255,255,255,.92) !important;
}
.banner-arrow {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  color: #0b3aa8;
  font-size: 22px;
  font-weight: 900;
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: 0 10px 24px -20px rgba(0,0,0,.85);
}
.banner-arrow:hover,
.banner-controls .banner-dot:hover { transform: translateY(-1px); }
@media (max-width: 640px) {
  .home-banner__slide .home-banner__media::after,
  .home-banner__media::after { background: linear-gradient(0deg, rgba(7,26,67,.93) 0%, rgba(7,26,67,.50) 52%, rgba(7,26,67,.18) 100%) !important; }
  .banner-controls { left: 16px; bottom: 16px; padding: 6px; gap: 6px; }
  .banner-controls .banner-dot { width: 30px !important; height: 30px !important; min-width: 30px !important; font-size: 11px !important; }
  .banner-controls .banner-dot.is-active { width: 40px !important; }
  .banner-arrow { width: 30px; height: 30px; font-size: 20px; }
}

#cart-panel.cart-widget__panel--portal {
  position: fixed !important;
  top: var(--cart-panel-top, 74px) !important;
  left: var(--cart-panel-left, 16px) !important;
  right: auto !important;
  bottom: auto !important;
  inset-inline-start: auto !important;
  inset-inline-end: auto !important;
  width: var(--cart-panel-width, min(420px, calc(100dvw - 32px))) !important;
  max-width: calc(100dvw - 20px) !important;
  max-height: var(--cart-panel-max-height, calc(100dvh - 96px)) !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  border-radius: 24px !important;
  z-index: 6000 !important;
  overflow: hidden !important;
  transform-origin: top center !important;
  animation: cartDropDownV14 .18s ease both !important;
}
#cart-panel.cart-widget__panel--portal[hidden] { display: none !important; }
#cart-panel.cart-widget__panel--portal .cart-widget__items {
  flex: 1 1 auto !important;
  max-height: none !important;
  overflow-y: auto !important;
}
#cart-panel.cart-widget__panel--portal::before {
  content: '';
  position: absolute;
  top: -7px;
  left: min(50%, calc(100% - 30px));
  width: 16px;
  height: 16px;
  transform: rotate(45deg);
  background: #fff;
  border-inline-start: 1px solid rgba(226,232,240,.95);
  border-block-start: 1px solid rgba(226,232,240,.95);
}
@keyframes cartDropDownV14 {
  from { opacity: 0; transform: translateY(-8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 720px) {
  #cart-panel.cart-widget__panel--portal {
    border-radius: 22px !important;
    max-height: var(--cart-panel-max-height, calc(100dvh - 84px)) !important;
  }
  #cart-panel.cart-widget__panel--portal footer {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  #cart-panel.cart-widget__panel--portal footer span { grid-column: 1 / -1 !important; }
}
