/* Elena Velas y Aromas - Estilos Personalizados */

/* Variables CSS para Dark Mode */
:root {
  --primary-gold: #D4AF37;
  --gold-rich: #B8860B;
  --gold-metallic: #C9A961;
  --gold-pale: #F5E6D3;
  --gold-cream: #FFF8DC;
  --gold-dark: #8B6914;
  --gold-light: #FFD700;
  --gold-intense: #FFC107;
  --gold-shine: #FFD54F;
  --black-elegant: #1a1a1a;
  --black-rich: #0f0f0f;
  --bg-dark: #0f0f0f;
  --bg-darker: #050505;
}

/* Mejoras Tipográficas Generales */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Tipografía Elegante para Títulos */
h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.02em;
  font-weight: 600;
  line-height: 1.2;
}

.font-playfair {
  letter-spacing: -0.01em;
  font-weight: 600;
  line-height: 1.3;
}

/* Botones con Tipografía Mejorada */
button, .btn {
  letter-spacing: 0.03em;
  font-weight: 600;
  text-transform: none;
}

/* Textos en Cards de Productos */
.producto h3 {
  letter-spacing: -0.01em;
  font-weight: 700;
}

.producto p {
  letter-spacing: 0.01em;
  line-height: 1.6;
}

/* Navegación y Menú */
nav a, nav button {
  letter-spacing: 0.02em;
  font-weight: 500;
}

/* Enlaces de navegación con mejor contraste en hover */
nav a {
  position: relative;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  color: #1f2937 !important; /* Gris oscuro para modo claro */
}

.dark nav a {
  color: #e5e7eb !important; /* Gris claro para modo oscuro */
}

/* Precios con Estilo Elegante */
.text-yellow-600, .text-yellow-400 {
  letter-spacing: 0.02em;
  font-weight: 700;
}

/* Subtítulos y Descripciones */
p, .text-sm, .text-base {
  letter-spacing: 0.01em;
  line-height: 1.7;
}

/* Mejoras para Botones de Categoría */
.filter-btn {
  letter-spacing: 0.02em;
  font-weight: 600;
}

/* Hero Section */
/* Mejora para Labels y Etiquetas */
label {
  letter-spacing: 0.01em;
  font-weight: 600;
}

/* Textos en Inputs */
input, textarea {
  letter-spacing: 0.01em;
}

input::placeholder {
  letter-spacing: 0.01em;
  opacity: 0.7;
}

/* Fondo claro por defecto (dark mode opcional) */

/* Efecto Glow para textos dorados - Estilo del logo */
.glow-gold {
  color: #D4AF37;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

/* Efecto Glow púrpura para título */
.glow-purple {
  color: #a855f7;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow-purple {
}

/* Sparkle animation */
.fa-sparkles {
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle-icon {
  0%, 100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1) rotate(180deg);
  }
}

.glow-pink {
  color: #FF69B4;
}

.glow-blue {
  color: #5C8AFF;
}

.glow-red {
  color: #FF0000;
}

/* Partículas doradas flotantes */
.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  opacity: 0.6;
  animation: float 15s infinite;
}

@keyframes float-particle {
  0% {
    transform: translateY(100vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100vh) translateX(100px) rotate(360deg);
    opacity: 0;
  }
}

/* Banner dorado */
.golden-banner {
  border-radius: 50px;
  padding: 1rem 2rem;
}

/* Cards de estadísticas */
.stats-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-5px);
}

/* Botones de categoría con colores */
.category-btn-gold {
  transition: all 0.3s ease;
}

.category-btn-gold:hover {
  transform: translateY(-2px);
}

/* Banner de catálogo individual */
.catalog-banner {
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  border: 2px solid rgba(255, 215, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.catalog-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  animation: rotate 20s linear infinite;
}

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

/* Fuentes Personalizadas */
.font-playfair {
  font-family: 'Playfair Display', serif;
}

.font-montserrat {
  font-family: 'Montserrat', sans-serif;
}

/* Utilidades */
.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;
}

.sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.fade-in {
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

.fade-in-visible {
  opacity: 1;
}

.fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}

/* Ripple Effect */
.ripple-effect {
  position: relative;
  overflow: hidden;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
}

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

