/* ============================================
   RESPONSIVE - MÓVILES (≤ 768px)
   ============================================ */

@media (max-width: 768px) {
  /* Reset del contenedor principal */
  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh !important;
    background: #0f2d07 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .t-rminos-y-condiciones {
    position: relative !important;
    width: 100% !important;
    min-height: 100vh !important;
    height: auto !important;
    background: #0f2d07 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4% 5% !important;
    gap: 3% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
  }

  /* Adornos decorativos sutiles - REMOVIDOS */
  /* .t-rminos-y-condiciones::before y ::after removidos por solicitud del usuario */

  /* ========================================
     OCULTAR ELEMENTOS DECORATIVOS DE DESKTOP
     ======================================== */
  .capa-1,
  .capa-12,
  .capa-13,
  .capa-14 {
    display: none !important;
  }

  /* ========================================
     PANES DECORATIVOS
     ======================================== */
  .pan-decorativo {
    position: fixed !important;
    width: clamp(80px, 22vw, 120px) !important;
    height: auto !important;
    max-width: 150px !important;
    opacity: 1 !important;
    z-index: 1 !important;
    pointer-events: none !important;
  }

  .pan-decorativo.pan-1 {
    display: none !important;
  }

  .pan-decorativo.pan-2 {
    top: 30% !important;
    width: 18% !important;
    left: -9% !important;
    transform: rotate(33deg) !important;
  }

  .pan-decorativo.pan-3 {
    bottom: -2.5% !important;
    left: 0% !important;
    width: 12% !important;
    transform: rotate(21deg) !important;
  }

  .pan-decorativo.pan-4 {
    bottom: 5% !important;
    right: -5% !important;
    transform: scalex(-1) rotate(19deg) !important;
    width: 16% !important;
  }

  /* ========================================
     ADORNOS DE FONDO - RAMAS Y ESFERAS
     ======================================== */
  
  /* Ramas decorativas laterales */
  .frame-102,
  .frame-103 {
    position: fixed !important;
    width: clamp(140px, 38vw, 220px) !important;
    height: auto !important;
    z-index: 1 !important;
    opacity: 0.85 !important;
    display: block !important;
    pointer-events: none !important;
  }

  .frame-102 {
    transform: rotate(49deg) !important;
    width: clamp(140px, 35vw, 200px) !important;
    left: -8% !important;
    top: -11% !important;
  }

  .frame-103 {
    transform: rotate(31deg) !important;
    opacity: 0.7 !important;
    bottom: 22% !important;
    right: -26% !important;
    width: 54% !important;
    position: fixed !important;
    height: auto !important;
    z-index: 1 !important;
    display: block !important;
    pointer-events: none !important;
  }

  .frame-102 img,
  .frame-103 img,
  .frame-104 img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Nueva rama solo visible en móvil */
  .frame-104 {
    position: fixed !important;
    width: clamp(140px, 38vw, 220px) !important;
    height: auto !important;
    z-index: 1 !important;
    opacity: 0.85 !important;
    display: block !important;
    pointer-events: none !important;
    left: -20% !important;
    top: 45% !important;
  }

  /* Esfera decorativa 1 */
  .esfera {
    transform: scaleX(-1) rotate(58deg);
    position: fixed !important;
    top: 29% !important;
    right: -33% !important;
    width: 60%;
    height: auto !important;
    opacity: 1 !important;
    z-index: 1 !important;
    pointer-events: none !important;
    display: block !important;
    animation: float 4s ease-in-out infinite !important;
  }

  /* Esfera decorativa 2 */
  .esfera2 {
    position: fixed !important;
    bottom: 11% !important;
    left: -19% !important;
    width: clamp(146px, 48vw, 103px) !important;
    height: auto !important;
    opacity: 1 !important;
    z-index: 1 !important;
    pointer-events: none !important;
    display: block !important;
    filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.25)) !important;
    animation: float 5s ease-in-out infinite 1s !important;
  }

  /* Animación flotante sutil */
  @keyframes float {
    0%, 100% {
      transform: translateY(0) !important;
    }
    50% {
      transform: translateY(-10px) !important;
    }
  }

  /* ========================================
     MENÚ HAMBURGUESA (siempre visible, esquina superior derecha)
     ======================================== */
  .hamburguesa {
    position: fixed !important;
    top: 3% !important;
    right: 4% !important;
    width: 32px !important;
    height: 26px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: center !important;
    cursor: pointer !important;
    z-index: 100 !important;
  }

  .rectangle-5,
  .rectangle-6,
  .rectangle-7 {
    width: 100% !important;
    height: 4px !important;
    border-radius: 999px !important;
    background: #fef8cf !important;
    position: static !important;
  }

  /* ========================================
     1. BOTÓN REGRESAR (Esquina superior izquierda)
     ======================================== */
  .back {
    background: #fef8cf !important;
    border-radius: 8px !important;
    padding: 7px 15px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 13px !important;
    height: 23px !important;
    position: absolute !important;
    left: calc(50% - 138px) !important;
    top: 223px !important;
    z-index: 100 !important;
    text-decoration: none !important;
    transition: none !important;
  }

  .back:hover {
    background: #A80E1F !important;
  }

  .back:hover .arrow-back {
    filter: brightness(0) saturate(100%) invert(94%) sepia(8%) saturate(1023%) hue-rotate(30deg) brightness(105%) contrast(98%) !important;
  }

  .back .frame-90 {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
  }

  .back .regresar {
    display: none !important;
  }

  .arrow-back {
    width: 24px !important;
    height: 24px !important;
  }

  /* ========================================
     2. TITULAR - LOGO VILLANCICOS SUPÁN (Segundo)
     ======================================== */
  /* Logo Banner - Based on desktop layout proportions */
  .titular {
    order: 0 !important;
    width: 100% !important;
    max-width: clamp(300px, 90vw, 500px) !important;
    height: clamp(90px, 30vw, 135px) !important;
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    top: 72px !important;
    margin: 0 !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
    z-index: 100 !important;
  }

  .titular .layer-1 {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    overflow: visible !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
  }

  /* group37 - Main logo (similar to group46 in elegir-voz) */
  .titular .layer-1 .group37 {
    display: block !important;
    position: absolute !important;
    width: 87% !important;
    height: auto !important;
    top: 25% !important;
    left: 7.25% !important;
    right: 5.72% !important;
    z-index: 2 !important;
    overflow: visible !important;
  }

  /* group38 - Large musical note OVERLAYING (similar to group47) */
  .titular .layer-1 .group38 {
    display: block !important;
    position: absolute !important;
    width: 87% !important;
    height: auto !important;
    top: 23% !important;
    left: 6.46% !important;
    right: 6.51% !important;
    z-index: 5 !important;
    overflow: visible !important;
    opacity: 1 !important;
  }

  /* group42 - Part of logo (similar to group51) */
  .titular .layer-1 .group42 {
    display: block !important;
    position: absolute !important;
    width: 15% !important;
    height: auto !important;
    top: 11% !important;
    left: 12.62% !important;
    right: 72.44% !important;
    z-index: 3 !important;
    overflow: visible !important;
  }

  /* vector69 - Supán logo (similar to vector87) */
  .titular .layer-1 .vector69 {
    display: block !important;
    position: absolute !important;
    width: 6% !important;
    height: auto !important;
    top: 53% !important;
    left: 93.95% !important;
    right: 0% !important;
    z-index: 4 !important;
    overflow: visible !important;
  }

  /* Small decorative notes - positioned like desktop */
  .titular .layer-1 .group39 {
    display: block !important;
    position: absolute !important;
    width: 7.23% !important;
    height: auto !important;
    top: 68.54% !important;
    left: 2.37% !important;
    right: 90.4% !important;
    z-index: 2 !important;
    overflow: visible !important;
  }

  .titular .layer-1 .group40 {
    display: block !important;
    position: absolute !important;
    width: 13.45% !important;
    height: auto !important;
    top: 0% !important;
    left: 81.93% !important;
    right: 4.63% !important;
    z-index: 2 !important;
    overflow: visible !important;
  }

  .titular .layer-1 .group41 {
    display: block !important;
    position: absolute !important;
    width: 5.81% !important;
    height: auto !important;
    top: 40.99% !important;
    left: 0% !important;
    right: 94.19% !important;
    z-index: 2 !important;
    overflow: visible !important;
  }

  /* ========================================
     3. IMAGEN DEL PRODUCTO (Tercero)
     ======================================== */
  .producto-ajustado-1 {
    order: 3 !important;
    position: static !important;
    width: 240px !important;
    height: auto !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    margin-top: clamp(200px, 28vh, 240px) !important;
    z-index: 10 !important;
  }

  /* ========================================
     4. TARJETA DE TÉRMINOS Y CONDICIONES (Cuarto)
     ======================================== */
  .frame-77 {
    order: 4 !important;
    position: static !important;
    width: 92% !important;
    max-width: 240px !important;
    height: auto !important;
    padding: 5% 5% 6% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    box-sizing: border-box !important;
    z-index: 10 !important;
  }

  .frame-76 {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 110px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    box-sizing: border-box !important;
    margin-bottom: 0 !important;
  }

  /* ========================================
     CHECKBOXES + TEXTOS (cada par)
     ======================================== */
  
  /* Crear pares checkbox + texto usando flexbox horizontal */
  .frame-76 {
    position: relative !important;
  }

  .frame-35 {
    position: absolute !important;
    top: 2px !important;
    left: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 24px !important;
    pointer-events: none !important;
    z-index: 2 !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
  }

  .frame-35 > div {
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: rgba(254, 248, 207, 0.2) !important;
    touch-action: manipulation !important;
    position: relative !important;
    background: transparent !important;
    margin-bottom: 15px !important;

  }

  .frame-35 > div > * {
    background: transparent !important;
  }

  .frame-34 {
    position: relative !important;
    margin-left: 38px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    z-index: 1 !important;
    width: calc(100% - 32px) !important;
    max-width: 208px !important;
    box-sizing: border-box !important;
  }

  /* Checkbox transparente con borde y radius */
  .rectangle-1 {
    background: transparent !important;
    border-radius: 6px !important;
    border-style: solid !important;
    border-color: #ffffff !important;
    border-width: 2px !important;
    box-shadow: none !important;
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Estado checked - fondo blanco y muestra el checkmark */
  .rectangle-1.checked {
    background: #ffffff !important;
    border-color: #ffffff !important;
    box-shadow: none !important;
  }
  .rectangle-1.checked::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 19px !important;
    height: 13px !important;
    background-image: url('../check/layer-50.svg') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-color: transparent !important;
  }

  /* Ocultar el input checkbox nativo */
  .checkbox-input {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .texto-condiciones {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    font-family: "Nunito", sans-serif !important;
    font-size: 11px !important;
    line-height: 1.5 !important;
    color: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 1 !important;
    pointer-events: auto !important;
    cursor: default !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    box-sizing: border-box !important;
    display: block !important;
    align-self: flex-start !important;
    margin-top: 0 !important;
  }

  /* Ajustar alineación del segundo texto */
  .texto-condiciones.tengo-m-s-de-18-a-os-he-le-do-y-acepto-la-pol-tica-de-privacidad-y-la-pol-tica-de-cookies {
    margin-top: 6px !important;
  }

  .texto-condiciones .link-condicion {
    color: #fef8cf !important;
    text-decoration: underline !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 10 !important;
    display: inline-block !important;
  }

  /* ========================================
     5. BOTÓN CTA (Quinto - dentro de frame-77)
     ======================================== */
  .bot-n-2 {
    background: #fef8cf !important;
    border-radius: 12px !important;
    padding: 10px 20px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    height: auto !important;
    min-height: 38px !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    left: auto !important;
    transform: none !important;
    bottom: auto !important;
    margin-top: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    z-index: 13 !important;
    overflow: hidden !important;
    border: none !important;
    cursor: pointer !important;
    transition: none !important;
    box-sizing: border-box !important;
  }

  .bot-n-2:hover {
    background: #A80E1F !important;
  }

  .bot-n-2:hover .lorem-ipsum-dolor-sit {
    background: linear-gradient(to left, #FEF8CF, #FEF8CF) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: #FEF8CF !important;
    color: #FEF8CF !important;
  }

  .bot-n-2:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
  }

  .bot-n-2:not(:disabled):active {
    transform: none !important; /* Sin movimiento al presionar */
    box-shadow: none !important;
  }

  .lorem-ipsum-dolor-sit {
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    border: none !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: auto !important;
    min-width: auto !important;
    width: auto !important;
    box-shadow: none !important;
    transition: none !important;
    position: relative !important;
    font-family: "Nunito-ExtraBold", sans-serif !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    background-image: linear-gradient(to left, #0f2d07, #0f2d07),
      linear-gradient(to left, #790002, #790002) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    text-align: center !important;
    margin: 0 !important;
  }
}

/* ============================================
   TABLETS (481px - 768px)
   ============================================ */
@media (min-width: 481px) and (max-width: 768px) {
  .t-rminos-y-condiciones {
    padding: 32px 40px 48px !important;
    gap: 24px !important;
  }

  .titular {
    max-width: 380px !important;
  }

  .producto-ajustado-1 {
    width: clamp(220px, 45vw, 300px) !important;
  }

  .frame-77 {
    max-width: 540px !important;
    padding: 24px 28px !important;
  }

  .frame-76 {
    gap: 14px 12px !important;
  }

  .acepto-t-rminos-de-uso,
  .tengo-m-s-de-18-a-os-he-le-do-y-acepto-la-pol-tica-de-privacidad-y-la-pol-tica-de-cookies,
  .entiendo-que-mi-participaci-n-podr-a-contener-datos-personales-sensibles-y-autorizo-su-uso-para-generar-contenido-mediante-inteligencia-artificial-de-acuerdo-con-la-pol-tica-de-privacidad {
    font-size: 13.5px !important;
  }

  .lorem-ipsum-dolor-sit {
    font-size: 15px !important;
  }
}

/* ============================================
   POPUP DE ADVERTENCIA
   ============================================ */
.popup-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.6) !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 200 !important;
  padding: 20px !important;
  box-sizing: border-box !important;
  display: none !important;
}

