/* =========================================================
   PBTECH — HERO SAMSUNG GALAXY S26 ULTRA
   Versión definitiva / responsive / blindada para móviles
   ========================================================= */

#pb-s26-hero,
#pb-s26-hero * {
  box-sizing: border-box;
}

#pb-s26-hero {
  --pb-blue: #2685ff;
  --pb-cyan: #63d2ff;
  --pb-white: #ffffff;
  --pb-soft: rgba(255, 255, 255, 0.72);
  --pb-border: rgba(154, 193, 255, 0.26);

  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 720px;
  overflow: hidden;
  isolation: isolate;
  color: var(--pb-white);
  contain: paint;
}

/* Oscurecimiento del fondo */
#pb-s26-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(1, 5, 13, 0.94) 0%,
      rgba(1, 5, 13, 0.72) 38%,
      rgba(1, 5, 13, 0.16) 72%,
      rgba(1, 5, 13, 0.24) 100%
    );
}

#pb-s26-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 72% 48%,
      rgba(20, 115, 255, 0.16),
      transparent 34%
    );
}

.pb-s26-layout {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(390px, 0.92fr) minmax(470px, 1.08fr);
  align-items: center;
  gap: clamp(24px, 4vw, 72px);

  width: min(1440px, calc(100% - 64px));
  min-height: 720px;
  margin: 0 auto;
  padding: 64px 0;
}

/* =========================================================
   TEXTO
   ========================================================= */

.pb-s26-content {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 650px;
}

.pb-s26-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #5db0ff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.pb-s26-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pb-blue);
  box-shadow: 0 0 18px rgba(38, 133, 255, 0.95);
}

.pb-s26-brand {
  margin: 0 0 8px;
  font-size: clamp(19px, 1.7vw, 27px);
  font-weight: 800;
  letter-spacing: 0.12em;
}

.pb-s26-title {
  margin: 0;
  font-size: clamp(56px, 6vw, 100px);
  line-height: 0.93;
  font-weight: 760;
  letter-spacing: -0.055em;
}

.pb-s26-title span {
  display: block;
  margin-top: 10px;
  color: transparent;
  background:
    linear-gradient(
      100deg,
      #ffffff 0%,
      #a2c8ff 26%,
      #4d8dff 60%,
      #65d9ff 100%
    );
  -webkit-background-clip: text;
  background-clip: text;
}

.pb-s26-description {
  max-width: 560px;
  margin: 26px 0 30px;
  color: var(--pb-soft);
  font-size: clamp(17px, 1.45vw, 21px);
  line-height: 1.6;
}

/* =========================================================
   ESPECIFICACIONES
   ========================================================= */

.pb-s26-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;

  width: min(100%, 650px);
  overflow: hidden;
  border: 1px solid var(--pb-border);
  border-radius: 22px;

  background: rgba(255, 255, 255, 0.06);
  box-shadow:
    0 25px 65px rgba(0, 0, 0, 0.40),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);

  backdrop-filter: blur(20px) saturate(135%);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
}

.pb-s26-spec {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  min-height: 88px;
  padding: 18px;

  background: rgba(6, 13, 27, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.pb-s26-spec-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #6cb8ff;
  background: rgba(42, 129, 255, 0.12);
  border: 1px solid rgba(78, 153, 255, 0.24);
}

.pb-s26-spec strong,
.pb-s26-spec small {
  display: block;
}

.pb-s26-spec strong {
  margin-bottom: 4px;
  color: #fff;
  font-size: 15px;
}

.pb-s26-spec small {
  color: rgba(255, 255, 255, 0.60);
  font-size: 12px;
  line-height: 1.35;
}

/* =========================================================
   BOTONES
   ========================================================= */

.pb-s26-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.pb-s26-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;

  min-height: 54px;
  padding: 0 26px;
  border-radius: 999px;

  color: #fff;
  text-decoration: none !important;
  font-size: 15px;
  font-weight: 700;

  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease,
    border-color 220ms ease;
}

