/* ==========================================================================
   Razima — pages/home.css
   بالای خانه (فاز ۴): اسلایدر «تازه‌ها»، درهای خطوط، نوار تخفیف.
   پایین خانه (فاز ۵ بازطراحی می‌کند): استوری‌ها، تب‌های محصول، مطالب.
   ========================================================================== */

/* ============================ ۲. اسلایدر «تازه‌ها» ============================
   قاب دوپنلی گرد: پنل متن به رنگ خط اسلاید + عکس با لبه‌ی زیگزاگی (دوخت). ریل = بندانگشتی‌های کمانی با دوخت
   پیشرفت زیر هر کدام. اسلایدها در یک خانه‌ی گرید روی هم‌اند (ارتفاع ثابت). حرکت فقط transform و opacity. */
.hero { padding-block: clamp(10px, 1.6vw, 20px) 4px; }
.hero__grid { position: relative; display: grid; gap: 8px; }
.hero__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; font-size: var(--fs-sm); font-weight: 800; line-height: 1.7; }
.hero__tagline { color: var(--fg-muted); font-weight: 500; }
.hero__frame { position: relative; overflow: hidden; border-radius: var(--r-xl); background: var(--bg-soft); }
.hero__stage { display: grid; touch-action: pan-y; }
.hero__slide { --zs: 12px; position: relative; grid-area: 1 / 1; display: grid; grid-template-rows: auto 1fr; background: var(--tint); visibility: hidden; opacity: 0; transition: opacity var(--dur-4) var(--ease-out), visibility 0s; }
.hero__slide.is-active { z-index: 2; visibility: visible; opacity: 1; }
.hero__slide.is-leaving { z-index: 1; visibility: visible; opacity: 1; }

