/* Bouquet composer ("Customize your bouquet")
   Same language as the bag and checkout pages: Jost, cream cards with
   hairline borders and 16px corners, navy pill buttons (components.css).
   Class names are the ones assets/js/bluthem-composer.js drives
   (.is-selected, .is-active, .is-complete, [hidden], [data-state]).
--------------------------------------------- */
.bluthem_composer {
  font-family: var(--bl-font);
  color: var(--bl-navy);
  background: var(--bl-cream);
  padding: clamp(28px, 4vw, 56px) 0 clamp(56px, 7vw, 92px);
  -webkit-font-smoothing: antialiased;
}
.bluthem_composer :is(h1, h2, h3, h4, p) {
  margin: 0;
}

/* Intro
--------------------------------------------- */
.bluthem_composer-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(20px, 3vw, 30px);
  text-align: center;
}
.bluthem_composer-title {
  font-family: var(--bl-font);
  font-weight: 400;
  font-size: clamp(28px, 3.8vw, 46px);
  line-height: 1.06;
  color: var(--bl-navy);
}
.bluthem_composer-subtitle {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--bl-text-soft);
  max-width: 52ch;
}

/* Step indicator: numbered dots joined by hairlines
--------------------------------------------- */
.bluthem_step-indicator {
  --step-dot: 30px;
  display: flex;
  justify-content: center;
  gap: 0;
  list-style: none;
  margin: 0 0 clamp(24px, 3vw, 36px);
  padding: 0;
}
.bluthem_step-indicator-item {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: start;
  gap: 10px;
  padding-inline-end: 44px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bl-text-muted);
  transition: color 0.2s ease;
}
/* connector to the next step */
.bluthem_step-indicator-item::after {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline-end: 10px;
  width: 24px;
  height: 1px;
  background: rgba(22, 40, 63, 0.25);
}
.bluthem_step-indicator-item:last-child {
  padding-inline-end: 0;
}
.bluthem_step-indicator-item:last-child::after {
  display: none;
}
.bluthem_step-indicator-item.is-complete::after {
  background: var(--bl-navy);
}
.bluthem_step-indicator-count {
  width: var(--step-dot);
  height: var(--step-dot);
  border-radius: 50%;
  border: 1px solid rgba(22, 40, 63, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  letter-spacing: 0;
  color: var(--bl-navy);
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.bluthem_step-indicator-item.is-active,
.bluthem_step-indicator-item.is-complete {
  color: var(--bl-navy);
}
.bluthem_step-indicator-item.is-active .bluthem_step-indicator-count {
  background: var(--bl-navy);
  border-color: var(--bl-navy);
  color: var(--bl-cream);
}
.bluthem_step-indicator-item.is-complete .bluthem_step-indicator-count {
  border-color: var(--bl-navy);
}

/* Steps
--------------------------------------------- */
.bluthem_steps {
  position: relative;
}
.bluthem_step {
  display: none;
}
.bluthem_step.is-active {
  display: block;
  animation: bluthem_fade 0.25s ease;
}
@keyframes bluthem_fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
/* Scoped so the margin beats the page's heading reset (.bluthem_composer h2). */
.bluthem_composer .bluthem_step-title {
  font-family: var(--bl-font);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 24px;
  text-align: center;
}
.bluthem_composer .bluthem_step-title + .bluthem_step-note {
  margin-top: -14px; /* note sits close under its title */
}
/* Scoped so the margin beats the page's paragraph reset (.bluthem_composer p). */
.bluthem_composer .bluthem_step-note,
.bluthem_composer .bluthem_empty-state {
  font-size: 13.5px;
  font-weight: 300;
  color: var(--bl-text-soft);
  margin: 0 0 28px;
  text-align: center;
}

/* Option cards
--------------------------------------------- */
.bluthem_card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 18px;
  max-width: 1080px;
  margin: 0 auto;
}
.bluthem_selection-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  background: var(--bl-cream);
  border: 1px solid rgba(22, 40, 63, 0.12);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.bluthem_selection-card:hover {
  border-color: rgba(22, 40, 63, 0.35);
}
.bluthem_selection-card:focus-within {
  border-color: var(--bl-navy);
}
.bluthem_selection-card.is-selected {
  border-color: var(--bl-navy);
  background: var(--bl-panel);
  box-shadow: 0 8px 22px rgba(22, 40, 63, 0.08);
}
.bluthem_selection-card[hidden] {
  display: none;
}
.bluthem_selection-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  opacity: 0;
}
.bluthem_selection-media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bl-sand-light);
}
.bluthem_selection-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bluthem_selection-placeholder {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(22, 40, 63, 0.05) 0 1px, transparent 1px 10px);
}
.bluthem_selection-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bluthem_selection-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.bluthem_selection-title {
  font-family: var(--bl-font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.25;
}
.bluthem_selection-description {
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--bl-text-soft);
}
.bluthem_selection-price {
  font-size: 14px;
  color: var(--bl-navy);
  white-space: nowrap;
}
/* "Selected" tag on the photo */
.bluthem_selection-badge {
  position: absolute;
  top: 24px;
  inset-inline-end: 24px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bl-navy);
  color: var(--bl-cream);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.bluthem_selection-card.is-selected .bluthem_selection-badge {
  opacity: 1;
  transform: none;
}

