.detail-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.15fr 0.85fr;
}

.gallery {
  padding: 1rem;
}

.gallery-main {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: #eef2f8;
  cursor: zoom-in;
}

.gallery-main-wrap {
  position: relative;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 2;
}

.gallery-nav:hover {
  background: rgba(0, 0, 0, 0.65);
}

.gallery-nav-prev {
  left: 0.55rem;
}

.gallery-nav-next {
  right: 0.55rem;
}

.gallery-hint {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.thumbs {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.thumbs button img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 9px;
  border: 2px solid transparent;
}

.thumbs button.is-active img {
  border-color: var(--brand);
}

.details-card {
  padding: 1rem;
}

.detail-brand-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.detail-brand-head h1 {
  margin: 0;
}

.detail-brand-logo-wrap {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid #d0d5dd;
  background: #f8fafc;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.detail-brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.3rem;
}

.detail-brand-logo-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--brand-strong);
  font-weight: 800;
  background: #e6f0ff;
}

.detail-acessorios {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
  word-break: break-word;
}

.spec-list {
  display: grid;
  gap: 0.55rem;
}

.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #eaecf0;
}

.store-info {
  margin-top: 1rem;
  padding: 1rem;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  display: grid;
  place-items: center;
  padding: 2.5rem 1rem 1rem;
}

.photo-lightbox[hidden] {
  display: none !important;
}

.photo-lightbox-image {
  max-width: 100%;
  max-height: calc(100vh - 4rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.photo-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
}

.photo-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.35);
}

.photo-lightbox-nav-prev {
  left: 1rem;
}

.photo-lightbox-nav-next {
  right: 1rem;
}

.photo-lightbox-close {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.photo-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 980px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .gallery-nav {
    width: 34px;
    height: 34px;
  }

  .photo-lightbox-nav {
    width: 36px;
    height: 36px;
  }
}
