/* ============================================================
   Victor Shop — storefront stylesheet
   Design: intergame layout parity, Victor branding
   (purple #a855f7 on dark navy, Vazirmatn, RTL)
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input { font: inherit; }

/* ---------- Design tokens ---------- */
:root {
  /* brand */
  --primary: #a855f7;          /* Victor purple (contract) */
  --primary-2: #6562ff;        /* gradient partner (intergame) */
  --accent: #ff4da9;           /* hot-pink accent (intergame) */
  --gold: #f2c230;             /* feature-banner CTA (intergame) */
  --green: #22c55e;            /* discount badge (intergame) */
  --grad: linear-gradient(90deg, var(--primary-2), var(--primary));
  --grad-r: linear-gradient(270deg, var(--primary-2), var(--primary));

  /* surfaces */
  --bg: #0e0e1a;               /* Victor dark base (contract) */
  --bg-2: #131829;             /* card / section surface */
  --bg-3: #1a2138;             /* elevated surface */
  --border: #252c47;
  --border-soft: #1e2440;

  /* text */
  --text: #f4f4f4;
  --text-dim: #9aa3bd;
  --text-faint: #6b7392;

  /* shape */
  --radius: 12px;
  --radius-lg: 15px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --shadow-primary: 0 6px 24px rgba(168, 85, 247, .35);

  --container: 1280px;
}

/* ---------- Base ---------- */
body {
  font-family: Vazirmatn, Tahoma, sans-serif;
  background:
    radial-gradient(1100px 500px at 85% -100px, rgba(101, 98, 255, .14), transparent 60%),
    radial-gradient(900px 450px at 10% 120px, rgba(168, 85, 247, .10), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.9;
  font-size: 15px;
  min-height: 100vh;
  overflow-x: hidden;
}

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.section { padding-block: 34px; }

.skip-link {
  position: absolute; top: -48px; right: 12px; z-index: 200;
  background: var(--primary); color: #fff; padding: 8px 18px;
  border-radius: 0 0 10px 10px; transition: top .2s;
}
.skip-link:focus { top: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 26px; border-radius: 999px;
  font-weight: 600; font-size: .95rem;
  transition: transform .15s, box-shadow .15s, background .2s, border-color .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-primary); }
.btn-primary:hover { background: var(--grad-r); box-shadow: 0 8px 30px rgba(168, 85, 247, .5); }
.btn-ghost { border: 1px solid var(--border); color: var(--text-dim); }
.btn-ghost:hover { border-color: var(--primary); color: var(--text); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(14, 14, 26, .85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
  transition: box-shadow .25s;
}
.header-inner {
  display: flex; align-items: center; gap: 18px;
  min-height: 76px;
}

/* logo */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 13px;
  background: var(--grad); color: #fff;
  box-shadow: var(--shadow-primary);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.35; }
.logo-text strong { font-size: 1.12rem; letter-spacing: .2px; }
.logo-text small { color: var(--text-dim); font-size: .72rem; }

/* category dropdown */
.cat-menu { position: relative; }
.cat-menu-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 18px; border-radius: 999px;
  background: var(--bg-3); border: 1px solid var(--border);
  font-weight: 600; font-size: .9rem;
  transition: border-color .2s;
}
.cat-menu-btn:hover, .cat-menu.open .cat-menu-btn { border-color: var(--primary); }
.cat-menu-btn img { width: 17px; height: 17px; }
.cat-menu-btn .caret { transition: transform .2s; font-size: .7rem; color: var(--text-dim); }
.cat-menu.open .caret { transform: rotate(180deg); }

.cat-dropdown {
  position: absolute; top: calc(100% + 12px); right: 0; min-width: 240px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 8px; opacity: 0; visibility: hidden; translate: 0 8px;
  transition: opacity .18s, translate .18s, visibility .18s;
}
.cat-menu.open .cat-dropdown { opacity: 1; visibility: visible; translate: 0 0; }
.cat-dropdown a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 10px;
  color: var(--text-dim); font-size: .92rem;
  transition: background .15s, color .15s;
}
.cat-dropdown a:hover { background: var(--bg-3); color: var(--text); }
.cat-dropdown img { width: 28px; height: 28px; object-fit: contain; }

/* main nav */
.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-menu a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: 10px;
  color: var(--text-dim); font-size: .93rem; font-weight: 500;
  transition: color .15s, background .15s;
}
.nav-menu a img { width: 16px; height: 16px; opacity: .75; }
.nav-menu a:hover { color: var(--text); background: var(--bg-3); }
.nav-menu a.active { color: var(--text); position: relative; }
.nav-menu a.active::after {
  content: ""; position: absolute; inset-inline: 14px; bottom: 3px; height: 2px;
  border-radius: 2px; background: var(--grad);
}

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 10px; }
.nav-toggle span { width: 22px; height: 2px; border-radius: 2px; background: var(--text); }

/* header actions */
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid transparent; color: var(--text-dim);
  transition: color .15s, border-color .15s, background .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border); background: var(--bg-3); }
.icon-btn img { width: 19px; height: 19px; }
.cart-badge {
  position: absolute; top: -5px; left: -5px;
  min-width: 19px; height: 19px; padding-inline: 5px;
  display: grid; place-items: center;
  background: var(--grad); color: #fff;
  font-size: .68rem; font-weight: 700; border-radius: 999px;
}

/* ============================================================
   HERO — intro text (right) + compact slider card (left)
   ============================================================ */
.hero { padding-block: 40px 14px; }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr;
  gap: 48px; align-items: center;
}
.hero-content { position: relative; z-index: 0; }
.hero-watermark { top: -34px; font-size: 4.2rem; }
.hero-title { font-size: 2rem; margin-bottom: 12px; }
.hero-text { color: var(--text-dim); max-width: 58ch; margin-bottom: 24px; text-align: justify; }
.hero-cta { display: flex; gap: 12px; }

/* plain stats row (no boxes — like the original) */
.hero-stats { display: flex; gap: 34px; margin-top: 30px; flex-wrap: wrap; }
.stat dt { font-size: 1.35rem; font-weight: 800; color: var(--primary); }
.stat dd { color: var(--text-dim); font-size: .8rem; }

/* gradient slider card */
.hero-slider {
  position: relative; overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(165deg, var(--accent) 0%, var(--primary) 55%, var(--primary-2) 100%);
  box-shadow: var(--shadow);
  max-width: 440px; justify-self: start; width: 100%;
}
/* faint PS-icons pattern over the gradient */
.hero-slider::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: url("../images/slider-back-1.png") repeat;
  background-size: 150px;
  opacity: .18;
  pointer-events: none;
}
.hero-track { position: relative; z-index: 1; display: flex; transition: transform .55s cubic-bezier(.4, 0, .2, 1); }
.hero-slide {
  flex: 0 0 100%;
  display: grid; place-items: center;
  padding: 46px 34px 52px;
}
.hero-slide img {
  width: min(300px, 88%); height: auto; aspect-ratio: 1; object-fit: cover;
  border-radius: 18px; box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}

/* small arrows pinned to the card's top-left (like the original) */
.hero-slider .slider-arrow {
  top: 16px; translate: none;
  width: 32px; height: 32px;
}
.hero-slider .slider-arrow.prev { right: auto; left: 56px; }
.hero-slider .slider-arrow.next { right: auto; left: 16px; }

.slider-arrow {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 5;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(19, 24, 41, .55); border: 1px solid rgba(255, 255, 255, .18);
  color: #fff; backdrop-filter: blur(6px);
  transition: color .15s, border-color .15s, background .15s;
}
.slider-arrow:hover { border-color: #fff; background: rgba(19, 24, 41, .8); }

.slider-dots {
  position: absolute; bottom: 16px; inset-inline: 0;
  display: flex; justify-content: center; gap: 7px; z-index: 5;
}
.slider-dots button {
  width: 8px; height: 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .45); transition: width .2s, background .2s;
}
.slider-dots button.active { width: 26px; background: #fff; }

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section-head {
  position: relative; z-index: 0;
  display: flex; align-items: center; justify-content: space-between;
  flex-direction: row-reverse; gap: 14px; margin-bottom: 24px;
}
.section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.35rem; font-weight: 800;
}
.title-icon {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--grad); color: #fff; font-size: 1rem;
  box-shadow: var(--shadow-primary);
}
.see-all {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-dim); font-size: .88rem;
  padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px;
  transition: color .15s, border-color .15s;
}
.see-all:hover { color: var(--text); border-color: var(--primary); }

