/* Custom CSS for additional styling */
.tab-content {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.color-option.active {
  border-color: #3b82f6 !important;
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
}

.wishlist-active {
  border-color: #ef4444 !important;
  color: #ef4444 !important;
  background: #fef2f2 !important;
}

.wishlist-active svg {
  fill: currentColor;
}

/* Smooth transitions for all interactive elements */
button,
.color-option {
  transition: all 0.2s ease-in-out;
}

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

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

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Product image hover effects */
.product-image-container:hover .product-image {
  transform: scale(1.05);
}

.product-image {
  transition: transform 0.3s ease-in-out;
}

/* Enhanced button styles */

/* Card hover effects */
.product-card {
  transition: all 0.3s ease;
}

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

/* Tab button active state */
.tab-btn.active {
  border-bottom-color: #3b82f6;
  color: #3b82f6;
}

/* Zoom modal styles */
#zoomModal {
  backdrop-filter: blur(4px);
}

/* Price highlight animation */
@keyframes priceHighlight {
  0% {
    background-color: transparent;
  }

  50% {
    background-color: rgba(59, 130, 246, 0.1);
  }

  100% {
    background-color: transparent;
  }
}

.price-updated {
  animation: priceHighlight 0.6s ease-in-out;
}

/* Supplier badge styles */
.supplier-badge {
  position: relative;
  overflow: hidden;
}

.supplier-badge::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.supplier-badge:hover::before {
  left: 100%;
}

/* Related products grid responsive */
@media (max-width: 640px) {
  .related-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Enhanced form inputs */
/* input[type="number"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
} */

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

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

  100% {
    transform: rotate(360deg);
  }
}

/* Notification styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 24px;
  background: #10b981;
  color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
}

.notification.show {
  transform: translateX(0);
}

.notification.error {
  background: #ef4444;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .supplier-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .tab-navigation {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .tab-navigation::-webkit-scrollbar {
    display: none;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .color-option {
    border-width: 2px;
  }

  .tab-btn {
    border-bottom-width: 3px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for accessibility */

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #3b82f6;
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
}

.skip-link:focus {
  top: 6px;
}

/* Thumbnail Button */
.thumbnail-btn {
  border-width: 2px;
  border-style: solid;
  border-color: #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
  outline: none;
  transition: border-color 0.2s;
  background: transparent;
  padding: 0;
  aspect-ratio: 1 / 1;
}

.thumbnail-btn:hover {
  border-color: #cbd5e1;
}

.thumbnail-btn.active,
.thumbnail-btn.selected,
.thumbnail-btn.border-blue-500 {
  border-color: #2563eb !important;
}

/* Main Image */
.product-main-image {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  object-fit: cover;
}

/* Image Counter */
#imageCounter {
  font-size: 0.95rem;
  color: #334155;
  font-weight: 500;
  margin-top: 0.5rem;
  display: inline-block;
}

/* Example for color-option */
.color-option {
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  background: #fff;
}

.color-option.selected,
.color-option.active {
  border: 1px solid #2563eb;
  background: #eff6ff;
  color: #2563eb;
}

/* Wishlist Button */
.wishlist-btn,
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  color: #374151;
  border-radius: 0.5rem;
  background: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.wishlist-btn:hover,
.share-btn:hover {
  border-color: #9ca3af; /* gray-400 */
}

/* Wishlist Button Active */
.wishlist-active {
  border-color: #ef4444 !important;
  color: #ef4444 !important;
  background: #fef2f2 !important;
}

.product-detail-navs::-webkit-scrollbar {
  display: none;
}

/* Product Details Tab Navigation */
.product-tab-btn {
  padding: 1.5rem 0.25rem 0.75rem 0.25rem;
  border-bottom: 2px solid transparent;
  color: #64748b; /* text-gray-500 */
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
  background: none;
  transition: color 0.2s, border-color 0.2s;
  outline: none;
  cursor: pointer;
}

.product-tab-btn:hover {
  color: #334155; /* text-gray-700 */
}

.product-tab-btn.active,
.product-tab-btn.selected {
  border-bottom: 2px solid #2563eb; /* border-blue-500 */
  color: #2563eb; /* text-blue-600 */
}