@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap');

* {
  box-sizing: border-box;
}
:root {
    --color-primary: #4a1c6a; /* violeta oscuro - letras principales */
    --color-secondary: #8e79d8; /* violeta - letras secundarias */
    --color-muted: #b2a7da; /* lavanda - iluminación, bordes */
    --color-bg-light: #f4f4f6; /* blanco - fondos claros */
    --color-shadow: #1a1a1d; /* gris fondo - sombras */
    --color-bg-dark: #2b2b30; /* gris humo - fondo oscuro */
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--color-bg-light);
  margin: 0;
  font-family: 'Lato';
}

.validacion-header {
  background: var(--color-shadow);
  color: #fff;
  text-align: center;
  padding: 15px;
  font-size: 25px;
  letter-spacing: 3px;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-logo {
  width: auto;
  display: block;
  max-width: 180px;
  border-radius: 4px;
  object-fit: contain;
  flex-shrink: 0;
}

.header-designer-name {
  font-size: 25px;
  letter-spacing: 2px;
  font-weight: 300;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-name {
  font-size: 18px;
  letter-spacing: 3px;
  font-weight: 300;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease;
}

.validation-container {
  max-width: 650px;
  margin: 0 auto;
  padding: 30px 20px;
  flex: 1;
  width: 100%;
}

.producto-showcase {
  text-align: center;
}

/* Carousel */
.producto-imagen-wrapper {
  position: relative;
  background: var(--color-bg-light);
  padding: 40px 20px;
  border-radius: 0;
  margin-bottom: 35px;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.carousel-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-item {
  display: none;
  width: 100%;
  height: 100%;
}

.carousel-item.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.producto-imagen {
  width: 100%;
  height: 340px;
  object-fit: contain;
  object-position: center;
}

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 42px;
  color: var(--color-muted);
  cursor: pointer;
  user-select: none;
  transition: color 0.3s;
  z-index: 10;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-arrow:hover {
  color: var(--color-primary);
}

.nav-arrow.left {
  left: 10px;
}

.nav-arrow.right {
  right: 10px;
}

.carousel-indicators {
  text-align: center;
  margin-top: 15px;
  display: none;
}

.carousel-indicators.show {
  display: block;
}

.carousel-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-muted);
  margin: 0 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.carousel-dot.active {
  background: var(--color-primary);
}

/* Producto Info */
.producto-nombre {
  font-size: 22px;
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.producto-meta {
  border-top: 1px solid var(--color-muted);
  border-bottom: 1px solid var(--color-muted);
  padding: 18px 0;
  margin-bottom: 28px;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.8;
}

.meta-item {
  margin: 6px 0;
}

/* Certificación Badge */
.certification-status {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 12px 0 24px 0;
}

.certification-status.certified {
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
}

.certification-status.not-certified {
  background: #fff3e0;
  color: #e65100;
  border: 1px solid #ffe0b2;
}

/* Marca de agua sutil cuando no está certificado */
.producto-imagen-wrapper.not-certified::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, transparent 20%, rgba(255, 152, 0, 0.02) 100%);
  pointer-events: none;
  border-radius: 0;
}

/* Acciones */
.acciones-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 30px;
}

.accion-btn {
  display: block;
  padding: 13px 20px;
  background: #1a1a1d;
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  width: 100%;
  text-align: center;
  letter-spacing: 0.3px;
}

.accion-btn:hover {
  background: var(--color-bg-dark);
}

.accion-btn.active {
  background: var(--color-secondary);
}

.accordion-content {
  display: none;
  background: var(--color-bg-light);
  border: 1px solid var(--color-muted);
  border-top: none;
  padding: 20px;
  animation: slideDown 0.3s ease;
  margin-bottom: 8px;
}

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

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
  }
  to {
    opacity: 1;
    max-height: 800px;
  }
}

/* Badges/Cuidados */
.cuidados-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 15px 0;
}

.cuidado-item {
  text-align: center;
  padding: 15px 12px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.cuidado-item:hover {
  border-color: var(--color-muted);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.cuidado-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  display: block;
  object-fit: contain;
}

.cuidado-label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .cuidados-grid {
    grid-template-columns: 1fr;
  }
}

/* Certificado */
.btn-certificado {
  display: inline-block;
  padding: 10px 20px;
  background: var(--color-primary);
  color: #ffffff !important;
  text-decoration: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.3s ease;
  margin: 35px auto;
  width: fit-content;
  letter-spacing: 0.3px;
  border: none;
  box-shadow: inset 0 0 0 0.5px #ffffff;
}

.btn-certificado:hover {
  background: var(--color-secondary);
  color: #ffffff !important;
  box-shadow: inset 0 0 0 0.5px #ffffff;
  transform: translateY(-2px);
}