/* Mejoras para accesibilidad */
*:focus-visible {
  outline: 2px solid var(--primary-pink);
  outline-offset: 2px;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
  }
}

/* Responsive Images */
img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

/* Imágenes de productos con aspect ratio fijo y mejor visibilidad */
#products-grid img,
.catalog-banner img {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
  transition: transform 0.3s ease;
  border-radius: 8px;
}

#products-grid img:hover,
.catalog-banner img:hover {
  transform: scale(1.05);
}

/* Modal de producto - imagen más grande */
#product-modal img {
  aspect-ratio: 16/10;
  object-fit: cover;
  width: 100%;
  border-radius: 12px;
}

/* Mejorar visibilidad de imágenes en cards */
#products-grid .relative {
  overflow: hidden;
  border-radius: 8px;
}

#products-grid .relative img {
  min-height: 200px;
}

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

/* Glassmorphism para cards */
.glass-card {
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Mejoras de Touch Targets (mínimo 44x44px) */
button,
a,
input[type="button"],
input[type="submit"] {
  min-height: 44px;
  min-width: 44px;
  touch-action: manipulation;
}

/* Mejoras para Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  font-size: 16px; /* Previene zoom en iOS */
}

/* Bottom Dock - Spacing para el dock */
body {
  padding-bottom: 70px; /* Espacio para el dock en mobile */
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

#bottom-dock a,
#bottom-dock button {
  transition: all 0.2s ease;
  border-radius: 12px;
  padding: 8px 12px;
}

#bottom-dock a:hover,
#bottom-dock button:hover {
  transform: translateY(-2px);
}

#bottom-dock a:active,
#bottom-dock button:active {
  transform: translateY(0);
}

#bottom-dock i {
  transition: all 0.2s ease;
}

#bottom-dock a:hover i,
#bottom-dock button:hover i {
  color: #eab308;
  transform: scale(1.1);
}

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

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

/* Loading States */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Transiciones suaves para Dark Mode */
body,
button,
a,
input,
select,
textarea {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Mejoras para Cards */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
}

/* Spinner para Loading */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 3px solid white;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
}

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

/* Mejoras para el carrito */
.cart-item-enter {
  animation: slideInRight 0.3s ease-out;
}

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

/* Notificaciones */
.notification {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive Typography */
@media (max-width: 640px) {
  h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  
  h2 {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
  }
  
  p {
    font-size: clamp(0.875rem, 4vw, 1rem);
  }
}

/* Prevenir selección de texto en botones */
button {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Mejoras para el carrusel de promociones */
#promo-carousel {
  border-radius: 1rem;
  overflow: hidden;
}

#promo-slides {
  overflow: visible;
}

#promo-slides > div {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  min-width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

#promo-slides > div > div {
  width: 100%;
  max-width: 100%;
  text-align: center;
  padding: 0;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: hidden;
}

#promo-slides h3 {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
  padding: 0 0.5rem;
  box-sizing: border-box;
  display: block;
  overflow-wrap: anywhere;
}

#promo-slides p {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
  padding: 0 0.5rem;
  box-sizing: border-box;
  display: block;
  overflow-wrap: anywhere;
}

.from-cream-50 {
  --tw-gradient-from: #FFF8DC;
  --tw-gradient-to: rgba(255, 248, 220, 0);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.via-amber-50 {
  --tw-gradient-to: rgba(255, 251, 235, 0);
  --tw-gradient-stops: var(--tw-gradient-from), #F5E6D3, var(--tw-gradient-to);
}

.to-warm-beige {
  --tw-gradient-to: #F5E6D3;
}

/* Cards de productos con fondo gris elegante */
.producto {
  border: 1px solid rgba(212, 175, 55, 0.2);
  transition: all 0.3s ease;
}

.producto:hover {
  border-color: rgba(212, 175, 55, 0.4);
}

.dark .producto {
  border-color: rgba(212, 175, 55, 0.3);
}

/* Inputs y formularios con fondo gris claro */
input[type="text"],
input[type="email"],
textarea,
select {
  border-color: rgba(212, 175, 55, 0.3) !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
  border-color: #D4AF37 !important;
}

.dark input[type="text"],
.dark input[type="email"],
.dark textarea,
.dark select {
  border-color: rgba(212, 175, 55, 0.4) !important;
}

/* Bottom dock con fondo blanco */
#bottom-dock {
  border-top-color: rgba(212, 175, 55, 0.3) !important;
}

