/* Previously Viewed Products Widget Styles */
#previously-viewed-section {
  padding: 40px 0;
  margin-bottom: 40px;
}

.section-title {
  text-align: center;
  margin-bottom: 30px;
}

.page-heading {
  font-size: 2.5rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
}

.page-sub-heading {
  font-size: 1.1rem;
  color: #7f8c8d;
  margin: 0;
}

.previously-viewed-carousel {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  overflow: hidden;
  padding: 0 80px;
}

.carousel-container {
  overflow: hidden;
  border-radius: 12px;
  margin: 0 auto;
  width: 95%;
  padding: 20px;
  min-height: 300px;
  position: relative;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  gap: 20px;
  width: max-content;
  margin: 0;
  transform: translateX(0);
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border: 1px solid #e1e8ed;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-nav:hover {
  background: #f8f9fa;
  border-color: #007bff;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.carousel-nav.prev {
  left: 20px;
}

.carousel-nav.next {
  right: 20px;
}

.carousel-nav:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.product-card {
  flex: 0 0 200px;
  background: white;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  padding: 12px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-image-container {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: white;
  text-align: center;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.product-image-container:hover {
  background: #f8f9fa;
}

.product-image {
  max-height: 160px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 0;
  display: block;
  transition: all 0.3s ease;
}

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

.product-info {
  padding: 0;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: flex-start;
}

.product-title {
  text-align: center;
  color: #000;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 8px;
  max-height: 40px;
  overflow: hidden;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s ease;
}

.product-title:hover {
  color: #007bff;
  text-decoration: underline;
}

.product-price {
  text-align: center;
  color: #000;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 300px;
  color: #7f8c8d;
  width: 100%;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: #7f8c8d;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.empty-state-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 400px;
  margin: 0 auto;
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 1.2rem;
  margin: 0;
  line-height: 1.5;
}

.add-to-cart-btn {
  background: #333;
  color: #fff;
  border: none;
  border-radius: 3px;
  font-size: 14px;
  line-height: 21px;
  height: 37px;
  min-height: 37px;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 500;
  text-transform: uppercase;
  transition: all 0.3s ease;
  margin-top: 12px;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.product-card:hover .add-to-cart-btn {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.add-to-cart-btn:hover {
  opacity: 0.85;
}

.add-to-cart-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.add-to-cart-btn.loading {
  background: #666;
  color: #fff;
  cursor: not-allowed;
}

.add-to-cart-btn.success {
  background: #27ae60;
  color: #fff;
  cursor: default;
}

.add-to-cart-btn.error {
  background: #dc3545;
  color: #fff;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.cbISloader {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s ease-in-out infinite;
  margin-right: 6px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .page-heading {
    font-size: 2rem;
  }
  
  .previously-viewed-carousel {
    padding: 0 60px;
  }
  
  .carousel-container {
    width: 100%;
    padding: 15px;
  }
  
  .product-card {
    flex: 0 0 160px;
  }

  .carousel-nav {
    width: 40px;
    height: 40px;
  }

  .carousel-nav.prev {
    left: 15px;
  }

  .carousel-nav.next {
    right: 15px;
  }
  
  .add-to-cart-btn {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    font-size: 12px;
    padding: 6px 12px;
    height: 32px;
    min-height: 32px;
  }
}

@media (max-width: 480px) {
  .page-heading {
    font-size: 1.8rem;
  }

  .previously-viewed-carousel {
    padding: 0 50px;
  }

  .carousel-container {
    width: 100%;
    padding: 10px;
  }

  .product-card {
    flex: 0 0 160px;
  }

  .product-info {
    padding: 12px;
  }
  
  .product-title {
    font-size: 0.9rem;
  }

  .product-price {
    font-size: 1.1rem;
  }
} 