/* Estilos para la página individual del vapeador */

/* ================================
   LAYOUT BASE
   ================================ */

.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.vape-page {
  background-color: #000;
  color: #fff;
  min-height: 100vh;
  margin-top: 50px;
}

.vape-page .wrapper {
  background-color: #ff6b6b;
  padding: 2rem;
  border-radius: 8px;
}

/* ================================
   LAYOUT PRINCIPAL
   ================================ */

.product-details {
  padding: 2rem 0;
}

.product-header-info {
  margin-bottom: 2rem;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ================================
   DATOS DEL PRODUCTO
   ================================ */

.product-data {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  height: fit-content;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.product-data-header {
  display: flex;
  gap: 1rem;
  flex-direction: column;
  padding: 2rem;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.product-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: #1a1a1a;
  margin-bottom: 1rem;
}

.product-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.meta-item {
  font-size: 0.9rem;
  color: #495057;
  background: #fff;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  text-align: center;
}

.meta-item strong {
  color: #212529;
  font-weight: 600;
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ================================
   TABS
   ================================ */

.product-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  background: #e9ecef;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  border-bottom: 2px solid #dee2e6;
  gap: 1px;
}

.tab-button {
  padding: 1rem 0.5rem;
  background: #f8f9fa;
  border: none;
  font-weight: 500;
  font-size: 0.8rem;
  color: #6c757d;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  line-height: 1.2;
}

.tab-button:hover {
  background: #fff;
  color: #212529;
}

.tab-button.active {
  background: #fff;
  color: #212529;
  font-weight: 600;
  border-bottom: 3px solid #ff6b6b;
}

/* ================================
   CONTENIDO DE TABS
   ================================ */

.tab-content {
  display: none;
  padding: 2rem;
  background: #fff;
  color: #212529;
}

.tab-content.active {
  display: block;
}

.info-section {
  margin-bottom: 2rem;
}

.info-section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #dee2e6;
}

.subsection {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e9ecef;
}

.subsection:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.subsection-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 1.25rem;
}

/* ================================
   TABLA DE ESPECIFICACIONES
   ================================ */

.specs-table {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  transition: background 0.2s ease;
}

.spec-row:hover {
  background: #e9ecef;
}

.spec-row.long-text {
  flex-direction: column;
  gap: 0.5rem;
}

.spec-row.ingredients {
  flex-direction: column;
  gap: 0.5rem;
}

.spec-label {
  font-weight: 500;
  color: #6c757d;
  flex: 1;
  font-size: 0.9rem;
}

.spec-value {
  font-weight: 600;
  color: #212529;
  text-align: right;
  font-size: 0.9rem;
}

.spec-row.long-text .spec-value,
.spec-row.ingredients .spec-value {
  text-align: left;
  line-height: 1.6;
}

/* Status indicators */
.status-yes {
  color: #28a745;
  font-weight: 600;
}

.status-no {
  color: #dc3545;
  font-weight: 600;
}

.warning-text {
  color: #fd7e14;
  font-style: italic;
  font-weight: 600;
}

/* ================================
   GALERÍA DE IMÁGENES
   ================================ */

.product-images {
  position: sticky;
  top: 65px;
  align-self: start;
}

.main-image-container {
  position: relative;
  width: 100%;
  height: 300px;
  background: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid #dee2e6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  transition: all 0.3s ease;
}

.main-image-container:hover {
  border-color: #007bff;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.main-image-container::after {
  content: "";
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 14h-.79l-.28-.27a6.5 6.5 0 1 0-.7.7l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3Cpath d='M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z'/%3E%3C/svg%3E");
  background-size: 24px 24px;
  background-position: center;
  background-repeat: no-repeat;
}

.main-image-container::after {
  opacity: 1;
}

.main-product-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
}

/* ================================
   STATUS INDICATORS
   ================================ */

/* ================================
   NOTA DE RESPONSABILIDAD
   ================================ */

.note {
  padding: 2rem 0;
  background-color: #000;
  color: #fff;
}

.note .wrapper {
  background-color: transparent;
  padding: 0 1rem;
}

.note p {
  margin: 0;
  line-height: 1.6;
  font-size: 1.125rem;
  font-style: italic;
}

