/* Product inspection stays alongside the plaza. The full viewer keeps its own layout. */
#modal.product-modal.scene-product-card {
  inset: 84px 18px auto auto;
  width: min(440px, calc(100vw - 36px));
  height: min(740px, calc(100dvh - 108px));
  max-height: calc(100dvh - 108px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #ffffffcf;
  border-radius: 20px;
  box-shadow: 0 18px 60px #20372c26, 0 2px 8px #20372c12;
  z-index: 40;
  animation: expo-product-card-in .22s ease-out;
}
#modal.product-modal.scene-product-card:not([open]) { display: none; }
#modal.product-modal.scene-product-card::backdrop { background: transparent; backdrop-filter: none; }
#modal.product-modal.scene-product-card .modal-top {
  position: relative;
  inset: auto;
  min-height: 50px;
  flex-shrink: 0;
  padding: 4px 16px;
  gap: 12px;
  flex-direction: row;
  background: var(--paper);
}
#modal.product-modal.scene-product-card #modal-kicker { font-size: 12px; letter-spacing: 1px; }
#modal.product-modal.scene-product-card #modal-close { width: 44px; min-width: 44px; height: 44px; padding: 0; font-size: 25px; }
#modal.product-modal.scene-product-card #modal-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding-bottom: calc(90px + env(safe-area-inset-bottom));
}
#modal.product-modal.scene-product-card .product-page { padding: 18px 20px; width: 100%; }
#modal.product-modal.scene-product-card .product-grid { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
#modal.product-modal.scene-product-card .product-info { display: contents; }
#modal.product-modal.scene-product-card .product-info > .brand-logo { display: none; }
#modal.product-modal.scene-product-card .product-card-heading { order: 0; }
#modal.product-modal.scene-product-card .product-card-heading h2 { font-family: inherit; font-weight: 650; color: var(--ink); overflow-wrap: anywhere; margin: 0 0 3px; font-size: 27px; letter-spacing: -.6px; line-height: 1.3; }
#modal.product-modal.scene-product-card .product-card-heading h2:focus { outline: none; }
#modal.product-modal.scene-product-card .product-spec { order: 1; font-size: 15px; line-height: 1.5; color: #62675c; }
#modal.product-modal.scene-product-card .product-media { order: 2; width: 100%; margin-top: 13px; }
#modal.product-modal.scene-product-card .product-media:not(.is-fullscreen) { padding-top: 0; }
#modal.product-modal.scene-product-card .product-summary { order: 3; font-size: 14px; line-height: 1.65; margin: 16px 0; }
#modal.product-modal.scene-product-card .product-description { order: 4; width: 100%; margin: 0; padding: 0; border-bottom: 0; }
#modal.product-modal.scene-product-card .product-description summary { font-size: 14px; letter-spacing: 0; min-height: 48px; font-weight: 500; }
#modal.product-modal.scene-product-card .product-description p { font-size: 13px; }
#modal.product-modal.scene-product-card .product-description .model-note { font-size: 12px; }
#modal.product-modal.scene-product-card .product-cta {
  position: absolute;
  inset: auto 0 0;
  z-index: 10;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 -5px 14px #313a2708;
}
#modal.product-modal.scene-product-card .action-pair { grid-template-columns: 1.2fr 1fr; gap: 9px; }
#modal.product-modal.scene-product-card .action-pair .button { min-height: 46px; min-width: 0; padding: 10px 8px; font-size: 15px; gap: 5px; }
#modal.product-modal.scene-product-card .action-pair svg { width: 18px; }
#modal.product-modal.scene-product-card .store-note { font-size: 10px; text-align: center; margin-top: 5px; white-space: normal; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .media-card {
  position: relative;
  height: clamp(280px, 36dvh, 340px);
  min-height: 0;
  padding: 10px;
  border-radius: 16px;
}
#modal.product-modal.scene-product-card:not(.viewer-expanded) .media-tabs { position: relative; inset: auto; transform: none; margin: 0; padding: 2px; border-radius: 9px; align-self: flex-start; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .media-tabs button { min-height: 40px; min-width: 0; padding: 8px 10px; font-size: 13px; gap: 6px; border-radius: 7px; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .media-tabs svg { width: 17px; height: 17px; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .expand-top { top: 10px; right: 10px; width: 44px; min-height: 44px; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .media-viewport { margin: 0; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .loading-photo { padding: 3px 10px 24px; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .load-status { bottom: 2px; font-size: 11px; padding: 5px 8px; gap: 5px; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .load-status small { display: none; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .interaction-hint { margin: 0; min-height: 0; font-size: 10px; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .viewer-tools { gap: 6px; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .viewer-bottom { display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 6px; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .interaction-hint { text-align: left; white-space: nowrap; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .viewer-tools { margin-left: auto; flex-shrink: 0; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .viewer-tools .icon-button { width: 44px; min-height: 44px; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .viewer-tools .button { min-height: 44px; padding: 7px 8px; background: transparent; font-size: 12px; gap: 6px; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .viewer-tools .tool-fullscreen { display: none; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .viewer-tools svg { width: 18px; height: 18px; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .photo-thumbnails { display: none; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .photo-mode .photo-thumbnails { display: flex; gap: 10px; margin: 9px 0 0; justify-content: center; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .photo-thumbnails button { min-width: 64px; font-size: 11px; gap: 3px; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .photo-thumbnails img { width: 66px; height: 46px; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .photo-viewport { inset: 2px 25px 22px; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .photo-prev,
#modal.product-modal.scene-product-card:not(.viewer-expanded) .photo-next { min-height: 44px; width: 44px; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .photo-count { font-size: 11px; }
#modal.product-modal.scene-product-card.viewer-expanded { inset: 0; width: 100%; height: 100dvh; max-height: none; border: 0; border-radius: 0; animation: none; }
#modal.product-modal.scene-product-card.viewer-expanded #modal-content { overflow: visible; padding: 0; }
#modal.product-modal.scene-product-card .product-media.is-fullscreen { margin: 0; }