.popup-overlay[style*="display: flex"] {
  display: flex !important;
}

.pop-up {
  width: 50% !important;
  position: relative !important;
  animation: popupFadeIn 0.3s ease !important;
  display: flex !important;
  flex-direction: column !important;
}

.rectangle-3 {
  background: #fef8cf !important;
  border-radius: 20px !important;
  width: 100% !important;
  min-height: 100% !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
}

.popup-close {
  width: 24px !important;
  height: 24px !important;
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  cursor: pointer !important;
  z-index: 10 !important;
}

.popup-x-line-1 {
  background: #a80e1f !important;
  border-radius: 2px !important;
  width: 100% !important;
  height: 3px !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) rotate(45deg) !important;
}

.popup-x-line-2 {
  background: #a80e1f !important;
  border-radius: 2px !important;
  width: 100% !important;
  height: 3px !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) rotate(-45deg) !important;
}

.popup-close:hover .popup-x-line-1,
.popup-close:hover .popup-x-line-2 {
  background: #d01020 !important;
}

.ho-ho-ho-espera-un-momento-los-duendes-est-n-afinando-los-villancicos {
  color: #a80e1f !important;
  text-align: center !important;
  font-family: "Nunito", sans-serif !important;
  font-size: clamp(18px, 4.5vw, 26px) !important;
  font-weight: 800 !important;
  padding: 50px 24px 16px !important;
  position: relative !important;
  z-index: 1 !important;
  line-height: 1.3 !important;
}