.pb-s26-button:hover {
  color: #fff;
  transform: translateY(-2px);
}

.pb-s26-button-primary {
  border: 1px solid rgba(101, 199, 255, 0.82);
  background:
    linear-gradient(
      115deg,
      rgba(23, 107, 255, 0.96),
      rgba(20, 180, 255, 0.85)
    );
  box-shadow:
    0 0 28px rgba(25, 127, 255, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.pb-s26-button-secondary {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 17, 32, 0.52);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.pb-s26-guarantee {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  padding: 10px 15px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(7, 17, 31, 0.45);
  border: 1px solid rgba(111, 172, 255, 0.16);
  font-size: 13px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.pb-s26-guarantee span {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  color: #7dc4ff;
  background: rgba(45, 136, 255, 0.16);
}

/* =========================================================
   ESCENARIO 3D
   ========================================================= */

.pb-s26-stage {
  position: relative;
  z-index: 4;
  width: 100%;
  min-width: 0;
  height: clamp(560px, 49vw, 700px);
  overflow: hidden;
}

.pb-s26-viewer-glass {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 36px;
  border: 1px solid rgba(142, 190, 255, 0.24);

  background:
    radial-gradient(
      circle at 52% 48%,
      rgba(74, 147, 255, 0.11),
      transparent 44%
    ),
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.075),
      rgba(255, 255, 255, 0.014) 46%,
      rgba(37, 110, 216, 0.055)
    );

  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.13);

  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  isolation: isolate;
}

.pb-s26-viewer-glass::before {
  content: "";
  position: absolute;
  top: -36%;
  left: -30%;
  z-index: 3;
  width: 68%;
  height: 155%;
  pointer-events: none;

  background:
    linear-gradient(
      105deg,
      transparent 28%,
      rgba(255, 255, 255, 0.08) 46%,
      transparent 64%
    );

  transform: translateX(-140%) rotate(10deg);
  opacity: 0;
}

#pb-s26-hero.pb-s26-flying .pb-s26-viewer-glass::before {
  animation: pbS26GlassSweep 1.7s 420ms ease-out forwards;
}

@keyframes pbS26GlassSweep {
  0% {
    opacity: 0;
    transform: translateX(-140%) rotate(10deg);
  }

  24% {
    opacity: 0.72;
  }

  100% {
    opacity: 0;
    transform: translateX(280%) rotate(10deg);
  }
}

/* Sombra de contacto */
.pb-s26-viewer-glass::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 7%;
  z-index: 0;
  width: 48%;
  height: 9%;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: rgba(0, 0, 0, 0.80);
  filter: blur(18px);
  transform: translateX(-50%) scaleX(0.50);
  transition:
    opacity 850ms ease,
    transform 1000ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

#pb-s26-hero.pb-s26-arrived .pb-s26-viewer-glass::after {
  opacity: 0.84;
  transform: translateX(-50%) scaleX(1);
}

/* Model viewer */
#pb-s26-model {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;

  background: transparent;
  outline: none;
  border: 0;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;

  transform:
    translate3d(-16%, -12%, 0)
    scale(0.30)
    rotate(-5deg);

  transform-origin: 50% 50%;
  filter:
    brightness(0.72)
    blur(0.5px)
    drop-shadow(0 0 4px rgba(55, 147, 255, 0.16));

  will-change: transform, opacity, filter;
  touch-action: pan-y;
  overscroll-behavior: contain;
  contain: layout paint size;
}

#pb-s26-hero.pb-s26-loaded #pb-s26-model {
  opacity: 1;
}

#pb-s26-hero.pb-s26-flying #pb-s26-model {
  animation:
    pbS26Flight 2.4s cubic-bezier(0.22, 0.75, 0.25, 1) forwards;
}

#pb-s26-hero.pb-s26-ready #pb-s26-model {
  cursor: grab;
  pointer-events: auto;
  transform:
    translate3d(0, -1.5%, 0)
    scale(1.03);
  filter:
    brightness(1)
    drop-shadow(0 26px 30px rgba(0, 0, 0, 0.56))
    drop-shadow(0 0 22px rgba(55, 145, 255, 0.20));
}

