@media (min-width: 960px) {
  #purchase {
    --purchase-visible-rows: 7;
    --purchase-row-height: calc(62px + var(--wide-room, 0px) * .9);
    --purchase-row-gap: calc(8px + var(--wide-room, 0px) * .125);
    --purchase-heading-space: calc(40px + var(--wide-room, 0px) * 1.7);
    --purchase-list-size: calc(var(--purchase-row-height) * var(--purchase-visible-rows)
      + var(--purchase-row-gap) * (var(--purchase-visible-rows) - 1));
  }

  /* Reserve the same space for the specification list in every section. */
  #purchase .purchase-layout {
    min-block-size: max(calc(520px + var(--wide-room, 0px) * 12),
      calc(var(--purchase-heading-space) + var(--purchase-list-size)));
  }

  /* Longer lists can scroll within the left column. Keep the heading and
     the checkout in place, with room for the option outlines. */
  #purchase .specification-pane {
    display: flex;
    flex-direction: column;
    contain: size;
    min-block-size: 0;
  }

  #purchase .specification-pane .section-heading { flex: none; }
  #purchase .option-list { gap: var(--purchase-row-gap); grid-auto-rows: auto; }
  #purchase .option { min-height: var(--purchase-row-height); padding-block: 8px; }
  #purchase .option-copy strong { line-height: 1.35; }

  #purchase .specifications {
    min-block-size: 0;
    max-block-size: calc(var(--purchase-list-size) + 4px);
    overflow: auto;
    margin: -2px;
    padding: 2px;
  }

  /* Keep room for a fee line even when the current selection has no fee. */
  #purchase .checkout-action .total-block {
    min-block-size: calc(57px + var(--wide-room, 0px) * 1.525);
  }

  html[lang="en"] #purchase .checkout-summary .selected-product {
    min-block-size: max(70px, calc(68px + var(--wide-room, 0px) * 2.5));
  }
}

@media (min-width: 960px) and (max-width: 1199px) {
  html[lang="en"] #purchase .checkout-summary .selected-product { min-block-size: 88px; }
}

/* Let a three-line English name fit a compact desktop row. */
@media (min-width: 960px) and (max-width: 1160px) {
  html[lang="en"] #purchase { --purchase-row-height: 72px; }
  html[lang="en"] #purchase .option { padding-block: 6px; }
}

/* Use a common measure for the storefront and its checkout steps. */
@media (min-width: 960px) {
  body > :is(#top.header.wrap, #store-view.wrap, .site-footer.wrap) { max-width: 1160px; }
}

/* The controls now sit in a standard-width frame even on wide monitors. */
@media (min-width: 1600px) {
  body { --wide-room: 0px; }
}
@media (min-width: 1600px) and (min-height: 701px) {
  .product-stage { min-height: clamp(120px, calc(100dvh - 650px), 300px); }
}

@layer utilities {
  @media (min-width: 1280px) {
    #top .product-nav[data-claude-nav] .product-tab {
      width: 96px !important;
      padding-inline: 4px !important;
      gap: 5px !important;
      font-size: 13px !important;
    }
    #top .product-nav[data-claude-nav] .nav-logo { width: 17px !important; height: 17px !important; }
  }
}
