/* ===== NextWear premium site styles & animations ===== */

/* Prevent accidental horizontal scroll on mobile */
html, body { max-width: 100%; overflow-x: hidden; }

/* Keyframes */
@keyframes nwFadeUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes nwFadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes nwSlideL { from { opacity:0; transform:translateX(-28px); } to { opacity:1; transform:translateX(0); } }
@keyframes nwSlideR { from { opacity:0; transform:translateX(28px); } to { opacity:1; transform:translateX(0); } }
@keyframes nwPop { 0% { opacity:0; transform:scale(.6);} 70% { transform:scale(1.12);} 100% { opacity:1; transform:scale(1);} }
@keyframes nwZoomKen { from { transform:scale(1);} to { transform:scale(1.08);} }
@keyframes nwFloat { 0%,100% { transform:translateY(0);} 50% { transform:translateY(-6px);} }
@keyframes nwShine { 0% { background-position:-150% 0;} 100% { background-position:250% 0;} }

/* Entrance helpers */
.nw-fade      { animation: nwFadeUp .7s cubic-bezier(.16,1,.3,1) both; }
.nw-fade-in   { animation: nwFadeIn .8s ease both; }
.nw-slide-l   { animation: nwSlideL .8s cubic-bezier(.16,1,.3,1) both; }
.nw-slide-r   { animation: nwSlideR .8s cubic-bezier(.16,1,.3,1) both; }
.nw-pop       { animation: nwPop .6s cubic-bezier(.34,1.56,.64,1) both; }

/* Scroll-reveal: hidden until .is-visible added by observer */
.nw-reveal { opacity:0; transform:translateY(24px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.nw-reveal.is-visible { opacity:1; transform:translateY(0); }

/* Staggered children delays */
.nw-stagger > * { opacity:0; transform:translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.nw-stagger.is-visible > * { opacity:1; transform:translateY(0); }
.nw-stagger.is-visible > *:nth-child(1){ transition-delay:.05s;}
.nw-stagger.is-visible > *:nth-child(2){ transition-delay:.12s;}
.nw-stagger.is-visible > *:nth-child(3){ transition-delay:.19s;}
.nw-stagger.is-visible > *:nth-child(4){ transition-delay:.26s;}
.nw-stagger.is-visible > *:nth-child(5){ transition-delay:.33s;}
.nw-stagger.is-visible > *:nth-child(6){ transition-delay:.40s;}
.nw-stagger.is-visible > *:nth-child(7){ transition-delay:.47s;}
.nw-stagger.is-visible > *:nth-child(8){ transition-delay:.54s;}

/* Product card premium hover */
.nw-card { transition: transform .4s cubic-bezier(.16,1,.3,1); }
.nw-card:hover { transform:translateY(-4px); }
.nw-card .nw-card-img { transition: transform .7s cubic-bezier(.16,1,.3,1); }
.nw-card:hover .nw-card-img { transform:scale(1.06); }
.nw-card .nw-quickadd { opacity:0; transform:translateY(8px); transition: opacity .3s ease, transform .3s ease; }
.nw-card:hover .nw-quickadd { opacity:1; transform:translateY(0); }

/* Ken-burns for hero banner image */
.nw-ken { animation: nwZoomKen 8s ease-out both; }

/* Shine sweep (used on buttons / badges) */
.nw-shine { position:relative; overflow:hidden; }
.nw-shine::after {
  content:""; position:absolute; inset:0;
  background:linear-gradient(100deg, transparent 20%, rgba(255,255,255,.35) 50%, transparent 80%);
  background-size:200% 100%; animation: nwShine 3.5s ease-in-out infinite;
}

/* Category tile */
.nw-tile { position:relative; overflow:hidden; }
.nw-tile img { transition: transform .8s cubic-bezier(.16,1,.3,1); }
.nw-tile:hover img { transform:scale(1.08); }
.nw-tile .nw-tile-overlay { transition: background .4s ease; }
.nw-tile:hover .nw-tile-overlay { background:rgba(17,17,17,.35); }

/* Buttons: lift + press */
.nw-btn { transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease; }
.nw-btn:hover { transform:translateY(-2px); box-shadow:0 8px 20px -8px rgba(110,30,58,.5); }
.nw-btn:active { transform:translateY(0) scale(.99); }

/* line clamp helpers */
.nw-clamp-1 { display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
.nw-clamp-2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

/* Marquee (announcement / features strip) */
.nw-marquee { display:flex; gap:3rem; white-space:nowrap; animation: nwMarquee 22s linear infinite; }
@keyframes nwMarquee { from { transform:translateX(0);} to { transform:translateX(-50%);} }

@media (prefers-reduced-motion: reduce) {
  .nw-fade,.nw-fade-in,.nw-slide-l,.nw-slide-r,.nw-pop,.nw-ken,.nw-marquee { animation:none !important; opacity:1 !important; transform:none !important; }
  .nw-reveal,.nw-stagger>* { opacity:1 !important; transform:none !important; }
  .nw-shine::after { animation:none !important; }
}

/* Collection tiles — keeps white text legible on a photo even with the dark fade turned off */
.nw-tile-text { text-shadow: 0 1px 14px rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.45); }
.nw-tile-text span { text-shadow: none; }

/* Collection tiles — a slow, gentle fade from the bottom.
   Many stops on an ease-like curve, so there's no visible "edge" where the dark stops. */
.nw-tile-fade {
  background: linear-gradient(
    to top,
    rgba(17, 17, 17, 0.72) 0%,
    rgba(17, 17, 17, 0.62) 10%,
    rgba(17, 17, 17, 0.48) 20%,
    rgba(17, 17, 17, 0.34) 31%,
    rgba(17, 17, 17, 0.22) 42%,
    rgba(17, 17, 17, 0.13) 53%,
    rgba(17, 17, 17, 0.07) 64%,
    rgba(17, 17, 17, 0.03) 76%,
    rgba(17, 17, 17, 0.01) 88%,
    rgba(17, 17, 17, 0) 100%
  );
}

/* Collection description (rich text from the admin) — shown below the products */
.coll-desc h2, .coll-desc h3 { font-family: "Bodoni Moda", serif; color: #111; margin: 1.4em 0 .5em; line-height: 1.25; }
.coll-desc h2 { font-size: 1.5rem; }
.coll-desc h3 { font-size: 1.15rem; }
.coll-desc h2:first-child, .coll-desc h3:first-child { margin-top: 0; }
.coll-desc p { margin-bottom: 1em; }
.coll-desc p:last-child { margin-bottom: 0; }
.coll-desc strong { color: #111; font-weight: 600; }
.coll-desc ul, .coll-desc ol { margin: 0 0 1em 1.1em; }
.coll-desc ul { list-style: disc; }
.coll-desc ol { list-style: decimal; }
.coll-desc li { margin-bottom: .35em; }
.coll-desc a { color: var(--pine); text-decoration: underline; }