#pb-s26-hero.pb-s26-ready #pb-s26-model:active {
  cursor: grabbing;
}

@keyframes pbS26Flight {
  0% {
    opacity: 0;
    transform:
      translate3d(-16%, -12%, 0)
      scale(0.30)
      rotate(-5deg);
    filter:
      brightness(0.72)
      blur(0.6px);
  }

  20% {
    opacity: 1;
  }

  58% {
    transform:
      translate3d(-5%, -3%, 0)
      scale(0.74)
      rotate(1.5deg);
    filter:
      brightness(0.90)
      blur(0);
  }

  86% {
    transform:
      translate3d(0.5%, 0.5%, 0)
      scale(1.035)
      rotate(-0.4deg);
  }

  100% {
    opacity: 1;
    transform:
      translate3d(0, -1.5%, 0)
      scale(1.03)
      rotate(0deg);
    filter:
      brightness(1)
      drop-shadow(0 25px 30px rgba(0, 0, 0, 0.50));
  }
}

/* =========================================================
   GLOW / IMPACTO
   ========================================================= */

.pb-s26-glow {
  position: absolute;
  right: 4%;
  bottom: 4%;
  z-index: 1;
  width: min(620px, 48vw);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;

  background:
    radial-gradient(
      circle,
      rgba(64, 170, 255, 0.46) 0%,
      rgba(38, 120, 255, 0.23) 25%,
      rgba(20, 76, 180, 0.08) 48%,
      transparent 72%
    );

  filter: blur(28px);
  transform: translate3d(12%, 17%, 0) scale(0.45);
  transition:
    opacity 850ms ease,
    transform 1300ms cubic-bezier(0.16, 0.8, 0.23, 1);
}

#pb-s26-hero.pb-s26-arrived .pb-s26-glow {
  opacity: 0.92;
  transform: translate3d(12%, 17%, 0) scale(1);
}

.pb-s26-impact {
  position: absolute;
  left: 50%;
  top: 56%;
  z-index: 5;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: #b8e6ff;
  box-shadow:
    0 0 20px 8px rgba(120, 203, 255, 0.88),
    0 0 70px 28px rgba(40, 135, 255, 0.50),
    0 0 150px 65px rgba(35, 98, 255, 0.26);
  transform: translate(-50%, -50%) scale(0.2);
}

#pb-s26-hero.pb-s26-impact-active .pb-s26-impact {
  animation: pbS26Impact 850ms ease-out forwards;
}

@keyframes pbS26Impact {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }

  18% {
    opacity: 1;
  }

  48% {
    opacity: 0.84;
    transform: translate(-50%, -50%) scale(3.5);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(6);
  }
}

/* =========================================================
   LOADER / AYUDA
   ========================================================= */

.pb-s26-loader,
.pb-s26-hint {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 6;

  display: flex;
  align-items: center;
  gap: 9px;

  max-width: calc(100% - 24px);
  padding: 11px 16px;
  border-radius: 999px;

  color: rgba(255, 255, 255, 0.82);
  background: rgba(3, 10, 21, 0.66);
  border: 1px solid rgba(129, 184, 255, 0.23);

  font-size: 12px;
  white-space: nowrap;

  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  transform: translateX(-50%);
}

.pb-s26-loader span {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-top-color: #62b9ff;
  border-radius: 50%;
  animation: pbS26Spin 800ms linear infinite;
}

@keyframes pbS26Spin {
  to {
    transform: rotate(360deg);
  }
}

.pb-s26-hint {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
  transition:
    opacity 450ms ease,
    visibility 450ms ease,
    transform 450ms ease;
}

#pb-s26-hero.pb-s26-ready .pb-s26-hint {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.pb-s26-hint-icon {
  display: inline-block;
  color: #76c5ff;
  animation: pbS26Hint 1.35s ease-in-out infinite;
}