.dark #bottom-dock {
  border-top-color: rgba(212, 175, 55, 0.4) !important;
}

/* Animación suave para el logo */
@keyframes pulse-slow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.02);
  }
}

.animate-pulse-slow {
  animation: pulse-slow 3s ease-in-out infinite;
}

/* Animación para emojis en el hero */
@keyframes sparkle {
  0%, 100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1) rotate(5deg);
  }
}

#inicio p span:last-child {
  animation-delay: 1s;
}

/* Bordes dorados en modo oscuro */
.dark .border-yellow-500 {
  border-color: #D4AF37 !important;
}

.dark .text-yellow-400,
.dark .text-yellow-500 {
  color: #D4AF37 !important;
}

.text-yellow-500,
.text-yellow-600 {
  color: #D4AF37 !important;
}

.border-yellow-500 {
  border-color: #D4AF37 !important;
}

/* Mejoras en botones dorados */
button.bg-yellow-500,
button.bg-yellow-600,
a.bg-yellow-500,
a.bg-yellow-600 {
  transition: all 0.3s ease;
}

button.bg-yellow-500:hover,
button.bg-yellow-600:hover,
a.bg-yellow-500:hover,
a.bg-yellow-600:hover {
  transform: translateY(-2px);
}

/* Estilos mejorados para el botón de cambio de tema */
#theme-toggle {
  border: 1px solid rgba(209, 213, 219, 0.6) !important;
  transition: all 0.3s ease;
}

#theme-toggle:hover {
  transform: scale(1.05);
}

.dark #theme-toggle {
  border-color: rgba(75, 85, 99, 0.6) !important;
}

#theme-toggle i {
  transition: transform 0.3s ease, filter 0.3s ease;
}

#theme-toggle:hover i {
  transform: scale(1.1);
}

.skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

.dark .skeleton {
  background: linear-gradient(
    90deg,
    #2d2d2d 25%,
    #3d3d3d 50%,
    #2d2d2d 75%
  );
  background-size: 200% 100%;
}

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

