/* ============================================================
   PREMIUM ANIMATIONS & INTERACTIONS
============================================================ */

/* --- Scroll reveal --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .65s cubic-bezier(.22,1,.36,1), transform .65s cubic-bezier(.22,1,.36,1);
}
[data-reveal="left"]  { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="scale"] { transform: scale(.92); }
[data-reveal].visible {
  opacity: 1;
  transform: none;
}
[data-reveal][data-delay="1"] { transition-delay: .1s; }
[data-reveal][data-delay="2"] { transition-delay: .2s; }
[data-reveal][data-delay="3"] { transition-delay: .3s; }
[data-reveal][data-delay="4"] { transition-delay: .4s; }
[data-reveal][data-delay="5"] { transition-delay: .5s; }

/* --- Hero particles --- */
.hero__particles {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.particle {
  position: absolute;
  width: 4px; height: 4px;
  background: rgba(255,255,255,.18);
  border-radius: 50%;
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: .4; }
  100% { transform: translateY(-400px) translateX(40px) scale(0); opacity: 0; }
}

/* --- Hero title word reveal --- */
.hero__title .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(24px);
  animation: wordIn .7s cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes wordIn {
  to { opacity: 1; transform: none; }
}

/* --- Counting numbers animation --- */
.stat strong { transition: color .3s; }

/* --- Header scroll effect --- */
.header { transition: box-shadow .3s, background .3s; }
.header.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,.12); }

/* --- Product card enhanced hover --- */
.product-card {
  transition: box-shadow .28s ease, transform .28s ease, border-color .28s ease;
}
.product-card:hover {
  box-shadow: 0 16px 48px rgba(44,74,44,.15);
  transform: translateY(-4px);
  border-color: #c8ddc8;
}
.product-card__img { transition: background .3s; }
.product-card:hover .product-card__img { background: #f0f5f0; }

/* --- Urn hover animation --- */
.product-card svg { transition: transform .4s cubic-bezier(.34,1.56,.64,1); }
.product-card:hover svg { transform: translateY(-6px) scale(1.04); }

/* --- Material card hover --- */
.material-card {
  transition: box-shadow .25s, transform .25s;
}
.material-card:hover {
  box-shadow: 0 12px 36px rgba(44,74,44,.12);
  transform: translateY(-3px);
}
.material-card__swatch { transition: height .3s; }
.material-card:hover .material-card__swatch { height: 14px; }

/* --- Delivery card hover --- */
.delivery__card {
  transition: box-shadow .25s, transform .25s, border-color .25s;
}
.delivery__card:hover {
  box-shadow: 0 8px 24px rgba(44,74,44,.1);
  transform: translateY(-3px);
  border-color: #c8ddc8;
}
.delivery__card svg { transition: transform .4s cubic-bezier(.34,1.56,.64,1); }
.delivery__card:hover svg { transform: scale(1.12); }

/* --- Feature strip items --- */
.feature-item { transition: transform .25s; }
.feature-item:hover { transform: translateY(-4px); }
.feature-item svg { transition: transform .4s cubic-bezier(.34,1.56,.64,1); }
.feature-item:hover svg { transform: scale(1.15) rotate(-5deg); }

/* --- Project card hover --- */
.project-card {
  transition: box-shadow .25s, transform .25s;
}
.project-card:hover {
  box-shadow: 0 12px 36px rgba(0,0,0,.1);
  transform: translateY(-4px);
}
.project-card__img { transition: background .3s; overflow: hidden; }
.project-card:hover .project-card__img { background: linear-gradient(135deg, #b8d0b8, #90b890); }

/* --- Buttons pulse on hover --- */
.btn--primary {
  position: relative;
  overflow: hidden;
}
.btn--primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.12);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.btn--primary:hover::after { transform: scaleX(1); }

/* --- Nav link underline animation --- */
.nav__link {
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 12px; right: 12px;
  height: 2px;
  background: #2c4a2c;
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform .2s ease;
}
.nav__link:hover::after,
.nav__link.active::after { transform: scaleX(1); }

/* --- Logo hover --- */
.logo { transition: opacity .2s; }
.logo:hover { opacity: .85; }

/* --- Sidebar category hover --- */
.category-list__item {
  transition: background .15s, padding-left .15s;
}
.category-list__item:hover { padding-left: 16px; }
.category-list__item.active { padding-left: 10px; }

/* --- Checkbox animation --- */
.checkbox input[type=checkbox] {
  transition: transform .15s;
}
.checkbox:hover input[type=checkbox] { transform: scale(1.15); }

/* --- Page btn ripple --- */
.page-btn { transition: all .18s cubic-bezier(.34,1.56,.64,1); }
.page-btn:hover:not(.dots) { transform: scale(1.1); }

/* --- Swatch pop --- */
.swatch { transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s; }
.swatch:hover { transform: scale(1.2); }
.swatch.active { transform: scale(1.15); }

/* --- About stats counter --- */
.stat strong {
  display: block;
  font-variant-numeric: tabular-nums;
}

/* --- Footer links --- */
.footer__col a {
  transition: color .2s, padding-left .2s;
  display: block;
}
.footer__col a:hover { padding-left: 6px; }

/* --- Hero scroll indicator --- */
.hero__scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.5);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  animation: scrollBounce 2s ease-in-out infinite;
  z-index: 2;
}
.hero__scroll svg { width: 20px; height: 20px; }
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* --- Breadcrumb animate in --- */
.breadcrumb { animation: fadeSlideIn .4s ease; }
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: none; }
}

/* --- Loading skeleton shimmer for product grid --- */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Modal animate in --- */
.modal__box { animation: modalIn .28s cubic-bezier(.34,1.56,.64,1); }
@keyframes modalIn {
  from { transform: scale(.92) translateY(16px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* --- Toast slide up --- */
.toast {
  transition: opacity .3s, transform .3s;
  transform: translateY(12px);
}
.toast.show { transform: translateY(0); }

/* --- Product card appear stagger --- */
.product-card {
  animation: cardAppear .4s ease both;
}
@keyframes cardAppear {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* --- Similar cards hover --- */
.similar-card { transition: box-shadow .2s, transform .2s; }
.similar-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.1); transform: translateY(-2px); }

/* --- Form input focus glow --- */
.form-input {
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.form-input:focus {
  box-shadow: 0 0 0 3px rgba(44,74,44,.12);
}

/* --- Scroll progress bar --- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(to right, #2c4a2c, #6aaa6a);
  z-index: 9999;
  transition: width .1s linear;
  border-radius: 0 2px 2px 0;
}

/* --- Back to top button --- */
.back-to-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 46px; height: 46px;
  background: #2c4a2c;
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(44,74,44,.4);
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
  z-index: 500;
  font-size: 18px;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: scale(1.1) translateY(-2px); background: #3a5e3a; }

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
