/* Korrto 2026: «С чем носить» (bx/js/looks.js, 19.10.2026, по образцу Lamoda): пилюля на фото, слой образов (на телефоне шторка),
   быстрый просмотр вещи, панель «Собрать образ целиком». Подключается только в карточке товара с образами (includes/looks.php). */
html.lk-lock { overflow: hidden; }
.lk-type { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.lk-type em { font-style: normal; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: #fff; letter-spacing: 0; text-transform: none; }
.lk-meta { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.lk-sw { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--c); border: 1px solid var(--line-strong); vertical-align: -1px; margin-right: 6px; }
.lk-nophoto { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 100%; background: var(--mist); font-size: 11px; color: var(--ink-3); text-align: center; }
.lk-nophoto > span { width: 26px; height: 26px; border-radius: 50%; background: var(--c); border: 1px solid var(--line-strong); }

/* Пилюля на главном фото */
.lk-pill { position: absolute; left: 16px; top: 16px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px 0 14px; border-radius: 999px; background: #fff; color: var(--ink); font-size: 15px; font-weight: 520; box-shadow: 0 10px 28px -12px rgba(0,0,0,.45); transition: transform .2s var(--ease), background-color .2s, color .2s; }
.lk-pill:hover { background: var(--ink); color: #fff; }
.lk-pill:active { transform: scale(.97); }
.lk-x { position: absolute; top: 16px; right: 16px; z-index: 3; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--mist); color: var(--ink); transition: background-color .2s, color .2s; }
.lk-x:hover { background: var(--ink); color: #fff; }
.lk-x svg { width: 20px; height: 20px; }

/* Слой образов */
.lk-ov { position: fixed; inset: 0; z-index: 300; }
.lk-ov[hidden], .lk-qv[hidden] { display: none !important; }
.lk-ov__bg, .lk-qv__bg { position: absolute; inset: 0; background: rgba(15,15,15,.55); }
.lk-ov__box { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; background: #fff; display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; padding: 36px max(var(--gut), calc((100% - var(--wrap)) / 2 + var(--gut))) 64px; animation: lkIn .3s var(--ease); }
.lk-ov__box:focus, .lk-qv__box:focus { outline: none; }
@keyframes lkIn { from { opacity: 0; } }
.lk-ov__cur { position: sticky; top: 0; }
.lk-ov__title { font-size: clamp(40px, 4vw, 56px); }
.lk-ov__curline { display: flex; justify-content: space-between; gap: 16px; margin: 14px 0 18px; font-size: 14.5px; }
.lk-ov__curline span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-ov__curline b { flex: none; font-size: 15px; }
.lk-ov__curimg { aspect-ratio: 3 / 4; background: var(--stone); overflow: hidden; }
.lk-ov__curimg img, .lk-ov__curimg .lk-nophoto { width: 100%; height: 100%; object-fit: cover; }
.lk-ov__looks { padding-top: 6px; padding-right: 56px; }
.lk-ov__tabs { display: none; }
.lk-look + .lk-look { margin-top: 44px; }
.lk-look__t { display: flex; gap: 8px; align-items: baseline; margin: 0 0 16px; font-size: 18px; font-weight: 560; color: var(--ink-3); }
.lk-look__t span { font-size: 14px; font-weight: 400; }
.lk-look__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.lk-c { position: relative; min-width: 0; }
.lk-c__open { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; color: inherit; }
.lk-c__img { display: block; width: 100%; aspect-ratio: 3 / 4; margin-bottom: 8px; background: var(--stone); overflow: hidden; }
.lk-c__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.lk-c__open:hover img { transform: scale(1.04); }
.lk-c__price { font-size: 16px; font-weight: 640; }
.lk-c__type { font-size: 14px; }
.lk-c__meta { font-size: 12px; color: var(--ink-3); }
.lk-c__fav { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.9); }
.lk-c__fav svg { width: 18px; height: 18px; stroke-width: 1.7; }
[data-lk-fav][aria-pressed="true"] svg { fill: var(--red); stroke: var(--red); }
.lk-look__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 16px 0 0; font-size: 13.5px; color: var(--ink-3); }

/* Быстрый просмотр и «Собрать образ» */
.lk-qv { position: fixed; inset: 0; z-index: 320; display: grid; place-items: center; padding: 24px; }
.lk-qv__box { position: relative; width: min(860px, 100%); max-height: calc(100svh - 48px); overflow-y: auto; overscroll-behavior: contain; background: #fff; animation: lkPop .28s var(--ease); }
@keyframes lkPop { from { opacity: 0; transform: translateY(14px); } }
.lk-qv__grid { display: grid; grid-template-columns: 1fr 1fr; }
.lk-qv__img { aspect-ratio: 3 / 4; background: var(--stone); }
.lk-qv__img img, .lk-qv__img .lk-nophoto { width: 100%; height: 100%; object-fit: cover; }
.lk-qv__info { display: flex; flex-direction: column; gap: 12px; padding: 40px 32px 28px; }
.lk-qv__name { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 560; padding-right: 24px; }
.lk-qv__opt { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; font-size: 13.5px; color: var(--ink-2); }
.lk-sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.lk-sizes button { min-width: 48px; height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 10px; font-size: 14px; color: var(--ink); transition: background-color .15s, color .15s, border-color .15s; }
.lk-sizes button.is-order { border-style: dashed; color: var(--ink-2); }
.lk-sizes button:hover { border-color: var(--ink); }
.lk-sizes button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); border-style: solid; color: #fff; }
.lk-sizes.is-err button { border-color: var(--red); }
.lk-sizes--sm button { min-width: 42px; height: 34px; font-size: 13px; border-radius: 8px; }
.lk-qv__act { display: flex; gap: 8px; margin-top: 8px; }
.lk-qv__add { flex: 1; justify-content: center; }
.lk-qv__add[disabled], .lk-set__foot .btn[disabled] { opacity: .5; pointer-events: none; }
.lk-qv__err { min-height: 18px; margin: 0; font-size: 13px; color: var(--red); }
.lk-qv__more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.lk-qv__more svg { width: 16px; height: 16px; }

.lk-set { padding: 32px 32px 20px; }
.lk-set__t { margin: 0 48px 8px 0; font-size: clamp(32px, 4vw, 44px); }
.lk-set__sub { margin: 0 0 18px; font-size: 14px; color: var(--ink-2); }
.lk-set__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.lk-set__row { display: grid; grid-template-columns: 24px 72px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); transition: opacity .2s; }
.lk-set__row.is-off { opacity: .45; }
.lk-set__chk { padding-top: 28px; }
.lk-set__chk input { width: 18px; height: 18px; accent-color: var(--ink); }
.lk-set__img { display: block; aspect-ratio: 3 / 4; background: var(--stone); overflow: hidden; }
.lk-set__img img, .lk-set__img .lk-nophoto { width: 100%; height: 100%; object-fit: cover; font-size: 0; }
.lk-set__info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lk-set__name { margin: 0; font-size: 14.5px; line-height: 1.35; font-weight: 520; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lk-set__info .lk-meta b { color: var(--ink); font-weight: 600; }
.lk-set__info .lk-sizes { margin-top: 4px; }
.lk-set__foot { position: sticky; bottom: -20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 -32px; padding: 16px 32px 20px; background: #fff; border-top: 1px solid var(--line); }
.lk-set__foot p { margin: 0 0 2px; font-size: 13px; color: var(--ink-3); }
.lk-set__foot .lk-qv__err { min-height: 0; margin: 4px 0 0; color: var(--red); }

@media (max-width: 1100px) { .lk-look__row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .lk-pill { left: auto; top: auto; right: 0; bottom: 18px; height: 42px; border-radius: 999px 0 0 999px; padding-right: 16px; font-size: 14.5px; }
  /* Шторка снизу */
  .lk-ov__box { inset: auto 0 0 0; max-height: 92svh; display: block; padding: 20px 0 28px; border-radius: 18px 18px 0 0; animation: lkUp .32s var(--ease); }
  @keyframes lkUp { from { transform: translateY(40%); opacity: .4; } }
  .lk-x { top: 12px; right: 12px; width: 38px; height: 38px; background: transparent; }
  .lk-ov__cur { position: static; display: grid; grid-template-columns: minmax(0, 1fr) 42%; grid-template-rows: auto 1fr; column-gap: 12px; padding: 0 var(--gut); }
  .lk-ov__title { grid-column: 1; font-size: 40px; margin-top: 8px; }
  .lk-ov__curline { grid-column: 1; grid-row: 2; align-self: end; flex-direction: column; gap: 6px; margin: 0 0 14px; }
  .lk-ov__curline span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
  .lk-ov__curimg { grid-column: 2; grid-row: 1 / 3; margin-top: 40px; }
  .lk-ov__looks { padding: 0; }
  .lk-ov__tabs { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; margin: 18px 0 16px; padding: 0 var(--gut); border-bottom: 1px solid var(--line); }
  .lk-ov__tabs::-webkit-scrollbar { display: none; }
  .lk-ov__tabs button { flex: none; height: 42px; font-size: 17px; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
  .lk-ov__tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--ink); }
  .lk-look.is-off { display: none; }
  .lk-look + .lk-look { margin-top: 0; }
  .lk-look__t { display: none; }
  .lk-look__row { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 42%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 0 var(--gut); scroll-padding-left: var(--gut); }
  .lk-look__row::-webkit-scrollbar { display: none; }
  .lk-c { scroll-snap-align: start; }
  .lk-look__foot { padding: 0 var(--gut); }
  .lk-look__set { width: 100%; justify-content: center; }
  /* Быстрый просмотр и сборка — тоже шторка */
  .lk-qv { place-items: end stretch; padding: 0; }
  .lk-qv__box { width: 100%; max-height: 92svh; border-radius: 18px 18px 0 0; animation: lkUp .32s var(--ease); }
  .lk-qv__grid { grid-template-columns: 1fr; }
  .lk-qv__img { aspect-ratio: auto; height: 44svh; }
  .lk-qv__info { padding: 18px var(--gut) 24px; gap: 10px; }
  .lk-qv__name { font-size: 18px; }
  .lk-qv .lk-x { background: #fff; }
  .lk-set { padding: 24px var(--gut) 16px; }
  .lk-set__row { grid-template-columns: 22px 60px minmax(0, 1fr); gap: 10px; }
  .lk-set__chk { padding-top: 22px; }
  .lk-set__foot { margin: 0 calc(var(--gut) * -1); padding: 14px var(--gut) 18px; bottom: -16px; }
}