/* عکس: لبه‌ی پایین زیگزاگ (موبایل) */
.hero__photo { position: relative; overflow: hidden; aspect-ratio: 1; background: var(--tint); padding-bottom: 0;
  -webkit-mask: conic-gradient(from -45deg at 50% 100%, #000 90deg, #0000 0) 0 100% / calc(var(--zs) * 2) var(--zs) repeat-x, linear-gradient(#000 0 0) 0 0 / 100% calc(100% - var(--zs) + 1px) no-repeat;
  mask: conic-gradient(from -45deg at 50% 100%, #000 90deg, #0000 0) 0 100% / calc(var(--zs) * 2) var(--zs) repeat-x, linear-gradient(#000 0 0) 0 0 / 100% calc(100% - var(--zs) + 1px) no-repeat; }
.hero__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero.is-moved .hero__slide.is-active .hero__photo img { animation: rz-hero-settle 1.1s var(--ease-out) both; }
@keyframes rz-hero-settle { from { transform: scale(1.05); } }

/* متن */
.hero__tag { display: grid; align-content: start; justify-items: start; gap: 8px; padding: 14px 20px 92px; }
.hero__card { display: contents; }
.hero__label { display: inline-flex; align-items: center; gap: 8px; color: var(--tone); font-size: var(--fs-xs); font-weight: 750; }
.hero__label .zz { width: 28px; }
.hero__heading { font-size: var(--fs-2xl); font-weight: 800; line-height: 1.4; }
.hero__lead { display: -webkit-box; overflow: hidden; color: var(--fg-muted); font-size: var(--fs-sm); line-height: 1.85; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.hero__cta { margin-top: 6px; }
.hero__cta .icon { transition: transform var(--dur-2) var(--ease); }
.hero__cta:hover .icon { transform: translateX(-3px); }
[dir="ltr"] .hero__cta:hover .icon { transform: translateX(3px); }
.hero.is-moved .hero__slide.is-active .hero__tag > * { animation: rz-hero-rise .7s var(--ease-out) both; }
.hero.is-moved .hero__slide.is-active .hero__tag > :nth-child(2) { animation-delay: .06s; }
.hero.is-moved .hero__slide.is-active .hero__tag > :nth-child(3) { animation-delay: .12s; }
.hero.is-moved .hero__slide.is-active .hero__tag > :nth-child(4) { animation-delay: .18s; }
@keyframes rz-hero-rise { from { opacity: 0; transform: translateY(12px); } }

/* ---------- ریل: بندانگشتی‌های کمانی + دوخت پیشرفت ---------- */
.hero__rail { position: absolute; inset: auto 0 0; z-index: 3; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 0 20px 16px; padding-inline-end: 68px; pointer-events: none; }
.hero__rail > * { pointer-events: auto; }
html:not(.js) .hero__rail { display: none; }
.hero__picks { display: flex; gap: clamp(8px, 1.4vw, 14px); }
.hero__pick { display: block; padding: 0; border: 0; border-radius: 30px 30px 12px 12px; background: none; color: inherit; -webkit-tap-highlight-color: transparent; }
.hero__pick:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.hero__pick-card { display: grid; justify-items: center; gap: 5px; width: 46px; }
.hero__pick-card img { width: 46px; height: 58px; border-radius: 23px 23px 9px 9px; background: var(--surface); object-fit: cover; opacity: .62; transition: opacity var(--dur-2), box-shadow var(--dur-2), transform var(--dur-3) var(--ease-spring); }
.hero__pick:hover img { opacity: 1; transform: translateY(-2px); }
.hero__pick[aria-current="true"] img { opacity: 1; box-shadow: 0 0 0 2px var(--tint), 0 0 0 3.5px var(--fg); }
.hero__pick-label { display: none; max-width: 100%; overflow: hidden; color: var(--fg-muted); font-size: var(--fs-2xs); font-weight: 650; line-height: 1.6; white-space: nowrap; text-overflow: ellipsis; }
.hero__pick[aria-current="true"] .hero__pick-label { color: var(--fg); }
.hero__stitch { display: block; width: 100%; height: 8px; background: color-mix(in srgb, var(--fg) 14%, transparent); -webkit-mask: var(--zz-mask); mask: var(--zz-mask); }
.hero__stitch i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: right center; }
[dir="ltr"] .hero__stitch i { transform-origin: left center; }
.hero[data-state="paused"] .hero__pick[aria-current="true"] .hero__stitch i { transform: none; }
.hero[data-state="playing"] .hero__pick[aria-current="true"] .hero__stitch i { animation: rz-hero-stitch var(--hero-t, 6.5s) linear both; }
.hero.is-held .hero__pick[aria-current="true"] .hero__stitch i { animation-play-state: paused; }
@keyframes rz-hero-stitch { to { transform: none; } }

/* دکمه‌ها: قرص سفید */
.hero__ctrl { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--sh-2); }
.hero__ctrl .btn-icon { width: 36px; height: 36px; }
.hero__step, .hero__count { display: none; }
.hero__count { align-items: baseline; gap: 4px; min-width: 4.4em; padding-inline: 6px; color: var(--fg-muted); font-size: var(--fs-xs); font-weight: 600; }
.hero__count b { color: var(--fg); font-weight: 800; }
.hero__count i { font-style: normal; color: var(--line-input); }
.hero__i-play { display: none; }
.hero[data-state="paused"] .hero__i-pause { display: none; }
.hero[data-state="paused"] .hero__i-play { display: block; }
.hero__picks:has(li:nth-child(5)) .hero__pick-card, .hero__picks:has(li:nth-child(5)) .hero__pick-card img { width: 40px; }
.hero__picks:has(li:nth-child(5)) .hero__pick-card img { height: 50px; }

@media (min-width: 640px) {
  .hero__photo { aspect-ratio: 16 / 9; }
  .hero__tag { padding: 22px 32px 100px; }
  .hero__heading { font-size: var(--fs-3xl); }
  .hero__step { display: inline-grid; }
  .hero__count { display: inline-flex; }
  .hero__rail { padding: 0 32px 20px; }
  .hero__pick-label { display: block; }
  .hero__pick-card, .hero__pick-card img { width: 54px; }
  .hero__pick-card img { height: 68px; border-radius: 27px 27px 10px 10px; }
  .hero__picks:has(li:nth-child(5)) .hero__pick-card, .hero__picks:has(li:nth-child(5)) .hero__pick-card img { width: 54px; }
  .hero__picks:has(li:nth-child(5)) .hero__pick-card img { height: 68px; }
}
@media (min-width: 1024px) {
  .hero__grid { gap: 0; }
  .hero__title { position: absolute; top: 30px; inset-inline-start: 48px; z-index: 4; flex-direction: column; gap: 0; font-size: var(--fs-md); line-height: 1.6; }
  .hero__tagline { font-size: var(--fs-xs); }
  .hero__slide { --zs: 14px; grid-template-columns: 5fr 7fr; grid-template-rows: none; min-height: 560px; }
  .hero__tag { grid-column: 1; align-self: center; gap: 12px; padding: 104px 48px 136px; }
  .hero__photo { grid-column: 2; grid-row: 1; aspect-ratio: auto;
    -webkit-mask: conic-gradient(from 225deg at 100% 50%, #000 90deg, #0000 0) 100% 0 / var(--zs) calc(var(--zs) * 2) repeat-y, linear-gradient(#000 0 0) 0 0 / calc(100% - var(--zs) + 1px) 100% no-repeat;
    mask: conic-gradient(from 225deg at 100% 50%, #000 90deg, #0000 0) 100% 0 / var(--zs) calc(var(--zs) * 2) repeat-y, linear-gradient(#000 0 0) 0 0 / calc(100% - var(--zs) + 1px) 100% no-repeat; }
  [dir="ltr"] .hero__photo {
    -webkit-mask: conic-gradient(from 45deg at 0 50%, #000 90deg, #0000 0) 0 0 / var(--zs) calc(var(--zs) * 2) repeat-y, linear-gradient(#000 0 0) 100% 0 / calc(100% - var(--zs) + 1px) 100% no-repeat;
    mask: conic-gradient(from 45deg at 0 50%, #000 90deg, #0000 0) 0 0 / var(--zs) calc(var(--zs) * 2) repeat-y, linear-gradient(#000 0 0) 100% 0 / calc(100% - var(--zs) + 1px) 100% no-repeat; }
  .hero__heading { font-size: var(--fs-4xl); }
  .hero__rail { padding: 0 48px 28px; }
}

/* ============================ ۳. درهای خطوط ============================ */
.doors { padding-top: clamp(36px, 4.5vw, 64px); }
.doors__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.door {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 8px 14px;
  border-radius: var(--r-xl);
  background: var(--tint);
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.door:hover { transform: translateY(-4px); box-shadow: var(--sh-2); }
.door:has(.door__name a:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.door__name a:focus-visible { outline: none; }
.door__hanger { position: absolute; top: -8px; left: 50%; z-index: 2; margin-left: -16px; }
.door__media { position: relative; display: grid; place-items: center; overflow: hidden; aspect-ratio: 4 / 5; border-radius: 18px; background: var(--bg-soft); color: var(--tone); }
.door__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-4) var(--ease); }
.door:hover .door__media img { transform: scale(1.04); }
.door__icon .icon { width: 56px; height: 56px; stroke-width: 1.2; }
.door__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px; padding-inline: 6px; }
.door__head .latin { grid-column: 1; color: var(--tone); line-height: 1.4; }
.door__name { grid-column: 1; font-size: var(--fs-xl); line-height: 1.45; }
.door__name a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.door__go { grid-column: 2; grid-row: 1 / span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); color: var(--tone); transition: transform var(--dur-2) var(--ease); }
.door__go .icon { width: 20px; height: 20px; }
.door:hover .door__go { transform: translateX(-4px); }
[dir="ltr"] .door:hover .door__go { transform: translateX(4px); }
.door .door__chips { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; padding-inline: 4px; }
.door__chips a { display: inline-flex; align-items: center; min-height: 32px; padding: 2px 12px; border-radius: var(--r-pill); background: var(--surface); color: var(--fg); font-size: var(--fs-xs); font-weight: 650; transition: color var(--dur-2), box-shadow var(--dur-2); }
.door__chips a:hover { color: var(--tone); box-shadow: inset 0 0 0 1px var(--tone); }
.door__desc { display: -webkit-box; overflow: hidden; padding-inline: 6px; color: var(--fg-muted); font-size: var(--fs-xs); line-height: 1.8; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (min-width: 1024px) { .doors__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .door { padding: 10px 10px 16px; } }
@media (max-width: 479.98px) {
  .door__go { display: none; }
  .door__name { font-size: var(--fs-lg); }
  .door__chips a { min-height: 30px; padding-inline: 10px; }
}

/* نوار باریک فصلی (کلاه بافتنی) */
.season { position: relative; display: flex; align-items: center; gap: 14px; margin-top: clamp(14px, 2vw, 24px); padding: 10px; padding-inline-end: 20px; border-radius: var(--r-lg); background: var(--tint); color: var(--fg); transition: box-shadow var(--dur-2) var(--ease); }
.season:hover { box-shadow: var(--sh-2); }
.season__img { flex: none; width: 56px; height: 70px; border-radius: 12px; object-fit: cover; }
.season__text { display: grid; flex: 1; min-width: 0; gap: 2px; }
.season__top { display: flex; align-items: center; gap: 12px; }
.season__name { font-size: var(--fs-lg); }
.season__desc { overflow: hidden; color: var(--fg-muted); font-size: var(--fs-xs); white-space: nowrap; text-overflow: ellipsis; }
.season__go { display: inline-flex; flex: none; align-items: center; gap: 6px; color: var(--tone); font-size: var(--fs-sm); font-weight: 750; }
.season__go .icon { transition: transform var(--dur-2) var(--ease); }
.season:hover .season__go .icon { transform: translateX(-4px); }
@media (max-width: 639.98px) { .season__go-text { display: none; } }

/* ============================ ۴. تخفیف‌ها (ویترین رز) ============================
   پنل رز خاکی با لبه‌ی بالای زیگزاگ (دوخت)، ستون تیتر (قرص حراج، نشان درصد دوخت‌خورده، تاریخ پایان، فیلتر) و
   کارت‌های سفید روی پنل. ریل از لبه‌ی پنل نمی‌زند. */
.sale__panel {
  --zs: 9px;
  display: grid;
  gap: 20px;
  padding: calc(var(--zs) + clamp(18px, 2.6vw, 30px)) clamp(14px, 2.4vw, 28px) clamp(16px, 2.4vw, 28px);
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  background: var(--accent-soft);
  -webkit-mask: conic-gradient(from 135deg at 50% 0, #000 90deg, #0000 0) 0 0 / calc(var(--zs) * 2) var(--zs) repeat-x, linear-gradient(#000 0 0) 0 var(--zs) / 100% calc(100% - var(--zs) + 1px) no-repeat;
  mask: conic-gradient(from 135deg at 50% 0, #000 90deg, #0000 0) 0 0 / calc(var(--zs) * 2) var(--zs) repeat-x, linear-gradient(#000 0 0) 0 var(--zs) / 100% calc(100% - var(--zs) + 1px) no-repeat;
}
.sale__head { display: grid; align-content: start; justify-items: start; gap: 10px; min-width: 0; }
.sale__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; width: 100%; }
.sale__title { font-size: var(--fs-2xl); line-height: 1.35; }
.sale__lead { color: var(--fg-muted); font-size: var(--fs-sm); }
.sale__end { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--fs-sm); font-weight: 650; }
.sale__end > .icon { color: var(--accent); }
.sale__left { padding-inline: 10px; border-radius: var(--r-pill); background: var(--surface); color: var(--accent); font-size: var(--fs-2xs); font-weight: 750; line-height: 24px; }
/* نشان درصد: وصله‌ی گرد با دوخت خط‌چین */
.sale__seal { display: grid; flex: none; place-content: center; justify-items: center; width: 92px; height: 92px; border-radius: 50%; background: var(--accent); color: var(--on-accent); line-height: 1.1; outline: 1.5px dashed color-mix(in srgb, var(--on-accent) 75%, transparent); outline-offset: -7px; transform: rotate(-8deg); }
.sale__seal strong { font-size: var(--fs-2xl); font-weight: 850; }
.sale__seal small { font-size: var(--fs-2xs); font-weight: 700; }
.sale__filter { flex-wrap: wrap; overflow: visible; margin-top: 6px; }
.sale__filter .chip { background: var(--surface); }
.sale__filter .chip.is-active, .sale__filter .chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--on-accent); box-shadow: none; }
.sale__filter .chip.is-active .chip__count, .sale__filter .chip[aria-pressed="true"] .chip__count { background: color-mix(in srgb, var(--on-accent) 22%, transparent); color: var(--on-accent); }
.sale__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-top: 4px; }
.sale__rail { --rail-item: 236px; min-width: 0; }
.sale__item { display: grid; padding: 8px 8px 12px; border-radius: 20px; background: var(--surface); }
@media (max-width: 639.98px) { .sale__foot .rail-nav { display: none; } .sale__seal { width: 76px; height: 76px; outline-offset: -6px; } .sale__seal strong { font-size: var(--fs-xl); } }
@media (min-width: 1024px) {
  .sale__panel { grid-template-columns: 290px minmax(0, 1fr); gap: 28px; }
  .sale__head { height: 100%; }
  .sale__foot { margin-top: auto; }
}

/* بی اسلاید: هیروی ساده */
.hero-plain { padding-block: clamp(48px, 9vw, 112px); background: var(--bg-soft); text-align: center; }
.hero-plain__inner { display: grid; justify-items: center; gap: 16px; }
.hero-plain h1 { font-size: var(--fs-3xl); line-height: 1.3; }
.hero-plain p { color: var(--fg-muted); max-width: 52ch; }

/* ============================ ۵. استوری‌ها ============================
   ردیف باریک دایره‌ها؛ حلقه = دوخت خط‌چین رز (کوک)، که در hover آرام می‌چرخد. دیده‌شده = کوک خاکستری. */
.stories { padding-block: clamp(28px, 3.4vw, 44px) 0; }
.stories__inner { position: relative; }
/* .stories پیشوند است تا بر ul[class] { padding: 0 } پایه غلبه کند */
.stories .stories__rail { display: flex; justify-content: safe center; gap: clamp(12px, 2vw, 28px); margin: 0; padding: 8px 4px 6px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; list-style: none; }
.stories__rail::-webkit-scrollbar { display: none; }
.stories__rail > li { flex: none; scroll-snap-align: start; }
.story { --story-size: clamp(62px, 6vw, 76px); display: grid; justify-items: center; gap: 6px; width: calc(var(--story-size) + 18px); padding: 0; border: 0; background: none; color: var(--fg); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.story__ring { position: relative; display: grid; place-items: center; width: var(--story-size); height: var(--story-size); padding: 4px; border-radius: 50%; }
.story__ring::before { content: ""; position: absolute; inset: 0; border: 1.5px dashed var(--accent); border-radius: 50%; transition: transform var(--dur-4) var(--ease); }
.story__ring img { width: 100%; height: 100%; border-radius: 50%; background: var(--bg-soft); object-fit: cover; transition: transform var(--dur-3) var(--ease); }
.story__label { display: -webkit-box; max-width: 100%; overflow: hidden; font-size: var(--fs-2xs); font-weight: 600; line-height: 1.6; text-align: center; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.story:hover .story__ring::before, .story:focus-visible .story__ring::before { transform: rotate(40deg); }
.story:hover .story__ring img, .story:focus-visible .story__ring img { transform: scale(.95); }
.story:focus-visible { outline: none; }
.story:focus-visible .story__ring { outline: 2px solid var(--focus); outline-offset: 2px; }
.story.is-seen .story__ring::before { border-color: var(--line-strong); }
.story.is-seen .story__label { color: var(--fg-muted); }
.story.is-opening .story__ring::before { transform: rotate(180deg); transition-duration: .8s; }
.stories__nav { position: absolute; top: calc(8px + clamp(62px, 6vw, 76px) / 2); z-index: 2; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--bg); box-shadow: var(--sh-2), inset 0 0 0 1px var(--line); color: var(--fg); cursor: pointer; transform: translateY(-50%); transition: opacity var(--dur-2); }
.stories__nav:disabled { opacity: 0; pointer-events: none; }
.stories__nav .icon { width: 18px; height: 18px; }
.stories__nav--prev { inset-inline-start: max(4px, calc(var(--gutter) - 16px)); }
.stories__nav--next { inset-inline-end: max(4px, calc(var(--gutter) - 16px)); }
@media (hover: none) and (pointer: coarse) { .stories__nav { display: none; } }

/* ---------- نمایشگر استوری ---------- */
.story-viewer {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  overflow: hidden;
}
.story-viewer::backdrop { background: rgba(36, 38, 43, .86); backdrop-filter: blur(14px); }
.story-viewer[open] { display: grid; place-items: center; animation: rz-story-in .35s var(--ease) both; }
@keyframes rz-story-in { from { opacity: 0; transform: scale(.96); } }
.story-viewer__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  height: 100%;
  padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
}
.story-viewer__card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 420px, calc((100dvh - 24px) * 9 / 16));
  aspect-ratio: 9 / 16;
  max-height: 100%;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: #24262B;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.story-viewer__bars {
  position: absolute;
  inset-inline: 12px;
  top: 10px;
  z-index: 3;
  display: flex;
  gap: 4px;
}
.story-viewer__bar { flex: 1; height: 3px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, .32); }
.story-viewer__bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #fff;
  transform: scaleX(0);
  transform-origin: right center;
}
[dir="ltr"] .story-viewer__bar > i { transform-origin: left center; }
.story-viewer__bar.is-done > i { transform: scaleX(1); }
/* پیشرفت اسلاید فعال را stories.js با transform درون‌خطی پر می‌کند */

