/* ZYGOCA SA DE CV - Estilos Principales */

/* Variables CSS - Colores exactos del proyecto original React */
:root {
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.98 0 0);
  --secondary: oklch(0.961 0 0);
  --secondary-foreground: oklch(0.145 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --accent: oklch(0.961 0 0);
  --accent-foreground: oklch(0.145 0 0);
  --destructive: oklch(0.705 0.15 25.85);
  --destructive-foreground: oklch(0.98 0 0);
  --border: oklch(0.922 0 0);
  --input: oklch(0.922 0 0);
  --ring: oklch(0.205 0 0);
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
}

/* Reset y base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
}

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

/* Header personalizado */
.navbar-custom {
  background-color: var(--background) !important;
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary) !important;
}

.navbar-brand > div:first-child {
  background-color: #000000 !important;
}

.navbar-nav .nav-link {
  color: var(--foreground) !important;
  font-weight: 500;
  margin: 0 0.5rem;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--primary) !important;
}

/* Botón del carrito */
.cart-btn {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  position: relative;
  transition: all 0.3s ease;
}

.cart-btn:hover {
  background-color: var(--primary);
  opacity: 0.9;
  transform: translateY(-1px);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #dc3545;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  position: relative;
}

.hero-slide {
  height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  position: relative;
}

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

.hero-slide .container {
  z-index: 2;
}

.text-white-75 {
  color: rgba(255, 255, 255, 0.75) !important;
}

.hero-stats {
  z-index: 3;
}

.backdrop-blur {
  backdrop-filter: blur(10px);
}

.carousel-item {
  height: 100vh;
}

.carousel-caption {
  position: static;
  padding: 0;
  color: inherit;
}

/* Secciones principales */
.section-padding {
  padding: 4rem 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  text-align: center;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  text-align: center;
  margin-bottom: 3rem;
}

/* Cards de productos */
.product-card {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  background: var(--card);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-new { background-color: #28a745; color: white; }
.badge-offer { background-color: #fd7e14; color: white; }
.badge-stock { background-color: #17a2b8; color: white; }
.badge-sold-out { background-color: #6c757d; color: white; }

.product-info {
  padding: 1.5rem;
}

.product-category {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 0.5rem 0;
}

.product-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.stars {
  color: #ffc107;
}

.rating-text {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

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

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

.original-price {
  font-size: 1rem;
  color: var(--muted-foreground);
  text-decoration: line-through;
}

.savings {
  font-size: 0.875rem;
  color: #28a745;
  font-weight: 600;
}

.product-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline-primary:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  opacity: 0.9;
}

/* Cards de servicios */
.service-card {
  text-align: center;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  height: 100%;
  background: var(--card);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.service-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background-color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-foreground);
}

.service-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.service-description {
  color: var(--muted-foreground);
}

/* Sección About */
.about-section {
  background-color: var(--muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
}

.stat-label {
  font-size: 1rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Formulario de contacto */
.contact-section {
  background-color: var(--background);
}

.contact-info {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 2rem;
  height: fit-content;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background-color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-foreground);
  flex-shrink: 0;
}

.contact-details h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.contact-details p {
  color: var(--muted-foreground);
  margin: 0;
}

.form-control {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.1);
}

.form-label {
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

/* Footer */
.footer {
  background-color: var(--primary);
  color: var(--primary-foreground);
  padding: 3rem 0 1rem;
}

.footer h5 {
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer ul {
  list-style: none;
  padding: 0;
}

.footer ul li {
  margin-bottom: 0.5rem;
}

.footer ul li a {
  color: var(--primary-foreground);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer ul li a:hover {
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
  padding-top: 1rem;
  text-align: center;
  opacity: 0.8;
}

/* Modal del carrito */
.modal-header {
  border-bottom: 1px solid var(--border);
}

.modal-footer {
  border-top: 1px solid var(--border);
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 0.5rem;
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.cart-item-category {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.cart-item-price {
  font-weight: 600;
  color: var(--primary);
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quantity-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--background);
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quantity-btn:hover {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.quantity-display {
  min-width: 40px;
  text-align: center;
  font-weight: 600;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1050;
}

.toast {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

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

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

.animate-fade-in {
  animation: fadeInUp 0.6s ease-out;
}

/* Loading states */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--muted);
  border-top: 2px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }
  
  .carousel-item {
    height: 300px;
  }
  
  .carousel-caption {
    padding: 1rem;
    bottom: 1rem;
  }
  
  .product-actions {
    flex-direction: column;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .contact-info {
    margin-top: 2rem;
  }
}

@media (max-width: 576px) {
  .section-padding {
    padding: 2rem 0;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .cart-item {
    flex-direction: column;
    text-align: center;
  }
  
  .quantity-controls {
    justify-content: center;
  }
}