/* Info Bottom */
.producto-info-footer {
  text-align: center;
  margin-top: 30px;
  padding: 20px 0;
  border-top: 1px solid var(--color-muted);
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.6;
}

/* Errores */
.error-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 40px 20px;
}

.error-content {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 100%;
  text-align: center;
  border-left: 4px solid #dc2626;
}

.error-title {
  margin: 0 0 15px 0;
  font-size: 28px;
  color: #dc2626;
  font-weight: 700;
}

.error-message {
  margin: 0 0 30px 0;
  font-size: 16px;
  color: #666;
  line-height: 1.5;
}

.error-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.error-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.error-btn-primary {
  background: var(--color-primary);
  color: white;
}

.error-btn-primary:hover {
  background: #3d1554;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 28, 106, 0.3);
}

.error-btn-secondary {
  background: #f3f4f6;
  color: var(--color-primary);
  border: 2px solid #e5e7eb;
}

.error-btn-secondary:hover {
  background: #e5e7eb;
  border-color: var(--color-primary);
}

/* Footer */
.validacion-footer {
  background: var(--color-shadow);
  color: #fff;
  padding: 15px 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: auto;
  border-top: 1px solid var(--color-muted);
  min-height: auto;
  position: relative;
  overflow: visible;
}

.footer-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0;
}

.footer-logo img {
  height: 50px;
  width: auto;
  display: block;
}

.footer-text {
  font-size: 12px;
  color: var(--color-muted);
  flex: 0 1 auto;
  min-width: 250px;
  line-height: 1.6;
  letter-spacing: 0.3px;
}

/* Utility Classes */
.no-imagen {
  color: var(--color-muted);
  font-size: 14px;
}

.violet-text {
  color: var(--color-bg-dark);
}

.gray-light-text {
  color: var(--color-muted);
}

.gray-dark-text {
  color: var(--color-primary);
}

/* Icono fallback */
.icon-fallback {
  width: 60px;
  height: 60px;
  background: var(--color-muted);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.cuidado-icon-fallback {
  background: var(--color-bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Grid layouts */
.credenciales-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.credencial-card {
  padding: 18px;
  background: var(--color-bg-light);
  border: 1px solid var(--color-muted);
  border-radius: 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}

.credencial-icon {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 10px;
}

.credencial-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: 5px;
}

.credencial-desc {
  font-size: 11px;
  color: var(--color-muted);
  line-height: 1.4;
}

.grid-full-width {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--color-muted);
}

/* Media/Video Container */
.media-container {
  display: flex;
  gap: 10px;
  flex-direction: column;
}

.media-link {
  display: inline-block;
  padding: 12px 20px;
  background: var(--color-primary);
  color: var(--color-bg-light) !important;
  text-decoration: none;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  transition: background 0.3s;
}

.media-link:hover {
  background: var(--color-secondary);
}

/* Certificado Container */
.certificado-container {
  text-align: center;
  margin-bottom: 20px;
}

/* Error link */
.error-link {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s;
}

.error-link:hover {
  color: var(--color-secondary);
}

.error-margin {
  margin-top: 15px;
}

/* Footer logo image */
.footer-logo-img {
  height: 30px;
  width: auto;
}
/* ========================================
   3D VIEWER STYLES
   ======================================== */

.viewer-3d-container {
  width: 100%;
  height: 500px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  position: relative;
  overflow: hidden;
}

.viewer-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  text-align: center;
  color: #aaa;
  font-size: 0.9em;
}

.viewer-help {
  font-size: 0.85em;
  color: #666;
  margin-top: 0.5rem;
  text-align: center;
}

.viewer-help a {
  color: #667eea;
  text-decoration: none;
  transition: color 0.3s;
}

.viewer-help a:hover {
  color: #7c8ff0;
  text-decoration: underline;
}

/* ========================================
   FBX DOWNLOAD STYLES
   ======================================== */

.fbx-container {
  padding: 30px;
  text-align: center;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: 8px;
}

.fbx-icon {
  color: #aaa;
  font-size: 1em;
  margin-bottom: 15px;
}

.fbx-container p {
  color: #999;
  font-size: 0.9em;
  margin-bottom: 20px;
}

.btn-download-fbx {
  display: inline-block;
  background: #667eea;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
}

.btn-download-fbx:hover {
  background: #7c8ff0;
}

/* ========================================
   MEDIA STYLES
   ======================================== */

.media-video {
  max-width: 100%;
  width: 85%;
  height: auto;
  border-radius: 8px;
  margin: 0 auto;
  display: block;
}

/* ========================================
   FOOTER STYLES
   ======================================== */

.validacion-footer {
  background: #1a1a1d;
  color: white;
  text-align: center;
  padding: 8px 10px;
  margin-top: auto;
  border-top: 1px solid #333;
}