@keyframes pbS26Hint {
  0%,
  100% {
    transform: translateX(-2px);
  }

  50% {
    transform: translateX(3px);
  }
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {
  #pb-s26-hero {
    min-height: auto;
  }

  .pb-s26-layout {
    grid-template-columns: minmax(320px, 0.88fr) minmax(390px, 1.12fr);
    width: min(100% - 36px, 1100px);
    min-height: 660px;
    gap: 18px;
    padding: 44px 0;
  }

  .pb-s26-stage {
    height: 590px;
  }

  .pb-s26-title {
    font-size: clamp(52px, 7vw, 76px);
  }

  .pb-s26-spec {
    min-height: 78px;
    padding: 14px;
  }
}

/* =========================================================
   MÓVIL — BLINDADO
   ========================================================= */

@media (max-width: 767px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  #pb-s26-hero {
    width: 100%;
    max-width: 100%;
    min-height: auto;
    overflow: hidden;
    contain: paint;
  }

  #pb-s26-hero::before {
    background:
      linear-gradient(
        180deg,
        rgba(1, 5, 13, 0.34) 0%,
        rgba(1, 5, 13, 0.76) 42%,
        rgba(1, 5, 13, 0.96) 100%
      );
  }

  .pb-s26-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: auto;
    gap: 12px;
    padding:
      max(24px, env(safe-area-inset-top))
      14px
      max(34px, env(safe-area-inset-bottom));
  }

  .pb-s26-content {
    order: 1;
    width: 100%;
    max-width: none;
    padding: 6px 4px 0;
  }

  .pb-s26-stage {
    order: 2;
    width: 100%;
    height: clamp(410px, 116vw, 525px);
    min-height: 410px;
    max-height: 525px;
    overflow: hidden;
  }

  .pb-s26-viewer-glass {
    border-radius: 24px;
  }

  .pb-s26-eyebrow {
    margin-bottom: 8px;
    font-size: 11px;
  }

  .pb-s26-brand {
    margin-bottom: 7px;
    font-size: 15px;
  }

  .pb-s26-title {
    font-size: clamp(48px, 15vw, 68px);
    line-height: 0.94;
  }

  .pb-s26-title span {
    margin-top: 7px;
  }

  .pb-s26-description {
    margin: 18px 0 20px;
    font-size: 15px;
    line-height: 1.52;
  }

  .pb-s26-specs {
    grid-template-columns: 1fr 1fr;
    border-radius: 18px;
  }

  .pb-s26-spec {
    min-height: 88px;
    padding: 13px 10px;
    gap: 9px;
  }

  .pb-s26-spec-icon {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .pb-s26-spec strong {
    overflow-wrap: anywhere;
    font-size: 12px;
  }

  .pb-s26-spec small {
    overflow-wrap: anywhere;
    font-size: 10px;
  }

  .pb-s26-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 18px;
  }

  .pb-s26-button {
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
  }

  .pb-s26-guarantee {
    margin-top: 15px;
  }

  #pb-s26-model {
    width: 100%;
    height: 100%;
    max-width: 100%;
    transform-origin: 50% 50%;
    touch-action: pan-y;
    overscroll-behavior: contain;
    contain: layout paint size;
  }

  #pb-s26-hero.pb-s26-ready #pb-s26-model {
    transform:
      translate3d(0, -1%, 0)
      scale(1.015);
  }

  .pb-s26-viewer-glass::after {
    left: 50%;
    bottom: 8%;
    width: 56%;
    height: 8%;
  }

  .pb-s26-impact {
    left: 50%;
    top: 54%;
  }

  .pb-s26-glow {
    right: 50%;
    bottom: 8%;
    width: 88vw;
    max-width: 420px;
    opacity: 0;
    filter: blur(34px);
    transform: translate(50%, 0) scale(0.5);
  }

  #pb-s26-hero.pb-s26-arrived .pb-s26-glow {
    opacity: 0.30;
    transform: translate(50%, 0) scale(1);
  }

  .pb-s26-loader,
  .pb-s26-hint {
    bottom: 13px;
    max-width: calc(100% - 24px);
    font-size: 11px;
  }
}

