/* ═══════════════════════════════════════════
   PARLA — Design System
   Mobile-first · RTL · Editorial fashion
═══════════════════════════════════════════ */

:root {
  --bg: #f6f3ef;
  --bg-elevated: #fffdf9;
  --ink: #1c1814;
  --ink-soft: #5c534a;
  --ink-mute: #9a9086;
  --line: rgba(28, 24, 20, 0.08);
  --sand: #c9a882;
  --sand-deep: #a8845c;
  --espresso: #2a221c;
  --blush: #c45c4a;
  --sale: #b83a2e;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 8px 28px rgba(28, 24, 20, 0.08);
  --shadow-lg: 0 18px 48px rgba(28, 24, 20, 0.14);
  --nav-h: 58px;
  --bottom-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Vazirmatn", system-ui, sans-serif;
  --font-display: "Syne", "Vazirmatn", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  direction: rtl;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  width: min(100% - 2rem, 480px);
  margin-inline: auto;
}

.container-wide {
  width: min(100%, 480px);
  margin-inline: auto;
}

/* ── Ambient background ── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 100% -10%, rgba(201, 168, 130, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at -10% 40%, rgba(196, 92, 74, 0.06), transparent 50%),
    linear-gradient(180deg, #faf7f3 0%, var(--bg) 40%, #efe9e1 100%);
}

/* ── Top Bar ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  background: rgba(246, 243, 239, 0.78);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line);
  width: min(100%, 480px);
  margin-inline: auto;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.topbar.scrolled {
  background: rgba(255, 253, 249, 0.92);
  box-shadow: 0 4px 20px rgba(28, 24, 20, 0.06);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sand);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(28, 24, 20, 0.06);
}

.logo-mark span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  color: var(--espresso);
}

.topbar__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.icon-btn:active {
  transform: scale(0.94);
  background: rgba(28, 24, 20, 0.06);
}

.icon-btn svg {
  width: 22px;
  height: 22px;
  stroke: var(--ink);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart-btn {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--sale);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

/* ── Stories ── */
.stories {
  padding: 1rem 0 0.4rem;
  animation: fadeUp 0.7s var(--ease) both;
}

.stories__track {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  padding: 0.25rem 1rem 0.75rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.stories__track::-webkit-scrollbar {
  display: none;
}

.story {
  flex: 0 0 auto;
  width: 68px;
  text-align: center;
  scroll-snap-align: start;
}

.story__ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--sand), #e8c9a0 40%, var(--blush) 100%);
  margin-inline: auto 0;
  transition: transform 0.35s var(--ease);
}

.story:active .story__ring {
  transform: scale(0.94);
}

.story.seen .story__ring {
  background: #d9d0c6;
}

.story__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2.5px solid var(--bg);
  background: var(--bg-elevated) center / cover no-repeat;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.story__avatar svg {
  width: 26px;
  height: 26px;
  stroke: var(--ink-soft);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.story__label {
  margin-top: 0.4rem;
  font-size: 0.68rem;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Section headers ── */
.section {
  padding: 1.5rem 0 0.5rem;
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 1rem 0.9rem;
}

.section__title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section__link {
  font-size: 0.8rem;
  color: var(--sand-deep);
  font-weight: 600;
}

/* ── Hero ── */
.hero {
  padding: 0.5rem 1rem 0;
  animation: fadeUp 0.8s var(--ease) 0.08s both;
}

.hero__frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #d9cfc4;
  isolation: isolate;
}

.hero__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  animation: kenBurns 18s ease-in-out infinite alternate;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 35%, rgba(20, 14, 10, 0.72) 100%),
    linear-gradient(90deg, rgba(20, 14, 10, 0.18), transparent 45%);
  pointer-events: none;
}

.hero__content {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 1.6rem 1.35rem 1.5rem;
  color: #fff;
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  opacity: 0.85;
  margin-bottom: 0.45rem;
  font-weight: 500;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 7vw, 2.15rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 12ch;
  margin-bottom: 0.55rem;
}

