/* ============================================================
   style.css
   ------------------------------------------------------------
   Design tokens live in :root as CSS variables so colors and
   spacing stay consistent and are easy to tweak in one place.
   ============================================================ */

:root {
  /* Colors */
  --color-bg: #f5f7fa;
  --color-surface: #ffffff;
  --color-surface-alt: #eef2f7;
  --color-text: #101828;
  --color-text-muted: #5c6673;
  --color-accent:  #eeb1dd;      /* primary blue - trust & action */
  --color-accent-hover: #f0c5e7;
  --color-success: #16a34a;
  --color-error: #dc2626;
  --color-border: #e4e8ee;
  --color-pink: #ec4899;
  --color-pink-soft: rgba(236, 72, 153, 0.1);

  /* Layout */
  --radius-lg: 20px;
  --radius-md: 12px;
  --shadow-soft: 0 10px 30px rgba(16, 24, 40, 0.08);
  --shadow-button: 0 8px 20px rgba(37, 99, 235, 0.25);

  /* Typography */
  --font-main: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ------------------------------------------------------------
   Reset & base styles
   ------------------------------------------------------------ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background: linear-gradient(180deg, var(--color-bg) 0%, #eef1f6 100%);
  color: var(--color-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------
   Page layout - centers the card both vertically & horizontally
   ------------------------------------------------------------ */
.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* ------------------------------------------------------------
   Services section (landing page)
   ------------------------------------------------------------ */
.services {
  max-width: 440px;
  width: 100%;
}

.services__heading {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 6px;
}

.services__subheading {
  font-size: 14.5px;
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: 24px;
}

.service-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Each service box is a full <button> so it's clickable and
   keyboard-accessible everywhere, not just on a small "Buy" button */
.service-box {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-main);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.service-box:hover {
  transform: translateY(-2px);
  border-color: var(--color-accent);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.14);
}

.service-box:active {
  transform: translateY(0) scale(0.99);
}

.service-box:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
}

.service-box--loading {
  border-color: var(--color-accent);
}

.service-box__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-box__icon svg {
  width: 22px;
  height: 22px;
}

.service-box__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.service-box__title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--color-text);
}

.service-box__subtitle {
  font-size: 13.5px;
  color: var(--color-text-muted);
}

.service-box__arrow {
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-accent);
}

/* ------------------------------------------------------------
   Brow Lamination detail panel
   ------------------------------------------------------------ */
.detail-panel {
  /* Smaller than before, still comfortably readable */
  width: 38vw;
  max-width: 440px;
  min-width: 300px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: panel-grow 0.25s ease;
}

/* IMPORTANT: .detail-panel sets display:flex above, which (being an
   author style) would otherwise override the browser's built-in
   "display:none" for the [hidden] attribute, since both rules have
   the same specificity. This rule makes sure [hidden] always wins,
   so the panel is truly invisible until JS removes the attribute. */
.detail-panel[hidden] {
  display: none;
}

@keyframes panel-grow {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.detail-panel__back {
  align-self: flex-start;
  background: none;
  border: none;
  font-family: var(--font-main);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px 0;
}

.detail-panel__back:hover {
  color: var(--color-accent);
}

.detail-panel__header {
  text-align: center;
}

.detail-panel__title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.detail-panel__subtitle {
  font-size: 15px;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}

/* "Clase online en vivo" badge with a pulsing red dot */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-error);
  background: rgba(220, 38, 38, 0.08);
  padding: 6px 14px;
  border-radius: 999px;
}

.live-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-error);
  animation: live-pulse 1.4s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

/* Price */
.price-box {
  align-self: center;
  display: flex;
  align-items: baseline;
  gap: 6px;
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  padding: 14px 28px;
}

.price-box__amount {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-accent);
}

.price-box__currency {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-muted);
}

/* Instructor - pink border, rounded corners */
.instructor-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border: 2px solid var(--color-pink);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.instructor-box__label {
  font-size: 14.5px;
  color: var(--color-text-muted);
}

.instructor-box__name {
  font-weight: 700;
  color: var(--color-text);
}

.instructor-box__badge {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-pink);
  background: var(--color-pink-soft);
  padding: 5px 12px;
  border-radius: 999px;
}

/* Syllabus */
.syllabus-box__title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 10px;
}

.syllabus-box__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.syllabus-box__list li {
  position: relative;
  padding-left: 22px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--color-text);
}

.syllabus-box__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--color-accent);
}

/* Highlights */
.highlights-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

/* Pink pill, fully rounded (true pill shape) */
.diploma-pill {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-pink);
  background: var(--color-pink-soft);
  border-radius: 999px;
  padding: 14px 26px;
}

.highlight-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.highlight-text__star {
  width: 18px;
  height: 18px;
  color: #f59e0b;
  flex-shrink: 0;
}

/* Schedule */
.schedule {
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  padding: 20px;
}

.schedule__title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  margin-bottom: 16px;
}

.schedule__grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.schedule__item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
  font-weight: 600;
}

.schedule__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.schedule__note {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-text-muted);
}

