/* =============================================================
   SECTION 4 — INTERACTIVE BODY SCANNER & POPULAR TESTS
   All rules strictly scoped under .popular-tests
   ============================================================= */

.popular-tests {
  --pt-navy-950: #231C2C;
  --pt-navy-900: #292130;
  --pt-navy-800: #3B2F4A;
  --pt-teal-500: #8B5E83;
  --pt-teal-600: #6F5878;
  --pt-teal-300: #C77D8A;
  --pt-teal-050: #FCF3F4;
  --pt-cyan-500: #A98BC2;
  --pt-ink: #29252F;
  --pt-ink-soft: #6D6670;
  --pt-ink-faint: #9A929E;
  --pt-border: #E6DEE7;
  --pt-white: #FFFFFF;
  --pt-font-display: "Bricolage Grotesque", "Inter", sans-serif;
  --pt-font-body: "Inter", sans-serif;

  position: relative;
  background: linear-gradient(180deg, #FBF5EC 0%, #F3EADF 100%);
  padding-top: 6rem;
  padding-bottom: 6.5rem;
  font-family: var(--pt-font-body);
  overflow: hidden;
  isolation: isolate;
}

/* ---------- Ambient Background Aura ---------- */
.popular-tests-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(130px);
  z-index: 0;
}
.popular-tests-glow-1 {
  width: 38rem;
  height: 38rem;
  top: -6rem;
  left: -8rem;
  background: radial-gradient(
    circle,
    rgba(169, 139, 194, 0.12) 0%,
    transparent 70%
  );
}
.popular-tests-glow-2 {
  width: 36rem;
  height: 36rem;
  bottom: -6rem;
  right: -8rem;
  background: radial-gradient(
    circle,
    rgba(199, 125, 138, 0.08) 0%,
    transparent 70%
  );
}

.popular-tests-container {
  position: relative;
  z-index: 1;
}

/* ---------- Section Header ---------- */
.popular-tests-header {
  max-width: 52rem;
  margin: 0 auto 3rem;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
}
.popular-tests-header.is-visible {
  animation: pt-slide-up 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes pt-slide-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.popular-tests-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8B5E83;
  background: #FFFFFF;
  border: 1px solid rgba(139, 94, 131, 0.28);
  padding: 0.4rem 1.05rem;
  border-radius: 9999px;
  box-shadow: 0 2px 10px -2px rgba(139, 94, 131, 0.12);
  margin-bottom: 0.85rem;
}
.popular-tests-eyebrow i {
  font-size: 0.85rem;
  color: #C77D8A;
}

.popular-tests-title {
  font-family: var(--pt-font-display);
  font-weight: 700;
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  color: var(--pt-ink);
  margin-bottom: 0.85rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.popular-tests-description {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--pt-ink-soft);
  max-width: 44rem;
  margin: 0 auto;
}

/* =============================================================
   PACKAGE TICKETS
   ============================================================= */
.pt-ticket-row {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 2.75rem;
  flex-wrap: wrap;
}

.pt-ticket {
  flex: 1 1 280px;
  display: flex;
  align-items: stretch;
  background: var(--pt-white);
  border: 1px solid var(--pt-border);
  border-radius: 1.1rem;
  overflow: hidden;
  text-decoration: none;
  position: relative;
  box-shadow: 0 10px 26px -14px rgba(41, 33, 48, 0.08);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.pt-ticket:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px -14px rgba(41, 33, 48, 0.14);
}

.pt-ticket-flag {
  position: absolute;
  top: -9px;
  right: 126px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: linear-gradient(135deg, #C77D8A, #9E6A94);
  color: #FFFFFF;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
  box-shadow: 0 4px 10px rgba(199, 125, 138, 0.35);
  z-index: 2;
}

.pt-ticket-main {
  flex: 1;
  padding: 1.1rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.pt-ticket-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--pt-teal-050);
  color: #8B5E83;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--pt-font-display);
  font-weight: 800;
  font-size: 0.8rem;
}
.pt-ticket-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.pt-ticket-text strong {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--pt-navy-900);
  line-height: 1.25;
}
.pt-ticket-text span {
  font-size: 0.7rem;
  color: var(--pt-ink-soft);
  font-weight: 500;
}