/* Animaciones para filtrado de productos */
.producto-item {
  opacity: 1;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.producto-item.fade-out {
  opacity: 0;
  transform: scale(0.95);
}

/* Animaciones de entrada mejoradas para productos */

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animaciones de entrada mejoradas para productos */
.producto-item {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Delay escalonado para cada producto */
.producto-item:nth-child(1) { animation-delay: 0.05s; }
.producto-item:nth-child(2) { animation-delay: 0.1s; }
.producto-item:nth-child(3) { animation-delay: 0.15s; }
.producto-item:nth-child(4) { animation-delay: 0.2s; }
.producto-item:nth-child(5) { animation-delay: 0.25s; }
.producto-item:nth-child(6) { animation-delay: 0.3s; }
.producto-item:nth-child(7) { animation-delay: 0.35s; }
.producto-item:nth-child(8) { animation-delay: 0.4s; }
.producto-item:nth-child(9) { animation-delay: 0.45s; }
.producto-item:nth-child(10) { animation-delay: 0.5s; }
.producto-item:nth-child(n+11) { animation-delay: 0.55s; }

.producto-item.fade-in {
  opacity: 1;
  transform: scale(1);
}

/* Gradientes sutiles en botones */
/* Gradientes sutiles en fondos de tarjetas */
.producto {
  transition: all 0.3s ease;
}

.producto:hover {
  transform: translateY(-2px) scale(1.01);
}

.filter-btn:hover {
  transform: translateY(-2px);
}

.producto-item[style*="display: none"] {
  display: none !important;
}

/* Botón activo mejorado */
.filter-btn.active {
  position: relative;
}

.filter-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  border-radius: 2px;
}

/* Estilos para el modal de producto */
.product-modal-image {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-modal-image:hover {
  transform: scale(1.02);
}

/* Contenedor de imagen del modal agrupado */
#product-image-container-grupo {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#product-image-container-grupo img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: high-quality;
}

/* Skeleton Loaders Mejorados para Imágenes */
.skeleton-image {
  width: 100%;
  height: 288px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  border-radius: 1rem;
  margin-bottom: 1rem;
  opacity: 0.5;
  animation: skeleton-shimmer 1.5s infinite;
}

.dark .skeleton-image {
  background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
  background-size: 200% 100%;
  opacity: 0.4;
}

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

.skeleton-text {
  height: 20px;
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

.dark .skeleton-text {
  background: linear-gradient(
    90deg,
    #2d2d2d 25%,
    #3d3d3d 50%,
    #2d2d2d 75%
  );
  background-size: 200% 100%;
}

.skeleton-button {
  height: 44px;
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 9999px;
  margin-top: 0.75rem;
}

.dark .skeleton-button {
  background: linear-gradient(
    90deg,
    #2d2d2d 25%,
    #3d3d3d 50%,
    #2d2d2d 75%
  );
  background-size: 200% 100%;
}

/* Animación shimmer para promociones */
@keyframes shimmer-skew15 {
  0% {
    transform: translateX(-100%) skewX(-15deg);
  }
  100% {
    transform: translateX(200%) skewX(-15deg);
  }
}

.animate-shimmer {
  animation: shimmer 3s infinite;
}

/* Animación de texto dorado brillante */
@keyframes shimmer-text {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* Mejoras para el carrusel de promociones */
#promo-carousel {
  border-radius: 1.5rem;
  overflow: hidden;
}

.promo-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transition: all 0.3s ease;
  cursor: pointer;
}

.promo-indicator.active,
.promo-indicator:hover {
  transform: scale(1.2);
}

/* Ocultar skeleton cuando la imagen carga */
.producto-item img.loaded + .skeleton-image,
.producto-item img.loaded ~ .skeleton-image {
  display: none;
}

/* Badge de "Doble clic" elegante y discreto */
.double-click-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  color: white;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.6;
  transform: translateY(0);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 20;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.producto:hover .double-click-badge,
.producto-item:hover .double-click-badge {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.double-click-badge i {
  font-size: 0.65rem;
  color: #FFD700;
}

/* Badge en modales - más visible */
#product-image-container .double-click-badge,
#product-image-container-grupo .double-click-badge {
  opacity: 0.75;
  bottom: 12px;
  left: 12px;
  font-size: 0.75rem;
  padding: 8px 12px;
}

#product-image-container:hover .double-click-badge,
#product-image-container-grupo:hover .double-click-badge {
  opacity: 1;
  transform: scale(1.05);
}

/* Animación fade-in para precios */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.3s ease-out forwards;
}

/* Botones de tipo de compra */
.tipo-compra-btn {
  transition: all 0.3s ease;
}

.tipo-compra-btn:hover {
  transform: translateY(-2px);
}

/* Mantener colores cuando están activos o presionados */
.tipo-compra-btn.active,
.tipo-compra-btn-tamanos.active {
  border-color: var(--primary-gold) !important;
  color: #1f2937 !important;
}

.dark .tipo-compra-btn.active,
.dark .tipo-compra-btn-tamanos.active {
  border-color: var(--primary-gold) !important;
  color: var(--gold-light) !important;
}

/* Botones de precio */
.precio-btn {
  transition: all 0.3s ease;
}

.precio-btn:hover {
  transform: scale(1.02);
}

/* Mejoras para imágenes en tarjetas de productos */
.producto img {
  transition: all 0.3s ease;
  border-radius: 0.5rem;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: high-quality;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.producto:hover img {
  transform: scale(1.02);
}

/* Mejorar contenedor de imágenes de productos */
.producto > div:first-child {
  border-radius: 1rem 1rem 0 0;
}

/* Estilos para videos */
#videos-container iframe {
  width: 100%;
  border-radius: 0.75rem;
  min-height: 400px;
}

@media (max-width: 768px) {
  #videos-container iframe {
    min-height: 300px;
  }
}

#videos-container .video-card {
  aspect-ratio: 9/16;
  max-width: 100%;
}

#videos-container embed {
  width: 100%;
  border-radius: 0.75rem;
}

#form-personalizada input:invalid:not(:placeholder-shown),
#form-personalizada textarea:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
}

#form-personalizada input:valid:not(:placeholder-shown),
#form-personalizada textarea:valid:not(:placeholder-shown) {
  border-color: #10b981;
}

/* ============================================
   MEJORAS VISUALES IMPLEMENTADAS
   ============================================ */

