.products-page {
  padding-top: 96px;
}

.products-page h1 {
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  margin-bottom: 14px;
}

.display-block {
  margin-top: 36px;
}

.display-block h2 {
  margin-bottom: 14px;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
}

.product-show-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.product-show-grid-8 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-show-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(24, 33, 30, 0.05);
}

.product-show-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  background: #f6f8f7;
}

.product-show-copy {
  padding: 14px;
}

.product-show-copy .count {
  margin: 0;
  color: #8b938f;
}

.product-show-copy h3 {
  margin: 4px 0 6px;
}

.product-show-copy p {
  margin: 0 0 12px;
  color: var(--muted);
}

.product-card-media {
  padding: 10px 10px 4px;
}

.carousel {
  position: relative;
}

.carousel-track {
  position: relative;
}

.carousel-slide {
  display: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  margin: 0;
  background: #fff;
  overflow: hidden;
  width: 100%;
  cursor: zoom-in;
}

.carousel-slide.is-active {
  display: block;
}

.carousel-slide img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  background: #f6f8f7;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #1a2622;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.carousel-prev {
  left: 8px;
}

.carousel-next {
  right: 8px;
}

.carousel-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  background: #bdc8c3;
  padding: 0;
  cursor: pointer;
}

.carousel-dot.is-active {
  background: var(--brand);
}

.placeholder-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(145deg, rgba(36, 90, 71, 0.12), rgba(185, 137, 73, 0.12)),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.2) 0 8px, rgba(255, 255, 255, 0.45) 8px 16px);
}

.is-placeholder .product-show-copy h3 {
  color: #687470;
}

.type-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.type-tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
}

.type-tab.is-active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.panel-wrap {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}

.type-panel {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.type-panel.is-active {
  display: grid;
}

.type-panel-empty.is-active {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--muted);
  text-align: center;
  padding: 12px;
}

.type-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.gallery-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.media-group {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}

.media-group h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.type-panel .thumb-grid {
  grid-column: 1 / -1;
}

.thumb-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.thumb-btn:hover {
  border-color: var(--brand);
}

.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(6, 12, 10, 0.82);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
}

.lightbox-image {
  width: min(92vw, 920px);
  max-height: 80vh;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #1a2622;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-prev {
  left: 14px;
}

.lightbox-next {
  right: 14px;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-caption {
  margin: 10px 0 0;
  color: #fff;
  text-align: center;
  font-size: 0.92rem;
}

.nav a.active {
  color: var(--brand);
  font-weight: 600;
}

@media (max-width: 980px) {
  .product-show-grid,
  .product-show-grid-8,
  .type-panel {
    grid-template-columns: 1fr;
  }

  .gallery-layout {
    grid-template-columns: 1fr;
  }

  .thumb-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
