:root {
  --primary-color: #2196F3;
  --secondary-color: #1976D2;
  --accent-color: #64B5F6;
  --dark-color: #0D47A1;
  --light-color: #E3F2FD;
  --text-color: #263238;
  --white: #fff;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--gray-100);
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.main-header {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 700;
}

.logo h1 {
  font-size: 1.5rem;
  margin: 0;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.cart-link {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--accent-color);
  color: var(--white);
  font-size: 0.7rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Footer */
.main-footer {
  background-color: var(--dark-color);
  color: var(--white);
  padding: 2rem 1rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links a {
  color: var(--light-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--white);
  text-decoration: underline;
}

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: 0.25rem;
  margin-bottom: 1rem;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.product-card {
  background-color: var(--white);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.product-image {
  height: 200px;
  overflow: hidden;
      text-align: center;
}

.product-image img {
  /* width: 100%; */
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  margin-top: 20px;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-info {
  padding: 1.5rem;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.product-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--secondary-color);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Product Detail */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  background-color: var(--white);
  border-radius: 0.75rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin-top: 1rem;
}

.product-gallery {
  display: grid;
  grid-template-columns: 300px 80px;
  gap: 1rem;
  margin-left: 50px;
}

.product-thumbnails {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-left: 10px;
}

.product-thumbnail {
  max-height: 150px;
}

.thumbnail {
  width: 80px;
  height: 80px;
  border-radius: 0.25rem;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.thumbnail.active {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.thumbnail:hover {
  transform: scale(1.05);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

image-container img {
  max-height: 150px;
}

.product-main-image {
  border-radius: 0.5rem;
  overflow: hidden;
  height: 400px;
  width: 300px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.product-main-image img {
  width: 100%;
  height: auto;
  margin-top: 5%;
  /* object-fit: cover; */
  transition: transform 0.5s ease;
}

.product-main-image:hover img {
  transform: scale(1.03);
  cursor: pointer; /* Cambia el cursor cuando se pasa sobre la imagen */
}

.product-info-container {
  padding: 1rem 0;
}

.product-title {
  /* font-size: 1.8rem; */
  margin-bottom: 0.5rem;
  color: var(--dark-color);
  font-weight: 700;
}

.product-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.product-description {
  margin-bottom: 1.5rem;
  color: var(--gray-700);
  line-height: 1.7;
}

/* Product Variants */
.product-variants {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: var(--gray-100);
  border-radius: 0.5rem;
  border: 1px solid var(--gray-200);
}

.variant-group {
  margin-bottom: 1.5rem;
}

.variant-group:last-child {
  margin-bottom: 0;
}

.variant-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--gray-800);
}

.variant-options {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.variant-option {
  position: relative;
}

.variant-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.variant-option label {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 2px solid var(--gray-300);
  border-radius: 0.25rem;
  background-color: var(--white);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.variant-option input[type="radio"]:checked + label {
  border-color: var(--primary-color);
  background-color: var(--light-color);
  box-shadow: 0 0 0 1px var(--primary-color);
}

.variant-option input[type="radio"]:focus + label {
  box-shadow: 0 0 0 2px var(--accent-color);
}

/* Color variants */
.variant-options.colors {
  display: flex;
  gap: 1rem;
}

.variant-option.color {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.variant-option.color label {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  padding: 0;
  border: 2px solid var(--gray-300);
  transition: all 0.3s ease;
  position: relative;
}

.variant-option.color input[type="radio"]:checked + label {
  transform: scale(1.1);
  border-color: var(--white);
  box-shadow: 0 0 0 2px var(--primary-color);
}

.variant-option.color input[type="radio"]:checked + label::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  font-size: 1rem;
}

.color-name {
  font-size: 0.8rem;
  color: var(--gray-700);
  text-align: center;
  margin-top: 0.25rem;
}

/* Quantity control */
.quantity-control {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.quantity-control label {
  font-weight: 600;
  color: var(--gray-800);
}

.quantity-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.25rem;
  overflow: hidden;
  width: fit-content;
}

.quantity-buttons button {
  width: 35px;
  height: 35px;
  background-color: var(--gray-100);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.quantity-buttons button:hover {
  background-color: var(--gray-200);
}

.quantity-buttons input {
  width: 50px;
  height: 35px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--gray-300);
  border-right: 1px solid var(--gray-300);
  font-weight: 600;
}

.add-to-cart-button {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: 0.25rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.add-to-cart-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Cart */
.cart-container {
  background-color: var(--white);
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.cart-title {
  font-size: 1.5rem;
  font-weight: 600;
}

.cart-items {
  margin-bottom: 2rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 3fr 1fr 1fr 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--gray-200);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: 0.25rem;
  overflow: hidden;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.cart-item-variant {
  font-size: 0.85rem;
  color: var(--gray-600);
}

.cart-item-price {
  font-weight: 600;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-item-quantity button {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 1px solid var(--gray-300);
  background-color: var(--white);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cart-item-quantity button:hover {
  background-color: var(--gray-200);
}

.cart-item-quantity input {
  width: 40px;
  height: 25px;
  text-align: center;
  border: 1px solid var(--gray-300);
  border-radius: 0.25rem;
}

.cart-item-subtotal {
  font-weight: 600;
  color: var(--primary-color);
}

.cart-item-remove {
  color: var(--gray-500);
  cursor: pointer;
  transition: color 0.3s ease;
}

.cart-item-remove:hover {
  color: #dc3545;
}

.cart-summary {
  background-color: var(--gray-100);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-top: 2rem;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.cart-actions {
  display: flex;
  gap: 1rem;
}

.cart-actions .btn {
  flex: 1;
}

/* Checkout */
.checkout-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.checkout-form {
  background-color: var(--white);
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.25rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  outline: none;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.checkout-summary {
  background-color: var(--gray-100);
  border-radius: 0.5rem;
  padding: 1.5rem;
  align-self: start;
}

.checkout-items {
  margin-bottom: 1.5rem;
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-300);
}

.checkout-item-name {
  flex: 1;
}

.checkout-item-quantity {
  margin: 0 1rem;
  color: var(--gray-600);
}

.checkout-item-price {
  font-weight: 600;
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--gray-300);
}

.checkout-page {
  max-width: 1000px;
  margin: 0 auto;
}

.checkout-page h1 {
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  text-align: center;
}

.checkout-form-section {
  background-color: var(--white);
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

.btn-block {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  color: var(--white);
  background-color: var(--primary-color);
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-block:hover {
  background-color: var(--secondary-color);
}

/* Responsive */
@media (max-width: 768px) {
  .product-detail,
  .checkout-container {
    grid-template-columns: 1fr;
  }
  
  .cart-item {
    grid-template-columns: 60px 1fr;
    grid-template-rows: auto auto auto;
    gap: 0.5rem;
  }
  
  .cart-item-image {
    grid-row: span 3;
    width: 60px;
    height: 60px;
  }
  
  .cart-item-details {
    grid-column: 2;
  }
  
  .cart-item-price,
  .cart-item-quantity,
  .cart-item-subtotal {
    grid-column: 2;
  }
  
  .cart-item-remove {
    grid-column: 2;
    justify-self: end;
  }

  .product-main-image {
    width: 215px;
  }

  .product-thumbnails {
    width: 200px;
  }

  .variant-options {
    font-size: 12px;
  }
}

@media (max-width: 576px) {
  .product-gallery {
    grid-template-columns: 1fr;
    margin-left: 25px;
    width: 215px;
  }
  
  .product-thumbnails {
    flex-direction: row;
    order: 2;
  }
  
  .thumbnail {
    width: 60px;
    height: 60px;
  }
  
  .product-main-image {
    height: 300px;
    order: 1;
  }
}



/* Estilo para el modal */
.custom-modal {
  display: none; /* Ocultar el modal por defecto */
  position: fixed;
  top: 100%;
  left: 100%;
  transform: translate(-50%, -50%);
  background-color: white; /* Fondo blanco */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Sombra alrededor de la ventana */
  border-radius: 10px;
  z-index: 1000; /* Asegura que el modal esté encima de otros elementos */
  overflow: hidden; /* Asegura que no haya desbordamiento */
  padding: 20px; /* Espacio alrededor del contenido */
}

/* Fondo oscuro que cubre toda la pantalla */
.custom-modal-overlay {
  position: fixed;
  top: 100%;
  left: 100%;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7); /* Fondo oscuro */
  z-index: 999; /* Fondo detrás del modal */
}

/* Imagen dentro del modal */
#modalImage {
  width: 100%; /* Ajustar al tamaño del modal */
  height: auto;
  border-radius: 5px; /* Bordes redondeados a la imagen */
  margin: 0 auto; /* Centrar la imagen */
  display: block; /* Asegurar que la imagen no se salga del contenedor */
}

/* Botón de cerrar */
.close-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  color: #333;
  cursor: pointer;
  background: none;
  border: none;
}

