/* ===================================
   Variables y Configuración Base
   =================================== */
:root {
  /* Colores Primarios */
  --primary-500: #E91E63;
  --primary-600: #C2185B;
  --primary-700: #AD1457;
  
  /* Colores Secundarios */
  --secondary-500: #D4AF37;
  --secondary-600: #C5A028;
  
  /* Neutrales */
  --neutral-50: #FAFAFA;
  --neutral-100: #F5F5F5;
  --neutral-200: #EEEEEE;
  --neutral-300: #E0E0E0;
  --neutral-700: #616161;
  --neutral-900: #212121;
  
  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  /* Transiciones */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
  
  /* Espaciado móvil */
  --mobile-nav-height: 70px;
}

/* ===================================
   Reset y Configuración Global
   =================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--neutral-900);
  background-color: #fff;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Padding inferior en móvil para el menú fijo */
@media (max-width: 767px) {
  body {
    padding-bottom: var(--mobile-nav-height);
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ===================================
   Animaciones y Transiciones
   =================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes zoomIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.fade-in {
  animation: fadeIn var(--transition-normal) forwards;
}

.slide-up {
  animation: slideUp var(--transition-normal) forwards;
}

.zoom-in {
  animation: zoomIn var(--transition-normal) forwards;
}

/* ===================================
   Hero Slider
   =================================== */
.hero-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--neutral-100);
}

.hero-slider-container {
  display: flex;
  transition: transform var(--transition-slow);
}

.hero-slide {
  min-width: 100%;
  position: relative;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
}

@media (max-width: 767px) {
  .hero-slide {
    height: 350px;
  }
}

.hero-content {
  text-align: center;
  color: white;
  z-index: 2;
  padding: 2rem;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
}

.slider-arrow:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.slider-arrow.prev {
  left: 20px;
}

.slider-arrow.next {
  right: 20px;
}

@media (max-width: 767px) {
  .slider-arrow {
    width: 40px;
    height: 40px;
  }
  
  .slider-arrow.prev {
    left: 10px;
  }
  
  .slider-arrow.next {
    right: 10px;
  }
}

.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.slider-dot.active {
  background: white;
  width: 30px;
  border-radius: 6px;
}

/* ===================================
   Cards de Producto
   =================================== */
.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.product-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--neutral-100);
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-card-image img {
  transform: scale(1.1);
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--primary-500);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
}

.wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 2;
  transition: all var(--transition-fast);
}

.wishlist-btn:hover {
  background: var(--primary-500);
  color: white;
  transform: scale(1.1);
}

.product-card-body {
  padding: 1rem;
}

.product-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--neutral-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card-price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.price-current {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-600);
}

.price-old {
  font-size: 1rem;
  color: var(--neutral-700);
  text-decoration: line-through;
}

.add-to-cart-btn {
  width: 100%;
  background: var(--primary-500);
  color: white;
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.add-to-cart-btn:hover {
  background: var(--primary-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ===================================
   Navegación Móvil Inferior
   =================================== */
.mobile-nav-bottom {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  height: var(--mobile-nav-height);
}

@media (max-width: 767px) {
  .mobile-nav-bottom {
    display: flex;
    justify-content: space-around;
    align-items: center;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  padding: 0.5rem;
  transition: all var(--transition-fast);
  position: relative;
  color: var(--neutral-700);
}

.mobile-nav-item.active {
  color: var(--primary-500);
}

.mobile-nav-item i {
  font-size: 1.5rem;
}

.mobile-nav-item span {
  font-size: 0.7rem;
  font-weight: 500;
}

.cart-badge {
  position: absolute;
  top: 5px;
  right: 25%;
  background: var(--primary-500);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  padding: 0 5px;
}

/* ===================================
   Notificaciones Toast
   =================================== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-xl);
  min-width: 300px;
  animation: slideInRight var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast.success {
  border-left: 4px solid #4CAF50;
}

.toast.error {
  border-left: 4px solid #F44336;
}

.toast.info {
  border-left: 4px solid #2196F3;
}

@media (max-width: 767px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }
  
  .toast {
    min-width: auto;
  }
}

/* ===================================
   Utilidades
   =================================== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

.section {
  padding: 3rem 0;
}

@media (min-width: 768px) {
  .section {
    padding: 5rem 0;
  }
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--neutral-900);
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.5rem;
  }
}

.btn-primary {
  background: var(--primary-500);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all var(--transition-fast);
  display: inline-block;
}

.btn-primary:hover {
  background: var(--primary-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--secondary-500);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all var(--transition-fast);
  display: inline-block;
}

.btn-secondary:hover {
  background: var(--secondary-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--primary-500);
  padding: 0.875rem 2rem;
  border: 2px solid var(--primary-500);
  border-radius: 8px;
  font-weight: 600;
  transition: all var(--transition-fast);
  display: inline-block;
}

.btn-outline:hover {
  background: var(--primary-500);
  color: white;
}

/* Ocultar en móvil */
.hide-mobile {
  display: block;
}

@media (max-width: 767px) {
  .hide-mobile {
    display: none !important;
  }
}

/* Ocultar en escritorio */
.hide-desktop {
  display: none;
}

@media (max-width: 767px) {
  .hide-desktop {
    display: block;
  }
}

/* Grid responsivo de productos */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }
}

/* =================================== 
   BOTONES CON ESTADO DE CARGA (SPINNER)
   =================================== */

.btn-loading {
    position: relative !important;
    pointer-events: none !important;
    /* Mantenemos tamaño ocultando color de texto e iconos */
    color: transparent !important;
    text-shadow: none !important;
}

/* Ocultar hijos pero mantener el layout */
.btn-loading > *:not(.spinner-container) {
    visibility: hidden !important;
    opacity: 0 !important;
}

.spinner-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    /* Restaurar font-size para que el spinner no herede 0 */
    font-size: 1rem !important; 
}

.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin-loading 0.8s linear infinite;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Spinner para botones con fondo claro */
.btn-loading.bg-white .spinner,
.btn-loading.bg-gray-100 .spinner,
.btn-loading.border-2 .spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid #E91E63;
}

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

/* Efecto de click inmediato */
button:active {
    transform: scale(0.95);
    transition: transform 0.1s;
}

.btn-disabled {
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    pointer-events: none !important;
}