.story-viewer__head {
  position: absolute;
  inset-inline: 0;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 12px 28px;
  background: linear-gradient(to bottom, rgba(36, 38, 43, .62), transparent);
}
.story-viewer__avatar { width: 36px; height: 36px; border: 2px solid #fff; border-radius: 50%; object-fit: cover; }
.story-viewer__who { display: grid; flex: 1; min-width: 0; line-height: 1.5; }
.story-viewer__who strong { overflow: hidden; color: #fff; font-size: var(--fs-sm); white-space: nowrap; text-overflow: ellipsis; }
.story-viewer__who span { color: rgba(255, 255, 255, .75); font-size: var(--fs-2xs); }
.story-viewer__btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background var(--dur-2);
}
.story-viewer__btn:hover { background: rgba(255, 255, 255, .16); }
.story-viewer__btn:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.story-viewer__pause { position: relative; width: 12px; height: 14px; border-inline: 4px solid #fff; }
.story-viewer.is-paused .story-viewer__pause {
  width: 0;
  height: 0;
  border-inline: 0;
  border-block: 7px solid transparent;
  border-left: 12px solid #fff;
}

.story-viewer__media { position: relative; flex: 1; overflow: hidden; }
.story-viewer__backdrop {
  position: absolute;
  inset: -40px;
  width: calc(100% + 80px);
  max-width: none;
  height: calc(100% + 80px);
  object-fit: cover;
  filter: blur(28px) saturate(1.3) brightness(.7);
}
.story-viewer__img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity .25s var(--ease);
}
.story-viewer.is-loading .story-viewer__img { opacity: 0; }
.story-viewer__spinner {
  position: absolute;
  inset: 0;
  width: 38px;
  height: 38px;
  margin: auto;
  border: 3px solid rgba(255, 255, 255, .25);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
  animation: rz-story-spinner .8s linear infinite;
  transition: opacity .2s;
}
.story-viewer.is-loading .story-viewer__spinner { opacity: 1; }
@keyframes rz-story-spinner { to { transform: rotate(360deg); } }

.story-viewer__foot {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 48px 16px 18px;
  background: linear-gradient(to top, rgba(36, 38, 43, .78), transparent);
  pointer-events: none;
}
.story-viewer__foot:not(:has(:not([hidden]))) { display: none; }
.story-viewer__caption {
  margin: 0;
  color: #fff;
  font-size: var(--fs-sm);
  line-height: 1.9;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .4);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-viewer__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--r-pill);
  background: #fff;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5);
  color: var(--on-white-ink);
  font-size: var(--fs-sm);
  font-weight: 700;
  pointer-events: auto;
  transition: transform var(--dur-2) var(--ease-spring), gap var(--dur-2) var(--ease);
}
.story-viewer__cta:hover { gap: 12px; transform: translateY(-2px); color: var(--primary); }

