/* لوک‌بوکِ عمقی، اندازه‌ها از مرجعِ Maison Vell (واحدِ u = 1/1600 عرضِ صفحه، زیرِ ۸۲۰ پیکسل یک پیکسل).
   آینه‌ای برای راست‌به‌چپ: ستونِ محصول چپ، صف به راست دور می‌شود. Michroma فقط برای برچسب‌های لاتین. */
@font-face {
  font-family: Michroma;
  src: url(/static/fonts/Michroma-latin.woff2) format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF;
}

.pg-lookbook {
  --u: min(calc(100vw / 1600), calc(100svh / 900));
  --lb-ink: #252321;
  --lb-mid: #6E675E;
  --lb-rail: #EFE9DF;
  height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.pg-lookbook main { flex: 1; min-height: 0; }
.pg-lookbook .top { position: relative; }
.wide { font-family: Michroma, Vazirmatn, sans-serif; text-transform: uppercase; }

.lb-page { height: 100%; display: grid; grid-template-rows: auto 1fr; }
.lb-nav {
  display: flex; justify-content: center; gap: calc(52 * var(--u));
  padding: calc(12 * var(--u)) 16px calc(14 * var(--u));
  font-size: max(13px, calc(14 * var(--u))); color: var(--lb-mid); background: #fff;
}
.lb-nav a { transition: color .2s; padding: 4px 2px; }
.lb-nav a:hover, .lb-nav .is-on { color: var(--lb-ink); }
.lb-nav .is-on { box-shadow: inset 0 -1.5px 0 currentColor; }

.lb { grid-row: 2; position: relative; display: grid; grid-template-columns: 1fr calc(372 * var(--u)); min-height: 0; }

.lb-stage {
  position: relative; overflow: hidden; min-width: 0;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: none; outline: none;
  background:
    linear-gradient(transparent 60%, rgb(255 255 255 / .72) 100%),
    linear-gradient(270deg, #F3EEE6 0%, #EAE3D8 38%, #F0EAE1 62%, #F8F5F0 100%);
}
.lb-stage:focus-visible { box-shadow: inset 0 0 0 3px var(--sky); }
.lb-line { position: absolute; inset: 0; }
.lb-m { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform, filter; }
.lb-m img { position: relative; display: block; width: 100%; height: 100%; pointer-events: none; -webkit-user-drag: none; }
.lb-m::before {
  content: ""; position: absolute; left: 8%; right: 8%; bottom: -1.6%; height: 3.6%; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(80 68 58 / .24), transparent);
}

.lb-intro { position: absolute; z-index: 120; inset-inline-start: calc(46 * var(--u)); top: calc(36 * var(--u)); width: calc(390 * var(--u)); pointer-events: none; }
.lb-season { margin: 0; font-size: calc(13 * var(--u)); letter-spacing: .16em; color: var(--lb-ink); text-align: right; }
.lb-intro h1 { margin-top: calc(10 * var(--u)); font-size: calc(40 * var(--u)); font-weight: 300; line-height: 1.2; color: var(--lb-ink); }
.lb-lead { margin-top: calc(14 * var(--u)); font-size: calc(15 * var(--u)); line-height: 1.9; color: var(--lb-mid); }

.lb-tag { position: absolute; z-index: 120; inset-inline-start: calc(46 * var(--u)); bottom: calc(44 * var(--u)); display: flex; flex-direction: column; align-items: flex-end; }
.lb-look { display: flex; gap: .5em; font-size: calc(29 * var(--u)); line-height: calc(38 * var(--u)); letter-spacing: .14em; color: var(--lb-ink); pointer-events: none; }
.lb-win { height: calc(38 * var(--u)); overflow: hidden; }
.lb-roll { display: block; will-change: transform; }
.lb-roll b { display: block; height: calc(38 * var(--u)); font-weight: 400; }
.lb-shop {
  margin-top: calc(13 * var(--u)); padding: 0 0 calc(4 * var(--u)); border: 0; border-bottom: 1px solid currentColor; background: none;
  font-size: max(13px, calc(14 * var(--u))); font-weight: 700; color: var(--lb-ink); cursor: pointer;
}
.lb-shop:hover { color: var(--brand); }
.lb-note { position: absolute; z-index: 120; inset-inline-end: 14px; bottom: 10px; margin: 0; font-size: 11px; color: var(--lb-mid); pointer-events: none; }

/* راهنمای کوتاه تا اولین کشیدن */
.lb-stage::after {
  content: "بکشید تا لوک بعدی بیاید"; position: absolute; z-index: 120; left: 50%; bottom: calc(18 * var(--u) + 6px); transform: translateX(-50%);
  padding: 6px 14px; border-radius: 99px; background: rgb(255 255 255 / .8); color: var(--lb-mid); font-size: 12px; white-space: nowrap;
  pointer-events: none; transition: opacity .5s; animation: lb-nudge 2.4s ease-in-out 1.2s 2;
}
.lb.touched .lb-stage::after { opacity: 0; }
@keyframes lb-nudge { 0%, 100% { translate: 0 0; } 40% { translate: -14px 0; } }

.lb-ring {
  position: absolute; z-index: 130; left: 0; top: 0; width: calc(46 * var(--u)); height: calc(46 * var(--u));
  margin: calc(-23 * var(--u)) 0 0 calc(-23 * var(--u)); border: calc(2.5 * var(--u)) solid var(--lb-ink); border-radius: 99px;
  pointer-events: none; opacity: 0;
  transition: width .22s var(--ease), height .22s var(--ease), margin .22s var(--ease), opacity .2s;
}
.lb-ring.show { opacity: 1; }
.lb-ring.drag { width: calc(84 * var(--u)); height: calc(34 * var(--u)); margin: calc(-17 * var(--u)) 0 0 calc(-42 * var(--u)); }

/* ── ستونِ محصول ── */
.lb-rail { position: relative; overflow: hidden; background: var(--lb-rail); min-height: 0; }
.lb-card {
  position: absolute; inset-inline-start: 0; top: 0; width: 100%; display: flex; flex-direction: column;
  padding: calc(18 * var(--u)) calc(24 * var(--u)); will-change: transform; background: var(--lb-rail);
}
.lb-card.alt { background: #fff; }
.lb-code {
  position: absolute; z-index: 1; inset-inline-start: calc(22 * var(--u)); top: calc(18 * var(--u));
  font-size: max(11px, calc(11 * var(--u))); font-weight: 700; color: var(--lb-mid); background: rgb(255 255 255 / .7); padding: 1px 8px; border-radius: 99px;
}
.lb-shot { flex: 1; min-height: 0; display: block; }
.lb-shot img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; -webkit-user-drag: none; }
.lb-meta { display: grid; grid-template-columns: 1fr auto; align-items: end; column-gap: 8px; margin-top: calc(8 * var(--u)); }
.lb-meta h3 { font-weight: 700; font-size: max(12px, calc(13 * var(--u))); line-height: 1.5; color: var(--lb-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-meta span { display: block; grid-column: 1; margin-top: calc(3 * var(--u)); font-size: max(12px, calc(12.5 * var(--u))); color: var(--lb-mid); }
.lb-add {
  grid-column: 2; grid-row: 1 / 3; width: max(40px, calc(36 * var(--u))); height: max(40px, calc(36 * var(--u)));
  position: relative; border: 0; border-radius: 50%; background: none; cursor: pointer; transition: transform .2s var(--ease), background .2s;
}
.lb-add::before, .lb-add::after { content: ""; position: absolute; left: 50%; top: 50%; width: 15px; height: 1.5px; margin: -.75px 0 0 -7.5px; background: var(--lb-ink); }
.lb-add::after { transform: rotate(90deg); }
.lb-add:hover { transform: rotate(90deg); background: rgb(255 255 255 / .9); }
.lb-soon { grid-column: 2; grid-row: 1 / 3; align-self: end; font-size: 11px !important; color: var(--lb-mid); }

.lb-wait { position: fixed; inset: 0; z-index: 150; background: #F3EEE6; transition: opacity .5s; pointer-events: none; }
.lb-wait.gone { opacity: 0; }

/* ── کشوی سایز ── */
.lb-sheet-bg { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; background: rgb(37 35 33 / .42); animation: lb-fade .2s; }
.lb-sheet {
  width: min(520px, 100%); max-height: 86svh; overflow: auto; background: #fff; border-radius: 22px 22px 0 0;
  padding: 16px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); animation: lb-up .32s var(--ease);
}
@media (min-width: 821px) { .lb-sheet-bg { align-items: center; } .lb-sheet { border-radius: 22px; } }
.sh-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.sh-head h2 { font-size: 1.05rem; }
.sh-x { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: none; }
.sh-x:hover { background: var(--brand-50); }
.sh-item { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sh-item img { width: 64px; height: 80px; object-fit: contain; background: var(--brand-50); border-radius: 10px; mix-blend-mode: multiply; }
.sh-item b { display: block; line-height: 1.5; }
.sh-item span { display: block; font-size: .85rem; color: var(--muted); }
.sh-sizes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sz { min-height: 44px; min-width: 56px; padding: 0 14px; border: 2px solid var(--line-2); border-radius: 12px; background: #fff; font-weight: 800; }
.sz:hover:not(:disabled) { border-color: var(--brand2); }
.sz[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }
.sz:disabled { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.sh-soon { margin-top: 8px; font-size: .85rem; color: var(--amber-ink); }
.sh-msg { margin-top: 10px; font-size: .85rem; color: var(--muted); }
.sh-done { display: flex; gap: 12px; align-items: center; padding: 14px 0 16px; }
.sh-done > .ic { width: 40px; height: 40px; padding: 8px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.sh-done b { display: block; font-size: 1.05rem; }
.sh-done span { display: block; font-size: .85rem; color: var(--muted); }
.sh-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
@keyframes lb-fade { from { opacity: 0; } }
@keyframes lb-up { from { transform: translateY(40px); opacity: 0; } }

/* ── گوشی ── */
@media (max-width: 820px) {
  .pg-lookbook { --u: 1px; }
  .lb-nav { display: none; }
  .lb { grid-template-columns: 1fr; grid-template-rows: 1fr 190px; }
  .lb-stage, .lb-m { cursor: auto; }
  .lb-ring { display: none; }
  .lb-intro { inset-inline-start: 16px; top: 16px; width: calc(100% - 32px); }
  .lb-season { font-size: 10px; }
  .lb-intro h1 { font-size: 22px; margin-top: 4px; }
  .lb-lead { display: none; }
  .lb-tag { inset-inline-start: 16px; bottom: 16px; }
  .lb-look { font-size: 22px; line-height: 30px; }
  .lb-win, .lb-roll b { height: 30px; }
  .lb-card { width: 160px; height: 100%; padding: 10px 12px; }
  .lb-code { inset-inline-start: 10px; top: 8px; }
  .lb-stage::after { bottom: 22px; left: 16px; transform: none; }
  .lb-note { top: 84px; bottom: auto; inset-inline-start: 16px; inset-inline-end: auto; max-width: 52%; text-align: start; line-height: 1.6; }
}

@media (prefers-reduced-motion: reduce) {
  .lb-sheet, .lb-sheet-bg, .lb-stage::after { animation: none; }
}
