.shirt-options {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

/* Toggle wrapper — the entire header + summary block is a single button
 * so clicking anywhere on the visible (collapsed) panel expands it.
 * Reset all the browser's default button chrome so it visually matches
 * the rest of the panel: no background, no border, no padding, full
 * width, inherit font and text alignment from the parent. */
.shirt-options__toggle {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.shirt-options__toggle:focus-visible {
  outline: 2px solid var(--brand-pink);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.shirt-options__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  /* No bottom margin when collapsed — the summary chip sits directly
   * under the title. The expanded content has its own top margin that
   * separates it from the header (see .shirt-options__content). */
}

.shirt-options.is-expanded .shirt-options__header {
  /* When expanded, the summary chip is gone and the color row needs
   * breathing room from the title. Restore the original spacing. */
  margin-bottom: 1.1rem;
}

.shirt-options__title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.shirt-options__title-icon {
  font-size: 22px;
  line-height: 1;
}

.shirt-options__price {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-pink);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

/* Compact summary — visible only when collapsed. A single row showing
 * a mini color swatch and the color label · size text. The chevron
 * affordance lives in the header (always visible) so the user has the
 * same expand/collapse signal in both states. */
.shirt-options__summary {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.4rem;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.shirt-options__summary-swatch {
  --swatch-color: #fff;
  --swatch-border: #e8e8ec;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--swatch-color);
  border: 1px solid var(--swatch-border);
  box-shadow: inset 0 -1px 2px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.shirt-options__summary-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shirt-options__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  /* Rotates 180° when the section is expanded so the chevron points
   * up ("click to close") instead of down ("click to reveal"). The
   * transition pairs with the content's max-height transition so the
   * arrow and the content animate together. */
  transition: color 0.12s ease, transform 0.18s ease;
}

.shirt-options.is-expanded .shirt-options__chevron {
  transform: rotate(180deg);
}

.shirt-options__toggle:hover .shirt-options__chevron {
  color: var(--brand-pink);
}

/* Expanded content wrapper. The max-height transition is what produces
 * the collapse / expand animation. We render the markup regardless of
 * state (rather than conditional rendering) so the transition has
 * something to interpolate between.
 *
 * 240px comfortably fits the color swatches row + size pills row at
 * typical sidebar widths. If a future redesign adds more rows this
 * cap may need to grow; values much larger than the content's natural
 * height slow the perceived animation because max-height interpolates
 * across the full declared range. */
.shirt-options__content {
  overflow: hidden;
  transition: max-height 0.18s ease, opacity 0.12s ease, margin-top 0.18s ease;
}

.shirt-options.is-collapsed .shirt-options__content {
  max-height: 0;
  opacity: 0;
  /* visibility:hidden after the transition completes pulls the content
   * out of the tab order and the accessibility tree. We don't use
   * `display:none` because that would prevent the transition from
   * running at all. */
  visibility: hidden;
  margin-top: 0;
}

.shirt-options.is-expanded .shirt-options__content {
  max-height: 240px;
  opacity: 1;
  visibility: visible;
}

.shirt-options__row + .shirt-options__row {
  margin-top: 0.85rem;
}

.shirt-options__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.2px;
}

/* Color swatches ----------------------------------------------------------- */

.shirt-options__swatches {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.shirt-options__swatch {
  --swatch-color: #fff;
  --swatch-border: #e8e8ec;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: transparent;
  border: 2px solid transparent;
  padding: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease;
}

.shirt-options__swatch:hover {
  transform: scale(1.06);
}

.shirt-options__swatch:active {
  transform: scale(0.94);
}

.shirt-options__swatch-fill {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: var(--swatch-color);
  border: 1px solid var(--swatch-border);
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.06);
}

.shirt-options__swatch.is-selected {
  border-color: var(--brand-pink);
}

/* Size pills --------------------------------------------------------------- */

.shirt-options__sizes {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.shirt-options__size {
  min-width: 56px;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-strong);
  background: #fff;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.4px;
  transition: background 0.12s ease, border 0.12s ease, color 0.12s ease, transform 0.12s ease;
}

.shirt-options__size:hover {
  background: var(--brand-pink-soft);
}

.shirt-options__size:active {
  transform: scale(0.97);
}

.shirt-options__size.is-selected {
  border-color: var(--brand-pink);
  color: var(--brand-pink-strong);
  background: var(--brand-pink-soft);
}

@media (max-width: 480px) {
  .shirt-options {
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
  }
  .shirt-options__title {
    font-size: 16px;
  }
  .shirt-options__price {
    font-size: 20px;
  }
}