/* Placeholder para cuando no hay imagen */
.no-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 300px;
  background: #e9ecef;
  border: 2px dashed #adb5bd;
  border-radius: 8px;
  color: #6c757d;
  font-size: 1.1rem;
}

/* Secciones de miniaturas */
.thumbnail-sections {
  display: flex;
  gap: 1rem;
  flex-direction: column;
  margin-top: 1rem;
}

.thumbnail-section .section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 0.5rem 0;
  letter-spacing: 0.5px;
}

/* Fila de miniaturas */
.thumbnails-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.thumbnail {
  width: 100%;
  height: 80px;
  cursor: pointer;
  border-radius: 6px;
  border: 2px solid #dee2e6;
  transition: all 0.2s ease;
  object-fit: contain;
  background: #f8f9fa;
  padding: 0.25rem;
}

.thumbnail:hover {
  border-color: #adb5bd;
}

.thumbnail.active {
  border-color: #000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Modal para imágenes ampliadas */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.image-modal.active {
  display: flex !important;
}

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

.modal-content {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
  animation: zoomIn 0.3s ease;
  padding-top: 60px;
}

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

.modal-image {
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid white;
  color: #000;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 1);
  transform: rotate(90deg);
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.5);
}

/* Información del producto */
.info-section {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #dee2e6;
}

.subsection {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e9ecef;
}

.subsection:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.subsection-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 1.25rem;
}

/* Indicadores de estado */
.status-yes {
  color: #059669;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-no {
  color: #dc2626;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-pending {
  color: #d97706;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Texto de advertencia */
.warning-text {
  background: #fef3c7;
  padding: 0.5rem;
  border-radius: 6px;
  border-left: 4px solid #f59e0b;
  font-weight: 500;
  color: #92400e;
}

/* Filas especiales */
.spec-row.ingredients .spec-value,
.spec-row.long-text .spec-value {
  line-height: 1.5;
  max-width: none;
}

.spec-row.photo-section {
  flex-direction: column;
  align-items: flex-start;
}

.spec-row.photo-section .spec-label {
  margin-bottom: 0.5rem;
}

/* Sección regulatoria con destaque por país */
.country-specific {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px solid #3b82f6;
  border-radius: 8px;
  padding: 1rem;
  color: #1e40af;
  font-weight: 600;
}

/* ================================
   RESPONSIVE
   ================================ */

/* Tablet */
@media (max-width: 1024px) {
  .product-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .product-images {
    position: relative;
    top: 0;
    width: 100%;
  }

  .product-data-header {
    order: 1;
  }

  .product-images {
    order: 2;
  }

  .product-tabs {
    order: 3;
  }

  .tab-content {
    order: 4;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .vape-page .wrapper {
    padding: 1.5rem 1rem;
  }

  .product-details {
    padding: 1rem 0;
  }

  .product-layout {
    display: flex;
    flex-direction: column;
  }

  .product-data-header {
    order: 1;
  }

  .product-images {
    order: 2;
    margin-bottom: 2rem;
    width: 100%;
  }

  .product-tabs {
    order: 3;
  }

  .tab-content {
    order: 4;
  }

  .product-title {
    font-size: 2rem;
  }

  .product-meta {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .meta-item {
    font-size: 0.85rem;
  }

  .product-tabs {
    grid-template-columns: 1fr;
  }

  .tab-button {
    font-size: 0.85rem;
    padding: 1rem;
  }

  .tab-content {
    padding: 1.5rem 1rem;
  }

  .section-title {
    font-size: 1.2rem;
  }

  .subsection-title {
    font-size: 1rem;
  }

  .spec-row {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .spec-label,
  .spec-value {
    text-align: left;
  }

  .main-image-container {
    height: 300px;
  }

  .thumbnails-row {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
  }

  .thumbnail {
    height: 80px;
  }
}

/* Mobile pequeño */
@media (max-width: 480px) {
  .vape-page .wrapper {
    padding: 1rem 0.75rem;
  }

  .product-title {
    font-size: 1.75rem;
  }

  .tab-button {
    font-size: 0.8rem;
    padding: 0.875rem;
  }

  .tab-content {
    padding: 1rem;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .spec-row {
    padding: 0.5rem;
  }

  .main-image-container {
    height: 250px;
  }

  .thumbnails-row {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }

  .thumbnail {
    height: 70px;
  }
}
