/* v11: more motion + product page interactions */

/* ---------- reading progress line ---------- */
.scroll-progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 80; background: linear-gradient(90deg, #c9a46a, #8a6a3b); transform-origin: left center; transform: scaleX(0); pointer-events: none; }

/* ---------- header hides on scroll down, returns on scroll up ---------- */
.hdr.hdr--pill { transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.hdr.hdr--pill.is-hidden { transform: translateY(calc(-100% - 24px)); }

/* ---------- offer progress bar in the buy box ---------- */
.pi-offer { flex-wrap: wrap; }
.pi-offer > span:first-of-type { flex: 1; min-width: 0; }
.nudge-bar { flex-basis: 100%; height: 4px; border-radius: 4px; background: rgba(27, 23, 20, .1); overflow: hidden; margin-top: 10px; }
.nudge-bar i { display: block; height: 100%; width: var(--p, 0%); border-radius: 4px; background: linear-gradient(90deg, #c9a46a, #8a6a3b); transition: width 1.1s var(--ease-out); }

/* ---------- product page entrance ---------- */
@keyframes ozIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes ozZoomIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.pdp-v4 .pi > * { animation: ozIn .8s var(--ease-out) both; animation-delay: calc(var(--d, 0) * 60ms + 80ms); }
.pdp-v4 .gallery-item { animation: ozZoomIn 1s var(--ease-out) both; animation-delay: calc(var(--d, 0) * 90ms); }

/* ---------- "Added" confirmation on the main button ---------- */
.btn.is-added { background: #2f5a3a !important; border-color: #2f5a3a !important; color: #fff !important; }
.btn .added-tick { display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; }
.btn .added-tick path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: ozTick .45s .1s var(--ease-out) forwards; }
@keyframes ozTick { to { stroke-dashoffset: 0; } }

/* ---------- small delights ---------- */
@keyframes ozPop { 0% { transform: scale(1); } 40% { transform: scale(1.28); } 100% { transform: scale(1); } }
[data-wish].pop .icon, .review-helpful.pop { animation: ozPop .45s var(--ease-out); }
.journey-notes li, .pi-facts li, .fam-chip { transition: transform .25s var(--ease-out), box-shadow .25s, background .25s; }
.journey-notes li:hover, .pi-facts li:hover { transform: translateY(-2px); box-shadow: 0 6px 16px -10px rgba(27, 23, 20, .4); }
.fam-chip:hover { transform: translateY(-2px); }
.link-arrow .icon, .coll-cap .icon { transition: transform .3s var(--ease-out); }
.link-arrow:hover .icon { transform: translateX(5px); }
.pi-pair { transition: background .25s; border-radius: 12px; }
.pi-pair:hover { background: rgba(27, 23, 20, .03); }

/* accordion opens smoothly */
@keyframes ozAcc { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.accordion details[open] .acc-body { animation: ozAcc .4s var(--ease-out); }

/* reviews: rating bars grow, wear markers slide in */
.dist-bar span { transform: scaleX(0); transform-origin: left center; transition: transform 1.1s var(--ease-out); }
.dist.is-in .dist-bar span { transform: none; }
.dist.is-in .dist-row:nth-child(2) .dist-bar span { transition-delay: .08s; }
.dist.is-in .dist-row:nth-child(3) .dist-bar span { transition-delay: .16s; }
.dist.is-in .dist-row:nth-child(4) .dist-bar span { transition-delay: .24s; }
.dist.is-in .dist-row:nth-child(5) .dist-bar span { transition-delay: .32s; }
.wear-summary .wear-scale i { opacity: 0; transform: translate(-50%, -50%) scale(.3); transition: opacity .5s .3s, transform .7s .3s var(--ease-out); }
.wear-summary.is-in .wear-scale i { opacity: 1; transform: translate(-50%, -50%); }

/* cards and reviews appear one after another */
.stagger-in { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: calc(var(--d, 0) * 70ms); }
.stagger-in.is-in { opacity: 1; transform: none; }

/* sticky add-to-bag bar slides more softly */
.sticky-atc { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }

@media (prefers-reduced-motion: reduce) {
  .scroll-progress { display: none; }
  .hdr.hdr--pill.is-hidden { transform: none; }
  .pdp-v4 .pi > *, .pdp-v4 .gallery-item, .accordion details[open] .acc-body, [data-wish].pop .icon, .review-helpful.pop { animation: none !important; }
  .dist-bar span, .wear-summary .wear-scale i, .stagger-in, .nudge-bar i { transition: none !important; transform: none !important; opacity: 1 !important; }
}
