/* Information belongs in the card; model controls stay beside the scene. */
#modal.product-modal.scene-product-card.scene-content-card:not(.viewer-expanded) {
  width: min(380px, calc(100vw - 36px));
  height: auto;
  max-height: calc(100dvh - 108px);
}
#modal.product-modal.scene-product-card.scene-content-card:not(.viewer-expanded) .modal-top {
  position: absolute;
  inset: 16px 16px auto auto;
  z-index: 12;
  min-height: 44px;
  width: auto;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
}
#modal.scene-content-card #modal-kicker { display: none; }
#modal.product-modal.scene-product-card.scene-content-card:not(.viewer-expanded) #modal-content {
  flex: 0 1 auto;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}
#modal.product-modal.scene-product-card.scene-content-card .product-page { padding: 22px 20px 14px; }
#modal.scene-content-card .product-card-heading {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  column-gap: 9px;
  row-gap: 6px;
}
#modal.product-modal.scene-product-card.scene-content-card .product-card-heading h2 {
  grid-column: 1 / -1;
  padding-right: 48px;
  margin: 0;
  font-size: 26px;
  letter-spacing: -.5px;
}
#modal.scene-content-card .product-brand {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #59675f;
}
#modal.scene-content-card .product-brand::after {
  content: '';
  display: inline-block;
  height: 10px;
  margin-left: 9px;
  border-right: 1px solid #cbd2ca;
}
#modal.product-modal.scene-product-card.scene-content-card .product-spec {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}
#modal.scene-content-card .product-sheet-handle { display: none; }
#modal.scene-content-card .product-preview { order: 2; margin: 20px 0 12px; }
#modal.scene-content-card .preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #747b73;
}
#modal.scene-content-card .preview-heading button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 44px;
  padding: 0 0 0 8px;
  gap: 5px;
  font-size: 12px;
  color: #465d54;
}
#modal.scene-content-card .preview-heading svg { width: 15px; height: 15px; }
#modal.scene-content-card .preview-stage { position: relative; }
#modal.scene-content-card .preview-feature {
  display: block;
  width: 100%;
  height: 220px;
  padding: 15px 48px 24px;
  overflow: hidden;
  background: #eeede7;
  border: 1px solid #e5e5dd;
  border-radius: 14px;
}
#modal.scene-content-card .preview-feature img { width: 100%; height: 100%; object-fit: contain; }
#modal.scene-content-card .preview-image-error img { display: none; }
#modal.scene-content-card .preview-image-status { font-size: 12px; line-height: 1.6; color: #7b8076; }
#modal.scene-content-card :is(.preview-prev, .preview-next) {
  position: absolute;
  top: calc(50% - 22px);
  width: 36px;
  min-width: 36px;
  min-height: 44px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #fff;
  background: #f9faf6ed;
  color: #4c6258;
  box-shadow: 0 2px 8px #2e493811;
}
#modal.scene-content-card .preview-prev { left: 8px; }
#modal.scene-content-card .preview-next { right: 8px; }
#modal.scene-content-card .preview-count {
  position: absolute;
  bottom: 9px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: #70786f;
  pointer-events: none;
}
#modal.scene-content-card .preview-strip { display: none; }
#modal.product-modal.scene-content-card .product-facts { display: block; margin: 4px 0 12px; padding: 0; border: 0; font-size: 13px; line-height: 1.6; }
#modal.scene-content-card .product-facts > div { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 5px 0; }
#modal.scene-content-card .product-facts dt { color: #7b8278; }
#modal.scene-content-card .product-facts dd { margin: 0; color: #424d43; }
#modal.scene-content-card .product-scene-status { order: 3; margin: 0 0 12px; font-size: 12px; line-height: 1.6; color: #73796e; }
#modal.product-modal.scene-product-card.scene-content-card .product-description summary { min-height: 52px; font-weight: 500; }
.product-scene-actions {
  position: fixed;
  z-index: 41;
  display: flex;
  gap: 8px;
}
.product-scene-actions button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  color: #34584c;
  background: linear-gradient(145deg, #fffffff5, #e8f0ecf5);
  border: 1px solid #ffffff;
  border-radius: 14px;
  box-shadow: 0 3px 12px #24382b1a, inset 0 0 0 2px #e2e9e4;
}
.product-scene-actions svg { width: 21px; height: 21px; }

@media (max-width: 760px) {
  #modal.product-modal.scene-product-card.scene-content-card:not(.viewer-expanded) {
    inset: auto 0 0;
    width: 100%;
    height: 52dvh;
    max-height: 52dvh;
  }
  #modal.product-modal.scene-product-card.scene-content-card:not(.viewer-expanded) #modal-content { flex: 1; }
  #modal.product-modal.scene-product-card.scene-content-card .product-page { padding: 0 16px 10px; }
  #modal.product-modal.scene-product-card.scene-content-card:not(.viewer-expanded) .modal-top { inset: 29px 12px auto auto; }
  #modal.scene-content-card .product-card-heading { row-gap: 4px; }
  #modal.product-modal.scene-product-card.scene-content-card .product-card-heading h2 { font-size: 23px; }
  #modal.scene-content-card .product-sheet-handle {
    display: block;
    grid-column: 1 / -1;
    justify-self: center;
    width: 100px;
    height: 28px;
    padding: 0;
    touch-action: none;
  }
  #modal.scene-content-card .product-sheet-handle::after {
    content: '';
    display: block;
    width: 32px;
    height: 4px;
    margin: auto;
    border-radius: 4px;
    background: #cdd2c8;
  }
  #modal.scene-content-card .product-sheet-handle span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  #modal.scene-content-card .product-preview { margin: 8px 0 12px; }
  #modal.scene-content-card .preview-heading { margin-bottom: 4px; min-height: 36px; }
  #modal.scene-content-card .preview-heading button { min-height: 36px; }
  #modal.scene-content-card .preview-stage { display: none; }
  #modal.scene-content-card .preview-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px;
    margin: -2px;
  }
  #modal.scene-content-card .preview-strip > button {
    flex: 0 0 calc((100% - 16px) / 3);
    height: 82px;
    min-width: 72px;
    padding: 6px;
    border-radius: 10px;
    border: 1px solid #e0e2d9;
    background: #eeede7;
  }
  #modal.scene-content-card .preview-strip > button[aria-pressed='true'] { border-color: #93a99b; }
  #modal.scene-content-card .preview-strip img { width: 100%; height: 100%; object-fit: contain; }
  #modal.product-modal.scene-product-card.scene-content-card .product-description summary { min-height: 48px; }
  #modal.product-modal.scene-product-card.scene-content-card.product-sheet-expanded:not(.viewer-expanded) {
    height: calc(100dvh - var(--header-height, 60px) - 24px);
    max-height: 82dvh;
  }
  body:has(#modal.product-sheet-expanded:not(.viewer-expanded)) .product-scene-actions { display: none; }
}
@media (max-width: 760px) and (max-height: 500px) and (orientation: landscape) {
  #modal.product-modal.scene-product-card.scene-content-card:not(.viewer-expanded) {
    max-height: calc(100dvh - var(--header-height, 60px) - 136px);
  }
  #modal.product-modal.scene-product-card.scene-content-card.product-sheet-expanded:not(.viewer-expanded) {
    max-height: calc(100dvh - var(--header-height, 60px) - 8px);
  }
}