.pt-ticket-stub {
  width: 118px;
  flex-shrink: 0;
  position: relative;
  background: var(--pt-navy-900);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.75rem 0.5rem;
  border-left: 2px dashed rgba(255, 255, 255, 0.2);
}
.pt-ticket-stub::before,
.pt-ticket-stub::after {
  content: "";
  position: absolute;
  left: -8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #FBF5EC;
}
.pt-ticket-stub::before {
  top: -8px;
}
.pt-ticket-stub::after {
  bottom: -8px;
}

.pt-ticket-price {
  font-family: var(--pt-font-display);
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
}
.pt-ticket-old {
  font-size: 0.64rem;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: line-through;
}
.pt-ticket-cta {
  font-size: 0.68rem;
  font-weight: 700;
  color: #C77D8A;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.15rem;
}

/* =============================================================
   BODY SCANNER
   ============================================================= */
.pt-scanner {
  display: flex;
  gap: 1.75rem;
  margin-bottom: 2.5rem;
  align-items: stretch;
}

.pt-scanner-figure {
  flex: 0 0 320px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--pt-navy-900), var(--pt-navy-800));
  border-radius: 1.75rem;
  padding: 1.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 25px 60px -25px rgba(41, 33, 48, 0.4);
}
.pt-scanner-figure::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(169, 139, 194, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(169, 139, 194, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}
.pt-scanner-figure::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 260px;
  height: 260px;
  background: radial-gradient(
    circle,
    rgba(199, 125, 138, 0.2),
    transparent 70%
  );
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.pt-body-svg {
  position: relative;
  z-index: 1;
  width: 70%;
  max-width: 210px;
  height: auto;
}
.pt-body-part {
  fill: rgba(169, 139, 194, 0.12);
  stroke: rgba(199, 125, 138, 0.65);
  stroke-width: 1.5;
}

.pt-scanner-scanline {
  position: absolute;
  left: 8%;
  right: 8%;
  height: 2px;
  z-index: 2;
  top: 10%;
  background: linear-gradient(
    90deg,
    transparent,
    #A98BC2,
    transparent
  );
  box-shadow: 0 0 14px #A98BC2;
  animation: pt-body-scan 4s ease-in-out infinite;
}
@keyframes pt-body-scan {
  0%,
  100% {
    top: 10%;
    opacity: 0.2;
  }
  50% {
    top: 85%;
    opacity: 1;
  }
}

.pt-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.pt-hotspot.pt-hotspot-flip {
  flex-direction: row-reverse;
}

.pt-hotspot-dot {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #C77D8A;
  box-shadow: 0 0 0 4px rgba(199, 125, 138, 0.25);
}
.pt-hotspot-dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(199, 125, 138, 0.5);
  animation: pt-hotspot-ping 2.2s ease-out infinite;
}
@keyframes pt-hotspot-ping {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.pt-hotspot-label {
  font-size: 0.66rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(199, 125, 138, 0.35);
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  transition: all 0.2s ease;
}
.pt-hotspot:hover .pt-hotspot-label,
.pt-hotspot.active .pt-hotspot-label {
  background: #C77D8A;
  color: #FFFFFF;
  border-color: transparent;
}
.pt-hotspot.active .pt-hotspot-dot {
  background: #fff;
  box-shadow: 0 0 0 5px rgba(199, 125, 138, 0.5);
}

.pt-scanner-panel {
  flex: 1;
  min-width: 0;
  background: var(--pt-white);
  border: 1px solid var(--pt-border);
  border-radius: 1.75rem;
  padding: 1.75rem 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px -30px rgba(41, 33, 48, 0.08);
}
.pt-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--pt-border);
}
.pt-panel-eyebrow {
  font-family: var(--pt-font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--pt-navy-900);
  display: block;
  margin-bottom: 0.3rem;
}
.pt-panel-hint {
  font-size: 0.8rem;
  color: var(--pt-ink-soft);
  margin: 0;
  max-width: 26rem;
}
.pt-panel-reset {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  cursor: pointer;
  background: var(--pt-teal-050);
  color: #8B5E83;
  border: 1px solid rgba(139, 94, 131, 0.3);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 9999px;
  transition: all 0.2s ease;
}
.pt-panel-reset:hover {
  background: #8B5E83;
  color: #fff;
}

.pt-test-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.35rem;
}
.pt-test-list::-webkit-scrollbar {
  width: 6px;
}
.pt-test-list::-webkit-scrollbar-thumb {
  background: rgba(41, 33, 48, 0.15);
  border-radius: 9999px;
}