/* 1. SEPARADORES ENTRE SECCIONES */
section:not(:first-child) {
  position: relative;
}

/* 2. MEJORAR SOMBRAS Y PROFUNDIDAD */
.producto {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.producto:hover {
  transform: translateY(-4px);
}

/* Sombras mejoradas en botones */
button, .btn, a[class*="bg-"] {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 3. MICROINTERACCIONES */
/* Loading state para productos */
.producto.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.producto.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid rgba(212, 175, 55, 0.3);
  border-top-color: var(--primary-gold);
  border-radius: 50%;
  animation: spin-centered 0.8s linear infinite;
}

/* Nombre propio: antes se llamaba "spin" y pisaba silenciosamente al de .spinner. */
@keyframes spin-centered {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Indicador visual al agregar al carrito */
@keyframes cart-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.cart-icon-bounce {
  animation: cart-bounce 0.5s ease;
}

/* Transiciones suaves en botones */
button, .btn, a[class*="bg-"], a[class*="border-"] {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow;
}

button:active, .btn:active {
  transform: scale(0.98);
}

/* Efecto de pulso en botones importantes */
@keyframes pulse-glow {
}

.button-pulse {
  animation: pulse-glow 2s infinite;
}

/* Notificación de éxito */
.notification-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
  animation: slideDown 0.3s ease-out;
}

/* 5. BARRA DE BÚSQUEDA MEJORADA */
#product-search {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#product-search:focus {
  border-color: var(--primary-gold);
  transform: translateY(-2px);
}

#product-search::placeholder {
  color: #9ca3af;
  transition: opacity 0.3s;
}

#product-search:focus::placeholder {
  opacity: 0.5;
}

/* Icono de búsqueda animado */
#product-search:focus + .fa-search,
#product-search:focus ~ .fa-search {
  color: var(--primary-gold);
  transform: translateY(-50%) scale(1.1);
}

.relative .fa-search {
  transition: all 0.3s ease;
}

/* 6. MEJORAR CONTRASTE EN BOTONES */
/* Botones principales con mejor contraste */
.bg-yellow-500, .bg-yellow-600 {
  color: #000000 !important;
  font-weight: 700 !important;
}

.bg-yellow-500:active, .bg-yellow-600:active,
.bg-yellow-500:focus, .bg-yellow-600:focus {
  color: #000000 !important;
  transform: translateY(0);
}

/* Botones con borde dorado mejorados */
.border-\[#D4AF37\], .border-yellow-500 {
  border-width: 2px !important;
  border-color: var(--primary-gold) !important;
  font-weight: 600 !important;
  position: relative;
  overflow: hidden;
}

.border-\[#D4AF37\]:hover, .border-yellow-500:hover {
  border-color: var(--gold-light) !important;
}

/* Estados activos más claros */
button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(212, 175, 55, 0.5);
  outline-offset: 2px;
}

/* 8. EFECTOS VISUALES SUTILES */
/* Gradientes sutiles en fondos de secciones */
section {
  position: relative;
}

/* Bordes dorados sutiles en elementos importantes */
.glow-gold {
  position: relative;
}

.glow-gold::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  border-radius: 1px;
  opacity: 0.6;
}

/* Brillo sutil en logos y títulos */
h1, h2.font-playfair {
  position: relative;
  background-clip: text;
  -webkit-background-clip: text;
}

h1::before, h2.font-playfair::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.5;
  pointer-events: none;
}

/* Efecto de resplandor en hover para elementos dorados */
.text-\[#D4AF37\], .text-yellow-500, .text-yellow-400 {
  transition: text-shadow 0.3s ease;
}

/* Partículas laterales para los márgenes */
.side-particles-container {
  position: fixed;
  top: 0;
  width: 150px;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.side-particles-container.loaded {
  opacity: 1;
}

#side-particles-left {
  left: 0;
}

#side-particles-right {
  right: 0;
}

.side-particle {
  position: absolute;
  border-radius: 50%;
  animation: float-side 20s infinite ease-in-out;
}

@keyframes float-side {
  0% {
    transform: translateY(100vh) translateX(0) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 0.7;
    transform: translateY(90vh) translateX(10px) scale(1);
  }
  50% {
    transform: translateY(50vh) translateX(-5px) scale(1.2);
    opacity: 0.5;
  }
  90% {
    opacity: 0.7;
    transform: translateY(10vh) translateX(5px) scale(1);
  }
  100% {
    transform: translateY(-10vh) translateX(0) scale(0);
    opacity: 0;
  }
}