/* Buy button inside the detail panel */
.buy-now-btn {
  width: 100%;
  padding: 17px 20px;
  font-family: var(--font-main);
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-button);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.buy-now-btn:hover {
  background: var(--color-accent-hover);
}

.buy-now-btn:active {
  transform: scale(0.98);
}

.buy-now-btn:disabled {
  background: #9ab3e8;
  cursor: not-allowed;
  box-shadow: none;
}

.error-message {
  color: var(--color-error);
  font-size: 13.5px;
  margin-top: 16px;
  text-align: center;
}

.secure-note {
  margin-top: 22px;
  text-align: center;
  font-size: 12.5px;
  color: var(--color-text-muted);
}

/* ------------------------------------------------------------
   Success page
   ------------------------------------------------------------ */
.success-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border);
  max-width: 380px;
  width: 100%;
  padding: 32px 28px;
  text-align: center;
  animation: success-card-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes success-card-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.success-icon {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 22px;
}

/* The green circle behind the checkmark. It "pops" in with a
   slight overshoot, giving it a satisfying bounce. */
.success-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(22, 163, 74, 0.12);
  animation: success-circle-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

@keyframes success-circle-pop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* A ring that expands outward and fades, like a soft pulse/ripple */
.success-icon__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--color-success);
  animation: success-ring-pulse 1s ease-out 0.5s;
  opacity: 0;
}

@keyframes success-ring-pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* The checkmark itself, "drawn" using a stroke-dasharray trick:
   the line starts fully hidden (offset by its own length) and
   animates to offset 0, revealing it stroke by stroke. */
.success-icon__check {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 32px;
  height: 32px;
}

.success-icon__check path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: success-check-draw 0.4s ease-out 0.45s forwards;
}

@keyframes success-check-draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* Confetti: small colored dots that burst outward from the center
   once, then fade. Each piece gets its own angle/distance/color
   via a per-element CSS variable and a slightly staggered delay. */
.confetti {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--confetti-color, var(--color-accent));
  opacity: 0;
  animation: confetti-burst 0.7s ease-out 0.5s forwards;
}

@keyframes confetti-burst {
  0% {
    transform: translate(-50%, -50%) rotate(0deg) translateY(0);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) rotate(var(--confetti-angle, 0deg)) translateY(-42px) rotate(180deg);
    opacity: 0;
  }
}

.confetti--1 { --confetti-angle: 0deg;   --confetti-color: var(--color-accent); }
.confetti--2 { --confetti-angle: 60deg;  --confetti-color: var(--color-pink); }
.confetti--3 { --confetti-angle: 120deg; --confetti-color: #f59e0b; }
.confetti--4 { --confetti-angle: 180deg; --confetti-color: var(--color-success); }
.confetti--5 { --confetti-angle: 240deg; --confetti-color: var(--color-accent); }
.confetti--6 { --confetti-angle: 300deg; --confetti-color: var(--color-pink); }

.success-card__title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  animation: success-text-in 0.4s ease-out 0.55s both;
}

.success-card__description {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--color-text-muted);
  animation: success-text-in 0.4s ease-out 0.65s both;
}

@keyframes success-text-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

 
/* WhatsApp group link — shown only after a successful payment,
   for the specific service that was purchased. Icon-only circular
   button with a text caption underneath. */
.whatsapp-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  animation: success-text-in 0.4s ease-out 0.7s both;
}
 
.whatsapp-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  color: #ffffff;
  background: #25d366;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.25);
  transition: background 0.15s ease, transform 0.1s ease;
}
 
.whatsapp-link i {
  font-size: 26px;
  line-height: 1;
}
 
.whatsapp-link:hover {
  background: #1ebe5b;
  transform: scale(1.05);
}
 
.whatsapp-block__caption {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text-muted);
}
 
/* Same rule as .detail-panel[hidden]: since .whatsapp-block sets
   display:flex, that author style would otherwise beat the browser's
   built-in display:none for [hidden] at equal specificity. This makes
   sure [hidden] always wins, so the block stays truly invisible
   until success.js reveals it for a recognized product. */
.whatsapp-block[hidden] {
  display: none;
}

 

.home-link {
  display: inline-block;
  margin-top: 24px;
  width: 100%;
  padding: 15px 20px;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  color: #ffffff;
  background: var(--color-accent);
  border-radius: var(--radius-md);
  animation: success-text-in 0.4s ease-out 0.75s both;
  box-shadow: var(--shadow-button);
  transition: background 0.15s ease;
}

.home-link:hover {
  background: var(--color-accent-hover);
}

/* ------------------------------------------------------------
   Responsive tweaks for small screens
   ------------------------------------------------------------ */
@media (max-width: 420px) {
  .service-box {
    padding: 16px;
    gap: 12px;
  }

  .services__heading {
    font-size: 21px;
  }

  .success-card {
    padding: 26px 20px;
  }

  /* On small screens, 38vw is too narrow to read comfortably,
     so the detail panel expands closer to full width instead */
  .detail-panel {
    width: 90vw;
    padding: 20px;
  }

  .detail-panel__title {
    font-size: 22px;
  }
}
