/* Estilos custom para creama */

/* Animaciones y transiciones */
html {
  scroll-behavior: smooth;
}

body {
  transition: background-color 0.3s, color 0.3s;
}

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

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

.dark ::-webkit-scrollbar-track {
  background: #252019;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #8B5E3C;
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Animación de entrada para cards del catálogo */
.catalogo-card {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Toast animations */
.creama-toast {
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Patrones de textura */
.wood-texture {
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h100v100H0z' fill='none'/%3E%3Cpath d='M0 50 Q25 45 50 50 T100 50' stroke='%23B8A99A' stroke-opacity='0.1' fill='none'/%3E%3Cpath d='M0 30 Q50 25 100 30' stroke='%23B8A99A' stroke-opacity='0.1' fill='none'/%3E%3Cpath d='M0 70 Q50 65 100 70' stroke='%23B8A99A' stroke-opacity='0.1' fill='none'/%3E%3C/svg%3E");
}

/* Logo fallback styling */
.logo-fallback {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: #2C1810;
  letter-spacing: 0.05em;
}

.dark .logo-fallback {
  color: #F5F0EB;
}

/* Mobile menu transitions */
#mobile-menu {
  transition: transform 0.3s ease-in-out;
}

#mobile-menu.hidden {
  transform: translateX(-100%);
}

/* Form inputs */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(200, 149, 108, 0.2);
}

/* Toggle switch styling */
input[type="checkbox"] {
  cursor: pointer;
}

/* Card hover effects */
.hover-elevate {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.dark .hover-elevate:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Gradient backgrounds */
.bg-creama-gradient {
  background: linear-gradient(135deg, #FAF7F2 0%, #F0EBE3 100%);
}

.dark .bg-creama-gradient {
  background: linear-gradient(135deg, #1A1412 0%, #252019 100%);
}

/* Hero pattern */
.hero-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C8956C' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Modal backdrop */
.modal-backdrop {
  backdrop-filter: blur(4px);
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid #C8956C;
  outline-offset: 2px;
}

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

/* Responsive fixes */
@media (max-width: 640px) {
  .hero-pattern {
    background-size: 40px 40px;
  }
}