/* Ocultar en móviles */
@media (max-width: 767px) {
  .side-particles-container {
    display: none !important;
  }
}

/* Modal de Confirmación */
#confirm-modal .rounded-3xl {
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#confirm-modal:not(.hidden) .rounded-3xl {
  transform: scale(1);
  opacity: 1;
}

#confirm-modal #confirm-overlay {
  animation: fadeIn 0.2s ease-out;
}

/* Partículas doradas sutiles en fondo */
@keyframes float-soft {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

.particle-gold {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  opacity: 0.3;
  animation: float 6s infinite ease-in-out;
  pointer-events: none;
}

/* Mejora en el logo con efecto sutil */
header img {
  transition: all 0.3s ease;
}

header img:hover {
  transform: scale(1.05);
}

/* Cards con efecto de vidrio sutil */
.glass-effect {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark .glass-effect {
  border-color: rgba(255, 255, 255, 0.05);
}

#imagen-preview img {
  object-fit: contain;
  padding: 0.5rem;
}

#imagen-preview button:hover {
  transform: scale(1.05);
}

/* Animación para errores del formulario */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.text-red-400:not(.hidden) {
  animation: shake 0.5s ease-in-out;
}

/* Estilos para videos en sección personalizadas */
#personalizadas video {
  transition: transform 0.3s ease;
}

#personalizadas video:hover {
  transform: scale(1.02);
}

/* Animaciones para Toast Mejorado */

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

.animate-slide-in-right {
  animation: slideInRight 0.3s ease-out forwards;
}

.animate-slide-out-right {
  animation: slideOutRight 0.3s ease-out forwards;
}

/* Estilos adicionales para el toast */
#product-toast {
  max-width: calc(100vw - 2rem);
}

#product-toast button:hover {
  transform: scale(1.05);
}

/* Responsive para toast en móviles */
@media (max-width: 640px) {
  #product-toast {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
  
  #product-toast .flex {
    flex-direction: column;
    text-align: center;
  }
  
  #product-toast img {
    margin: 0 auto;
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) skewX(-12deg);
  }
  100% {
    transform: translateX(200%) skewX(-12deg);
  }
}

/* Partículas animadas para Hero */
#particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.6;
  animation: float 15s infinite ease-in-out;
}

.particle::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0.3;
  }
  25% {
    transform: translateY(-20px) translateX(10px) scale(1.1);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-40px) translateX(-10px) scale(0.9);
    opacity: 0.8;
  }
  75% {
    transform: translateY(-20px) translateX(5px) scale(1.05);
    opacity: 0.5;
  }
}

.particle-small {
  width: 4px;
  height: 4px;
}

.particle-medium {
  width: 6px;
  height: 6px;
}

.particle-large {
  width: 8px;
  height: 8px;
}

/* Variaciones de animación para diferentes partículas */
.particle:nth-child(3n) {
  animation-duration: 18s;
  animation-delay: -2s;
}

.particle:nth-child(3n+1) {
  animation-duration: 20s;
  animation-delay: -4s;
}

.particle:nth-child(3n+2) {
  animation-duration: 16s;
  animation-delay: -6s;
}

/* Velas Animadas de Fondo */
/* #candles-container - Deshabilitado porque se ve mal al inicio */
#candles-container {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

#candles-container.loaded {
  display: none !important;
}

.candle-floating {
  position: absolute;
  bottom: -50px;
  opacity: 0.25;
  animation: floatCandle 20s infinite ease-in-out;
}

.candle-floating:nth-child(odd) {
  animation-duration: 25s;
  animation-direction: reverse;
}

.candle-floating:nth-child(3n) {
  animation-duration: 18s;
}

.candle-floating:nth-child(4n) {
  animation-duration: 22s;
  animation-direction: reverse;
}

/* Animaciones para velas del Hero */
@keyframes fadeInCandle {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes floatCandleHero {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(10px, -15px) scale(1.05);
  }
  50% {
    transform: translate(-5px, -25px) scale(0.95);
  }
  75% {
    transform: translate(-10px, -10px) scale(1.02);
  }
}

