/* One sizing model for every product photo. The frame sets the dimensions;
   the image cannot change them while loading or when switching photos. */
.product-visual,.robot-card-image,.robot-detail-photo,.product-photo-button,
.gallery-image,.home-portrait>a,.home-photo {
  position:relative;
  --frame-inset:8px;
  overflow:hidden;
  padding:0;
  min-width:0;
}
.product-visual.product-visual>img,.robot-card-image.robot-card-image>img,.robot-detail-photo.robot-detail-photo>img,
.gallery-image.gallery-image>img,.home-portrait.home-portrait>a>img,.home-photo.home-photo>img,
.product-photo-button .product-visual>img {
  position:absolute;
  inset:var(--frame-inset);
  width:calc(100% - var(--frame-inset) * 2);
  height:calc(100% - var(--frame-inset) * 2);
  max-width:none;
  max-height:none;
  min-height:0;
  padding:0;
  object-fit:contain;
  object-position:center;
  transform:none;
  display:block;
}
.product-visual img[data-photo-shape],.robot-card-image img[data-photo-shape],
.robot-detail-photo img.contain { padding:0; }
.robot-detail-photo,.product-photo-button { width:100%; aspect-ratio:1; height:auto; }
.product-photo-button>.product-visual {
  position:absolute;
  inset:0;
  height:100%;
  width:100%;
  aspect-ratio:auto;
  padding:0;
  border:0;
}
.gallery-image,.product-gallery-grid .gallery-image,.gallery-figure .gallery-image {
  width:100%; height:auto; aspect-ratio:1; padding:0;
}
.gallery-image.small-preview>img {
  inset:auto;
  top:50%; left:50%;
  width:calc(100% - 20px); height:calc(100% - 20px);
  max-width:130px; max-height:130px;
  transform:translate(-50%,-50%);
}
.review-grid,.robot-grid:has(>[data-product]),.robot-grid:has(>.gallery-figure),.card-grid:has(>[data-product]) {
  grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px;
}
.review-grid>[data-product],.robot-grid>[data-product],.card-grid>[data-product] {
  display:flex; flex-direction:column; min-width:0;
}
.review-grid>[data-product]>.product-visual,
.review-grid>[data-product]>.robot-card-image,
.review-grid>[data-product]>.ai-card-cover,
.robot-grid>[data-product]>.robot-card-image,
.card-grid>[data-product]>.product-visual {
  width:100%; height:auto; aspect-ratio:4 / 5;
  padding:0; align-self:stretch; border:0; border-bottom:1px solid var(--line);
}
.review-grid .card-body,.robot-grid>[data-product] .card-body,.card-grid .card-body {
  padding:16px; gap:9px; border-left:0; min-width:0; flex:1;
}
.review-grid .card-footer,.robot-grid>[data-product] .card-footer,.card-grid .card-footer { margin-top:auto; }
.review-grid .card-body p,.robot-grid>[data-product] .card-body p,.card-grid .card-body p { display:none; }
.review-grid .card-body h3,.robot-grid>[data-product] .card-body h3,.card-grid .card-body h3 {
  font-size:1.05rem; line-height:1.35; overflow-wrap:anywhere;
}
.card-body .eyebrow,.card-body .status { white-space:normal; overflow-wrap:anywhere; }
.home-page { --accent:#d4af95; --frame-line:#523c39; }
body:has(.home-page) { background:#0e0a0c; }
.home-page .home-hero { padding-top:30px; }
.home-page .home-portrait>a,.home-page .home-photo { background:#080808; border-color:#402c2d; }
.home-page .home-models { border-top-color:#402c2d; }
.home-page .home-hero h1 { max-width:600px; }
.home-page .home-hero p { max-width:470px; }
@media(max-width:1100px) and (min-width:641px) {
  .review-grid,.robot-grid:has(>[data-product]),.robot-grid:has(>.gallery-figure),.card-grid:has(>[data-product]) {
    grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px;
  }
}
@media(max-width:640px) {
  .review-grid,.robot-grid:has(>[data-product]),.robot-grid:has(>.gallery-figure),.card-grid:has(>[data-product]) {
    grid-template-columns:minmax(0,1fr); gap:16px;
  }
  .review-grid .card-body,.robot-grid>[data-product] .card-body,.card-grid .card-body {
    padding:12px; gap:8px;
  }
  .review-grid .card-body h3,.robot-grid>[data-product] .card-body h3,.card-grid .card-body h3 { font-size:1rem; }
  .review-grid .card-footer,.robot-grid>[data-product] .card-footer,.card-grid .card-footer { padding-top:8px; }
  .home-page .home-hero { padding-top:20px; }
  .home-page .home-portrait>a,.home-page .home-photo { aspect-ratio:1; max-width:none; }
}

/* Catalogue previews fill one portrait frame. Each robot has a reviewed focal
   point; full source photos remain on its product page and in the viewer. */
.robot-card-image.robot-card-image>img.robot-preview {
  inset:0; width:100%; height:100%;
  object-fit:var(--preview-fit,contain); object-position:var(--photo-focus,50% 50%);
}
.gallery-figure .gallery-image.gallery-image { aspect-ratio:4 / 5; }
.gallery-figure .gallery-image.gallery-image>img {
  inset:0; width:100%; height:100%; object-fit:cover; object-position:50% 0%;
}
.gallery-figure .gallery-image.gallery-image>img[src$="realbotix-aria.webp"] { object-position:50% 20%; }
.home-page .home-hero { grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:44px; }
.home-page .home-photo {
  display:block; width:100%; max-width:none; aspect-ratio:1;
  padding:0; border:1px solid var(--frame-line); border-radius:12px; cursor:zoom-in;
}
.home-photo.home-photo>img { object-fit:contain; object-position:center; }
.home-portrait figcaption a { color:var(--muted); text-decoration:none; }
.home-portrait figcaption a:hover { color:var(--accent); text-decoration:underline; }
.home-photo:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
.home-page .home-models .robot-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media(max-width:900px) {
  .home-page .home-hero { grid-template-columns:minmax(0,1fr); gap:24px; }
  .home-page .home-hero h1 { font-size:clamp(2.3rem,7vw,3.6rem); }
  .home-page .home-hero p { max-width:600px; }
  .home-page .home-portrait { width:100%; }
}
@media(max-width:640px) {
  .home-page .home-models .robot-grid { grid-template-columns:minmax(0,1fr); }
  .product-gallery-grid { grid-template-columns:minmax(0,1fr); }
  .gallery-image,.product-gallery-grid .gallery-image { aspect-ratio:1; }
  .robot-detail-photo,.product-photo-button { max-width:none; }
  .home-page .section-heading { align-items:baseline; gap:12px; }
  .home-page .home-hero { gap:20px; }
}

@media(min-width:901px) {
  .robot-detail,.product-detail { grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr); }
}
@media(max-width:640px) {
  .product-gallery-grid { grid-auto-flow:row; grid-auto-columns:auto; overflow:visible; }
}

.product-gallery-grid:has(>figure:only-child) { grid-template-columns:minmax(0,1fr); max-width:440px; }
.product-gallery-grid:has(>figure:nth-child(2):last-child) { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media(max-width:640px) {
  .product-gallery-grid:has(>figure:nth-child(2):last-child) { grid-template-columns:minmax(0,1fr); }
}

/* Review previews use the same portrait proportions as the catalogue.
   The enlarged viewer always displays the complete original photograph. */
.robot-review .robot-detail-photo { aspect-ratio:4 / 5; max-height:none; }
.robot-review .robot-detail-photo.robot-detail-photo>img.review-photo-preview {
  inset:0; width:100%; height:100%; object-fit:cover;
  object-position:var(--photo-focus,50% 20%);
}
.photo-count { position:absolute; bottom:14px; right:14px; padding:8px 11px; border:1px solid #806b51; border-radius:6px; background:#101011e8; color:var(--ink); font:.8125rem/1.4 var(--sans); }
.robot-review .gallery-image.gallery-image { aspect-ratio:4 / 5; }
.product-gallery-grid .gallery-image.gallery-image>img {
  object-fit:var(--gallery-fit,contain); object-position:var(--photo-focus,50% 50%);
}
.specs.spec-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; border:0; margin:16px 0; }
.specs.spec-cards>div { display:block; padding:15px 17px; border:1px solid var(--line); border-radius:8px; background:#121314; }
.specs.spec-cards dt { margin-bottom:6px; font-size:.75rem; line-height:1.5; color:var(--muted); }
.specs.spec-cards dd { margin:0; font-size:.9375rem; line-height:1.6; color:var(--ink); overflow-wrap:anywhere; }
.spec-note { color:var(--muted); font-size:.8125rem!important; line-height:1.6; }
@media(max-width:640px) {
  .robot-review .product-gallery-grid,.robot-review .product-gallery-grid:has(>figure:nth-child(2):last-child) { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .robot-review .product-gallery-grid:has(>figure:only-child) { grid-template-columns:minmax(0,1fr); max-width:240px; }
  .robot-review .product-gallery figcaption { font-size:.6875rem; line-height:1.5; }
  .specs.spec-cards { grid-template-columns:minmax(0,1fr); gap:8px; }
  .specs.spec-cards>div { padding:12px 14px; }
}

/* Complete product views, compact homepage and an immediately accessible gallery. */
.home-page .home-hero { grid-template-columns:minmax(0,1fr) minmax(0,.85fr); gap:48px; }
.home-page .home-photo { max-width:410px; aspect-ratio:4 / 5; --frame-inset:0px; }
.home-page .home-models .robot-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.robot-review .robot-detail-photo.robot-detail-photo>img.review-photo-preview { object-fit:contain; object-position:center; }
.photo-choices { display:flex; gap:8px; width:100%; max-width:420px; padding:10px 1px 4px; overflow-x:auto; scroll-snap-type:x proximity; scrollbar-width:thin; }
.photo-choice { position:relative; flex:0 0 68px; height:85px; padding:0; border:1px solid var(--line); border-radius:6px; background:var(--photo-surface,#151516); overflow:hidden; cursor:zoom-in; scroll-snap-align:start; }
.photo-choice img { display:block; width:100%; height:100%; object-fit:contain; }
.photo-choice span { position:absolute; right:3px; bottom:3px; min-width:17px; padding:1px 4px; background:#0c0c0ddd; border-radius:3px; color:#eee9df; font:11px/1.5 var(--sans); }
.photo-choice:hover,.photo-choice:focus-visible { border-color:var(--accent); outline:2px solid var(--accent); outline-offset:1px; }
@media(max-width:1100px) { .home-page .home-models .robot-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:900px) { .home-page .home-hero { grid-template-columns:minmax(0,1fr); gap:22px; } }
@media(max-width:640px) {
  .home-page .home-photo { max-width:360px; }
  .home-page .home-models .robot-grid { grid-template-columns:minmax(0,1fr); }
  .photo-choices { max-width:100%; }
  .photo-choice { flex-basis:60px; height:75px; }
}
.robot-card-image.robot-card-image>img.robot-preview[data-photo-shape="square"],
.robot-card-image.robot-card-image>img.robot-preview[data-photo-shape="landscape"] { object-fit:contain; object-position:center; }
.robot-detail>figure { width:100%; max-width:100%; min-width:0; }
.photo-choices { min-width:0; }
@media(max-width:700px) { .robot-detail { align-items:stretch; } }

.gallery-figure .gallery-image.gallery-image>img { object-fit:contain; object-position:center; }
