/* 3D OBJECT PHOTOGRAPHY */

.object-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  padding-top: 34px;
  border-top: 1px solid var(--line-strong);
}

.object-card {
  display: block;
  color: var(--primary);
  background: transparent;
  border-top: 1px solid var(--line-strong);
  padding-top: 12px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.object-card:hover {
  color: var(--light-accent);
  transform: translateY(-2px);
}

.object-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #ffffff;
}

.object-thumb img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  background: #ffffff;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.object-card:hover .object-thumb img {
  transform: scale(1.045);
  filter: contrast(1.05) saturate(1.05);
}

.object-card-text {
  display: block;
  padding-top: 12px;
}

.object-card-title {
  display: block;
  color: var(--primary-dark);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 750;
}

.object-card-desc {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.object-page {
  max-width: 1120px;
}

.object-view-header {
  max-width: 760px;
  margin-bottom: 24px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}

.object-view-header h2 {
  margin: 12px 0 8px;
  color: var(--primary-dark);
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.15;
  font-weight: 750;
  letter-spacing: -0.015em;
}

.object-view-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.object-view-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 34px 0;
  background: #ffffff;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  overflow-x: auto;
}

.object-viewer,
#container {
  background: transparent !important;
  box-shadow: none;
}

.object-caption {
  max-width: 780px;
  margin: 22px auto 0;
  text-align: center;
}

.object-caption p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.object-caption b,
.object-caption strong {
  color: var(--primary-dark);
}

@media (max-width: 820px) {
  .object-gallery {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .object-view-wrap {
    justify-content: flex-start;
    background: #ffffff;
  }
}

@media (max-width: 560px) {
  .object-gallery {
    grid-template-columns: 1fr;
  }

  .object-view-wrap {
    margin-left: calc(-1 * (50vw - 50%));
    margin-right: calc(-1 * (50vw - 50%));
    width: 100vw;
    padding-left: 14px;
    padding-right: 14px;
  }
}


/* Hide Object2VR skin controls on object pages where skin scripts are not used. */
/* Anemometer keeps its own controls because its HTML still loads anemometer_skin.js. */
.object-page:not(.anemometer-page) .ggskin,
.object-page:not(.anemometer-page) [class*="ggskin"],
.object-page:not(.anemometer-page) [id*="controller"],
.object-page:not(.anemometer-page) [id*="button"] {
  pointer-events: none;
}


/* DETAIL PAGE POLISH */

.object-view-header {
  max-width: 760px;
  margin: 0 0 22px;
  padding-left: 0;
  border-left: 0;
}

.object-view-header h2 {
  margin: 0;
}

.object-view-wrap {
  position: relative;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.object-viewer,
#container {
  position: relative;
  z-index: 1;
  background: transparent !important;
  box-shadow: 0 0 30px rgba(0,0,0,0);
}

.object-caption p:first-child {
  color: var(--text);
  font-weight: 400;
}

.object-caption b,
.object-caption strong {
  font-weight: 400;
}


/* FINAL 3D OBJECT DETAIL TEXT LAYOUT */

.object-description {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
}

.object-view-header {
  margin-bottom: 28px;
}

.object-caption {
  margin-top: 20px;
}

.object-caption p {
  margin: 0 0 10px;
}

.object-caption p:first-child {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}


/* MOBILE RESPONSIVE OBJECT2VR VIEWERS */

.object-view-wrap {
  justify-content: center;
  overflow-x: hidden;
}

.object-viewer,
#container {
  display: block;
  width: 100% !important;
  max-width: 640px;
  height: auto !important;
  aspect-ratio: 1 / 1;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  touch-action: pan-y;
}

.object-viewer[style*="width:640px;height:425px"],
#container[style*="width:640px;height:425px"] {
  max-width: 640px;
  aspect-ratio: 640 / 425;
}

.object-viewer[style*="width:640px;height:533px"],
#container[style*="width:640px;height:533px"] {
  max-width: 640px;
  aspect-ratio: 640 / 533;
}

.object-viewer[style*="width:640px;height:541px"],
#container[style*="width:640px;height:541px"] {
  max-width: 640px;
  aspect-ratio: 640 / 541;
}

.object-viewer[style*="width:640px;height:581px"],
#container[style*="width:640px;height:581px"] {
  max-width: 640px;
  aspect-ratio: 640 / 581;
}

.object-viewer[style*="width:600px;height:400px"],
#container[style*="width:600px;height:400px"] {
  max-width: 600px;
  aspect-ratio: 600 / 400;
}

.object-viewer[style*="width:600px;height:551px"],
#container[style*="width:600px;height:551px"] {
  max-width: 600px;
  aspect-ratio: 600 / 551;
}

.object-viewer[style*="width:686px;height:550px"],
#container[style*="width:686px;height:550px"] {
  max-width: 686px;
  aspect-ratio: 686 / 550;
}

.object-viewer[style*="width:600px;height:600px"],
#container[style*="width:600px;height:600px"] {
  max-width: 600px;
  aspect-ratio: 1 / 1;
}

.object-viewer canvas,
.object-viewer img,
#container canvas,
#container img {
  max-width: 100% !important;
}

@media (max-width: 820px) {
  .object-view-wrap {
    justify-content: center;
    padding: 24px 0;
  }
}

@media (max-width: 560px) {
  .object-view-header {
    margin-bottom: 20px;
  }

  .object-view-wrap {
    margin-left: calc(-1 * (50vw - 50%));
    margin-right: calc(-1 * (50vw - 50%));
    width: 100vw;
    padding: 22px 16px;
    box-sizing: border-box;
  }

  .object-viewer,
  #container {
    width: 100% !important;
    max-width: calc(100vw - 32px);
  }

  .object-caption {
    margin-top: 16px;
    padding: 0 8px;
  }
}