.pt-test-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--pt-border);
  border-radius: 1rem;
  transition: all 0.3s ease;
  opacity: 1;
  transform: scale(1);
}
.pt-test-list.is-filtered .pt-test-row {
  opacity: 0.32;
  filter: grayscale(0.5);
  transform: scale(0.97);
}
.pt-test-list.is-filtered .pt-test-row.is-match {
  opacity: 1;
  filter: none;
  transform: scale(1);
  border-color: rgba(139, 94, 131, 0.45);
  background: var(--pt-teal-050);
  box-shadow: 0 8px 20px -10px rgba(139, 94, 131, 0.35);
}

.pt-test-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.icon-blue {
  background: #EFEAF3;
  color: #3B2F4A;
}
.icon-rose {
  background: #FCF3F4;
  color: #C77D8A;
}
.icon-purple {
  background: #F3EEF9;
  color: #8B5E83;
}
.icon-teal {
  background: #F1ECF7;
  color: #6F5878;
}
.icon-cyan {
  background: #FCF3F4;
  color: #C77D8A;
}
.icon-yellow {
  background: #FAF0E4;
  color: #9E6B28;
}

.pt-test-info {
  flex: 1;
  min-width: 0;
}
.pt-test-info h4 {
  font-family: var(--pt-font-display);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--pt-navy-900);
  margin: 0 0 0.1rem;
  line-height: 1.3;
}
.pt-test-info p {
  font-size: 0.7rem;
  color: var(--pt-ink-soft);
  margin: 0;
}

.pt-test-right {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}
.pt-test-price {
  font-family: var(--pt-font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--pt-navy-900);
}
.pt-test-book {
  padding: 0.35rem 0.85rem;
  background: var(--pt-navy-900);
  color: #fff;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}
.pt-test-book:hover {
  background: #8B5E83;
  color: #fff;
}

/* =============================================================
   BOTTOM ASSISTANCE BANNER
   ============================================================= */
.popular-tests-bottom-banner {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(251, 245, 236, 0.9) 100%
  );
  border: 1px solid rgba(139, 94, 131, 0.25);
  border-radius: 1.4rem;
  padding: 1.85rem 2.25rem;
  box-shadow: 0 18px 40px -15px rgba(41, 33, 48, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.bottom-banner-content {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: 44rem;
}
.bottom-banner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  min-width: 3.5rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #8B5E83, #3B2F4A);
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 8px 18px -4px rgba(139, 94, 131, 0.35);
}
.bottom-banner-content h4 {
  font-family: var(--pt-font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--pt-navy-900);
  margin-bottom: 0.25rem;
}
.bottom-banner-content p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--pt-ink-soft);
  margin-bottom: 0;
}
.bottom-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}
.bottom-btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #8B5E83;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.72rem 1.4rem;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 6px 18px -4px rgba(139, 94, 131, 0.4);
  transition: all 0.28s ease;
}
.bottom-btn-whatsapp:hover {
  background: #6F5878;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -4px rgba(139, 94, 131, 0.5);
}
.bottom-btn-call {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  color: var(--pt-navy-900);
  border: 1px solid var(--pt-border);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.72rem 1.35rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.28s ease;
}
.bottom-btn-call:hover {
  border-color: #8B5E83;
  background: var(--pt-teal-050);
  color: #8B5E83;
  transform: translateY(-2px);
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 900px) {
  .pt-scanner {
    flex-direction: column;
  }
  .pt-scanner-figure {
    flex: none;
    width: 100%;
    padding: 2rem 1rem;
  }
  .pt-body-svg {
    max-width: 190px;
  }
}

@media (max-width: 767.98px) {
  .pt-ticket-row {
    flex-direction: column;
  }
  .popular-tests-bottom-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
  }
  .bottom-banner-actions {
    width: 100%;
    flex-direction: column;
  }
  .bottom-btn-whatsapp,
  .bottom-btn-call {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .popular-tests {
    padding-top: 4.5rem;
    padding-bottom: 5rem;
  }
  .pt-scanner-panel {
    padding: 1.5rem 1.25rem 1rem;
  }
  .pt-test-right {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .pt-scanner-scanline,
  .pt-hotspot-dot::after {
    animation: none !important;
  }
  .pt-ticket,
  .pt-test-row,
  .pt-test-book {
    transition: none !important;
  }
}
