/* 렌티큘러 카드 — 펼쳐진 상품 카드의 앞면(.cfront) 위에 B 그림을 세로 렌즈 줄로 겹친다.
   줄마다 B의 같은 세로 조각을 담고, 기울기에 따라 줄의 불투명도만 바꾼다(opacity·transform만 움직인다). */
.lenti-on .cardwrap{position:relative;touch-action:pan-y;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;cursor:grab}
.lenti-on .cardwrap.lenti-drag{cursor:grabbing}
.lenti-on .cfront{will-change:transform}

/* 렌즈 층은 앞면과 같은 둥근 모서리로 자른다 — overflow만으로는 3D 회전 중 합성된 줄이 모서리 밖으로 비치는 기기가 있어
   clip-path(둥근 inset)를 함께 건다. 반경 --lr은 스크립트가 앞면에서 읽어 넣는다. */
.lenti{position:absolute;inset:0;border-radius:var(--lr,6px);overflow:hidden;pointer-events:none;opacity:0;transition:opacity .25s ease-out;contain:strict;
  isolation:isolate;-webkit-clip-path:inset(0 round var(--lr,6px));clip-path:inset(0 round var(--lr,6px))}
.lenti.ready{opacity:1}
.lenti-s{position:absolute;top:0;height:100%;background-repeat:no-repeat;opacity:0}

/* 렌즈 결 — 아주 옅은 세로 줄무늬 */
.lenti-ridge{position:absolute;inset:0;mix-blend-mode:overlay;opacity:.24;
  background:repeating-linear-gradient(90deg,rgba(255,255,255,.22) 0 1px,rgba(255,255,255,0) 1px calc(var(--lsw,4px)*.45),rgba(0,0,0,.32) calc(var(--lsw,4px) - 1px) var(--lsw,4px))}

/* 결 반짝임 — 렌즈 줄마다 가는 빛 선, 느리게 흐르는 빛 띠 안에서만 보인다(줄은 제자리, 빛만 지나간다) */
.lenti-sheen{position:absolute;inset:0;mix-blend-mode:screen;opacity:.6;
  background:repeating-linear-gradient(90deg,rgba(255,244,220,.5) 0 1px,rgba(255,255,255,0) 1px var(--lsw,4px));
  -webkit-mask-image:linear-gradient(100deg,transparent 40%,#000 50%,transparent 60%);mask-image:linear-gradient(100deg,transparent 40%,#000 50%,transparent 60%);
  -webkit-mask-size:300% 100%;mask-size:300% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  animation:lenti-sheen 7s linear infinite}
/* 데모: 결 반짝임은 회전 반사 띠를 따라간다(스크립트가 마스크 자리를 옮긴다) — 은은하게 */
.lenti-sheen.follow{animation:none;opacity:.32}
/* 반사 띠 — 기울기와 따로 7초마다 카드를 가로지른다(5.6초 지나가고 1.4초 쉼). 밝기만 기울기로 바뀐다(스크립트) */
.lenti-glare{position:absolute;top:-10%;bottom:-10%;left:-100%;width:300%;mix-blend-mode:screen;opacity:.5;will-change:transform;
  background:linear-gradient(100deg,rgba(255,255,255,0) 40%,rgba(255,236,190,.34) 48%,rgba(255,255,255,.1) 52%,rgba(255,255,255,0) 60%);
  animation:lenti-sweep 7s linear infinite}
/* 데모 반사 띠(data-lenti-preset="demo") — 기울기 t를 따라 옮겨 간다(스크립트가 transform만 바꾼다) */
.lenti-glare2{position:absolute;top:-10%;bottom:-10%;left:-10%;width:312%;mix-blend-mode:screen;opacity:.36;will-change:transform;
  background:linear-gradient(100deg,rgba(255,255,255,0) 38%,rgba(255,236,190,.30) 47%,rgba(255,255,255,.08) 52%,rgba(255,255,255,0) 62%)}
@keyframes lenti-sweep{0%{transform:translate3d(-28.4%,0,0)}80%,100%{transform:translate3d(28.4%,0,0)}}
@keyframes lenti-sheen{0%{-webkit-mask-position:92.5% 0;mask-position:92.5% 0}80%,100%{-webkit-mask-position:7.5% 0;mask-position:7.5% 0}}

/* 처음 펼칠 때 한 번 보이는 안내 */
.lenti-hint{position:absolute;left:50%;bottom:-14px;z-index:3;transform:translate(-50%,4px);white-space:nowrap;pointer-events:none;
  font:600 12px/1 var(--f-body,system-ui,sans-serif);letter-spacing:-.01em;color:#2a1d05;
  background:linear-gradient(180deg,var(--gold-2,#f6dfa2),var(--gold,#e9c46a));border-radius:999px;padding:7px 12px;
  box-shadow:0 4px 14px rgba(0,0,0,.35);opacity:0;transition:opacity .35s ease-out,transform .35s ease-out}
.lenti-hint.show{opacity:1;transform:translate(-50%,0)}

/* 동작 줄이기 설정 — 기본은 효과를 숨긴다. <html data-lenti-motion>이면 설정과 관계없이 다른 사람과 같게:
   렌티큘러를 그대로 두고, 화면 스타일이 끈 카드 뒤집기 애니메이션도 되살린다. */
@media (prefers-reduced-motion:reduce){
  :root:not([data-lenti-motion]) .lenti,:root:not([data-lenti-motion]) .lenti-hint{display:none}
  :root[data-lenti-motion] .prod[open] .cardwrap{animation:cin .25s cubic-bezier(.2,.75,.2,1) both}
  :root[data-lenti-motion] .prod[open] .cardart{animation:cflip 1.1s linear both,clift .7s .4s ease-in-out both}
  :root[data-lenti-motion] .prod[open] .cfront{animation:cglow .45s .78s ease-out both}
  /* 상품 페이지 큰 카드(.c3d — 화면에 들어올 때 .on)도 같게 */
  :root[data-lenti-motion].js .c3d:not(.on) .cardart{transform:rotateY(180deg)}
  :root[data-lenti-motion] .c3d.on .cardwrap{animation:cin .25s cubic-bezier(.2,.75,.2,1) both}
  :root[data-lenti-motion] .c3d.on .cardart{animation:cflip 1.1s linear both,clift .7s .4s ease-in-out both}
  :root[data-lenti-motion] .c3d.on .cfront{animation:cglow .45s .78s ease-out both}
}

/* <html data-lenti-noflash> — 펼칠 때 앞면 바깥 빛이 번쩍이는 애니메이션을 끈다(은은한 상시 빛은 그대로) */
:root[data-lenti-noflash] .prod[open] .cfront,:root[data-lenti-noflash] .c3d.on .cfront{animation:none}

/* <html data-lenti-flip> + 렌티큘러가 붙은 카드 — 뒤집기 회전은 스크립트가 돌린다(들림 clift만 CSS로 남긴다) */
:root[data-lenti-flip] .lenti-jsflip.prod[open] .cardart,:root[data-lenti-flip] .lenti-jsflip.c3d.on .cardart{animation:clift .7s .4s ease-in-out both}

/* 카드 바깥 빛 색 — 첫 화면 상품 카드와 상품 페이지 큰 카드(lenti-pd.js가 .lenti-glow를 단다)가 같이 쓰는 한 곳.
   빛 모양(퍼짐·세기)은 v5.css .cface의 box-shadow(0 0 40px -6px var(--c)), 펼칠 때 번쩍임은 위 data-lenti-noflash로 끈다. */
.prod .cardart,.lenti-glow .cardart{--c:#5A8FD0}
