/* Perfume Personality Quiz + invitation popup — mobile-first */

.batin-pq {
  --pq-gold: #b08d57;
  --pq-ink: #1a1612;
  --pq-muted: #5a4a42;
  --pq-cream: #f7f3eb;
  --pq-line: rgba(60, 50, 43, 0.14);
  --pq-radius: 4px;
  --pq-touch: 48px;
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
  color: var(--pq-ink);
  font-family: var(--batin-font-sans, "Instrument Sans", system-ui, sans-serif);
}

.batin-pq__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pq-gold);
  font-family: var(--batin-font-serif, "Marcellus", Georgia, serif);
}

.batin-pq__title {
  margin: 0 0 0.5rem;
  font-family: var(--batin-font-serif, "Marcellus", Georgia, serif);
  font-size: clamp(1.65rem, 5vw, 2.35rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--pq-ink);
}

.batin-pq__lead,
.batin-pq__question {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--pq-muted);
}

.batin-pq__question {
  font-family: var(--batin-font-serif, "Marcellus", Georgia, serif);
  font-size: clamp(1.2rem, 3.8vw, 1.55rem);
  color: var(--pq-ink);
}

.batin-pq__progress {
  margin: 1.25rem 0 1.5rem;
}

.batin-pq__progress-bar {
  height: 4px;
  background: var(--pq-line);
  border-radius: 999px;
  overflow: hidden;
}

.batin-pq__progress-fill {
  display: block;
  height: 100%;
  background: var(--pq-gold);
  transition: width 0.35s ease;
}

.batin-pq__progress-label {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--pq-muted);
}

.batin-pq__stage {
  animation: batin-pq-fade 0.35s ease;
}

.batin-pq__stage[hidden] {
  display: none !important;
}

@keyframes batin-pq-fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.batin-pq__answers {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.batin-pq__answer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--pq-touch);
  padding: 0.85rem 1rem;
  border: 1px solid var(--pq-line);
  border-radius: var(--pq-radius);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.batin-pq__answer:hover,
.batin-pq__answer:focus-within,
.batin-pq__answer.is-selected {
  border-color: var(--pq-gold);
  background: rgba(176, 141, 87, 0.06);
  box-shadow: 0 0 0 1px rgba(176, 141, 87, 0.25);
}

.batin-pq__answer input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--pq-gold);
  flex-shrink: 0;
}

.batin-pq__answer-label {
  font-size: 1rem;
  line-height: 1.4;
  color: var(--pq-ink);
}

.batin-pq__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.batin-pq__nav-spacer {
  flex: 1;
}

.batin-pq__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--pq-touch);
  min-width: 7.5rem;
  padding: 0.7rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--pq-radius);
  font-family: inherit;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.batin-pq__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.batin-pq__btn--primary {
  background: var(--pq-gold);
  color: #fff !important;
  border-color: var(--pq-gold);
}

.batin-pq__btn--primary:hover:not(:disabled) {
  background: #9a7848;
  border-color: #9a7848;
  color: #fff !important;
}

.batin-pq__btn--ghost {
  background: transparent;
  color: var(--pq-ink) !important;
  border-color: var(--pq-line);
}

.batin-pq__btn--ghost:hover {
  border-color: var(--pq-gold);
  color: var(--pq-gold) !important;
}

.batin-pq__result-card {
  margin: 0.75rem 0 1.25rem;
}

.batin-pq__result-loading {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--pq-muted);
}

.batin-pq__product {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

.batin-pq__product-media {
  background: var(--pq-cream);
  border-radius: var(--pq-radius);
  overflow: hidden;
}

.batin-pq__product-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.batin-pq__profile {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pq-gold);
}

.batin-pq__product-name {
  margin: 0 0 0.5rem;
  font-family: var(--batin-font-serif, "Marcellus", Georgia, serif);
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  font-weight: 400;
}

.batin-pq__product-name a {
  color: inherit;
  text-decoration: none;
}

.batin-pq__product-price {
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
  color: var(--pq-ink);
}

.batin-pq__product-short {
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--pq-muted);
}

.batin-pq__product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.batin-pq-error {
  color: #8a2e2e;
  padding: 1rem;
  background: #fdf2f2;
  border-radius: var(--pq-radius);
}

/* Popup */
.batin-pq-popup {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.75rem;
}

.batin-pq-popup[hidden] {
  display: none !important;
}

.batin-pq-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 6, 0.55);
}

.batin-pq-popup__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: min(92vh, 640px);
  overflow: auto;
  background: #fff;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
  animation: batin-pq-sheet 0.35s ease;
  -webkit-overflow-scrolling: touch;
}

@keyframes batin-pq-sheet {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.batin-pq-popup__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--pq-ink, #1a1612);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
}

.batin-pq-popup__media {
  background: #0a0806;
}

.batin-pq-popup__media[hidden] {
  display: none !important;
}

.batin-pq-popup__media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 38vh;
  object-fit: cover;
}

.batin-pq-popup__body {
  padding: 1.15rem 1.15rem 1.4rem;
}

.batin-pq-popup__title {
  margin: 0 0 0.55rem;
  padding-right: 2.5rem;
  font-family: var(--batin-font-serif, "Marcellus", Georgia, serif);
  font-size: clamp(1.2rem, 4.5vw, 1.45rem);
  font-weight: 400;
  line-height: 1.3;
  color: #1a1612;
}

.batin-pq-popup__text {
  margin: 0 0 1.15rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #5a4a42;
}

.batin-pq-popup__actions {
  display: grid;
  gap: 0.65rem;
}

.batin-pq-popup__cta,
.batin-pq-popup__skip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1rem;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}

.batin-pq-popup__cta {
  background: #b08d57;
  color: #fff !important;
  border-color: #b08d57;
}

.batin-pq-popup__cta:hover {
  background: #9a7848;
  color: #fff !important;
}

.batin-pq-popup__skip {
  background: transparent;
  color: #5a4a42;
  border-color: rgba(60, 50, 43, 0.18);
}

body.batin-pq-popup-open {
  overflow: hidden;
}

/* Tablet+ */
@media (min-width: 600px) {
  .batin-pq {
    padding: 1.75rem 1.25rem 3rem;
  }

  .batin-pq__answers {
    grid-template-columns: 1fr 1fr;
  }

  .batin-pq__product {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 1.75rem;
    align-items: center;
  }

  .batin-pq-popup {
    align-items: center;
    padding: 1.5rem;
  }

  .batin-pq-popup__dialog {
    width: min(100%, 480px);
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    animation-name: batin-pq-fade;
  }

  .batin-pq-popup__media img {
    max-height: 220px;
  }

  .batin-pq-popup__actions {
    grid-template-columns: 1fr 1fr;
  }
}

/* Desktop */
@media (min-width: 960px) {
  .batin-pq {
    max-width: 860px;
    padding-top: 2.25rem;
  }

  .batin-pq__answers {
    gap: 0.85rem;
  }

  .batin-pq__answer {
    padding: 1rem 1.15rem;
  }

  .batin-pq-popup__dialog {
    width: min(100%, 520px);
  }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .batin-pq__stage,
  .batin-pq-popup__dialog,
  .batin-pq__progress-fill {
    animation: none !important;
    transition: none !important;
  }
}