/* Velas del Hero - deshabilitadas */
#hero-candles-container {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

#catalog-candles-container {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

#catalog-particles-container {
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

#catalog-particles-container.loaded {
  opacity: 1;
}

#hero-candles-container svg {
  animation: candleGlow 2s ease-in-out infinite;
}

@keyframes candleGlow {
}

@keyframes floatCandle {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0.2;
  }
  10% {
    opacity: 0.3;
  }
  50% {
    transform: translateY(-80vh) translateX(20px) rotate(5deg);
    opacity: 0.35;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-100vh) translateX(-20px) rotate(-5deg);
    opacity: 0.15;
  }
}

/* Estilos de la vela SVG */
.candle-svg {
  width: 40px;
  height: 80px;
}

/* Animación de la llama */
.candle-flame {
  animation: flicker 1.5s infinite ease-in-out;
  transform-origin: center bottom;
}

.candle-flame path {
  fill: url(#flameGradient);
}

@keyframes flicker {
  0%, 100% {
    transform: scaleY(1) scaleX(1);
    opacity: 1;
  }
  25% {
    transform: scaleY(1.1) scaleX(0.95);
    opacity: 0.9;
  }
  50% {
    transform: scaleY(0.95) scaleX(1.05);
    opacity: 0.85;
  }
  75% {
    transform: scaleY(1.05) scaleX(0.98);
    opacity: 0.95;
  }
}

/* Variaciones de tamaño para las velas */
.candle-small {
  width: 30px;
  height: 60px;
  opacity: 0.2;
}

.candle-medium {
  width: 40px;
  height: 80px;
  opacity: 0.25;
}

.candle-large {
  width: 50px;
  height: 100px;
  opacity: 0.22;
}

/* Responsive - menos velas en móviles */
@media (max-width: 768px) {
  .candle-floating {
    opacity: 0.15;
  }
  
  .candle-small,
  .candle-medium,
  .candle-large {
    opacity: 0.15;
  }
}

/* Sección videos */

section.vid-seccion {
  position: relative;
  padding: clamp(72px, 10vw, 120px) 0;
  background: var(--bg-2);
  overflow: hidden;
}

.vid-envoltura {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.vid-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: center;
}

/* --- Texto --- */

.vid-texto {
  max-width: 30rem;
  margin: 0 auto;
  text-align: center;
}

.vid-eyebrow {
  display: block;
  margin-bottom: var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-micro);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.vid-titulo {
  margin: 0 0 var(--space-6);
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.vid-titulo em {
  display: block;
  font-style: italic;
  font-weight: 500;
  color: var(--gold-deep);
}

.vid-intro {
  margin: 0 0 var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--ink-2);
}

.vid-lista {
  display: grid;
  width: fit-content;
  gap: var(--space-3);
  margin: 0 auto var(--space-8);
  padding: 0;
  list-style: none;
  text-align: left;
}

.vid-lista li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--ink);
}

.vid-lista i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 22px; height: 22px;
  border-radius: var(--r-full);
  background: var(--gold-mist);
  color: var(--gold-deep);
  font-size: 10px;
}

