/* Saree & Jewellery Slider Styles */
.sj-slider-container {
  position: relative;
  max-width: 100%;
  margin: 20px 0;
  overflow: visible;
}

.sj-slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.sj-slider-track {
  flex: 1;
  overflow: hidden;
  margin: 0 50px;
  cursor: grab;
}

.sj-slider-track:active {
  cursor: grabbing;
}

.sj-slider-track.sj-dragging {
  cursor: grabbing;
  transition: none !important;
}

.sj-slider-container.sj-slider-dragging .sj-product-actions {
  pointer-events: none;
}

.sj-slider-items {
  display: flex;
  transition: transform 0.3s ease;
  gap: 20px;
  user-select: none;
}

.sj-slider-items.sj-dragging {
  transition: none;
}

.sj-product-item {
  flex: 0 0 calc(25% - 15px);
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease;
  border: 1px solid #e0e0e0;
  box-shadow: none;
  pointer-events: auto;
}

.sj-product-item:hover {
  transform: translateY(-5px);
}

.sj-slider-container.sj-slider-dragging .sj-product-item:hover {
  transform: none;
}

.sj-product-image-container {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  box-shadow: none;
  border: none;
}

.sj-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Slightly faster transition */
  pointer-events: none;
}

.sj-main-image {
  position: relative;
  z-index: 2;
  opacity: 1;
  transform: scale(1);
}

.sj-hover-image {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transform: scale(0.8);
  z-index: 1;
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
}

/* Smooth grow effect on hover - Make it more dramatic */
.sj-product-item:hover .sj-main-image {
  opacity: 0;
  transform: scale(0.9);
  z-index: 1;
}

.sj-product-item:hover .sj-hover-image {
  opacity: 1;
  transform: scale(1.25); /* Increased from 1.1 to 1.25 for 25% zoom */
  z-index: 2;
  pointer-events: none;
}

/* Disable hover effects during dragging */
.sj-slider-container.sj-slider-dragging .sj-product-item:hover .sj-main-image {
  opacity: 1;
  z-index: 2;
}

.sj-slider-container.sj-slider-dragging .sj-product-item:hover .sj-hover-image {
  opacity: 0;
  z-index: 1;
}

.sj-offer-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: bold;
  border-radius: 4px;
  z-index: 10;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.sj-product-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 15;
  pointer-events: auto;
}

.sj-product-item:hover .sj-product-actions {
  opacity: 1;
  transform: translateY(0);
}