/* A scene selection keeps the actual product on the counter. The card only
   supplies information and the optional photo / full-screen inspection tools. */
/* Remove these absolute overlays from framing measurements as well as sight;
   projected labels also set their own visibility while the camera moves. */
body.has-product-card :is(.scene-topbar, .scene-tools, .scene-bottom, #browse-nav, .compass, .scene-disclaimer, #pins, #product-hotspots) { display: none; }
#modal.product-modal.scene-product-card.scene-product-info:not(.viewer-expanded) {
  width: min(360px, calc(100vw - 36px));
  height: auto;
  max-height: calc(100dvh - 108px);
}
#modal.product-modal.scene-product-card.scene-product-info:not(.viewer-expanded) #modal-content { flex: 0 1 auto; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .scene-model-info .media-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 44px;
  align-items: center;
  gap: 6px;
  height: auto;
  min-height: 44px;
  padding: 0;
  background: transparent;
  overflow: visible;
}
#modal.product-modal.scene-product-card:not(.viewer-expanded) .scene-model-info .media-tabs { grid-area: 1 / 1; justify-self: start; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .scene-model-info .media-tabs button { min-height: 44px; padding: 8px; gap: 5px; font-size: 12px; white-space: nowrap; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .scene-model-info .expand-top { position: static; grid-area: 1 / 3; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .scene-model-info .viewer-bottom { grid-area: 1 / 2; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .scene-model-info .viewer-tools { margin: 0; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .scene-model-info .tool-reset { width: 44px; padding: 0; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .scene-model-info :is(.interaction-hint, .tool-reset span, .photo-thumbnails) { display: none; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .scene-model-unavailable .viewer-bottom { flex-wrap: wrap; }
#modal.product-modal.scene-product-card:not(.viewer-expanded) .scene-model-unavailable .interaction-hint { white-space: normal; line-height: 1.5; }

@media (max-width: 760px) {
  body.has-product-card #browse-nav { bottom: calc(54dvh + 10px); }
  body.has-product-card #browse-nav > button { min-width: 112px; min-height: 44px; padding: 8px 16px; }
  #modal.product-modal.scene-product-card {
    inset: auto 0 0;
    width: 100%;
    height: 54dvh;
    max-height: 54dvh;
    border-radius: 21px 21px 0 0;
  }
  #modal.product-modal.scene-product-card .modal-top { min-height: 44px; padding: 0 14px; }
  #modal.product-modal.scene-product-card #modal-kicker { font-size: 11px; letter-spacing: .5px; max-width: none; text-align: left; }
  #modal.product-modal.scene-product-card .product-page { padding: 10px 14px 14px; }
  #modal.product-modal.scene-product-card .product-card-heading h2 { font-size: 23px; margin: 0 0 1px; }
  #modal.product-modal.scene-product-card .product-spec { font-size: 13px; }
  #modal.product-modal.scene-product-card .product-media { margin-top: 10px; }
  #modal.product-modal.scene-product-card:not(.viewer-expanded) .media-card { height: clamp(190px, 28dvh, 238px); padding: 8px; }
  #modal.product-modal.scene-product-card:not(.viewer-expanded) .expand-top { top: 8px; right: 8px; }
  #modal.product-modal.scene-product-card:not(.viewer-expanded) .interaction-hint { font-size: 10px; }
  #modal.product-modal.scene-product-card .product-cta { padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); }
  #modal.product-modal.scene-product-card .action-pair .button { min-height: 44px; font-size: 14px; }
  #modal.product-modal.scene-product-card .product-summary { font-size: 13px; margin: 12px 0; }
  #modal.product-modal.scene-product-card.scene-product-info:not(.viewer-expanded) {
    inset: auto 0 0;
    width: 100%;
    height: 52dvh;
    max-height: 52dvh;
  }
  #modal.product-modal.scene-product-card.scene-product-info:not(.viewer-expanded) #modal-content { flex: 1; }
  #modal.product-modal.scene-product-card.scene-product-info .product-card-heading h2 { font-size: 21px; }
  #modal.product-modal.scene-product-card.scene-product-info:not(.viewer-expanded) .scene-model-info .media-card { height: auto; padding: 0; }
  #modal.product-modal.scene-product-card.viewer-expanded { inset: 0; height: 100dvh; max-height: none; border-radius: 0; }
}
@media (max-width: 760px) and (max-height: 500px) and (orientation: landscape) {
  /* Keep at least a small usable scene above the card when browser chrome
     leaves very little height. Information still scrolls above the actions. */
  #modal.product-modal.scene-product-card.scene-product-info:not(.viewer-expanded) {
    max-height: calc(100dvh - var(--header-height, 60px) - 136px);
  }
}
@media (max-width: 360px) {
  #modal.product-modal.scene-product-card .action-pair .button { font-size: 12px; }
  #modal.product-modal.scene-product-card:not(.viewer-expanded) .media-tabs button { padding: 8px; font-size: 12px; }
}
@keyframes expo-product-card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  #modal.product-modal.scene-product-card { animation: none; }
}
