/* ==========================================================================
   Animations: page entrance, scroll reveals, hover effects
   ========================================================================== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes lineUp { from { opacity: 0; transform: translateY(70%); clip-path: inset(0 0 100% 0); } to { opacity: 1; transform: none; clip-path: inset(-30% -10% -30% -10%); } }
@keyframes popIn { 0% { opacity: 0; transform: scale(.2) rotate(-25deg); } 70% { opacity: 1; transform: scale(1.15) rotate(6deg); } 100% { opacity: 1; transform: none; } }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(90px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes bump { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.6); } }
@keyframes shine { from { left: -80%; } to { left: 130%; } }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(28, 28, 28, .35); } 100% { box-shadow: 0 0 0 16px rgba(28, 28, 28, 0); } }

body { animation: pageIn .5s ease backwards; }

/* --- Scroll reveal (elements are only hidden when JS is running) --- */
.js [data-reveal] {
  opacity: 0;
  transition: opacity .8s cubic-bezier(.2, .65, .3, 1), transform .9s cubic-bezier(.2, .65, .3, 1), clip-path 1.1s cubic-bezier(.2, .65, .3, 1);
  transition-delay: var(--d, 0s);
}
.js [data-reveal="up"] { transform: translateY(50px); }
.js [data-reveal="down"] { transform: translateY(-40px); }
.js [data-reveal="left"] { transform: translateX(-60px); }
.js [data-reveal="right"] { transform: translateX(60px); }
.js [data-reveal="zoom"] { transform: scale(.88); }
.js [data-reveal="curtain"] { opacity: 1; clip-path: inset(0 0 100% 0); transform: translateY(30px); }
.js [data-reveal="draw"] { opacity: 1; transform: scaleX(0); transform-origin: left; }
.js [data-reveal].is-in { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }

/* --- Hero entrance --- */
.js .hero h1 .ln { animation: lineUp 1s cubic-bezier(.2, .65, .3, 1) backwards; }
.js .hero h1 .ln:nth-child(1) { animation-delay: .15s; }
.js .hero h1 .ln:nth-child(2) { animation-delay: .3s; }
.js .hero h1 .ln:nth-child(3) { animation-delay: .45s; }
.js .hero h1 .pic { animation: popIn .7s cubic-bezier(.3, 1.4, .5, 1) backwards; }
.js .hero h1 .ln:nth-child(1) .pic { animation-delay: .85s; }
.js .hero h1 .ln:nth-child(2) .pic:nth-of-type(1) { animation-delay: 1s; }
.js .hero h1 .ln:nth-child(2) .pic:nth-of-type(2) { animation-delay: 1.15s; }
.hero h1 .pic img { transition: transform .4s cubic-bezier(.3, 1.4, .5, 1); }
.hero h1 .pic:hover img { transform: scale(1.3) rotate(10deg); }
.js .hero hr { transform-origin: left; animation: growX 1.1s .7s cubic-bezier(.7, 0, .2, 1) backwards; }
.js .hero p { animation: fadeUp .9s .9s backwards; }
.js .hero .btn { animation: fadeUp .9s 1.05s backwards; }
.js .hero-img img { animation: slideInRight 1.2s .2s cubic-bezier(.2, .65, .3, 1) backwards; }
.hero-img { will-change: transform; }

/* --- Buttons: light sweep + lift --- */
.btn, .button { position: relative; overflow: hidden; transition: opacity .2s, background .25s, transform .25s, box-shadow .25s; }
.btn::after, .button::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -80%; width: 50%; transform: skewX(-25deg); pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
}
.btn:hover::after, .button:hover::after { animation: shine .75s ease; }
.btn:hover { opacity: 1; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0, 0, 0, .18); }
.btn-light:hover, .btn-outline:hover { box-shadow: none; }
.btn:active { transform: translateY(0); }
.privileges .btn-lg { animation: pulseRing 2.2s 1s infinite; }

/* --- Category tiles --- */
.offer { transition: transform .45s cubic-bezier(.2, .65, .3, 1), box-shadow .45s; }
.offer:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0, 0, 0, .18); }
.offer h3 { transition: transform .45s cubic-bezier(.2, .65, .3, 1), letter-spacing .45s; }
.offer:hover h3 { transform: translateY(-8px) scale(1.06); letter-spacing: 1px; }

