/* Photograph cards shared by brands and model ranges. */
body.ss-theme .dm-photo-choices .dm-choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
body.ss-theme .dm-photo-choices a.dm-photo-card {
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
  min-width: 0; min-height: 60px; padding: 0; gap: 0; overflow: hidden;
  border: 1px solid #d5d9dc; border-radius: 5px; background: #fff;
  color: #fff; text-align: left; text-decoration: none;
  transition: box-shadow .18s ease, border-color .18s ease;
}
body.ss-theme .dm-photo-card img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; background: #fff; }
body.ss-theme .dm-photo-card img.dm-photo-montage { object-fit: cover; }
body.ss-theme .dm-photo-card .dm-photo-label {
  display: flex; align-items: center; flex: 1; box-sizing: border-box;
  min-height: 54px; padding: 14px 18px; background: linear-gradient(110deg, #264960, #416c84);
  font: 700 18px/1.35 var(--dm-font, sans-serif); color: #fff;
}
body.ss-theme .dm-photo-card:is(:hover, :focus-visible) { border-color: #5788a4; box-shadow: 0 5px 18px #19242d24; }
body.ss-theme .dm-photo-card:focus-visible { outline: 3px solid #33759b; outline-offset: 3px; }

/* One real grid on desktop; the extra cards move into details only on compact screens. */
body.ss-theme .ss-photo-choices { display: block !important; width: 100%; max-width: 100%; box-sizing: border-box; }
body.ss-theme .ss-photo-choices > .dm-choice-grid,
body.ss-theme .ss-photo-choices > .dm-choice-more > .dm-choice-grid {
  display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: row; align-items: stretch; gap: 16px; width: 100%; margin: 0;
}
body.ss-theme .ss-photo-choices > .dm-choice-more { display: block; margin: 16px 0 0; }
body.ss-theme .ss-photo-choices > .dm-choice-more[hidden] { display: none !important; }
body.ss-theme .ss-photo-choices > .dm-choice-more > .dm-choice-grid { margin-top: 12px; }
body.ss-theme .ss-photo-choices .dm-photo-card { padding: 0 !important; height: auto !important; text-align: left !important; }
body.ss-theme .ss-photo-choices .dm-photo-label { color: #fff !important; text-align: left !important; }
body.ss-theme .ss-photo-choices a.dm-photo-card:not(:has(img)) { align-self: start; }
@media (min-width: 1600px) {
  body.ss-theme .ss-photo-choices > .dm-choice-grid,
  body.ss-theme .ss-photo-choices > .dm-choice-more > .dm-choice-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1059px) {
  body.ss-theme .ss-photo-choices > .dm-choice-grid,
  body.ss-theme .ss-photo-choices > .dm-choice-more > .dm-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  body.ss-theme .ss-photo-choices > .dm-choice-grid,
  body.ss-theme .ss-photo-choices > .dm-choice-more > .dm-choice-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { body.ss-theme .ss-photo-choices a.dm-photo-card { transition: none; } }

/* On product overview pages the photograph grid replaces the old narrow sidebar. */
body.ss-theme #imSection_1.ss-native-accessory:has(> #imCell_198 .ss-photo-choices) {
  grid-template-columns: minmax(0, 1fr) !important;
}
body.ss-theme #imSection_1.ss-native-accessory:has(> #imCell_198 .ss-photo-choices) > [id^="imCell_"] {
  grid-column: 1 / -1 !important; grid-row: auto !important;
}
body.ss-theme #imSection_1.ss-native-accessory:has(> #imCell_198 .ss-photo-choices) > #imCell_198 {
  grid-area: auto / 1 / auto / -1 !important;
}