.footer-logo {
  margin-bottom: 4px;
}

.footer-logo-img {
  height: 30px;
  width: auto;
  object-fit: contain;
}

.footer-text {
  font-size: 11px;
  color: #999;
  margin: 0;
}

/* ========================================
   INPUT FORM STYLES
   ======================================== */

.validar-input-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 40px 20px;
}

.validar-input-content {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 100%;
  text-align: center;
}

.validar-input-title {
  font-size: 28px;
  color: var(--color-primary);
  margin: 0 0 15px 0;
  font-weight: 700;
}

.validar-input-subtitle {
  font-size: 16px;
  color: #666;
  margin: 0 0 30px 0;
  line-height: 1.5;
}

.validar-form {
  margin-bottom: 30px;
}

.validar-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.validar-code-input {
  flex: 1;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.validar-code-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(74, 28, 106, 0.1);
}

.validar-code-input::placeholder {
  color: #bbb;
}

.validar-submit-btn {
  padding: 14px 30px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.validar-submit-btn:hover {
  background: #3d1554;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 28, 106, 0.3);
}

.validar-submit-btn:active {
  transform: translateY(0);
}

/* ========================================
   QR CAMERA SCANNER STYLES
   ======================================== */

.mobile-camera-section {
  margin: 20px 0;
  padding: 15px;
  background: #f0f4ff;
  border-radius: 8px;
  border: 2px dashed var(--color-primary);
}

.camera-btn {
  width: 100%;
  padding: 14px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.camera-btn:hover {
  background: #3d1554;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 28, 106, 0.3);
}

.camera-btn:active {
  transform: translateY(0);
}

.qr-scanner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: black;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.qr-video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block !important;
  background: #000;
}

.qr-scanner::before {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  border: 3px solid #22c55e;
  border-radius: 8px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10001;
  box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.3);
}

.qr-scanner::after {
  content: 'Posiciona el código QR dentro del marco';
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  color: #22c55e;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  z-index: 10001;
  white-space: nowrap;
}

.close-camera-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  z-index: 10000;
}

.close-camera-btn:hover {
  background: white;
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.close-camera-btn:active {
  transform: scale(0.95);
}

.validar-help-text {
  background: #f3f4f6;
  padding: 20px;
  border-radius: 8px;
  text-align: left;
  border-left: 4px solid var(--color-primary);
}

.validar-help-text p {
  margin: 0 0 12px 0;
  font-weight: 600;
  color: var(--color-primary);
  font-size: 14px;
}

.validar-help-text ul {
  margin: 0;
  padding-left: 20px;
  list-style: none;
}

.validar-help-text li {
  color: #555;
  font-size: 13px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.validar-help-text li:before {
  content: "✓ ";
  color: var(--color-primary);
  font-weight: bold;
  margin-right: 8px;
}

/* ========================================
   PRODUCTO DETAILS STYLES
   ======================================== */

.product-details-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.product-detail-item {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

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

.product-detail-item p {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--color-bg-dark);
  line-height: 1.6;
  font-size: 14px;
}

.product-detail-bullet {
  flex-shrink: 0;
  color: var(--color-primary);
  font-weight: bold;
  min-width: 1em;
}

.product-detail-label {
  font-weight: 600;
  color: var(--color-bg-dark);
  min-width: 120px;
}

.product-detail-value {
  color: #555;
  flex: 1;
}

/* ========================================
   PRODUCT MEDIA STYLES
   ======================================== */

.product-media-container {
  width: 100%;
  border-radius: 4px;
  background: #000;
  margin-bottom: 15px;
}

.product-video-element {
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: #000;
  display: block;
}

.product-media-help {
  font-size: 0.85em;
  color: #666;
  margin: 10px 0;
  text-align: left;
}

.product-media-help-link {
  color: #667eea;
  text-decoration: none;
  transition: color 0.3s ease;
  margin: 0 6px;
}

.product-media-help-link:hover {
  color: #7c8ff0;
  text-decoration: underline;
}

.product-media-help-divider {
  color: #999;
  margin: 0 6px;
}

/* ========================================
   MEDIA RESPONSIVE FIXES
   ======================================== */

@media (max-width: 600px) {
  .validation-container {
    padding: 0px;
  }
  
  .producto-imagen-wrapper {
    padding: 0px;
    margin-bottom: 0px;
  }
  
  .validar-input-content {
    padding: 30px 20px;
  }
  
  .validar-input-title {
    font-size: 24px;
  }
  
  .validar-input-group {
    flex-direction: column;
    gap: 0;
  }
  
  .validar-code-input,
  .validar-submit-btn {
    width: 100%;
  }

  .product-detail-item p {
    font-size: 13px;
  }
}