.box-selector {
  background: var(--blush);
  color: var(--wine);
  padding: clamp(80px, 10vw, 144px) clamp(20px, 7vw, 110px);
  scroll-margin-top: 72px;
}

.box-selector-heading {
  align-items: end;
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  margin: 0 auto clamp(48px, 7vw, 80px);
  max-width: 1320px;
}

.box-selector-heading h2 {
  font-size: clamp(3.4rem, 6.6vw, 7.2rem);
  letter-spacing: -0.07em;
  margin: 0;
}

.box-selector-heading > p {
  font-size: 1rem;
  margin: 0 0 10px;
  max-width: 48ch;
}

.box-options {
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 0.92fr 1.08fr 1fr;
  margin: 0 auto;
  max-width: 1320px;
}

.box-option {
  align-items: stretch;
  background: oklch(97% 0.018 48);
  border: 0;
  color: var(--wine);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 44px;
  grid-template-rows: auto 1fr auto;
  min-height: 390px;
  padding: clamp(28px, 3.7vw, 56px);
  position: relative;
  text-align: left;
  transition: background-color 220ms cubic-bezier(0.16, 1, 0.3, 1), color 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.box-option + .box-option {
  border-left: 1px solid var(--line);
}

.box-option:nth-child(2) {
  background: oklch(93% 0.037 14);
}

.box-option:hover {
  background: oklch(90% 0.05 13);
}

.box-option:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: -5px;
  z-index: 2;
}

.box-option[aria-pressed="true"] {
  background: var(--wine);
  color: var(--cream);
}

.box-number {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.box-copy {
  align-self: end;
  display: grid;
}

.box-copy small {
  color: var(--cocoa);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-bottom: 13px;
  text-transform: uppercase;
}

.box-copy strong {
  font-family: var(--display);
  font-size: clamp(2.3rem, 3.4vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.box-copy > span {
  font-size: 0.86rem;
  line-height: 1.6;
  margin-top: 18px;
  max-width: 29ch;
}

.box-option[aria-pressed="true"] .box-copy small,
.box-option[aria-pressed="true"] .box-copy > span {
  color: oklch(98% 0.012 80 / 0.76);
}

.box-select-label {
  align-items: center;
  border-top: 1px solid currentColor;
  display: flex;
  font-size: 0.67rem;
  font-weight: 700;
  justify-content: space-between;
  letter-spacing: 0.11em;
  padding-top: 16px;
  text-transform: uppercase;
}

.box-select-label::after {
  content: "+";
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 400;
}

.box-option[aria-pressed="true"] .box-select-label::after {
  content: "✓";
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
}

.box-selection-status {
  font-size: 0.78rem;
  margin: 22px auto 0;
  max-width: 1320px;
}

.order-toast {
  background: var(--wine);
  bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) + 18px));
  box-shadow: 0 18px 48px oklch(20% 0.05 15 / 0.24);
  color: var(--cream);
  font: 600 0.84rem/1.55 var(--sans);
  left: max(24px, calc(env(safe-area-inset-left, 0px) + 18px));
  max-width: min(390px, calc(100vw - 48px));
  padding: 17px 20px;
  position: fixed;
  transform: translate3d(0, 16px, 0);
  transition: opacity 220ms cubic-bezier(0.16, 1, 0.3, 1), transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
}

.order-toast:not([hidden]) {
  animation: toast-in 240ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.order-toast.is-leaving {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
}

@keyframes toast-in {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@media (max-width: 900px) {
  .box-selector-heading {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .box-options {
    grid-template-columns: 1fr;
  }

  .box-option {
    gap: 28px;
    min-height: 280px;
  }

  .box-option + .box-option {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 580px) {
  .box-selector {
    padding: 72px 20px;
  }

  .box-selector-heading {
    gap: 24px;
    margin-bottom: 40px;
  }

  .box-selector-heading h2 {
    font-size: clamp(3rem, 14vw, 4.2rem);
  }

  .box-option {
    min-height: 250px;
    padding: 28px;
  }

  .order-toast {
    bottom: max(16px, calc(env(safe-area-inset-bottom, 0px) + 12px));
    left: 16px;
    max-width: calc(100vw - 32px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .box-option,
  .order-toast {
    animation: none;
    transition: none;
  }
}