.sj-slider-container.sj-slider-dragging .sj-product-item:hover .sj-product-actions {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

/* Professional Navigation Arrows */
.sj-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
  color: #333;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0 !important;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 10;
  font-size: 0;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  flex-shrink: 0;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sj-nav-arrow::before {
  content: "";
  width: 12px;
  height: 12px;
  border-top: 2px solid #333;
  border-right: 2px solid #333;
  transition: all 0.2s ease;
}

.sj-nav-prev::before {
  transform: rotate(-135deg);
  margin-left: 3px;
}

.sj-nav-next::before {
  transform: rotate(45deg);
  margin-right: 3px;
}

.sj-slider-container:hover .sj-nav-arrow {
  opacity: 1 !important;
  visibility: visible;
}

.sj-nav-arrow:hover {
  background: linear-gradient(135deg, #333, #555);
  border-color: #333;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 3px 10px rgba(0, 0, 0, 0.1);
}

.sj-nav-arrow:hover::before {
  border-color: #fff;
}

.sj-nav-arrow.disabled {
  opacity: 0.3 !important;
  cursor: not-allowed;
  background: linear-gradient(135deg, rgba(200, 200, 200, 0.5), rgba(180, 180, 180, 0.5));
}

.sj-nav-arrow.disabled::before {
  border-color: #999;
}

.sj-nav-prev {
  left: 10px;
}

.sj-nav-next {
  right: 10px;
}

/* Clean Wishlist Button - No Circle, Single Heart */
.sj-wishlist-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 8px;
  z-index: 20;
  position: relative;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  font-family: Arial, sans-serif;
  line-height: 1;
  width: auto;
  height: auto;
  min-width: 32px;
  min-height: 32px;
}

.sj-wishlist-btn:hover {
  transform: scale(1.2);
  color: #ff6b6b;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.sj-wishlist-btn.wishlist-clicked {
  animation: heartBeat 0.6s ease;
}

.sj-wishlist-btn.active {
  color: #dc3545;
  text-shadow: 0 2px 6px rgba(220, 53, 69, 0.5);
}

@keyframes heartBeat {
  0%,
  100% {
    transform: scale(1.2);
  }
  25% {
    transform: scale(1.5);
  }
  50% {
    transform: scale(1.2);
  }
  75% {
    transform: scale(1.4);
  }
}

/* Enhanced Add to Bag Button */
.sj-add-to-bag-btn {
  background: linear-gradient(135deg, #fff, #f8f9fa);
  color: #333;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 10px 16px;
  border-radius: 25px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  z-index: 20;
  position: relative;
  touch-action: manipulation;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: auto;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sj-add-to-bag-btn:hover {
  background: linear-gradient(135deg, #333, #555);
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border-color: #333;
}

.sj-add-to-bag-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.sj-add-to-bag-btn.loading {
  background: linear-gradient(135deg, #6c757d, #5a6268);
  color: white;
  position: relative;
  overflow: hidden;
}

.sj-add-to-bag-btn.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 1.5s infinite;
}

.sj-add-to-bag-btn.success {
  background: linear-gradient(135deg, #28a745, #20c997) !important;
  color: white !important;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.sj-product-info {
  padding: 15px;
}

.sj-product-title {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

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

.sj-product-title a:hover {
  color: #666;
}

.sj-product-price {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  font-size: 14px;
}

.sj-discount {
  color: #28a745;
  font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .sj-slider-container {
    margin: 20px 0;
  }

  .sj-product-item {
    flex: 0 0 calc(50% - 10px);
  }

  .sj-slider-track {
    margin: 0 20px; /* Reduced margin for more width */
    touch-action: pan-x;
  }

  .sj-nav-arrow {
    width: 35px;
    height: 35px;
    font-size: 16px;
    opacity: 0.8 !important;
    visibility: visible;
  }

  .sj-slider-container:hover .sj-nav-arrow {
    opacity: 1 !important;
  }

  .sj-nav-prev {
    left: 5px; /* Closer to edge */
  }

  .sj-nav-next {
    right: 5px; /* Closer to edge */
  }

  .sj-product-info {
    padding: 12px;
  }

  .sj-product-title {
    font-size: 12px;
  }

  .sj-product-price {
    font-size: 12px;
  }

  /* Better mobile button sizing */
  .sj-wishlist-btn {
    font-size: 18px;
    padding: 6px;
    min-width: 28px;
    min-height: 28px;
  }

  .sj-add-to-bag-btn {
    font-size: 10px;
    padding: 8px 10px;
    min-height: 32px;
    white-space: nowrap;
  }

  .sj-product-actions {
    padding: 12px;
  }

  /* Reduce hover effect intensity on mobile but still make it effective */
  .sj-product-item:hover .sj-hover-image {
    transform: scale(1.2); /* Increased from 1.05 to 1.2 for mobile */
  }
}

@media (max-width: 480px) {
  .sj-slider-container {
    margin: 15px 0;
  }

  .sj-slider-track {
    margin: 0 15px; /* Even less margin for full width effect */
  }

  .sj-nav-arrow {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .sj-nav-prev {
    left: 2px; /* Almost touching edge */
  }

  .sj-nav-next {
    right: 2px; /* Almost touching edge */
  }

  .sj-offer-badge {
    font-size: 9px;
    padding: 3px 6px;
  }

  .sj-add-to-bag-btn {
    font-size: 9px;
    padding: 6px 8px;
    min-height: 28px;
  }

  .sj-wishlist-btn {
    font-size: 16px;
    padding: 4px;
    min-width: 24px;
    min-height: 24px;
  }

  .sj-product-actions {
    padding: 10px;
  }
}

/* Full width on very small screens */
@media (max-width: 360px) {
  .sj-slider-track {
    margin: 0 10px; /* Minimal margin */
  }

  .sj-nav-prev {
    left: 0px; /* Touch the edge */
  }

  .sj-nav-next {
    right: 0px; /* Touch the edge */
  }
}

/* Message styles */
.sj-message {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 4px;
  color: white;
  font-weight: bold;
  z-index: 9999;
  animation: slideInRight 0.3s ease;
}

.sj-message-success {
  background: #28a745;
}

.sj-message-error {
  background: #dc3545;
}

.sj-message-info {
  background: #17a2b8;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Touch feedback */
.sj-slider-track {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