/* underline-style tabs (like the original) */
.head-tabs { display: flex; gap: 22px; }
.head-tabs button {
  padding: 6px 2px;
  color: var(--text-faint); font-size: .92rem; font-weight: 600;
  position: relative;
  transition: color .15s;
}
.head-tabs button:hover { color: var(--text-dim); }
.head-tabs button.active { color: var(--text); }
.head-tabs button.active::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -4px; height: 2px;
  border-radius: 2px; background: var(--grad);
}

/* faint English watermark behind section headings */
.section-watermark {
  position: absolute; top: -22px; right: 0; z-index: -1;
  font-size: 3.6rem; font-weight: 800; letter-spacing: 3px;
  color: rgba(244, 244, 244, .04);
  pointer-events: none; user-select: none;
}

/* ============================================================
   CATEGORY CAROUSEL (horizontal cards)
   ============================================================ */
.cat-carousel { position: relative; }
.cat-track {
  display: flex; gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding-block: 8px;
}
.cat-track::-webkit-scrollbar { display: none; }

.cat-card {
  flex: 0 0 calc((100% - 54px) / 4);
  scroll-snap-align: start;
  display: flex; align-items: center; gap: 16px;
  border: 1px solid var(--border); border-radius: 24px;
  padding: 22px 20px;
  transition: border-color .2s;
}
.cat-card:hover { border-color: var(--primary); }

.cat-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cat-en { color: var(--accent); font-size: .74rem; font-weight: 600; letter-spacing: .5px; }
.cat-card h3 { font-size: 1.1rem; }
.cat-card p { color: var(--text-dim); font-size: .78rem; line-height: 1.8; margin-bottom: 12px; min-height: 2.9em; }

.cat-icon {
  flex: 0 0 106px; width: 106px; height: 106px;
  display: grid; place-items: center;
  background: var(--bg-3); border: 1px solid var(--border-soft);
  border-radius: 24px;
  transform: rotate(-8deg);
  transition: transform .25s;
}
.cat-icon img { width: 66%; height: 66%; object-fit: contain; }
.cat-card:hover .cat-icon { transform: rotate(0deg); }

.cat-link {
  align-self: flex-start;
  display: inline-block; padding: 8px 30px; border-radius: 999px;
  background: var(--grad); color: #fff;
  font-size: .82rem; font-weight: 700;
  box-shadow: var(--shadow-primary);
  transition: background .2s;
}
.cat-link:hover { background: var(--grad-r); }

.cat-carousel .slider-arrow.prev { right: -10px; }
.cat-carousel .slider-arrow.next { left: -10px; }

/* static dots (below carousels, unlike the hero's absolute dots) */
.dots-static { position: static; margin-top: 14px; }
.dots-static button { background: var(--text-faint); }
.dots-static button.active { background: var(--primary); }

/* ============================================================
   PRODUCT CARDS
   ============================================================ */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.product-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.product-card:hover { transform: translateY(-4px); border-color: var(--border); box-shadow: var(--shadow); }

.product-thumb { position: relative; display: block; aspect-ratio: 5 / 3; overflow: hidden; }
.product-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s;
}
.product-card:hover .product-thumb img { transform: scale(1.06); }

.discount-badge {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  background: var(--green); color: #fff;
  font-size: .78rem; font-weight: 800;
  padding: 4px 11px; border-radius: 999px;
  box-shadow: 0 4px 14px rgba(34, 197, 94, .4);
}

.product-info { display: flex; flex-direction: column; gap: 10px; padding: 16px; flex: 1; }
.product-name { font-size: .9rem; font-weight: 600; line-height: 1.7; }
.product-name a { display: block; }
.product-name a:hover { color: var(--primary); }

.rating { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--text-dim); }
.stars { position: relative; display: inline-block; font-size: .82rem; color: var(--text-faint); letter-spacing: 2px; }
.stars::before { content: "\2605\2605\2605\2605\2605"; }
.stars-fill { position: absolute; inset: 0; overflow: hidden; color: #fbbf24; white-space: nowrap; }
.stars-fill::before { content: "\2605\2605\2605\2605\2605"; letter-spacing: 2px; }

.product-price { margin-top: auto; font-size: .92rem; color: var(--text-dim); }
.product-price .price { font-size: 1.1rem; font-weight: 800; color: var(--primary); }
.product-price del { color: var(--text-faint); font-size: .82rem; margin-inline-end: 8px; }

.product-actions { display: flex; align-items: center; gap: 8px; }
.btn-add {
  flex: 1; padding: 10px 12px; border-radius: 999px;
  background: var(--grad);
  color: #fff; font-size: .82rem; font-weight: 700;
  box-shadow: var(--shadow-primary);
  transition: background .2s, box-shadow .2s, opacity .2s;
}
.btn-add:hover { background: var(--grad-r); box-shadow: 0 8px 26px rgba(168, 85, 247, .5); }
.btn-add:disabled { opacity: .8; cursor: default; }

.qty {
  display: flex; align-items: center; gap: 2px;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px;
}
.qty button {
  width: 27px; height: 30px; display: grid; place-items: center;
  color: var(--text-dim); border-radius: 999px; font-weight: 700;
}
.qty button:hover { color: var(--text); background: var(--bg-2); }
.qty span { min-width: 20px; text-align: center; font-size: .88rem; }

/* ============================================================
   FEATURE BANNERS (character art + gold CTA)
   ============================================================ */
.banner-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat-banner {
  display: flex; flex-direction: row-reverse; /* art left, text right */
  align-items: center; gap: 10px;
  min-height: 175px; border-radius: 20px;
  border: 1px solid var(--border-soft);
  background:
    radial-gradient(300px 170px at 15% 100%, rgba(168, 85, 247, .22), transparent 70%),
    var(--bg-2);
  padding: 20px 22px;
  transition: transform .2s, border-color .2s;
}
.feat-banner:hover { transform: translateY(-4px); border-color: var(--border); }
.feat-art {
  flex: 0 0 128px; width: 128px; height: 150px;
  object-fit: contain; object-position: bottom;
  margin-top: -34px; /* let the character break out of the card */
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .5));
}
.feat-text { flex: 1; min-width: 0; }
.feat-text h3 { font-size: .98rem; margin-bottom: 2px; line-height: 1.7; }
.feat-sub { color: var(--text-dim); font-size: .78rem; margin-bottom: 14px; }
.feat-cta {
  display: inline-block;
  background: var(--gold); color: #1d1503;
  font-size: .78rem; font-weight: 800;
  padding: 7px 20px; border-radius: 999px;
  box-shadow: 0 5px 18px rgba(242, 194, 48, .35);
  transition: filter .15s;
}
.feat-cta:hover { filter: brightness(1.08); }

/* ============================================================
   DEALS + COUNTDOWN (panel right, products left)
   ============================================================ */
.deals-grid { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: stretch; }
.deal-countdown {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center;
  border-radius: 20px; padding: 30px 20px;
  background:
    radial-gradient(420px 260px at 50% -60px, rgba(168, 85, 247, .45), transparent 70%),
    var(--bg-2);
  border: 1px solid var(--border);
}
/* pink accent bar on the panel's outer (right) edge */
.deal-countdown::after {
  content: ""; position: absolute; inset-inline-start: -3px; top: 30%;
  width: 6px; height: 40%; border-radius: 999px;
  background: var(--accent);
}
.deal-icon {
  width: 92px; height: 92px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff;
  box-shadow: 0 10px 30px rgba(168, 85, 247, .35);
}
.deal-icon img { width: 62%; height: auto; }
.deal-countdown h3 { font-size: 1.2rem; }
.deal-countdown p { color: var(--text-dim); font-size: .86rem; }
.countdown { display: flex; gap: 8px; margin-top: 8px; direction: ltr; }
.cd-box {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 11px; padding: 9px 13px; min-width: 62px;
}
.cd-num { font-size: 1.25rem; font-weight: 800; color: var(--primary); }
.cd-box small { color: var(--text-faint); font-size: .68rem; }
.deals-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* ============================================================
   WIDE BANNER
   ============================================================ */