.vid-boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 52px;
  padding: 0 var(--space-8);
  border-radius: var(--r-full);
  background: #167B42;
  color: #FFFFFF !important;
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: var(--shadow-2);
  transition: background-color var(--dur-base) var(--ease-out),
              transform var(--dur-press) var(--ease-out);
}
.vid-boton i { font-size: 20px; color: inherit !important; }
.vid-boton:active { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
  .vid-boton:hover { background: #116233; }
}

/* --- Media: video vertical con fotos detrás --- */

.vid-media {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vid-sin-video { display: none; }

.vid-escena {
  position: relative;
  width: min(80vw, 340px);
}

.vid-foto { display: none; }

.vid-marco {
  position: relative;
  z-index: 1;
  aspect-ratio: 9 / 16;
  width: 100%;
  overflow: hidden;
  border-radius: 28px;
  background: var(--surface-2);
  box-shadow: var(--shadow-3), 0 2px 6px rgba(74, 58, 30, 0.08);
}

.vid-poster,
.vid-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 300ms var(--ease-suave);
}

.vid-video { background: transparent; }
.vid-fallo .vid-video { display: none; }
.vid-cambiando .vid-poster,
.vid-cambiando .vid-video { opacity: 0; }

.vid-control {
  position: absolute;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  padding: 0;
  border: 0;
  border-radius: var(--r-full);
  background: rgba(23, 22, 21, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--gold-ink);
  cursor: pointer;
  transition: background-color var(--dur-base) var(--ease-out),
              transform var(--dur-press) var(--ease-out);
}
.vid-control svg { width: 20px; height: 20px; fill: currentColor; }
.vid-control:active { transform: scale(0.94); }
.vid-icono-pausa { display: none; }
.vid-sonando .vid-icono-pausa { display: block; }
.vid-sonando .vid-icono-play { display: none; }

@media (hover: hover) and (pointer: fine) {
  .vid-control:hover { background: rgba(23, 22, 21, 0.72); }
}

.vid-credito {
  margin: var(--space-4) 0 0;
  font-family: var(--font-body);
  font-size: var(--text-micro);
  color: var(--ink-3);
}
.vid-credito a {
  display: inline-block;
  padding: var(--space-3) var(--space-1);
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

/* --- Carril de miniaturas --- */

.vid-carril {
  display: flex;
  gap: var(--space-3);
  margin: var(--space-12) calc(var(--space-4) * -1) 0;
  padding: var(--space-2) var(--space-4) var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--space-4);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.vid-carril::-webkit-scrollbar { display: none; }

.vid-item {
  flex: none;
  scroll-snap-align: start;
}

.vid-mini {
  position: relative;
  display: block;
  width: 104px;
  aspect-ratio: 9 / 16;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  box-shadow: var(--shadow-1);
  cursor: pointer;
  text-align: left;
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}

.vid-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vid-mini::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to top, rgba(23, 22, 21, 0.62) 0%, rgba(23, 22, 21, 0) 55%);
  box-shadow: inset 0 0 0 2px transparent;
  transition: box-shadow var(--dur-base) var(--ease-out);
}

.vid-mini[aria-pressed="true"]::after {
  box-shadow: inset 0 0 0 3px var(--gold-lite);
}

.vid-mini-titulo {
  position: absolute;
  left: var(--space-2);
  right: var(--space-2);
  bottom: var(--space-2);
  z-index: 1;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  color: #FFFFFF;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vid-mini-red {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: var(--r-full);
  background: rgba(23, 22, 21, 0.6);
  color: #FFFFFF;
  font-size: 11px;
}

.vid-mini:active { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
  .vid-mini:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
}

.vid-boton:focus-visible,
.vid-control:focus-visible,
.vid-mini:focus-visible,
.vid-credito a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* --- Entrada al hacer scroll --- */

.vid-aparece {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 400ms var(--ease-suave), transform 400ms var(--ease-suave);
}
.vid-aparece-tarde { transition-delay: 120ms; }
.vid-aparece.vid-visible { opacity: 1; transform: none; }

/* --- Escritorio --- */

@media (min-width: 900px) {
  .vid-envoltura { padding: 0 var(--space-8); }

  .vid-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }

  .vid-texto { margin: 0; text-align: left; }
  .vid-lista { margin-left: 0; }

  .vid-escena { width: 100%; max-width: 360px; }

  .vid-foto {
    position: absolute;
    z-index: 0;
    display: block;
    object-fit: cover;
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-2);
  }
  .vid-foto-a {
    top: 10%;
    left: -34%;
    width: 52%;
    aspect-ratio: 3 / 4;
    transform: rotate(-6deg);
  }
  .vid-foto-b {
    right: -30%;
    bottom: 12%;
    width: 50%;
    aspect-ratio: 1 / 1;
    transform: rotate(5deg);
  }

  .vid-mini { width: 120px; }
  /* Centrado con márgenes automáticos y no con justify-content: si las
     miniaturas no caben, justify-content:center corta las primeras. */
  .vid-item:first-child { margin-left: auto; }
  .vid-item:last-child { margin-right: auto; }
  .vid-carril {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vid-aparece,
  .vid-aparece-tarde {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .vid-poster, .vid-video, .vid-mini, .vid-mini::after,
  .vid-boton, .vid-control { transition: none; }
  .vid-mini:hover, .vid-mini:active,
  .vid-boton:active, .vid-control:active { transform: none; }
}
