/* ============================================================
   MOON SMOOTH — premium polish layer (homepage + shop page only)
   Every rule is scoped under body.mas-smooth so no other page
   is affected. Remove the MOON-SMOOTH block from index.php /
   shop.php (and this file) to revert completely.
   ============================================================ */

/* --- Page entrance --- */
body.mas-smooth .hero > * { animation: masRise .7s cubic-bezier(.22,.61,.36,1) both; }
body.mas-smooth .hero > *:nth-child(2) { animation-delay: .09s; }
body.mas-smooth .hero > *:nth-child(3) { animation-delay: .18s; }
@keyframes masRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* --- Reveal on scroll (JS adds .mas-in) --- */
body.mas-smooth .card,
body.mas-smooth .cat-card,
body.mas-smooth .section-head,
body.mas-smooth .form-card {
  opacity: 0; transform: translateY(22px);
}
body.mas-smooth .card.mas-in,
body.mas-smooth .cat-card.mas-in,
body.mas-smooth .section-head.mas-in,
body.mas-smooth .form-card.mas-in {
  opacity: 1; transform: none;
  transition: opacity .55s ease, transform .55s cubic-bezier(.22,.61,.36,1), box-shadow .3s ease, border-color .3s ease;
}

/* --- Cards: gentle lift + glow on hover --- */
body.mas-smooth .card {
  transition: opacity .55s ease, transform .55s cubic-bezier(.22,.61,.36,1), box-shadow .3s ease, border-color .3s ease;
  will-change: transform;
}
@media (hover:hover) and (pointer:fine) {
  body.mas-smooth .card.mas-in:hover,
  body.mas-smooth a.cat-card.mas-in:hover {
    transform: translateY(-5px);
    border-color: rgba(22,163,74,.55);
    box-shadow: 0 22px 46px rgba(0,0,0,.52), 0 0 0 1px rgba(22,163,74,.14);
  }
  body.mas-smooth .card .thumb img { transition: opacity .6s ease, transform .6s cubic-bezier(.22,.61,.36,1); }
  body.mas-smooth .card:hover .thumb img.mas-loaded { transform: scale(1.08); }
}

/* --- Thumb shimmer while the photo loads, then a soft fade-in --- */
body.mas-smooth .card .thumb { background: #0d1310; }
body.mas-smooth .card .thumb::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(105deg, rgba(255,255,255,0) 35%, rgba(255,255,255,.06) 50%, rgba(255,255,255,0) 65%);
  background-size: 220% 100%; animation: masShimmer 1.4s linear infinite;
  transition: opacity .4s ease;
}
body.mas-smooth .card .thumb.mas-done::before { opacity: 0; animation: none; }
@keyframes masShimmer { from { background-position: 130% 0; } to { background-position: -90% 0; } }
body.mas-smooth .card .thumb img { opacity: 0; }
body.mas-smooth .card .thumb img.mas-loaded { opacity: 1; }

/* --- Header: deeper glass on smooth pages --- */
body.mas-smooth .nav {
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 12px 34px rgba(0,0,0,.14);
}
body.mas-smooth .nav.scrolled {
  background: rgba(5,8,7,.97);
  box-shadow: 0 18px 44px rgba(0,0,0,.14);
}

/* --- Buttons & interactive bits: soft press + glow --- */
body.mas-smooth .btn { transition: transform .18s ease, box-shadow .25s ease, filter .25s ease, background .25s ease, border-color .25s ease; }
body.mas-smooth .btn:active { transform: scale(.965); }
body.mas-smooth .card:active { transform: scale(.982); }
body.mas-smooth a.cat-card:active { transform: scale(.982); }
@media (hover:hover) {
  body.mas-smooth .btn-primary:hover { filter: brightness(1.09); box-shadow: 0 10px 28px rgba(22,163,74,.5); }
}
body.mas-smooth a, body.mas-smooth button { -webkit-tap-highlight-color: transparent; }
body.mas-smooth input, body.mas-smooth select, body.mas-smooth textarea { transition: border-color .25s ease, box-shadow .25s ease; }
body.mas-smooth input:focus, body.mas-smooth select:focus, body.mas-smooth textarea:focus {
  border-color: rgba(22,163,74,.65); box-shadow: 0 0 0 4px rgba(22,163,74,.16); outline: none;
}
body.mas-smooth .pagination a, body.mas-smooth .page-link { transition: transform .2s ease, background .25s ease, border-color .25s ease; }
@media (hover:hover) {
  body.mas-smooth .pagination a:hover, body.mas-smooth .page-link:hover { transform: translateY(-2px); }
}

/* --- Respect users who prefer less motion --- */
@media (prefers-reduced-motion: reduce) {
  body.mas-smooth .hero > * { animation: none; }
  body.mas-smooth .card, body.mas-smooth .cat-card, body.mas-smooth .section-head, body.mas-smooth .form-card { opacity: 1; transform: none; transition: none; }
  body.mas-smooth .card .thumb::before { animation: none; }
  body.mas-smooth .card .thumb img { opacity: 1; transition: none; }
}

/* --- v3 site-wide extras --- */
body.mas-smooth .product-gallery, body.mas-smooth .product-info { animation: masRise .6s cubic-bezier(.22,.61,.36,1) both; }
body.mas-smooth .thumb-strip img { transition: border-color .25s ease, transform .25s ease, opacity .25s ease; }
body.mas-smooth ::selection { background: rgba(22,163,74,.55); color: #fff; }
body.mas-smooth { scrollbar-color: #2a3a30 #0a0f0c; scrollbar-width: thin; }
body.mas-smooth::-webkit-scrollbar { width: 10px; }
body.mas-smooth::-webkit-scrollbar-track { background: #0a0f0c; }
body.mas-smooth::-webkit-scrollbar-thumb { background: #2a3a30; border-radius: 8px; border: 2px solid #0a0f0c; }
body.mas-smooth::-webkit-scrollbar-thumb:hover { background: #16a34a; }
body.mas-smooth .nav a { transition: color .25s ease, opacity .25s ease; }
