/* ================================
   MODERN ANIMATIONS & SCROLL FX
   Progressive Enhancement Safe
================================ */

/* ---------- Keyframes ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes glow {
  0% { box-shadow: 0 0 0 rgba(52, 211, 153, 0); }
  50% { box-shadow: 0 0 25px rgba(52, 211, 153, 0.45); }
  100% { box-shadow: 0 0 0 rgba(52, 211, 153, 0); }
}

/* ---------- Base Animated State ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
}

/* ---------- When Visible ---------- */
.reveal.active {
  opacity: 1;
  transform: none;
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Direction Variants */
.reveal.left.active { animation: fadeLeft 0.9s ease forwards; }
.reveal.right.active { animation: fadeRight 0.9s ease forwards; }
.reveal.zoom.active { animation: zoomIn 0.8s ease forwards; }

/* ---------- Hero Text ---------- */
.slide-content h2,
.slide-content p,
.slide-content button {
  animation: fadeUp 1s ease forwards;
}

/* ---------- Cards ---------- */
.product-card,
.category-card,
.feature,
.benefit,
.blog-card,
.cert {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.product-card:hover,
.category-card:hover,
.feature:hover,
.benefit:hover,
.blog-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.25);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn:hover::after {
  opacity: 1;
}

.btn--primary:hover {
  animation: glow 1.6s ease infinite;
}

/* ---------- Navbar ---------- */
.nav-link {
  transition: transform 0.25s ease, color 0.25s ease;
}

.nav-link:hover {
  transform: translateY(-3px);
}

/* ---------- Gallery Parallax ---------- */
.gallery-placeholder {
  background-attachment: fixed;
}

/* ---------- Popup Modal ---------- */
.modal.active {
  animation: zoomIn 0.5s ease forwards;
}

/* ---------- Cart Sidebar ---------- */
.cart-sidebar.active {
  animation: fadeRight 0.4s ease forwards;
}

/* ---------- Older Devices / Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ================================
   PREMIUM PAGE LOADER
================================ */

#pageLoader {
  position: fixed;
  inset: 0;
  background: #306754;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loader-inner {
  text-align: center;
  color: #fff;
  animation: fadeUp 1s ease forwards;
}

.loader-inner p {
  margin-top: 16px;
  font-weight: 600;
  letter-spacing: 1px;
}

.leaf {
  width: 60px;
  height: 60px;
  border-radius: 100% 0;
  background: #50c878;
  transform: rotate(-45deg);
  animation: spinLeaf 1.4s infinite ease-in-out;
}

@keyframes spinLeaf {
  0% { transform: rotate(-45deg) scale(1); }
  50% { transform: rotate(315deg) scale(1.1); }
  100% { transform: rotate(675deg) scale(1); }
}

/* Hide loader */
#pageLoader.hide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

/* ================================
   PAGE TRANSITIONS
================================ */

.page {
  animation: pageFade 0.6s ease forwards;
}

@keyframes pageFade {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================================
   PRODUCT IMAGE STYLING
================================ */

.product-image {
  width: auto;
  height: 280px;
  overflow: hidden;
  border-radius: 14px;
  margin-bottom: 12px;
  background: #f4f6f3;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.jugad{
  width: 25%;
  height: 280px;
  overflow: hidden;
  border-radius: 14px;
  margin-bottom: 12px;
  background: #f4f6f3;
}

/* Leaf-inspired hover zoom */
.product-card:hover .product-image img {
  transform: scale(1.12);
}

/* Subtle depth */
.product-card {
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 45px rgba(0,0,0,0.18);
}

/* Mobile optimization */
@media (max-width: 768px) {
  .product-image {
    height: 50%;
  }
  .jugad {
    height: 50%;
    width: 100%;
  }
}

/* Quantity Selector */
.qty-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0 15px;
    gap: 8px;
}

.qty-selector button {
    width: 32px;
    height: 32px;
    border: none;
    background: #306754;
    color: #fff;
    font-size: 18px;
    border-radius: 6px;
    cursor: pointer;
}

.qty-selector input {
    width: 60px;
    text-align: center;
    font-size: 14px;
    padding: 5px;
}

/* Quantity Selector */
.qty-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0 15px;
    gap: 8px;
}

.qty-selector button {
    width: 32px;
    height: 32px;
    border: none;
    background: #306754;
    color: #fff;
    font-size: 18px;
    border-radius: 6px;
    cursor: pointer;
}

.qty-selector input {
    width: 60px;
    text-align: center;
    font-size: 14px;
    padding: 5px;
}