.story-viewer__step {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  cursor: pointer;
  transition: background var(--dur-2), opacity var(--dur-2);
}
.story-viewer__step:hover { background: rgba(255, 255, 255, .26); }
.story-viewer__step:disabled { opacity: .25; cursor: default; }
@media (max-width: 640px) {
  .story-viewer__stage { padding: 0; }
  .story-viewer__step { display: none; }
  .story-viewer__card { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
  .story-viewer__bars { top: max(10px, env(safe-area-inset-top, 0px)); }
  .story-viewer__head { padding-top: max(24px, calc(env(safe-area-inset-top, 0px) + 14px)); }
}
@media (prefers-reduced-motion: reduce) {
  .story-viewer[open] { animation: none; }
}

/* ============================ بخش‌های پایین: رندر تنبل ============================
   content-visibility: auto رسم بخش‌های زیر دید را تا نزدیک شدن عقب می‌اندازد (عکس‌های تنبل درونشان هم دیرتر
   بار می‌شوند). ارتفاع تقریبی برای این‌که نوار پیمایش نپرد؛ auto اندازه‌ی واقعی را پس از اولین رسم نگه می‌دارد. */
.cv { content-visibility: auto; contain-intrinsic-size: auto 720px; }
.doors, .stories { content-visibility: auto; contain-intrinsic-size: auto 520px; }
.stories { contain-intrinsic-size: auto 150px; }

/* ریل کارت‌های خانه: موبایل ≈ ۲٫۲ کارت در دید (قطعه‌ای از سومی = نشانه‌ی پیمایش) */
.picks .rail, .sale__rail { --rail-item: 248px; }
@media (max-width: 639.98px) {
  .picks .rail, .sale__rail { grid-auto-columns: calc((100% - 24px) / 2.2); gap: 12px; }
}

/* ============================ ۶. تازه‌ترین / پرفروش‌ترین ============================ */
.picks .section-head { margin-bottom: clamp(18px, 2.6vw, 32px); }
.js .picks__nojs { display: none; }
.picks__nojs { margin: 20px 0 8px; font-size: var(--fs-lg); }

/* ============================ ۷. دو بنر فصلی ============================
   کارت ته‌رنگ خط؛ عکس ۴:۵ در قاب طاقی که ۴۰px از لبه‌ی بالای کارت بیرون می‌زند و از چوب‌لباسی آویزان است. */
.banners { padding-block: clamp(28px, 3.6vw, 52px); }
.banners__grid { display: grid; gap: clamp(16px, 2.4vw, 32px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); margin: 0; padding: 0; list-style: none; }
.banners__grid--one { max-width: 760px; margin-inline: auto; }
.banner { --arch: 40px; --pt: clamp(22px, 2.6vw, 30px); position: relative; display: grid; grid-template-columns: minmax(0, 1fr) clamp(118px, 36%, 230px); align-items: end; gap: clamp(14px, 2.4vw, 28px); margin-top: var(--arch); padding: clamp(20px, 2.8vw, 32px); padding-top: var(--pt); border-radius: var(--r-xl); background: var(--tint); }
.banner__text { display: grid; justify-items: start; align-content: center; gap: 6px; align-self: center; min-width: 0; }
.banner__title { font-size: var(--fs-2xl); line-height: 1.45; }
.banner__title a::after { content: ""; position: absolute; inset: calc(-1 * var(--arch)) 0 0; z-index: 2; border-radius: var(--r-xl); }
.banner__lead { color: var(--fg-muted); font-size: var(--fs-sm); line-height: 1.9; }
.banner__go { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--tone); font-size: var(--fs-sm); font-weight: 750; }
.banner__go .icon { transition: transform var(--dur-2) var(--ease); }
.banner__media { position: relative; display: grid; justify-items: center; align-content: start; align-self: stretch; margin-top: calc(-1 * (var(--arch) + var(--pt))); }
.banner__hanger { position: relative; z-index: 1; width: 40px; height: 20px; margin-bottom: -3px; background: var(--tone); }
.banner__arch { display: block; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 999px 999px var(--r) var(--r); background: var(--bg-soft); box-shadow: 0 0 0 5px var(--bg), var(--sh-2); transition: transform var(--dur-3) var(--ease); }
.banner__arch img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-4) var(--ease); }
.banner:hover .banner__arch { transform: translateY(-6px) rotate(-1.2deg); }
.banner:hover .banner__arch img { transform: scale(1.04); }
.banner:hover .banner__go .icon { transform: translateX(-4px); }
[dir="ltr"] .banner:hover .banner__go .icon { transform: translateX(4px); }
.banner__arch { transform-origin: 50% 0; }
@media (max-width: 479.98px) {
  .banner { --pt: 18px; grid-template-columns: minmax(0, 1fr) 40%; padding: 18px; }
  .banner__title { font-size: var(--fs-xl); }
  .banner__lead { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
}

/* ============================ ۸. نوار اعتماد و بسته‌بندی ============================ */
.trust__panel { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(20px, 4vw, 56px); padding: clamp(12px, 1.6vw, 18px); padding-inline-end: clamp(20px, 4vw, 56px); border-radius: var(--r-2xl); background: var(--bg-soft); }
.trust__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-xl); background: var(--bg-tint); }
.trust__media img { width: 100%; height: 100%; object-fit: cover; }
.trust__seal { position: absolute; bottom: 14px; inset-inline-start: 14px; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--surface-glass); color: var(--accent); box-shadow: var(--sh-1); }
.trust__body { display: grid; justify-items: start; gap: 8px; padding-block: 12px; }
.trust__body h2 { font-size: var(--fs-2xl); }
.trust__body h2::after { content: ""; display: block; width: 48px; height: 8px; margin-top: 12px; background: var(--accent); -webkit-mask: var(--zz-mask); mask: var(--zz-mask); }
.trust__text { max-width: 46ch; color: var(--fg-muted); line-height: 2; }
.trust .trust__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; width: 100%; margin: 12px 0 0; padding: 0; list-style: none; }
.trust__list li { display: flex; align-items: center; gap: 12px; min-width: 0; }
.trust__icon { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); color: var(--brand); box-shadow: inset 0 0 0 1px var(--line); }
.trust__icon .icon { width: 22px; height: 22px; }
.trust__item { display: grid; min-width: 0; font-size: var(--fs-sm); line-height: 1.6; }
.trust__item strong { font-weight: 700; }
.trust__item small { color: var(--fg-muted); font-size: var(--fs-2xs); }
/* بی بلوک بسته‌بندی: یک نوار ۴ تایی */
.trust--strip .trust__panel { grid-template-columns: minmax(0, 1fr); padding: clamp(18px, 2.6vw, 28px) clamp(18px, 3vw, 40px); }
.trust--strip .trust__body { padding: 0; }
.trust--strip .trust__list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); margin: 0; }
@media (max-width: 767.98px) {
  .trust__panel { grid-template-columns: minmax(0, 1fr); padding: 10px 10px 20px; }
  .trust__body { padding: 4px 10px 0; }
}
@media (max-width: 379.98px) { .trust .trust__list { grid-template-columns: minmax(0, 1fr); } }

/* ============================ ۹. مجله ============================ */
.posts { display: grid; gap: clamp(16px, 2.4vw, 28px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 767.98px) {
  /* موبایل: یک ردیف پیمایشی به جای سه کارت بلند پشت هم */
  .journal .posts { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
  .journal .posts::-webkit-scrollbar { display: none; }
  .journal .posts > * { scroll-snap-align: start; }
}
