/* Store purchase paths — aligned with maestro-store-v2 / product-purchase */
@import url("../maestro-btn-section.css");

.store-purchase-flow {
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.store-purchase-flow--unified {
  gap: 0;
}

.store-flow-card--unified {
  border-right: 4px solid var(--accent, #8a7a62);
}

.store-flow-card--unified .store-flow-card__cta {
  width: 100%;
  max-width: none;
  justify-content: center;
}

.store-flow-or {
  margin: 0.85rem 0 0.75rem;
  padding: 0.55rem 0;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  color: var(--text-muted, #6b5e54);
}

.store-flow-manual {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.store-flow-manual .store-flow-expand-btn {
  width: 100%;
  max-width: none;
  justify-content: center;
}

.store-flow-card {
  background: var(--cream, #fffdf9);
  border: 1px solid var(--border, rgba(44, 38, 32, 0.1));
  border-radius: 16px;
  box-shadow: 0 10px 32px rgba(44, 38, 32, 0.06);
  padding: 1.35rem 1.5rem 1.45rem;
}

.store-flow-card--quiz {
  border-right: 4px solid var(--accent, #8a7a62);
}

.store-flow-card--returning {
  border-right: 4px solid rgba(58, 52, 44, 0.35);
}

.store-flow-card__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent, #8a7a62);
}

.store-flow-card__title {
  margin: 0 0 0.5rem;
}

.store-flow-card__text {
  margin: 0 0 1.1rem;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text-muted, #6b5e54);
}

/* Section CTAs: maestro-btn-section.css */
.store-flow-card__cta,
.store-flow-expand-btn {
  display: inline-flex;
}

/* Collapsible sticker panel */
.store-manual-picker-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 0;
}

.store-manual-picker-panel.is-open {
  margin-top: 1rem;
  grid-template-rows: 1fr;
}

.store-manual-picker-panel__inner {
  min-height: 0;
  overflow: hidden;
}

.store-manual-picker {
  padding: 1.15rem 1.1rem 1.2rem;
  background: var(--white, #fff);
  border: 1px solid var(--border, rgba(44, 38, 32, 0.1));
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.store-manual-picker__hint {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--text, #2c2620);
  line-height: 1.5;
}

.store-manual-picker__hint strong {
  font-weight: 700;
  color: var(--primary, #3a342c);
}

.store-manual-picker__error {
  margin: 0 0 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  background: rgba(180, 60, 50, 0.08);
  border: 1px solid rgba(180, 60, 50, 0.2);
  color: #8b2e26;
  font-size: 0.9rem;
  line-height: 1.45;
}

.store-manual-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 0.7rem;
  margin-bottom: 1.1rem;
  max-height: min(420px, 55vh);
  overflow-y: auto;
  padding: 0.2rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(58, 52, 44, 0.25) transparent;
}

.store-manual-picker__grid::-webkit-scrollbar {
  width: 6px;
}

.store-manual-picker__grid::-webkit-scrollbar-thumb {
  background: rgba(58, 52, 44, 0.22);
  border-radius: 999px;
}

.store-sticker-pick {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.4rem 0.6rem;
  border: 1.5px solid var(--border, rgba(44, 38, 32, 0.12));
  border-radius: 14px;
  background: var(--cream, #fffdf9);
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    transform 0.15s ease;
}

.store-sticker-pick:hover {
  border-color: rgba(138, 122, 98, 0.45);
  box-shadow: 0 6px 18px rgba(44, 38, 32, 0.08);
  transform: translateY(-1px);
}

.store-sticker-pick.is-selected {
  border-color: var(--primary, #3a342c);
  background: rgba(250, 247, 242, 1);
  box-shadow: 0 0 0 2px rgba(58, 52, 44, 0.08), 0 8px 20px rgba(44, 38, 32, 0.08);
}

.store-sticker-pick__check {
  position: absolute;
  top: 7px;
  inset-inline-start: 7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3a342c, #2c2620);
  color: #fffdf9;
  font-size: 11px;
  line-height: 22px;
  opacity: 0;
  transform: scale(0.55);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.store-sticker-pick.is-selected .store-sticker-pick__check {
  opacity: 1;
  transform: scale(1);
}

.store-sticker-pick__img-wrap {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-sticker-pick__img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.store-sticker-pick__fallback {
  font-size: 1.5rem;
  opacity: 0.3;
  color: var(--accent, #8a7a62);
}

.store-sticker-pick__label {
  font-size: 0.73rem;
  line-height: 1.3;
  font-weight: 500;
  color: var(--text, #2c2620);
  max-width: 100%;
}

.btn-confirm-manual,
.btn-continue-returning {
  width: 100%;
  border-radius: 999px;
  justify-content: center;
}

body.maestro-store-v2 .btn-confirm-manual {
  background: linear-gradient(135deg, #3a342c, #2c2620);
}

.store-purchase-actions[hidden] {
  display: none !important;
}

.store-purchase-actions:not([hidden]) {
  margin-top: 0.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border, rgba(44, 38, 32, 0.1));
  animation: storeFlowRevealActions 0.35s ease;
}

@keyframes storeFlowRevealActions {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  .store-flow-card {
    padding: 1.15rem 1.1rem 1.25rem;
  }

  .store-manual-picker__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: min(360px, 50vh);
  }

  .store-sticker-pick__img-wrap {
    width: 68px;
    height: 68px;
  }

  .store-flow-card__cta,
  .store-flow-expand-btn {
    max-width: none;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .store-manual-picker-panel,
  .store-sticker-pick,
  .maestro-btn-section--expand::after,
  .store-purchase-actions:not([hidden]) {
    transition: none;
    animation: none;
  }

  .store-sticker-pick:hover {
    transform: none;
  }
}