.hero__text {
  font-size: 0.88rem;
  opacity: 0.88;
  max-width: 28ch;
  margin-bottom: 1.1rem;
  line-height: 1.55;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 44px;
  padding: 0 1.25rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn:active {
  transform: scale(0.97);
}

.btn--light {
  background: #fff;
  color: var(--espresso);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.btn--dark {
  background: var(--espresso);
  color: #fff;
  width: 100%;
}

.btn--outline {
  background: transparent;
  border: 1px solid rgba(28, 24, 20, 0.18);
  color: var(--ink);
}

.btn--sand {
  background: var(--sand);
  color: var(--espresso);
}

/* ── Horizontal product rails ── */
.rail {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  padding: 0 1rem 0.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.rail::-webkit-scrollbar {
  display: none;
}

.product-card {
  flex: 0 0 auto;
  width: 158px;
  scroll-snap-align: start;
  animation: fadeUp 0.6s var(--ease) both;
}

.product-card:nth-child(2) { animation-delay: 0.06s; }
.product-card:nth-child(3) { animation-delay: 0.12s; }
.product-card:nth-child(4) { animation-delay: 0.18s; }

.product-card__media {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  background: #e8dfd4;
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.product-card:active .product-card__media img {
  transform: scale(1.04);
}

.badge {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 1;
  height: 24px;
  padding: 0 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.badge--sale {
  background: var(--sale);
  color: #fff;
}

.badge--new {
  background: var(--espresso);
  color: #fff;
}

.wish-btn {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.88);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  z-index: 1;
  transition: transform 0.2s var(--ease);
}

.wish-btn:active {
  transform: scale(0.9);
}

.wish-btn svg {
  width: 16px;
  height: 16px;
  stroke: var(--ink);
  fill: none;
  stroke-width: 1.7;
}

.wish-btn.active svg {
  fill: var(--sale);
  stroke: var(--sale);
}

.product-card__body {
  padding: 0.65rem 0.15rem 0;
}

.product-card__name {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__price {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.price {
  font-size: 0.88rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.price--old {
  font-size: 0.72rem;
  color: var(--ink-mute);
  text-decoration: line-through;
  font-weight: 500;
}

.price__currency {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-right: 0.15rem;
}

/* Grid products */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 0.75rem;
  padding: 0 1rem;
}

.product-grid .product-card {
  width: auto;
}

/* ── Categories ── */
.cat-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: 140px 140px;
  gap: 0.7rem;
  padding: 0 1rem;
}

.cat {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
}

.cat:first-child {
  grid-row: 1 / 3;
}

.cat img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.cat:active img {
  transform: scale(1.05);
}

.cat__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(18, 12, 8, 0.7) 100%);
}

.cat__label {
  position: absolute;
  inset-inline: 0.9rem;
  bottom: 0.85rem;
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
}

.cat__count {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.8;
  margin-top: 0.15rem;
}

/* ── Promo banner ── */
.banner {
  padding: 1.5rem 1rem 0.5rem;
}

.banner__frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--espresso);
}

.banner__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.banner__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem 1.35rem;
  color: #fff;
}

.banner__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  opacity: 0.8;
  margin-bottom: 0.35rem;
}

.banner__title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.85rem;
  max-width: 14ch;
}

.banner__cta {
  align-self: flex-start;
  height: 36px;
  padding: 0 1rem;
  border-radius: 999px;
  background: var(--sand);
  color: var(--espresso);
  font-size: 0.78rem;
  font-weight: 700;
}

/* ── Trends masonry-ish ── */
.trends {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  padding: 0 1rem 1.5rem;
}

.trend {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #e8dfd4;
}

.trend:nth-child(1),
.trend:nth-child(4) {
  aspect-ratio: 3 / 4;
}

.trend:nth-child(2),
.trend:nth-child(3) {
  aspect-ratio: 1 / 1;
}

.trend img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trend__meta {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 1.5rem 0.7rem 0.7rem;
  background: linear-gradient(transparent, rgba(16, 12, 8, 0.75));
  color: #fff;
}

.trend__tag {
  font-size: 0.68rem;
  opacity: 0.85;
  margin-bottom: 0.15rem;
}

.trend__name {
  font-size: 0.82rem;
  font-weight: 700;
}

/* ── Footer soft ── */
.site-footer {
  padding: 2rem 1rem 1.5rem;
  text-align: center;
  color: var(--ink-mute);
  font-size: 0.78rem;
}

.site-footer__brand {
  font-family: var(--font-display);
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

/* ── Bottom nav ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 100;
  height: calc(var(--bottom-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 253, 249, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
}

.bottom-nav__inner {
  width: min(100%, 480px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: var(--bottom-h);
}

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  font-size: 0.65rem;
  color: var(--ink-mute);
  font-weight: 500;
  transition: color 0.2s;
}

.bottom-nav__item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav__item.active {
  color: var(--espresso);
}

.bottom-nav__item.active svg {
  stroke-width: 2;
}

/* ═══════════════════════════════════════════
   PRODUCT PAGE
═══════════════════════════════════════════ */

.pdp-gallery {
  position: relative;
  width: min(100%, 480px);
  margin-inline: auto;
  background: #e8dfd4;
}

.pdp-gallery__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.pdp-gallery__track::-webkit-scrollbar {
  display: none;
}

.pdp-gallery__slide {
  flex: 0 0 100%;
  aspect-ratio: 3 / 4;
  scroll-snap-align: start;
}

.pdp-gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-gallery__dots {
  position: absolute;
  bottom: 1rem;
  inset-inline: 0;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}

.pdp-gallery__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transition: all 0.25s var(--ease);
}

