/* Vendor CSS - Third party styles */

/* Swiper CSS overrides */
.swiper {
  width: 100%;
  height: 100%;
}

.swiper-slide {
  text-align: center;
  font-size: 18px;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Custom button styles for Swiper */
.swiper-button-next,
.swiper-button-prev {
  color: var(--bs-primary);
  width: 40px;
  height: 40px;
  margin-top: -20px;
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 20px;
  font-weight: bold;
}

/* Pagination styles */
.swiper-pagination-bullet {
  background: var(--bs-primary);
  opacity: 0.3;
}

.swiper-pagination-bullet-active {
  opacity: 1;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Image lazy loading */
img.lazy {
  opacity: 0;
  transition: opacity 0.3s;
}

img.lazy.loaded {
  opacity: 1;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--bs-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--bs-secondary);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

.slide-in-up {
  animation: slideInUp 0.5s ease-out;
}

/* Utility classes */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-truncate-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive images */
.img-responsive {
  max-width: 100%;
  height: auto;
}

/* Card hover effects */
.card-hover {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Badge styles */
.badge-sale {
  background-color: var(--bs-danger);
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.badge-new {
  background-color: var(--bs-success);
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

/* Price styles */
.price-original {
  text-decoration: line-through;
  color: var(--bs-gray-500);
}

.price-sale {
  color: var(--bs-danger);
  font-weight: bold;
}

/* Rating stars */
.rating {
  color: #ffc107;
}

.rating .star {
  font-size: 1rem;
}

/* Quantity input */
.quantity-input {
  max-width: 80px;
  text-align: center;
}

/* Product grid responsive */
@media (max-width: 576px) {
  .product-grid .col-6 {
    padding: 0.5rem;
  }
}

/* Toast notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1055;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Custom form controls */
.form-control {
  border: 1px solid var(--bs-primary);
}

.form-control:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

.form-select:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}