.wide-banner {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  border-radius: 20px; border: 1px solid var(--border-soft);
  padding: 40px 48px; min-height: 190px;
  background:
    linear-gradient(90deg, rgba(14, 14, 26, .96) 40%, rgba(14, 14, 26, .55)),
    url("../images/Assassin-creed.webp") center / cover;
}
.wide-sub { color: var(--text-dim); font-size: .88rem; }
.wide-text h3 { font-size: 1.6rem; margin-block: 4px; }
.wide-text small { color: var(--text-faint); letter-spacing: 1px; }
.wide-cta {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); color: var(--text);
  font-weight: 600; font-size: .9rem;
  padding: 11px 26px; border-radius: 999px;
  transition: border-color .2s, color .2s;
}
.wide-cta:hover { border-color: var(--primary); color: #fff; }

/* ============================================================
   TOP PRODUCTS OF MONTH
   ============================================================ */
.top-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.top-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 10px;
  transition: border-color .2s, transform .2s;
}
.top-item:hover { border-color: var(--border); transform: translateY(-2px); }
.top-thumb {
  flex: 0 0 64px; width: 64px; height: 64px; border-radius: 10px; overflow: hidden;
}
.top-thumb img { width: 100%; height: 100%; object-fit: cover; }
.top-info h3 { font-size: .84rem; font-weight: 600; line-height: 1.6; }
.top-info h3 a:hover { color: var(--primary); }
.top-price { color: var(--primary); font-weight: 700; font-size: .8rem; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.about-content p { color: var(--text-dim); font-size: .92rem; margin-bottom: 14px; text-align: justify; }
.about-content .btn { margin-top: 6px; }
.about-img img { border-radius: 20px; width: 100%; height: auto; }

/* ============================================================
   SERVICE BANNERS (colored)
   ============================================================ */
.service-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-radius: 20px; padding: 24px;
  min-height: 168px; color: #fff;
  transition: transform .2s;
}
.service-card:hover { transform: translateY(-3px); }
.s-gold { background: linear-gradient(135deg, #f7b733, #c07c09); }
.s-pink { background: linear-gradient(135deg, #f472b6, #be185d); }
.s-teal { background: linear-gradient(135deg, #2dd4bf, #0e7490); }
.service-body { position: relative; z-index: 2; }
.service-body h3 { font-size: 1.05rem; margin-bottom: 2px; }
.service-body p { color: rgba(255, 255, 255, .88); font-size: .8rem; margin-bottom: 14px; }
.service-cta {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, .75); color: #fff;
  font-size: .78rem; font-weight: 700;
  padding: 7px 18px; border-radius: 999px;
  transition: background .2s, color .2s;
}
.service-cta:hover { background: #fff; color: #1a1a2e; }
.service-art {
  flex: 0 0 118px; width: 118px; height: 118px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .3));
}

/* ============================================================
   BLOG (mini list right, cards left)
   ============================================================ */
.blog-grid { display: grid; grid-template-columns: 300px 1fr; gap: 18px; }
.blog-main { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.blog-card {
  background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.blog-card:hover { border-color: var(--border); transform: translateY(-3px); }
.blog-thumb { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.blog-card:hover .blog-thumb img { transform: scale(1.05); }
.blog-date {
  position: absolute; bottom: 10px; right: 10px;
  background: var(--grad); color: #fff;
  font-size: .68rem; font-weight: 600;
  padding: 3px 12px; border-radius: 999px;
}
.blog-body { padding: 14px 16px 18px; }
.blog-meta { color: var(--text-faint); font-size: .74rem; margin-bottom: 6px; }
.blog-body h3 { font-size: .88rem; font-weight: 600; line-height: 1.75; }
.blog-body h3 a:hover { color: var(--primary); }

.blog-list { display: flex; flex-direction: column; gap: 12px; }
.blog-mini {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 10px;
  transition: border-color .2s;
}
.blog-mini:hover { border-color: var(--primary); }
.mini-thumb { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; }
.mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mini-text { font-size: .84rem; font-weight: 600; line-height: 1.6; }
.mini-text small { display: block; color: var(--text-faint); font-weight: 400; font-size: .72rem; }

/* ============================================================
   AUTH (login / verify / account)
   ============================================================ */
.auth-section {
  display: grid; place-items: center;
  min-height: calc(100vh - 300px);
  padding: 60px 20px;
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 24px; padding: 36px 32px;
  box-shadow: var(--shadow);
  text-align: center;
}
.auth-logo { display: flex; justify-content: center; margin-bottom: 18px; }
.auth-title { font-size: 1.35rem; margin-bottom: 6px; }
.auth-sub { color: var(--text-dim); font-size: .88rem; margin-bottom: 22px; }
.auth-error {
  background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .4);
  color: #fca5a5; font-size: .84rem;
  border-radius: 12px; padding: 10px 14px; margin-bottom: 16px;
}
.auth-success {
  background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .4);
  color: #86efac; font-size: .84rem;
  border-radius: 12px; padding: 10px 14px; margin-bottom: 16px;
}
.auth-tabs {
  display: flex; gap: 6px; margin-bottom: 22px;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px;
}
.auth-tabs a {
  flex: 1; text-align: center;
  padding: 9px 10px; border-radius: 999px;
  color: var(--text-dim); font-size: .88rem; font-weight: 600;
  transition: color .15s, background .2s;
}
.auth-tabs a:hover { color: var(--text); }
.auth-tabs a.active { background: var(--grad); color: #fff; box-shadow: var(--shadow-primary); }
.auth-form { display: flex; flex-direction: column; gap: 10px; text-align: right; }
.auth-label { color: var(--text-dim); font-size: .82rem; }
.auth-input {
  width: 100%; padding: 13px 16px;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 13px; color: var(--text);
  font-size: 1.05rem; text-align: center; letter-spacing: 2px;
  transition: border-color .15s;
}
.auth-input:focus { outline: none; border-color: var(--primary); }
.auth-input::placeholder { color: var(--text-faint); letter-spacing: normal; }
.auth-code { font-size: 1.5rem; letter-spacing: 10px; font-weight: 700; }
.auth-submit { justify-content: center; width: 100%; margin-top: 8px; }
.auth-resend-form { margin-top: 16px; }
.auth-resend {
  color: var(--primary); font-size: .84rem; font-weight: 600;
  transition: color .15s;
}
.auth-resend:hover:not(:disabled) { color: var(--accent); }
.auth-resend:disabled { color: var(--text-faint); cursor: default; }
.auth-back {
  display: inline-block; margin-top: 10px;
  color: var(--text-dim); font-size: .8rem;
}
.auth-back:hover { color: var(--text); }
.auth-note { color: var(--text-faint); font-size: .76rem; margin-top: 18px; }
.auth-note a { color: var(--primary); }
/* ============================================================
   ACCOUNT DASHBOARD (پنل کاربری)
   ============================================================ */
.account-panel { padding-block: 34px 44px; }
.account-grid { display: grid; grid-template-columns: 260px 1fr; gap: 22px; align-items: start; }

.account-side {
  position: sticky; top: 96px;
  background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); padding: 20px;
}
.account-user { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border-soft); }
.account-avatar {
  flex: 0 0 46px; width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 14px; background: var(--grad); color: #fff; box-shadow: var(--shadow-primary);
}
.account-user-meta { display: flex; flex-direction: column; line-height: 1.5; min-width: 0; }
.account-user-meta strong { font-size: .95rem; }
.account-user-meta span { color: var(--text-dim); font-size: .8rem; }

.account-nav { display: flex; flex-direction: column; gap: 4px; margin-block: 16px; }
.account-nav a {
  padding: 10px 14px; border-radius: 10px;
  color: var(--text-dim); font-size: .9rem; font-weight: 500;
  transition: color .15s, background .15s;
}
.account-nav a:hover { color: var(--text); background: var(--bg-3); }
.account-nav a.active { color: var(--text); background: var(--bg-3); }
.account-nav-admin { color: var(--primary) !important; font-weight: 700 !important; }
.account-logout { border-top: 1px solid var(--border-soft); padding-top: 14px; }
.account-logout .btn { width: 100%; justify-content: center; }

.account-main { display: flex; flex-direction: column; gap: 18px; }
.account-block {
  background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); padding: 24px;
}
.account-title { font-size: 1.4rem; margin-bottom: 4px; }
.account-lead { color: var(--text-dim); font-size: .9rem; margin-bottom: 20px; }
.account-block-title { font-size: 1.05rem; margin-bottom: 6px; }
.account-hint { color: var(--text-dim); font-size: .85rem; margin-bottom: 14px; }

.account-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.account-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
}
.account-card-label { color: var(--text-dim); font-size: .8rem; }
.account-card-value { color: var(--primary); font-size: 1.3rem; font-weight: 800; }
.account-card-value.account-soon { color: var(--text-faint); font-size: 1rem; font-weight: 600; }

.account-admin-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  background:
    radial-gradient(420px 200px at 90% -40px, rgba(168, 85, 247, .22), transparent 70%),
    var(--bg-2);
  border-color: var(--border);
}
.account-admin-banner p { color: var(--text-dim); font-size: .85rem; margin-top: 4px; }
.account-admin-banner .btn { flex-shrink: 0; }

.account-form { display: flex; flex-direction: column; gap: 12px; max-width: 380px; }
.account-field { display: flex; flex-direction: column; gap: 6px; }
.account-field label { color: var(--text-dim); font-size: .82rem; }
.account-field input {
  width: 100%; padding: 12px 14px;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 12px; color: var(--text); font-size: .95rem;
  transition: border-color .15s;
}
.account-field input:focus { outline: none; border-color: var(--primary); }
.account-form .btn { align-self: flex-start; }

@media (max-width: 820px) {
  .account-grid { grid-template-columns: 1fr; }
  .account-side { position: static; }
  .account-nav { flex-direction: row; flex-wrap: wrap; }
  .account-cards { grid-template-columns: 1fr; }
  .account-admin-banner { flex-direction: column; align-items: stretch; text-align: center; }
  .account-admin-banner .btn { justify-content: center; }
}

/* ============================================================
   SHOP / PRODUCT / CART / CHECKOUT / PAYMENT
   ============================================================ */
.shop-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.shop-cat {
  padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-dim);
  font-size: .86rem; font-weight: 600; transition: all .2s;
}
.shop-cat:hover { color: var(--text); border-color: var(--primary); }
.shop-cat.active { background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--shadow-primary); }

