/* Custom Styles for ProductReview Affiliate Site */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card {
  animation: fadeIn 0.5s ease-out;
}

/* Hover effects for product cards - Minimal */
.product-card:hover {
  transform: translateY(-3px);
}

/* Line clamp utilities */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Search input focus effect */
#search-input:focus {
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Mobile menu animation */
#mobile-menu {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Link underline animation */
a {
  position: relative;
  transition: color 0.3s ease;
}

/* Star rating colors */
.text-yellow-400 {
  color: #fbbf24;
}

/* Prose styling for legal pages */
.prose {
  line-height: 1.75;
}

.prose h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.prose h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.prose p {
  margin-bottom: 1.25rem;
}

.prose ul {
  margin-bottom: 1.25rem;
}

/* Button ripple effect */
button, .button {
  position: relative;
  overflow: hidden;
}

button:active, .button:active {
  transform: scale(0.98);
}

/* Loading animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Image lazy loading blur effect */
img {
  transition: filter 0.3s ease;
}

img[data-loading="true"] {
  filter: blur(10px);
}

/* Responsive typography */
@media (max-width: 640px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  header, footer, .no-print {
    display: none;
  }
  
  body {
    background: white;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  body {
    background: white;
    color: black;
  }
  
  .bg-gray-50 {
    background: white;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  /* Uncomment to enable dark mode
  body {
    background: #1a1a1a;
    color: #ffffff;
  }
  
  .bg-white {
    background: #2d2d2d;
  }
  
  .text-gray-800 {
    color: #e5e5e5;
  }
  */
}

/* Utility classes */
.transition-all {
  transition: all 0.3s ease;
}

.shadow-custom {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Grid gap utilities for older browsers */
.grid-gap-8 {
  gap: 2rem;
}

/* Aspect ratio utilities */
.aspect-w-16 {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
}

.aspect-w-16 > * {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

/* Custom gradient backgrounds */
.gradient-blue {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-green {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Amazon button style */
.amazon-button {
  background: #ff9900;
  color: #000000;
  font-weight: bold;
  padding: 12px 24px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.amazon-button:hover {
  background: #ffad33;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 153, 0, 0.4);
}

/* Category card hover effects */
.category-card {
  transition: all 0.3s ease;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Pagination styles */
#pagination {
  user-select: none;
}

.pagination-btn {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.pagination-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pagination-btn:disabled {
  opacity: 0.5;
}

.pagination-btn.active {
  background: #2563eb;
  color: white;
}

/* Amazon Slider Styles */
#amazon-slider {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  user-select: none;
  -webkit-user-select: none;
}

#amazon-slider::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Slider Arrow Buttons */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: white;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  color: #374151;
  opacity: 0.7;
}

.slider-arrow:hover {
  background: #3b82f6;
  color: white;
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.slider-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.slider-arrow.hidden {
  opacity: 0;
  pointer-events: none;
}

.slider-arrow-left {
  left: -16px;
}

.slider-arrow-right {
  right: -16px;
}

@media (max-width: 768px) {
  .slider-arrow {
    width: 40px;
    height: 40px;
  }
  
  .slider-arrow-left {
    left: 4px;
  }
  
  .slider-arrow-right {
    right: 4px;
  }
}

.amazon-slide-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  height: 120px;
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  user-select: none;
  -webkit-user-select: none;
}

.amazon-slide-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.amazon-slide-btn:active {
  transform: translateY(-2px) scale(1.02);
}

/* Hide scrollbar utility */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Snap scroll for smooth swiping */
.snap-x {
  scroll-snap-type: x mandatory;
}

.snap-start {
  scroll-snap-align: start;
}

.snap-mandatory {
  scroll-snap-type: x mandatory;
}

/* Sticky header shadow on scroll */
.header-scrolled {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Toast notification (if needed) */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #1f2937;
  color: white;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Loading spinner */
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.category-card {
    cursor:pointer;
}