/* Accessory rows and the shared product-photo viewer. */
.buy-addon-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line, #dcd8d0); }
.buy-addon-row:last-child { border-bottom: 0; }
.buy-addon-preview { position: relative; display: block; width: 76px; height: 76px; min-width: 0; margin: 0; padding: 0; border: 1px solid var(--line, #dcd8d0); border-radius: 0; background: #fff; color: var(--ink, #171719); cursor: zoom-in; }
.buy-addon-preview img { display: block; width: 100%; height: 100%; padding: 5px; object-fit: contain; }
.buy-addon-preview > svg { position: absolute; right: 2px; bottom: 2px; width: 18px; height: 18px; padding: 2px; background: #fff; fill: none; stroke: currentColor; stroke-width: 1.6; }
.buy-addon-preview:hover { border-color: var(--ink, #171719); }
.buy-addon-preview:focus-visible { outline: 2px solid var(--accent, #c51e2f); outline-offset: 3px; }
.buy-addon-row .buy-option { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-width: 0; min-height: 76px; margin: 0; padding: 0; border: 0; background: transparent; font-size: 14px; cursor: pointer; }
.buy-addon-row .buy-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent, #c51e2f); cursor: pointer; }
.buy-addon-row .buy-option > span { min-width: 0; line-height: 1.55; overflow-wrap: anywhere; }
.buy-addon-row .buy-option small { display: block; margin-top: 4px; color: var(--muted, #5f5d60); font-size: 13px; line-height: 1.5; }
.buy-addon-row .buy-option b { color: var(--ink, #171719); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 440px) {
  .buy-addon-row { grid-template-columns: 60px minmax(0, 1fr); gap: 10px; }
  .buy-addon-preview { width: 60px; height: 60px; }
  .buy-addon-row .buy-option { min-height: 60px; gap: 8px; }
}
.accessory-lightbox {
  width: min(920px, calc(100vw - 48px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line, #dcd8d0);
  border-radius: 0;
  background: var(--panel, #fbfaf7);
  color: var(--ink, #171719);
  box-shadow: 0 20px 80px rgb(0 0 0 / .22);
  font: inherit;
}
.accessory-lightbox::backdrop { background: rgb(17 17 19 / .62); }
.accessory-lightbox [hidden] { display: none !important; }
.accessory-lightbox__body { max-height: calc(100dvh - 50px); overflow-y: auto; }
.accessory-lightbox__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line, #dcd8d0);
}
.accessory-lightbox__header h2 { min-width: 0; margin: 0; font-family: inherit; font-size: 18px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.accessory-lightbox__button {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line, #dcd8d0);
  border-radius: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.accessory-lightbox__button:hover, .accessory-lightbox__retry:hover { background: var(--paper, #f3f1ec); }
.accessory-lightbox__button:active { background: #e9e6df; }
.accessory-lightbox :is(button, a):focus-visible { outline: 2px solid var(--accent, #c51e2f); outline-offset: 3px; }
.accessory-lightbox__figure { margin: 0; }
.accessory-lightbox__stage {
  position: relative;
  display: grid;
  place-items: center;
  height: min(62dvh, 620px);
  min-height: 160px;
  padding: 20px;
  overflow: hidden;
  background: #fff;
}
.accessory-lightbox__image { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.accessory-lightbox__loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; pointer-events: none; }
.accessory-lightbox__status { margin: 0; padding: 16px; color: var(--muted, #5f5d60); font-size: 14px; }
.accessory-lightbox__retry { min-height: 44px; padding: 10px 16px; border: 1px solid var(--line, #dcd8d0); border-radius: 0; background: #fff; color: inherit; font: inherit; font-size: 14px; cursor: pointer; pointer-events: auto; }
.accessory-lightbox__footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 16px 22px; border-top: 1px solid var(--line, #dcd8d0); }
.accessory-lightbox__caption { min-width: 0; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.accessory-lightbox__controls { display: flex; align-items: center; gap: 10px; }
.accessory-lightbox__counter { min-width: 36px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 600px) {
  .accessory-lightbox { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  .accessory-lightbox__body { max-height: calc(100dvh - 26px); }
  .accessory-lightbox__header { gap: 12px; padding: 12px 14px; }
  .accessory-lightbox__header h2 { font-size: 16px; }
  .accessory-lightbox__stage { height: min(58dvh, 520px); padding: 12px; }
  .accessory-lightbox__footer { gap: 12px; padding: 12px 14px; }
  .accessory-lightbox__controls { gap: 4px; }
  .accessory-lightbox__counter { min-width: 32px; }
}
