.purchase-open { overflow: hidden; }
.purchase { position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0; border: 0; max-width: 100%; width: min(100%, 430px); height: 100%; max-height: 100%; color: #202020; background: white; box-shadow: 0 0 40px #0003; overflow: auto; }
.purchase::backdrop { background: #0008; }
.purchase-panel { min-height: 100%; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.purchase-header { display: flex; justify-content: space-between; align-items: center; }
.purchase-header h2 { font-size: 24px; font-weight: 700; }
#purchase-close { font-size: 28px; width: 44px; height: 44px; cursor: pointer; }
.purchase-colors { display: flex; gap: 8px; border: 0; padding: 0; }
.purchase-colors legend { font-weight: 600; margin-bottom: 10px; }
.purchase-colors label { position: relative; flex: 1; }
.purchase-colors input { position: absolute; opacity: 0; }
.purchase-colors span { display: flex; align-items: center; flex-direction: column; padding: 8px 4px; gap: 5px; border: 1px solid #aaa; border-radius: 8px; font-size: 13px; cursor: pointer; }
.purchase-colors input:checked + span { border-color: #9a3600; box-shadow: 0 0 0 1px #9a3600; background: #fff5ed; }
.purchase-colors input:focus-visible + span { outline: 2px solid #181818; outline-offset: 3px; }
.purchase-colors img { width: 44px; height: 44px; object-fit: contain; }
.purchase-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-block: 1px solid #ddd; }
.purchase-item img { width: 76px; height: 76px; object-fit: contain; }
.purchase-item h3 { font-size: 16px; font-weight: 600; }
.purchase-item p { margin: 2px 0; }
.purchase-quantity { display: flex; justify-content: space-between; align-items: center; }
.purchase-quantity input { border: 1px solid #aaa; border-radius: 6px; padding: 6px 8px; width: 74px; min-height: 44px; }
.purchase-summary { display: grid; gap: 12px; margin-top: auto; }
.purchase-summary div { display: flex; justify-content: space-between; }
#purchase-checkout { display: block; text-align: center; background: #9a3600; color: white; text-decoration: none; font-weight: 700; border-radius: 6px; padding: 13px; }
#purchase-checkout[aria-disabled="true"] { opacity: .55; }
.purchase-item[hidden] { display: none; }
.purchase-item + .purchase-item { border-top: 0; }
.purchase-item-details { flex: 1; }
.purchase-item .purchase-quantity { flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12px; }
.purchase-item .purchase-quantity input { width: 58px; }
.purchase-item img { flex: none; width: clamp(46px, 17vw, 76px); }