.pdp-gallery__dot.active {
  width: 18px;
  border-radius: 999px;
  background: #fff;
}

.pdp-back {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.9);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.pdp-back svg {
  width: 20px;
  height: 20px;
  stroke: var(--ink);
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pdp-wish {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.9);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.pdp-wish svg {
  width: 18px;
  height: 18px;
  stroke: var(--ink);
  fill: none;
  stroke-width: 1.7;
}

.pdp-body {
  width: min(100%, 480px);
  margin-inline: auto;
  padding: 1.25rem 1rem 2rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin-top: -1.25rem;
  position: relative;
  z-index: 2;
  box-shadow: 0 -8px 30px rgba(28, 24, 20, 0.06);
}

.pdp-brand {
  font-size: 0.75rem;
  color: var(--sand-deep);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.pdp-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.65rem;
}

.pdp-pricing {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}

.pdp-pricing .price {
  font-size: 1.2rem;
}

.pdp-rating {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
}

.pdp-rating strong {
  color: var(--ink);
}

.pdp-block {
  margin-bottom: 1.35rem;
}

.pdp-block__label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
}

.pdp-block__hint {
  font-weight: 500;
  color: var(--ink-mute);
  font-size: 0.75rem;
}

.size-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.size-chip {
  min-width: 48px;
  height: 42px;
  padding: 0 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s var(--ease);
}

.size-chip.active {
  background: var(--espresso);
  color: #fff;
  border-color: var(--espresso);
}

.size-chip:disabled {
  opacity: 0.35;
  text-decoration: line-through;
}

.color-row {
  display: flex;
  gap: 0.55rem;
}

.color-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid transparent;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color 0.2s;
}

.color-dot.active {
  outline-color: var(--espresso);
}

.pdp-desc {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.75;
}

.pdp-meta {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.pdp-meta div {
  display: flex;
  justify-content: space-between;
}

.pdp-meta strong {
  color: var(--ink);
  font-weight: 600;
}

.pdp-cta-bar {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 100;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(255, 253, 249, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
}

.pdp-cta-bar__inner {
  width: min(100%, 480px);
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 0.6rem;
}

body.is-pdp {
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

body.is-pdp .bottom-nav {
  display: none;
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(var(--bottom-h) + 1rem + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 200;
  background: var(--espresso);
  color: #fff;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s var(--ease);
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

body.is-pdp .toast {
  bottom: calc(80px + env(safe-area-inset-bottom));
}

/* Story viewer modal */
.story-viewer {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #0e0b09;
  display: none;
  flex-direction: column;
  max-width: 480px;
  margin-inline: auto;
}

.story-viewer.open {
  display: flex;
  animation: fadeIn 0.25s var(--ease);
}

.story-viewer__progress {
  display: flex;
  gap: 4px;
  padding: 0.75rem 0.75rem 0;
}

.story-viewer__bar {
  flex: 1;
  height: 2.5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}

.story-viewer__bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: #fff;
}

.story-viewer__bar.active > i {
  animation: progressFill 4s linear forwards;
}

.story-viewer__bar.done > i {
  width: 100%;
}

.story-viewer__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem;
  color: #fff;
}

.story-viewer__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sand) center / cover;
}

.story-viewer__name {
  font-size: 0.85rem;
  font-weight: 600;
  flex: 1;
}

.story-viewer__close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}

.story-viewer__close svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.story-viewer__media {
  flex: 1;
  margin: 0.5rem 0.75rem 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: #1a1612 center / cover no-repeat;
}

.story-viewer__tap {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes kenBurns {
  from { transform: scale(1.02) translateY(0); }
  to { transform: scale(1.08) translateY(-1.5%); }
}

@keyframes progressFill {
  from { width: 0; }
  to { width: 100%; }
}

/* Desktop polish — keep mobile frame centered */
@media (min-width: 520px) {
  .topbar,
  .bottom-nav,
  .pdp-cta-bar,
  .story-viewer {
    box-shadow: 0 0 0 1px var(--line);
  }

  .hero__frame {
    aspect-ratio: 16 / 11;
  }

  .hero__title {
    max-width: 20ch;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