/* --- Brands marquee --- */
.brands ul.marquee {
  overflow: hidden; display: block; min-width: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.brands ul.marquee .track { display: flex; align-items: center; gap: 90px; padding-right: 90px; width: max-content; animation: marquee 24s linear infinite; }
.brands ul.marquee:hover .track { animation-play-state: paused; }
.brands img { transition: transform .3s, opacity .3s, filter .3s; }
.brands img:hover { transform: scale(1.12); filter: none; opacity: 1; }

/* --- Privileges --- */
.privileges .head img { animation: float 3s ease-in-out infinite; }
.perks li { transition: transform .3s; }
.perks li:hover { transform: translateX(6px); }
.perks li img { transition: transform .7s cubic-bezier(.3, 1.4, .5, 1); }
.perks li:hover img { transform: rotate(180deg) scale(1.15); }
.cta-mini img { animation: wobble 2.5s ease-in-out infinite; }
.arch img { transition: transform .8s; }
.arch:hover img { transform: scale(1.03); }

/* --- Product cards --- */
.product-card { transition: transform .4s cubic-bezier(.2, .65, .3, 1); }
.product-card:hover { transform: translateY(-6px); }
.product-card .thumb { transition: box-shadow .4s; }
.product-card:hover .thumb { box-shadow: 0 18px 36px rgba(0, 0, 0, .12); }
.product-card:hover .thumb a > img:first-child { transform: scale(1.05); }
.product-card .dot { transition: transform .2s; }
.product-card .dot:hover { transform: scale(1.5); }
.wish.added .icon { animation: bump .45s; }

/* --- Header, badges, misc --- */
.badge.bump { animation: bump .45s ease; }
.site-header { transition: transform .35s ease, box-shadow .3s; }
.site-header.hidden-up { transform: translateY(-100%); }
.gallery4 img:hover { transform: scale(1.04) rotate(-1deg); }
.gallery4 img, .about-hero img { transition: transform .8s cubic-bezier(.2, .65, .3, 1); }
.why-grid .item img { transition: transform .7s cubic-bezier(.3, 1.4, .5, 1); }
.why-grid .item:hover img { transform: rotate(-20deg) scale(1.15); }
.mini-cart-item, .search-results a { animation: fadeUp .45s backwards; }
.mini-cart-item:nth-child(2), .search-results a:nth-child(2) { animation-delay: .06s; }
.mini-cart-item:nth-child(3), .search-results a:nth-child(3) { animation-delay: .12s; }
.mini-cart-item:nth-child(4), .search-results a:nth-child(4) { animation-delay: .18s; }
.search-results a:nth-child(5) { animation-delay: .24s; }
.search-results a:nth-child(6) { animation-delay: .3s; }
.drawer .mobile-menu li { opacity: 0; transform: translateX(-20px); transition: .35s; }
.drawer.open .mobile-menu li { opacity: 1; transform: none; }
.drawer.open .mobile-menu li:nth-child(2) { transition-delay: .05s; }
.drawer.open .mobile-menu li:nth-child(3) { transition-delay: .1s; }
.drawer.open .mobile-menu li:nth-child(4) { transition-delay: .15s; }
.drawer.open .mobile-menu li:nth-child(5) { transition-delay: .2s; }
.drawer.open .mobile-menu li:nth-child(6) { transition-delay: .25s; }
.drawer.open .mobile-menu li:nth-child(7) { transition-delay: .3s; }
.toast { transition: opacity .3s, transform .45s cubic-bezier(.3, 1.4, .5, 1); }
.tab-panel.active, .notice { animation: fadeUp .5s backwards; }

/* Respect visitors who ask their device for less motion */
/* (gentle fades stay; movement, loops and zooms are switched off) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { transform: none !important; clip-path: none !important; }
  .js [data-reveal="curtain"], .js [data-reveal="draw"] { opacity: 0; }
  .js [data-reveal].is-in { opacity: 1; }
  .js .hero h1 .ln, .js .hero h1 .pic, .js .hero hr, .js .hero p, .js .hero .btn, .js .hero-img img { animation-name: pageIn; }
  .privileges .head img, .cta-mini img, .privileges .btn-lg, .hero h1 .star { animation: none; }
  .btn:hover::after, .button:hover::after { animation: none; }
}