/* Flower colours + quantities
--------------------------------------------- */
.bluthem_flower-colors {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--bl-line);
}
.bluthem_flower-color {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bluthem_color-media {
  flex: 0 0 auto;
  display: flex;
}
.bluthem_color-media img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}
.bluthem_color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(22, 40, 63, 0.18);
  background: var(--bl-sand);
}
.bluthem_color-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 300;
}
/* The per-colour stepper mirrors the shared .bluthe_qty pill. */
.bluthem_flower-quantity {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(22, 40, 63, 0.25);
  border-radius: 999px;
  overflow: hidden;
}
.bluthem_flower-quantity-button {
  width: 30px;
  height: 30px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-family: var(--bl-font);
  font-size: 15px;
  line-height: 1;
  color: var(--bl-navy);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  transition: background 0.18s ease;
}
.bluthem_flower-quantity-button:hover {
  background: var(--bl-panel);
}
.bluthem_flower-quantity-button:focus-visible {
  outline: 2px solid var(--bl-accent);
  outline-offset: -2px;
}
.bluthem_flower-quantity-input,
.bluthem_flower-quantity-input[type="number"] {
  width: 34px;
  min-width: 0;
  height: 30px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
  font-family: var(--bl-font);
  font-size: 16px;
  color: var(--bl-navy);
  -moz-appearance: textfield;
  appearance: textfield;
}
.bluthem_flower-quantity-input:focus {
  outline: none;
}
.bluthem_flower-quantity-input::-webkit-outer-spin-button,
.bluthem_flower-quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Review: preview + summary
--------------------------------------------- */
.bluthem_review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(22px, 3vw, 40px);
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
}
.bluthem_review-media {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bluthem_review-media p {
  font-size: 12.5px;
  font-weight: 300;
  color: var(--bl-text-muted);
}
.bluthem_review-image {
  position: relative;
  aspect-ratio: 4 / 5;
  min-height: 320px;
  border-radius: var(--bl-radius-lg, 26px);
  overflow: hidden;
  background: var(--bl-sand-light);
  box-shadow: var(--bl-shadow-panel);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bluthem_review-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bluthem_review-image .bluthem_image-loader {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(22, 40, 63, 0.15);
  border-top-color: var(--bl-navy);
  animation: bluthem_spin 0.9s linear infinite;
}
.bluthem_review-image[data-state="loading"] .bluthem_image-loader {
  display: block;
}
.bluthem_review-image[data-state="loading"] img {
  display: none !important;
}
.bluthem_review-image[data-state="error"]::after {
  content: attr(data-error-text);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  font-size: 14px;
  font-weight: 300;
  color: var(--bl-text-soft);
}
.bluthem_review-image[data-state="loaded"] .bluthem_image-loader {
  display: none;
}
@keyframes bluthem_spin {
  to { transform: rotate(360deg); }
}

/* Summary card, same rows as the bag summary */
.bluthem_review-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid #E4DCD2;
  border-radius: 16px;
  padding: clamp(20px, 2.5vw, 28px);
}
.bluthem_review-heading {
  font-family: var(--bl-font);
  font-weight: 400;
  font-size: 22px;
  margin-bottom: 4px;
}
.bluthem_summary-section h4 {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bl-text-soft);
  margin-bottom: 8px;
}
.bluthem_summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  font-weight: 300;
}
.bluthem_summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.bluthem_summary-list li > :last-child {
  font-weight: 400;
  white-space: nowrap;
}
.bluthem_summary-empty {
  color: var(--bl-text-muted);
}
.bluthem_summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--bl-line);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bl-text-soft);
}
.bluthem_summary-amount {
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--bl-navy);
}
.bluthem_review-details .single_add_to_cart_button {
  width: 100%;
  margin-top: 6px;
}

/* Back / Next
--------------------------------------------- */
.bluthem_step-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  max-width: 1080px;
  margin: clamp(26px, 3vw, 36px) auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--bl-line);
}
.bluthem_step-controls .bluthem_button {
  min-width: 140px;
}

.bluthem_visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.variation p {
  margin: 0;
}

/* Responsive
--------------------------------------------- */
@media (max-width: 1024px) {
  .bluthem_review-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .bluthem_review-image {
    max-width: 560px;
  }
}
@media (max-width: 767px) {
  .bluthem_step-indicator {
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .bluthem_step-indicator::-webkit-scrollbar {
    display: none;
  }
  /* Phones: numbers only, joined by short lines. */
  .bluthem_step-indicator-item {
    padding-inline-end: 34px;
    white-space: nowrap;
  }
  .bluthem_step-indicator-label {
    display: none;
  }
  .bluthem_step-indicator-item::after {
    width: 18px;
    inset-inline-end: 8px;
  }
  .bluthem_card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .bluthem_selection-card {
    padding: 10px;
    gap: 10px;
  }
  .bluthem_selection-title {
    font-size: 15px;
  }
  .bluthem_step-title {
    font-size: 21px;
  }
  .bluthem_step-controls .bluthem_button {
    flex: 1 1 0;
    min-width: 0;
  }
}
@media (max-width: 480px) {
  /* Flower cards stay two-up on phones; each colour row wraps so the
     stepper drops under the colour name when the card is narrow. */
  .bluthem_flower-color {
    flex-wrap: wrap;
    gap: 6px 8px;
  }
  .bluthem_color-name {
    flex: 1 1 auto;
    font-size: 12.5px;
  }
  .bluthem_flower-quantity {
    margin-inline-start: auto;
  }
  .bluthem_flower-quantity-button {
    width: 28px;
    height: 28px;
  }
  .bluthem_flower-quantity-input,
  .bluthem_flower-quantity-input[type="number"] {
    width: 28px;
    height: 28px;
  }
}