/* Pantallas muy pequeñas */
@media (max-width: 380px) {
  .pb-s26-layout {
    padding-left: 10px;
    padding-right: 10px;
  }

  .pb-s26-title {
    font-size: 46px;
  }

  .pb-s26-spec {
    min-height: 93px;
    padding: 11px 8px;
  }

  .pb-s26-spec-icon {
    display: none;
  }

  .pb-s26-stage {
    height: 410px;
    min-height: 410px;
  }
}

/* =========================================================
   ACCESIBILIDAD
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  #pb-s26-model,
  .pb-s26-glow,
  .pb-s26-impact,
  .pb-s26-hint,
  .pb-s26-viewer-glass::before {
    animation: none !important;
    transition: none !important;
  }

  #pb-s26-model {
    opacity: 1;
    transform:
      translate3d(0, -1.5%, 0)
      scale(1.03);
    filter: none;
  }
}

/* =========================================================
   DETALLES PREMIUM V2
   - Cristal menos marcado
   - Destello azul al pulsar "Comprar ahora"
   ========================================================= */

/* El vidrio queda más integrado con el fondo */
.pb-s26-viewer-glass {
  border-color: rgba(142, 190, 255, 0.14);

  background:
    radial-gradient(
      circle at 50% 48%,
      rgba(74, 147, 255, 0.08),
      transparent 48%
    ),
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.045),
      rgba(255, 255, 255, 0.008) 48%,
      rgba(37, 110, 216, 0.035)
    );

  box-shadow:
    0 28px 75px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 60px rgba(65, 130, 230, 0.035);

  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* Degradado adicional para disolver visualmente las esquinas */
.pb-s26-viewer-glass {
  -webkit-mask-image:
    radial-gradient(
      ellipse 112% 112% at 50% 50%,
      #000 76%,
      rgba(0, 0, 0, 0.88) 88%,
      rgba(0, 0, 0, 0.72) 100%
    );
  mask-image:
    radial-gradient(
      ellipse 112% 112% at 50% 50%,
      #000 76%,
      rgba(0, 0, 0, 0.88) 88%,
      rgba(0, 0, 0, 0.72) 100%
    );
}

/* Luz azul de compra */
.pb-s26-purchase-flash {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;

  width: 18px;
  height: 18px;
  border-radius: 50%;

  pointer-events: none;
  opacity: 0;

  background: rgba(189, 232, 255, 0.98);

  box-shadow:
    0 0 24px 10px rgba(116, 205, 255, 0.92),
    0 0 95px 42px rgba(42, 139, 255, 0.62),
    0 0 190px 95px rgba(23, 85, 255, 0.30);

  transform: translate(-50%, -50%) scale(0.15);
  mix-blend-mode: screen;
}

#pb-s26-hero.pb-s26-buy-flash .pb-s26-purchase-flash {
  animation: pbS26PurchaseFlash 760ms ease-out forwards;
}

@keyframes pbS26PurchaseFlash {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.15);
  }

  18% {
    opacity: 1;
  }

  46% {
    opacity: 0.92;
    transform: translate(-50%, -50%) scale(3.6);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(7.2);
  }
}

/* Ligero refuerzo del botón al hacer clic */
.pb-s26-button-primary.pb-s26-button-clicked {
  transform: translateY(-1px) scale(0.985);
  box-shadow:
    0 0 44px rgba(25, 127, 255, 0.70),
    0 0 90px rgba(25, 127, 255, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

/* En móvil evitamos que el destello exceda visualmente el escenario */
@media (max-width: 767px) {
  .pb-s26-purchase-flash {
    width: 14px;
    height: 14px;
  }

  .pb-s26-viewer-glass {
    border-color: rgba(142, 190, 255, 0.12);
    box-shadow:
      0 22px 55px rgba(0, 0, 0, 0.30),
      inset 0 1px 0 rgba(255, 255, 255, 0.07);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pb-s26-purchase-flash {
    animation: none !important;
  }
}
