/* ===================== RESET Y BASE ===================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.6;
}

body.overflow-hidden {
  overflow: hidden;
}

h1, h2, h3 {
  font-weight: 600;
  color: #111;
  margin-bottom: 1rem;
}

/* ===================== HEADER ===================== */
header {
  background-color: #fff;
  padding: 1rem 2rem;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.header-main-logo {
  height: 100px;
  width: 100px;
  object-fit: contain;
}

header h1 {
  font-size: 2.8rem;
  white-space: nowrap;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.nav-badge {
  position: absolute;
  top: -8px;
  right: -12px;
  background-color: #dc2626;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  border: 2px solid white;
}

/* ===================== PRODUCTOS ===================== */
.product-card-container {
  flex: 1 1 calc(33.333% - 1rem);
  max-width: 280px;
  display: flex;
  flex-direction: column;
}

.related-products-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: stretch;
}

.product-image-container {
  width: 100%;
  aspect-ratio: 1/1;
  background-color: #f8fafc;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.product-image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.product-description {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 4.5em;
}

/* ===================== OPCIÓN DE COMPRA ===================== */
.purchase-option {
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.purchase-option:hover {
  border-color: #f472b6;
}

.purchase-option.active {
  border-color: #db2777;
  background-color: #fce7f3;
  box-shadow: 0 0 0 2px #fce7f3;
}

.purchase-option p {
  margin: 0;
  line-height: 1.2;
}

/* ===================== FORMULARIO ===================== */
.form-container-page {
  background-color: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  max-width: 600px;
  margin: 2rem auto;
}

.form-container-page h1 {
  text-align: center;
  margin-bottom: 2rem;
}

/* ===================== PÁGINA DE AGRADECIMIENTO ===================== */
.agradecimiento {
  text-align: center;
  padding: 4rem 1rem;
  max-width: 800px;
  margin: 2rem auto;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* ===================== NOTIFICACIONES ===================== */
.notification-message {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: #fff;
  font-weight: bold;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.notification-message.show { opacity: 1; transform: translateY(0); }
.notification-message.success { background-color: #28a745; }
.notification-message.error { background-color: #dc3545; }
.notification-message.warning { background-color: #ffc107; color: #333; }
.notification-message.info { background-color: #0d6efd; }

/* ===================== MODAL ===================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content,
.modal-split {
  background-color: #fff;
  padding: 2rem;
  border-radius: 20px;
  max-width: 960px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  color: #111;
}

.modal-close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 100;
  background-color: rgba(255,255,255,0.9);
  color: #111;
  font-size: 1.4rem;
  border: none;
  padding: 5px 10px;
  border-radius: 50%;
  cursor: pointer;
}

.modal-close-button:hover {
  background-color: #eee;
}

/* ===================== MODAL TIPO INSTAGRAM ===================== */
.modal-split-grid {
  display: flex;
  flex-direction: row;
  width: 100%;
}

.modal-left {
  flex: 1;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-right {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ===================== CARRUSEL ===================== */
.carousel-container {
  width: 100%;
  background-color: #000;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: 16px;
}

.carousel-inner {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.carousel-item {
  min-width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
}

.carousel-item.active { display: flex; }

.carousel-item img,
.carousel-item video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  margin: auto;
}

.carousel-nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.3);
  color: #000;
  font-size: 2rem;
  padding: 10px;
  cursor: pointer;
  border-radius: 50%;
  border: none;
  z-index: 10;
}

.carousel-nav-button:hover {
  background-color: rgba(255, 255, 255, 0.6);
}

.carousel-nav-button.prev { left: 10px; }
.carousel-nav-button.next { right: 10px; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  header { flex-direction: column; align-items: center; gap: 1rem; }
  header h1 { font-size: 2rem; }
  nav { width: 100%; justify-content: center; margin-top: 1rem; }

  .form-container-page { margin: 1rem; padding: 1.5rem; }
  .agradecimiento { padding: 2rem 1rem; margin: 1rem; }
  .agradecimiento h1 { font-size: 1.8rem; }

  .modal-content, .modal-split {
    width: 100%;
    height: 100%;
    border-radius: 0;
    padding: 1rem;
    max-width: none;
    max-height: none;
  }

  .modal-split-grid {
    flex-direction: column;
  }

  .carousel-container { height: 300px; }

  .product-card-container {
    flex: 1 1 calc(50% - 1rem);
  }
}

@media (max-width: 480px) {
  .carousel-container { height: 200px; }
  .product-card-container { flex: 1 1 100%; }
}
