/**
 * Fio de Algodão - Custom Styles
 * Production-ready CSS for e-commerce platform
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
  font-family: 'Inter', sans-serif;
}

/* Carousel Styles */
.carousel-container {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.carousel-dot.active {
  background: white;
  width: 32px;
  border-radius: 6px;
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Button Styles */
.btn-primary {
  background: linear-gradient(135deg, #8b7355 0%, #a0826d 100%);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(139, 115, 85, 0.3);
}

.btn-primary:active {
  transform: scale(0.98);
}

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

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

::-webkit-scrollbar-thumb {
  background: #8b7355;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #5a4a3a;
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toast Notifications - handled by JS but styles here for override */
.toast {
  min-width: 250px;
  max-width: 500px;
  word-wrap: break-word;
}

/* Form Focus States */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

/* Quantity Input - Remove arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* Product Grid Responsive */
@media (max-width: 640px) {
  .carousel-slide {
    height: 300px;
  }
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Print Styles */
@media print {
  header,
  footer,
  .no-print {
    display: none !important;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus Visible for Keyboard Navigation */
*:focus-visible {
  outline: 2px solid #8b7355;
  outline-offset: 2px;
}

/* Disable focus outline for mouse users */
*:focus:not(:focus-visible) {
  outline: none;
}

/* Empty State Animations */
.empty-state {
  animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Skeleton Loader (for future use) */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Image Placeholder */
img[src*="placehold"] {
  background: #f5f5f5;
}

/* Transition for page loads */
body {
  opacity: 0;
  animation: pageLoad 0.3s ease-in forwards;
}

@keyframes pageLoad {
  to {
    opacity: 1;
  }
}

/* Dark mode support (future) */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here */
}

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