.vuelve-a-intentarlo-en-unos-minutos {
  color: #0f2d07 !important;
  text-align: center !important;
  font-family: "Nunito", sans-serif !important;
  font-size: clamp(14px, 3.5vw, 18px) !important;
  font-weight: 400 !important;
  padding: 0 24px 32px !important;
  position: relative !important;
  z-index: 1 !important;
  line-height: 1.5 !important;
}

@keyframes popupFadeIn {
  from {
    opacity: 0 !important;
    transform: scale(0.9) !important;
  }
  to {
    opacity: 1 !important;
    transform: scale(1) !important;
  }
}

/* ============================================
   POPUP RESPONSIVE PARA MÓVILES
   ============================================ */
@media (max-width: 768px) {
  .popup-overlay {
    padding: 24px !important;
    box-sizing: border-box !important;
  }

  .pop-up {
    width: 342px !important;
    max-width: 90% !important;
    height: 161px !important;
    min-height: 161px !important;
    padding: 0 !important;
    position: relative !important;
    box-sizing: border-box !important;
  }

  .pop-up .rectangle-3 {
    background: #fef8cf !important;
    border-radius: 24px !important;
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    box-shadow: 7px 10px 13.8px 1px rgba(0, 0, 0, 0.09) !important;
  }

  .pop-up .a-santa-le-hace-falta-algo-en-la-lista {
    color: #a80e1f !important;
    text-align: center !important;
    font-family: "Nunito-ExtraBold", sans-serif !important;
    font-size: 21px !important;
    font-weight: 800 !important;
    position: absolute !important;
    right: 14.62% !important;
    left: 14.62% !important;
    width: 70.76% !important;
    bottom: 38.82% !important;
    top: 22.98% !important;
    height: 38.2% !important;
    line-height: 1.3 !important;
    z-index: 2 !important;
    box-sizing: border-box !important;
  }

  .pop-up .acepta-todos-los-t-rminos-y-condiciones {
    color: #000000 !important;
    text-align: center !important;
    font-family: "Nunito-Regular", sans-serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    position: absolute !important;
    right: 7.02% !important;
    left: 7.31% !important;
    width: 85.67% !important;
    bottom: 29.19% !important;
    top: 61.49% !important;
    height: 9.32% !important;
    line-height: 1.5 !important;
    z-index: 2 !important;
    box-sizing: border-box !important;
  }

  .pop-up .close {
    width: 17px !important;
    height: 17px !important;
    position: absolute !important;
    right: 12px !important;
    top: 12px !important;
    z-index: 10 !important;
    cursor: pointer !important;
  }

  .pop-up .close .rectangle-6 {
    background: #a80e1f !important;
    border-radius: 15px !important;
    width: 17px !important;
    height: 3.8px !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform-origin: center !important;
    transform: translate(-50%, -50%) rotate(-45deg) !important;
  }

  .pop-up .close .rectangle-7 {
    background: #a80e1f !important;
    border-radius: 15px !important;
    width: 17px !important;
    height: 3.8px !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform-origin: center !important;
    transform: translate(-50%, -50%) rotate(45deg) !important;
  }
}

/* Para pantallas muy pequeñas */
@media (max-width: 480px) {
  .pop-up {
    width: 90% !important;
    max-width: 342px !important;
    height: 161px !important;
    min-height: 161px !important;
  }

  .pop-up .a-santa-le-hace-falta-algo-en-la-lista {
    font-size: 19px !important;
  }

  .pop-up .acepta-todos-los-t-rminos-y-condiciones {
    font-size: 15px !important;
  }
}
