/* ==========================================================
   E-Commerce Product Card + Animation Kit
   Inspired by: emart-style handicraft/shop demos (generic pattern,
   koi copyrighted content copy nahi kiya gaya hai)
   Depends on: root-colors.css ke --color-primary / --color-secondary
   ========================================================== */

/* Agar root-colors.css enqueue nahi kiya to yeh fallback kaam aayenge */
/* :root {
    --color-primary: var(--color-primary, #af1216);
    --color-secondary: var(--color-secondary, #000000);
} */

/* ==========================================================
   1) PRODUCT CARD — image zoom + hover action icons slide-up
   ========================================================== */

.product-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-gray-200, #e9ecef);
  border-radius: 6px;
  background: #fff;
  transition:
    box-shadow 0.35s ease,
    transform 0.35s ease;
}

.product-card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.product-card .product-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.product-card .product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Hover par image thoda zoom ho */
.product-card:hover .product-thumb img {
  transform: scale(1.08);
}

/* Sale / New badge — halka pulse animation */
.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 2;
  animation: sbs-pulse 2s ease-in-out infinite;
}

@keyframes sbs-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

/* Action icons (wishlist / quick view / add to cart) — chhupe rahenge,
   hover par neeche se slide-up hoke aayenge */
.product-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -60px;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.95);
  opacity: 0;
  transition:
    bottom 0.35s ease,
    opacity 0.35s ease;
  z-index: 3;
}

.product-card:hover .product-actions {
  bottom: 0;
  opacity: 1;
}

.product-actions a,
.product-actions button {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--color-gray-300, #dee2e6);
  color: var(--color-secondary);
  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
}

.product-actions a:hover,
.product-actions button:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  transform: translateY(-3px);
}

/* Product title / price */
.product-card .product-info {
  padding: 14px 16px 18px;
  text-align: center;
}

.product-card .product-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.product-card .product-title a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.product-card .product-title a:hover {
  color: var(--color-primary);
}

.product-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary);
}

.product-price .old-price {
  color: #9a9a9a;
  text-decoration: line-through;
  font-weight: 400;
  margin-right: 6px;
  font-size: 13px;
}

/* ==========================================================
   2) BUTTON — shine sweep animation on hover
   ========================================================== */

.btn-shine {
  position: relative;
  display: inline-block;
  overflow: hidden;
  background: var(--color-primary);
  color: #fff;
  padding: 12px 28px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: background 0.3s ease;
}

.btn-shine:hover {
  background: var(--color-secondary);
  color: #fff;
}

.btn-shine::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.45),
    transparent
  );
  transform: skewX(-25deg);
}

.btn-shine:hover::before {
  animation: sbs-shine 0.9s ease forwards;
}

@keyframes sbs-shine {
  100% {
    left: 125%;
  }
}

/* ==========================================================
   3) SCROLL-IN FADE ANIMATION (sections/headings ke liye)
   JS ki madad se ".is-visible" class add hogi (guide neeche dekhein)
   ========================================================== */

.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================
   4) FEATURE ICONS ROW (Free Shipping / Support / Easy Return etc.)
   ========================================================== */

.feature-item {
  text-align: center;
  padding: 20px;
  transition: transform 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-6px);
}

.feature-item .feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(var(--color-primary-rgb, 175, 18, 22), 0.08);
  color: var(--color-primary);
  font-size: 22px;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

.feature-item:hover .feature-icon {
  background: var(--color-primary);
  color: #fff;
}

/* ==========================================================
   5) NEWSLETTER / QUICK-VIEW MODAL POPUP ANIMATION
   ========================================================== */

.sbs-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  z-index: 1000;
}

.sbs-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.sbs-modal-box {
  position: fixed;
  top: 50%;
  left: 50%;
  max-width: 480px;
  width: 90%;
  background: #fff;
  border-radius: 8px;
  padding: 32px;
  transform: translate(-50%, -45%) scale(0.92);
  opacity: 0;
  transition:
    transform 0.35s ease,
    opacity 0.35s ease;
  z-index: 1001;
}

.sbs-modal-overlay.is-open .sbs-modal-box {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* ==========================================================
   6) LOADING SPINNER (add-to-cart button ke liye)
   ========================================================== */

.sbs-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: sbs-spin 0.7s linear infinite;
}

@keyframes sbs-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================
   7) MOTION-SENSITIVE USERS ke liye respect karo
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* product card design */
.product-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  transition: 0.35s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
  height: 100%;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
}

.product-image {
  display: block;
  overflow: hidden;
  background: #f8f8f8;
}

.product-image img {
  width: 100%;
  height: 330px;
  object-fit: cover;
  transition: 0.6s;
}

.product-card:hover .product-image img {
  transform: scale(1.08);
}

.product-content {
  padding: 25px;
  text-align: center;
}

.product-category {
  display: inline-block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #9c7b5d;
  margin-bottom: 12px;
  font-weight: 600;
}

.product-title {
  margin: 0 0 15px;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 600;
}

.product-title a {
  color: #222;
  text-decoration: none;
  transition: 0.3s;
}

.product-title a:hover {
  color: #9c7b5d;
}

.product-desc {
  color: #666;
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 25px;
  min-height: 55px;
}

.product-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #222;
  font-weight: 600;
  transition: 0.3s;
}

.product-btn span {
  transition: 0.3s;
}

.product-btn:hover {
  color: #9c7b5d;
}

.product-btn:hover span {
  transform: translateX(6px);
}