.breadcrumb-mini { color: var(--text-faint); font-size: .82rem; margin-bottom: 20px; }
.breadcrumb-mini a:hover { color: var(--primary); }

.product-detail { display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; align-items: start; }
.product-detail-media {
  aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border-soft);
}
.product-detail-title { font-size: 1.5rem; margin-bottom: 8px; }
.product-detail-cat {
  display: inline-block; margin-bottom: 14px; font-size: .8rem; color: var(--accent);
}
.product-detail-desc { color: var(--text-dim); font-size: .92rem; margin-bottom: 18px; text-align: justify; }
.product-detail-price { font-size: 1.1rem; color: var(--text-dim); margin-bottom: 20px; }
.product-detail-price .price { font-size: 1.7rem; font-weight: 800; color: var(--primary); }
.product-detail-buy { display: flex; gap: 12px; flex-wrap: wrap; }
.product-detail-price del { color: var(--text-faint); font-size: 1rem; margin-inline-end: 10px; }
.discount-badge.inline { position: static; display: inline-block; margin-inline-end: 8px; }
.product-countdown {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 16px; margin-bottom: 18px;
}
.product-countdown .pc-label { color: var(--text-dim); font-size: .82rem; }
.product-countdown .pc-timer { color: var(--primary); font-weight: 800; font-size: 1.1rem; letter-spacing: 1px; }
.product-countdown.ended .pc-timer { color: var(--text-faint); }
.product-cashback { color: var(--text-dim); font-size: .84rem; margin-bottom: 18px; }

/* cart */
.cart-empty { text-align: center; padding: 50px 20px; }
.cart-empty p { color: var(--text-dim); margin-bottom: 18px; }
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.cart-lines { display: flex; flex-direction: column; gap: 12px; }
.cart-line {
  display: grid; grid-template-columns: 64px 1fr auto auto auto; align-items: center; gap: 14px;
  background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 12px 14px;
}
.cart-line-thumb { width: 64px; height: 64px; border-radius: 10px; font-size: .55rem; }
.cart-line-info h3 { font-size: .9rem; }
.cart-line-info h3 a:hover { color: var(--primary); }
.cart-line-unit { color: var(--text-dim); font-size: .8rem; }
.cart-line-qty { display: flex; gap: 6px; align-items: center; }
.cart-line-qty input {
  width: 62px; padding: 8px; text-align: center;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text);
}
.cart-qty-btn {
  font-size: .74rem; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px;
  transition: color .15s, border-color .15s;
}
.cart-qty-btn:hover { color: var(--text); border-color: var(--primary); }
.cart-line-total { font-weight: 800; color: var(--text); font-size: .92rem; }
.cart-line-remove button { color: var(--text-faint); font-size: 1rem; padding: 4px 8px; }
.cart-line-remove button:hover { color: var(--accent); }

.cart-summary {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px; position: sticky; top: 96px;
}
.cart-summary h2 { font-size: 1.05rem; margin-bottom: 16px; }
.cart-summary-row { display: flex; justify-content: space-between; padding-block: 8px; color: var(--text-dim); font-size: .88rem; }
.cart-summary-row.total { border-top: 1px solid var(--border-soft); margin-top: 6px; padding-top: 14px; color: var(--text); font-weight: 800; font-size: 1rem; }
.cart-summary-row.total span:last-child { color: var(--primary); }
.cart-code { margin-block: 12px; padding-block: 12px; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.cart-code-form { display: flex; gap: 6px; }
.cart-code-form input {
  flex: 1; min-width: 0; padding: 9px 12px;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-size: .84rem;
}
.cart-code-form input:focus { outline: none; border-color: var(--primary); }
.cart-code-form button {
  padding: 9px 16px; border-radius: 10px; font-size: .82rem; font-weight: 700;
  background: var(--bg-3); border: 1px solid var(--border); color: var(--text-dim);
  transition: color .15s, border-color .15s;
}
.cart-code-form button:hover { color: var(--text); border-color: var(--primary); }
.cart-code-applied { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .84rem; color: #86efac; }
.cart-code-applied button { color: var(--text-faint); padding: 2px 6px; }
.cart-code-applied button:hover { color: var(--accent); }
.cart-code-error { color: #fca5a5; font-size: .8rem; margin-bottom: 8px; }
.cart-discount span:last-child { color: #86efac; direction: ltr; }

.cart-checkout { width: 100%; justify-content: center; margin-top: 16px; }
.cart-continue { display: block; text-align: center; margin-top: 12px; color: var(--text-dim); font-size: .84rem; }
.cart-continue:hover { color: var(--text); }

/* checkout */
.checkout-subtitle { font-size: 1rem; margin-bottom: 14px; }
.checkout-review { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 20px; }
.checkout-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--border-soft); }
.checkout-line:last-child { border-bottom: 0; }
.checkout-line-title { flex: 1; font-size: .9rem; }
.checkout-line-qty { color: var(--text-dim); font-size: .82rem; }
.checkout-line-total { font-weight: 700; }
.checkout-note { color: var(--text-faint); font-size: .76rem; margin-top: 12px; }

/* sandbox gateway */
.sandbox-card {
  max-width: 460px; margin: 40px auto; text-align: center;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 20px; padding: 34px 28px;
}
.sandbox-badge {
  display: inline-block; background: var(--bg-3); border: 1px solid var(--border);
  color: var(--text-dim); font-size: .78rem; padding: 6px 16px; border-radius: 999px; margin-bottom: 16px;
}
.sandbox-note { color: var(--text-faint); font-size: .82rem; margin-bottom: 22px; }
.sandbox-amount {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-bottom: 24px;
}
.sandbox-amount span { color: var(--text-dim); font-size: .8rem; }
.sandbox-amount strong { color: var(--primary); font-size: 1.5rem; }
.sandbox-actions { display: flex; gap: 12px; justify-content: center; }

/* payment result */
.result-card {
  max-width: 480px; margin: 40px auto; text-align: center;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 20px; padding: 40px 30px;
}
.result-icon {
  width: 72px; height: 72px; margin: 0 auto 18px;
  display: grid; place-items: center; border-radius: 50%;
  font-size: 2rem; color: #fff;
}
.result-card.ok .result-icon { background: var(--green); }
.result-card.fail .result-icon { background: var(--accent); }
.result-card h1 { font-size: 1.3rem; margin-bottom: 8px; }
.result-card p { color: var(--text-dim); margin-bottom: 20px; }
.result-meta { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.result-meta > div { display: flex; justify-content: space-between; background: var(--bg-3); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.result-meta dt { color: var(--text-dim); font-size: .84rem; }
.result-meta dd { font-weight: 700; font-size: .88rem; }

@media (max-width: 820px) {
  .product-detail { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .cart-line { grid-template-columns: 56px 1fr auto; }
  .cart-line-qty, .cart-line-remove { grid-column: 2 / -1; justify-self: start; }
}

/* ============================================================
   WALLET
   ============================================================ */
.wallet-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.wallet-balance-card {
  display: flex; flex-direction: column; gap: 8px;
  background:
    radial-gradient(420px 200px at 85% -50px, rgba(168, 85, 247, .3), transparent 70%),
    var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px; margin-bottom: 18px;
}
.wallet-balance-label { color: var(--text-dim); font-size: .85rem; }
.wallet-balance-value { color: var(--primary); font-size: 2rem; font-weight: 800; }
.wallet-history { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 22px; }
.wallet-subtitle { font-size: 1rem; margin-bottom: 14px; }
.wallet-empty { color: var(--text-dim); font-size: .88rem; }
.wallet-table { width: 100%; border-collapse: collapse; }
.wallet-table th { text-align: right; color: var(--text-faint); font-size: .78rem; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border-soft); }
.wallet-table td { padding: 12px 10px; font-size: .86rem; border-bottom: 1px solid var(--border-soft); }
.wallet-table tr:last-child td { border-bottom: 0; }
.wallet-credit { color: #86efac; font-weight: 700; direction: ltr; }
.wallet-debit { color: #fca5a5; font-weight: 700; direction: ltr; }

.wallet-charge { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; position: sticky; top: 96px; }
.wallet-charge h2 { font-size: 1.05rem; margin-bottom: 8px; }
.wallet-hint { color: var(--text-dim); font-size: .82rem; margin-bottom: 16px; }
.wallet-charge-form { display: flex; flex-direction: column; gap: 8px; }
.wallet-charge-form label { color: var(--text-dim); font-size: .82rem; }
.wallet-charge-form input {
  padding: 12px 14px; background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 12px; color: var(--text); font-size: 1rem; text-align: center;
}
.wallet-charge-form input:focus { outline: none; border-color: var(--primary); }
.wallet-charge-form .btn { justify-content: center; margin-top: 6px; }
.wallet-tiers { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.wallet-tiers li { color: var(--text-faint); font-size: .76rem; padding-inline-start: 14px; position: relative; }
.wallet-tiers li::before { content: "🎁"; position: absolute; inset-inline-start: -6px; }

.account-cards-4 { grid-template-columns: repeat(4, 1fr); }
.account-kyc-val { font-size: 1rem !important; }
@media (max-width: 1000px) { .account-cards-4 { grid-template-columns: repeat(2, 1fr); } }

/* my orders */
.orders-list { display: flex; flex-direction: column; gap: 10px; }
.order-row {
  display: grid; grid-template-columns: 80px 1fr auto auto; align-items: center; gap: 14px;
  background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 14px 18px;
  transition: border-color .2s, transform .2s;
}
.order-row:hover { border-color: var(--primary); transform: translateX(-3px); }
.order-id { font-weight: 800; color: var(--text); }
.order-date { color: var(--text-faint); font-size: .82rem; }
.order-total { font-weight: 700; color: var(--text); }
.order-status {
  font-size: .76rem; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  background: var(--bg-3); color: var(--text-dim); border: 1px solid var(--border);
}
.order-status.status-0 { color: var(--text-dim); }
.order-status.status-1 { color: #7dd3fc; border-color: rgba(125,211,252,.4); }
.order-status.status-2 { color: #fcd34d; border-color: rgba(252,211,77,.4); }
.order-status.status-3 { color: #c4b5fd; border-color: rgba(196,181,253,.4); }
.order-status.status-4 { color: #86efac; border-color: rgba(134,239,172,.4); }
.order-status.status-5 { color: #fca5a5; border-color: rgba(252,165,165,.4); }

.order-detail { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.order-detail-main { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 22px; }
.order-detail-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.order-detail-date { color: var(--text-faint); font-size: .84rem; }
.order-items { width: 100%; border-collapse: collapse; }
.order-items th { text-align: right; color: var(--text-faint); font-size: .78rem; padding: 8px 6px; border-bottom: 1px solid var(--border-soft); }
.order-items td { padding: 12px 6px; font-size: .86rem; border-bottom: 1px solid var(--border-soft); }
.order-items tr:last-child td { border-bottom: 0; }
.order-detail-side { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; position: sticky; top: 96px; }
.order-detail-side h2 { font-size: 1.05rem; margin-bottom: 14px; }
.order-meta { margin-top: 16px; border-top: 1px solid var(--border-soft); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.order-meta > div { display: flex; justify-content: space-between; font-size: .82rem; }
.order-meta span:first-child { color: var(--text-dim); }
.order-pay { width: 100%; justify-content: center; margin-top: 16px; }
@media (max-width: 820px) {
  .order-detail { grid-template-columns: 1fr; }
  .order-detail-side { position: static; }
  .order-row { grid-template-columns: 60px 1fr auto; }
  .order-date { display: none; }
}

.account-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.account-code {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--bg-3); border: 1px dashed var(--primary);
  border-radius: 12px; padding: 14px 16px;
}
.account-code-value { font-size: 1.05rem; font-weight: 800; color: var(--primary); letter-spacing: 1px; }
.account-code-desc { color: var(--text-dim); font-size: .78rem; }
@media (max-width: 820px) { .account-codes { grid-template-columns: 1fr; } }

.referral-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: stretch; }
.referral-share { display: flex; flex-direction: column; gap: 6px; }
.referral-label { color: var(--text-dim); font-size: .8rem; }
.referral-link {
  width: 100%; padding: 12px 14px; cursor: copy;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 12px; color: var(--primary); font-size: .84rem;
}
.referral-share small { color: var(--text-faint); font-size: .78rem; }
.referral-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.referral-stat {
  display: flex; flex-direction: column; gap: 4px; justify-content: center;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; text-align: center;
}
.referral-stat-value { color: var(--primary); font-size: 1.2rem; font-weight: 800; }
.referral-stat-value small { font-size: .68rem; color: var(--text-dim); font-weight: 400; }
.referral-stat-label { color: var(--text-dim); font-size: .74rem; }
@media (max-width: 820px) { .referral-grid { grid-template-columns: 1fr; } }

.account-card-link { text-decoration: none; transition: border-color .2s; }
.account-card-link:hover { border-color: var(--primary); }
.account-card-value small { font-size: .7rem; color: var(--text-dim); font-weight: 400; }

@media (max-width: 820px) {
  .wallet-layout { grid-template-columns: 1fr; }
  .wallet-charge { position: static; }
}

/* ============================================================
   COUNTDOWN POPUP (محصولات زمان‌دار)
   ============================================================ */
.cd-popup {
  position: fixed; z-index: 120; inset-inline-start: 22px; bottom: 22px;
  width: min(340px, calc(100vw - 44px));
  background:
    radial-gradient(300px 160px at 100% -40px, rgba(168, 85, 247, .35), transparent 70%),
    var(--bg-2);
  border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
  padding: 20px; color: var(--text);
  animation: cdIn .35s cubic-bezier(.2, .7, .2, 1);
}
@keyframes cdIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.cd-popup-hide { opacity: 0; transform: translateY(16px); transition: opacity .25s, transform .25s; }
.cd-popup-close {
  position: absolute; top: 12px; inset-inline-end: 14px;
  color: var(--text-faint); font-size: .9rem; padding: 2px 6px;
}
.cd-popup-close:hover { color: var(--text); }
.cd-popup-badge {
  display: inline-block; background: var(--accent); color: #fff;
  font-size: .68rem; font-weight: 800; padding: 4px 12px; border-radius: 999px;
}
.cd-popup-title { font-size: 1.05rem; margin-top: 8px; }
.cd-popup-text { color: var(--text-dim); font-size: .82rem; margin-top: 6px; }
.cd-popup-timer {
  font-size: 1.6rem; font-weight: 800; letter-spacing: 2px; text-align: center;
  color: var(--primary); margin: 14px 0;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px;
}
.cd-popup-count { color: var(--text-dim); font-size: .78rem; }
.cd-popup-users { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.cd-popup-user {
  background: var(--bg-3); border: 1px solid var(--border-soft);
  color: var(--text-dim); font-size: .68rem;
  padding: 3px 9px; border-radius: 999px;
}
.cd-popup-actions { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.cd-popup-btn { width: 100%; justify-content: center; }
.cd-popup-link { text-align: center; color: var(--text-dim); font-size: .8rem; }
.cd-popup-link:hover { color: var(--primary); }

@media (max-width: 520px) {
  .cd-popup { inset-inline: 12px; bottom: 12px; width: auto; }
}

/* product-page discount countdown */
.product-countdown {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 16px;
}
.product-countdown .pc-label { color: var(--text-dim); font-size: .8rem; }
.product-countdown .pc-timer { color: var(--primary); font-weight: 800; font-size: 1.05rem; letter-spacing: 1px; }
.product-cashback { color: #86efac; font-size: .82rem; margin-bottom: 16px; }
.discount-badge.inline { position: static; display: inline-block; margin-inline-end: 8px; }

/* ============================================================
   SPIN WHEEL (گردونه شانس)
   ============================================================ */
.spin-section { position: relative; overflow: hidden; padding-block: 40px 60px; }
.spin-aurora {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(600px 400px at 50% 8%, rgba(168, 85, 247, .28), transparent 60%),
    radial-gradient(500px 400px at 15% 60%, rgba(255, 77, 169, .18), transparent 60%),
    radial-gradient(500px 400px at 85% 65%, rgba(101, 98, 255, .18), transparent 60%);
}
.spin-wrap { position: relative; z-index: 1; }

.spin-empty { text-align: center; padding: 60px 20px; }
.spin-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.spin-empty p { color: var(--text-dim); margin-bottom: 20px; }

.spin-head { text-align: center; margin-bottom: 28px; }
.spin-eyebrow {
  display: inline-block; background: rgba(255, 77, 169, .14); color: var(--accent);
  border: 1px solid rgba(255, 77, 169, .3);
  font-size: .8rem; font-weight: 700; padding: 6px 16px; border-radius: 999px;
}
.spin-title { font-size: 2rem; margin-top: 12px; }
.spin-sub { color: var(--text-dim); font-size: .92rem; max-width: 44ch; margin: 8px auto 0; }

/* stage */
.spin-stage {
  position: relative; width: min(440px, 90vw); aspect-ratio: 1; margin: 10px auto 0;
}
.spin-pointer {
  position: absolute; top: -6px; left: 50%; translate: -50% 0; z-index: 4;
  width: 0; height: 0;
  border-inline: 18px solid transparent;
  border-top: 30px solid var(--gold);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5));
}
.spin-pointer::after {
  content: ""; position: absolute; top: -38px; left: -9px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 12px rgba(242, 194, 48, .8);
}
.spin-wheel-shell {
  position: absolute; inset: 0; border-radius: 50%;
  padding: 12px;
  background: conic-gradient(from 0deg, var(--primary), var(--accent), var(--primary-2), var(--primary));
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .04), 0 24px 60px rgba(0, 0, 0, .55), 0 0 60px rgba(168, 85, 247, .35);
}
.spin-wheel {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--bg-2);
  transition: transform 4.5s cubic-bezier(.16, 1, .3, 1);
  will-change: transform;
}
.spin-seg-label { fill: #fff; font-size: 12px; font-weight: 700; font-family: Vazirmatn, Tahoma, sans-serif; }
.spin-seg-icon { font-size: 18px; }

.spin-hub {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%; z-index: 3;
  width: 92px; height: 92px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #efe7ff 20%, var(--primary) 70%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5), 0 0 0 6px rgba(14, 14, 26, .9), 0 0 0 8px rgba(168, 85, 247, .5);
  cursor: pointer; transition: scale .15s;
}
/* Centering uses the `translate` property, so hover must only add `scale` — a `transform:
   translate(...)` here would stack on top of that and make the button jump half its size. */
.spin-hub:hover:not(:disabled) { scale: 1.05; }
.spin-hub:disabled { cursor: default; opacity: .9; }
.spin-hub-inner {
  position: absolute; inset: 10px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--primary), var(--primary-2));
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, .3);
}
.spin-hub-text { color: #fff; font-weight: 800; font-size: .82rem; }

.spin-cta { text-align: center; margin-top: 30px; }
.spin-btn { padding: 14px 44px; font-size: 1.05rem; }
.spin-remaining { color: var(--text-dim); font-size: .85rem; margin-top: 12px; }
.spin-remaining strong { color: var(--primary); }

.spin-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 22px; }
.spin-legend-item { display: inline-flex; align-items: center; gap: 7px; color: var(--text-dim); font-size: .82rem; }
.spin-legend-item i { width: 12px; height: 12px; border-radius: 3px; }

/* result modal */
.spin-modal {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: rgba(6, 8, 18, .72); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .3s;
}
/* `display:grid` above overrides the UA `[hidden]{display:none}`, so without this the
   invisible modal (opacity:0) stays in the layout at z-index 200 and swallows every click
   on the whole page — the "spin page locks everything" bug. Restore hiding when hidden. */
.spin-modal[hidden] { display: none; }
.spin-modal.show { opacity: 1; }
.spin-modal-card {
  position: relative; z-index: 2; text-align: center;
  width: min(400px, calc(100vw - 40px));
  background:
    radial-gradient(300px 180px at 50% -40px, rgba(168, 85, 247, .4), transparent 70%),
    var(--bg-2);
  border: 1px solid var(--border); border-radius: 24px;
  padding: 36px 30px; box-shadow: var(--shadow);
  transform: scale(.85); transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.spin-modal.show .spin-modal-card { transform: scale(1); }
.spin-modal-icon {
  width: 84px; height: 84px; margin: 0 auto 16px;
  display: grid; place-items: center; font-size: 2.4rem;
  border-radius: 50%; background: var(--grad); box-shadow: var(--shadow-primary);
}
.spin-modal-title { font-size: 1.4rem; }
.spin-modal-prize { color: var(--primary); font-size: 1.3rem; font-weight: 800; margin-top: 8px; }
.spin-modal-msg { color: var(--text-dim); font-size: .9rem; margin-block: 10px 22px; }

/* confetti */
.spin-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.spin-confetti i {
  position: absolute; top: -10px; width: 9px; height: 14px; border-radius: 2px;
  animation: confFall 2.6s linear forwards;
}
@keyframes confFall {
  to { transform: translateY(105vh) rotate(720deg); opacity: .2; }
}

@media (max-width: 520px) {
  .spin-title { font-size: 1.5rem; }
  .spin-hub { width: 74px; height: 74px; }
  .spin-seg-label { font-size: 11px; }
}

/* ============================================================
   ENTERTAINMENT / CHALLENGES (بخش سرگرمی)
   ============================================================ */
.challenge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.challenge-card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); padding: 22px;
  transition: transform .2s, border-color .2s;
}
.challenge-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.challenge-card-icon {
  width: 48px; height: 48px; display: grid; place-items: center; font-size: 1.4rem;
  border-radius: 14px; background: var(--bg-3); border: 1px solid var(--border);
}
.challenge-card-title { font-size: 1.02rem; }
.challenge-card-sum { color: var(--text-dim); font-size: .82rem; line-height: 1.8; flex: 1; }
.challenge-card-cta { color: var(--primary); font-size: .84rem; font-weight: 700; }

.product-challenges { margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--border-soft); }
.product-challenges-title { font-size: 1.15rem; margin-bottom: 18px; }

/* challenge detail + quiz */
.challenge-detail { max-width: 780px; }
.challenge-hero { text-align: center; margin: 10px 0 24px; }
.challenge-hero-badge {
  display: inline-block; background: rgba(168, 85, 247, .14); color: var(--primary);
  border: 1px solid rgba(168, 85, 247, .3);
  font-size: .78rem; font-weight: 700; padding: 5px 16px; border-radius: 999px;
}
.challenge-hero-title { font-size: 1.8rem; margin-top: 12px; }
.challenge-body {
  color: var(--text-dim); font-size: .96rem; line-height: 2;
  background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); padding: 24px; margin-bottom: 24px;
}
.challenge-body strong { color: var(--text); }

.quiz { display: flex; flex-direction: column; gap: 16px; }
.quiz-q {
  background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); padding: 22px;
}
.quiz-q-text { font-size: 1rem; margin-bottom: 16px; display: flex; align-items: baseline; gap: 8px; }
.quiz-q-num {
  flex-shrink: 0; display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 8px; background: var(--grad); color: #fff; font-size: .8rem; font-weight: 800;
}
.quiz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiz-opt {
  text-align: right; padding: 13px 16px; border-radius: 12px;
  background: var(--bg-3); border: 1px solid var(--border);
  color: var(--text); font-size: .9rem; transition: all .15s;
}
.quiz-opt:hover { border-color: var(--primary); }
.quiz-q.answered .quiz-opt { cursor: default; opacity: .75; }
.quiz-opt.correct { background: rgba(34, 197, 94, .16); border-color: var(--green); color: #86efac; opacity: 1; }
.quiz-opt.wrong { background: rgba(239, 68, 68, .14); border-color: rgba(239, 68, 68, .5); color: #fca5a5; opacity: 1; }

.quiz-score {
  text-align: center; padding: 30px;
  background:
    radial-gradient(300px 160px at 50% -30px, rgba(168, 85, 247, .3), transparent 70%),
    var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.quiz-score-icon { font-size: 2.4rem; margin-bottom: 8px; }
.quiz-score p { color: var(--text-dim); margin-bottom: 16px; }
.quiz-score strong { color: var(--primary); font-size: 1.15rem; }

@media (max-width: 820px) {
  .challenge-grid { grid-template-columns: 1fr; }
  .quiz-opts { grid-template-columns: 1fr; }
}

/* ============================================================
   TRUST STRIP
   ============================================================ */
.trust-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.trust-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); padding: 18px 20px;
}
.trust-icon {
  flex: 0 0 46px; width: 46px; height: 46px;
  display: grid; place-items: center; font-size: 1.15rem;
  border-radius: 13px; background: var(--grad); color: #fff;
  box-shadow: var(--shadow-primary);
}
.trust-item h3 { font-size: .92rem; }
.trust-item p { color: var(--text-dim); font-size: .76rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  margin-top: 44px;
  background: linear-gradient(180deg, var(--bg-2), #0b0f1e);
  border-top: 1px solid var(--border-soft);
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 28px;
  padding-block: 44px 30px;
}
.footer-about p { color: var(--text-dim); font-size: .85rem; margin-top: 14px; text-align: justify; }
.footer-col h3 { position: relative; font-size: .95rem; margin-bottom: 16px; padding-bottom: 10px; }
.footer-col h3::after {
  content: ""; position: absolute; bottom: 0; right: 0;
  width: 34px; height: 3px; border-radius: 3px; background: var(--grad);
}
.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-links li, .footer-links a { color: var(--text-dim); font-size: .85rem; }
.footer-links a:hover { color: var(--primary); }

.footer-trust { border-top: 1px solid var(--border-soft); padding-block: 18px; }
.trust-badges { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.trust-badges img {
  width: 90px; height: 90px;
  background: #fff; border-radius: 12px; padding: 6px;
}
.trust-badge {
  display: inline-flex; align-items: center;
  padding: 10px 22px; border-radius: 11px;
  background: var(--bg-3); border: 1px solid var(--border);
  color: var(--text-dim); font-size: .8rem;
}

.footer-bottom { border-top: 1px solid var(--border-soft); padding-block: 16px; text-align: center; }
.footer-bottom p { color: var(--text-faint); font-size: .78rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .cat-card { flex-basis: calc((100% - 36px) / 3); }
  .product-grid, .top-grid { grid-template-columns: repeat(3, 1fr); }
  .deals-grid { grid-template-columns: 1fr; }
  .banner-row, .service-row { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-main { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .trust-row { grid-template-columns: repeat(2, 1fr); }
  .nav-menu a img { display: none; }
}

@media (max-width: 820px) {
  .header-inner { gap: 10px; }
  .cat-menu { display: none; }
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 100%; inset-inline: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg-2); border-bottom: 1px solid var(--border);
    padding: 10px 16px 16px; display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 12px 14px; }
  .nav-menu a.active::after { display: none; }

  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-slider { justify-self: center; max-width: 420px; }
  .hero-title { font-size: 1.5rem; }
  .hero-stats { gap: 22px; }

  .section-head { flex-wrap: wrap; }
  .cat-card { flex-basis: calc((100% - 18px) / 2); }
  .product-grid, .deals-products { grid-template-columns: repeat(2, 1fr); }
  .top-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .wide-banner { flex-direction: column; text-align: center; padding: 28px 22px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .cat-card { flex-basis: 100%; }
  .product-grid, .deals-products,
  .banner-row, .service-row, .blog-main, .trust-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .logo-text small { display: none; }
}

/* ============================================================
   Package-purchase wizard (محصولات بسته‌ای — الحاقیه)
   ============================================================ */
.wizard { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; margin-top: 18px; }
.wizard-main { display: flex; flex-direction: column; gap: 26px; min-width: 0; }

.wizard-step { position: relative; }
.wizard-step-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.wizard-step-num {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--primary); color: #fff; font-weight: 800; font-size: 1.15rem;
  box-shadow: 0 8px 20px -8px rgba(168, 85, 247, .6);
}
.wizard-step-title { font-size: 1.15rem; font-weight: 800; margin: 0 0 4px; }
.wizard-step-sub { color: var(--text-dim); font-size: .85rem; margin: 0; }

.wizard-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.wizard-tab {
  position: relative; background: none; border: none; color: var(--text-dim); font: inherit; font-weight: 700;
  padding: 10px 16px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.wizard-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.wizard-badge {
  position: absolute; top: -8px; inset-inline-start: 4px; background: #f2c230; color: #1b1b06;
  font-size: .62rem; font-weight: 800; padding: 2px 7px; border-radius: 6px;
}
.wizard-pill .wizard-badge { position: static; margin-inline-start: 6px; }

.wizard-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; justify-content: flex-end; }
.wizard-pill {
  background: var(--surface); border: 1px solid var(--line); color: var(--text-dim); font: inherit;
  font-size: .85rem; font-weight: 700; padding: 8px 16px; border-radius: 10px; cursor: pointer;
  transition: all .15s;
}
.wizard-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.wizard-note {
  background: rgba(101, 98, 255, .12); border: 1px solid rgba(101, 98, 255, .3); color: var(--text);
  border-radius: 10px; padding: 10px 14px; font-size: .82rem; margin-bottom: 12px;
}

.wizard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

.wizard-card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; transition: border-color .15s, box-shadow .15s;
}
.wizard-card.selected { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), 0 10px 26px -14px rgba(168, 85, 247, .55); }
.wizard-card .discount-badge { position: absolute; top: -8px; inset-inline-start: 12px; }
.wizard-card-top { display: flex; align-items: center; gap: 12px; }
.wizard-card-media { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; flex-shrink: 0; background: var(--bg-2); display: grid; place-items: center; }
.wizard-card-media img { width: 100%; height: 100%; object-fit: cover; }
.wizard-card-media .thumb-art { font-size: .5rem; padding: 4px; text-align: center; }
.wizard-card-info { flex: 1; min-width: 0; }
.wizard-card-title { font-size: .98rem; font-weight: 800; margin: 0 0 6px; }
.wizard-card-price { font-size: .9rem; }
.wizard-card-price del { color: var(--text-dim); font-size: .78rem; margin-inline-end: 6px; }
.wizard-card-price .price { color: var(--primary); font-weight: 800; }
.wizard-card-price .wc-unit { color: var(--text-dim); font-size: .78rem; }

.wizard-buy-btn {
  background: rgba(168, 85, 247, .12); color: var(--primary); border: 1px solid rgba(168, 85, 247, .5);
  font: inherit; font-weight: 700; padding: 9px 22px; border-radius: 10px; cursor: pointer; transition: all .15s;
}
.wizard-buy-btn:hover { background: var(--primary); color: #fff; }
.wizard-stepper { display: flex; align-items: center; gap: 10px; }
.wizard-stepper button {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-2);
  color: var(--text); font-size: 1.1rem; font-weight: 800; cursor: pointer; line-height: 1;
}
.wizard-stepper button:hover { border-color: var(--primary); color: var(--primary); }
.ws-qty { min-width: 22px; text-align: center; font-weight: 800; }

.wizard-card-bottom { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 10px; }
.wizard-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.wizard-chip {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text-dim);
  font-size: .74rem; font-weight: 700; padding: 4px 10px; border-radius: 8px;
}
.wizard-details { margin-top: 8px; font-size: .8rem; }
.wizard-details summary { color: var(--primary); cursor: pointer; font-weight: 700; }
.wizard-details p { color: var(--text-dim); margin: 6px 0 0; }

/* fields (step 2) */
.wizard-field { position: relative; margin-bottom: 14px; max-width: 460px; }
.wizard-field-label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 8px; }
.wizard-req { color: #f87171; }
.wizard-help { position: absolute; top: 0; inset-inline-end: 0; color: var(--text-dim); font-size: .78rem; cursor: help; }
.wizard-input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font: inherit; padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
.wizard-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(168, 85, 247, .25); }
.wizard-warning {
  background: rgba(101, 98, 255, .1); border: 1px solid rgba(101, 98, 255, .25); color: var(--text-dim);
  border-radius: 10px; padding: 10px 12px; font-size: .78rem; margin-top: 8px;
}

/* sticky summary */
.wizard-summary {
  position: sticky; top: 90px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 14px;
}
.wizard-summary-head { display: flex; align-items: center; gap: 10px; }
.wizard-summary-img { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; }
.wizard-summary-head strong { display: block; font-size: .95rem; }
.wizard-summary-sub { color: var(--text-dim); font-size: .76rem; }
.wizard-summary-lines { display: flex; flex-direction: column; gap: 6px; border-top: 1px dashed var(--line); padding-top: 10px; }
.wizard-summary-lines:empty { display: none; }
.ws-line { display: flex; justify-content: space-between; font-size: .82rem; color: var(--text-dim); }
.ws-line strong { color: var(--text); }
.wizard-summary-meta { background: var(--bg-2); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.ws-row { display: flex; justify-content: space-between; font-size: .85rem; color: var(--text-dim); }
.ws-row strong { color: var(--text); }
.wizard-summary-total { display: flex; justify-content: space-between; align-items: center; font-size: .9rem; }
.wizard-summary-total strong { color: var(--primary); font-size: 1.15rem; font-weight: 800; }
.wizard-submit { width: 100%; }
.wizard-submit:disabled { opacity: .5; cursor: not-allowed; }

.wizard-alert { border-radius: 10px; padding: 10px 14px; font-size: .85rem; }
.wizard-alert-error { background: rgba(248, 113, 113, .12); border: 1px solid rgba(248, 113, 113, .4); color: #f87171; }

.hidden { display: none !important; }

@media (max-width: 900px) {
  .wizard { grid-template-columns: 1fr; }
  .wizard-summary { position: static; order: 2; }
  .wizard-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Blog (وبلاگ)
   ============================================================ */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.blog-card {
  background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: transform .2s, border-color .2s;
}
.blog-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.blog-card-link { display: flex; flex-direction: column; height: 100%; }
.blog-card-img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-bottom: 1px solid var(--border-soft);
}
.blog-card-img--empty {
  display: grid; place-items: center; font-size: 2rem;
  background: var(--bg-3); color: var(--text-dim);
}
.blog-card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.blog-card-title { font-size: 1.02rem; line-height: 1.7; }
.blog-card-sum {
  color: var(--text-dim); font-size: .82rem; line-height: 1.9; flex: 1;
  /* keep every card the same height whatever the summary length */
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card-meta {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--text-dim); font-size: .76rem;
}
.blog-card-cta { color: var(--primary); font-weight: 700; }

/* tag cloud — also the footer tag row on a post */
.blog-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.blog-tags--footer { margin: 26px 0 0; padding-top: 20px; border-top: 1px solid var(--border-soft); }
.blog-tag {
  padding: 6px 14px; border-radius: 999px; font-size: .78rem;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text-dim);
  transition: color .2s, border-color .2s;
}
.blog-tag:hover, .blog-tag.is-active { color: var(--primary); border-color: var(--primary); }

.blog-pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 30px; }
.blog-pager-btn {
  padding: 9px 18px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--border); font-size: .84rem;
}
.blog-pager-btn:hover { border-color: var(--primary); color: var(--primary); }
.blog-pager-info { color: var(--text-dim); font-size: .8rem; }

/* article */
.blog-detail { max-width: 820px; }
.blog-hero { margin: 10px 0 22px; }
.blog-hero-title { font-size: 1.7rem; line-height: 1.8; margin-bottom: 10px; }
.blog-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--text-dim); font-size: .8rem; }
.blog-cover {
  width: 100%; border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft); margin-bottom: 22px;
}
.blog-lead {
  color: var(--text); font-size: .95rem; line-height: 2.1;
  padding-right: 14px; border-right: 3px solid var(--primary); margin-bottom: 22px;
}
.blog-body { color: var(--text-dim); font-size: .92rem; line-height: 2.2; }
.blog-body h2 { color: var(--text); font-size: 1.22rem; margin: 30px 0 12px; }
.blog-body h3 { color: var(--text); font-size: 1.05rem; margin: 24px 0 10px; }
.blog-body p { margin-bottom: 16px; }
.blog-body ul, .blog-body ol { margin: 0 22px 18px 0; }
.blog-body li { margin-bottom: 8px; }
.blog-body a { color: var(--primary); text-decoration: underline; }
.blog-body img { max-width: 100%; border-radius: var(--radius); margin: 14px 0; }
.blog-body blockquote {
  margin: 18px 0; padding: 12px 16px; border-right: 3px solid var(--primary);
  background: var(--bg-2); border-radius: var(--radius);
}
.blog-body code {
  background: var(--bg-3); padding: 2px 6px; border-radius: 6px;
  font-size: .86em; direction: ltr; display: inline-block;
}
.blog-body table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.blog-body th, .blog-body td { border: 1px solid var(--border); padding: 8px 12px; text-align: right; }

.blog-related { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border-soft); }

@media (max-width: 1024px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-hero-title { font-size: 1.35rem; }
}
