.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr);
  gap: 2.5rem;
  align-items: start;
  margin-block: 1.5rem 2rem;
}

.lightbox-source {
  display: none;
}

.gallery-main {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(1, 2, 29, 0.12);
  background: #f5f5f5;
}

.gallery-main-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(248, 250, 254, 0.85);
  color: var(--dark);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.gallery-arrow:hover {
  background: var(--light);
}

.gallery-arrow-prev {
  left: 0.75rem;
}

.gallery-arrow-next {
  right: 0.75rem;
}

.product-gallery {
  min-width: 0;
}

.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-block: 0.75rem 0;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  min-width: 0;
}

.gallery-thumb {
  flex: 0 0 auto;
  width: 4rem;
  height: 4rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #f5f5f5;
  cursor: pointer;
}

.gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb.is-active {
  border-color: var(--dark);
}

.gallery-thumb:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.product-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.product-info h3 {
  margin-block: 1.5rem 0.5rem;
  font-size: 1.05rem;
}

.piece-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block: 1rem 1.25rem;
}

.piece-option {
  padding: 0.6rem 1.1rem;
  border: 2px solid rgba(1, 2, 29, 0.15);
  border-radius: 0.5rem;
  background: rgba(1, 2, 29, 0.02);
  color: var(--dark);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.piece-option.is-selected {
  border-color: var(--dark);
  background: var(--dark);
  color: var(--light);
}

.piece-option:disabled {
  border-color: rgba(1, 2, 29, 0.1);
  background: rgba(1, 2, 29, 0.02);
  color: rgba(1, 2, 29, 0.35);
  cursor: not-allowed;
}

.piece-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-block: 0 1.25rem;
}

.piece-details > span {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
  padding: 0.6rem 0.5rem;
  border: 1px solid rgba(1, 2, 29, 0.12);
  border-radius: 0.5rem;
  background: rgba(1, 2, 29, 0.02);
  line-height: 1.3;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  font-weight: 600;
}

.piece-availability.is-available {
  color: #2f7d4f;
}

.piece-availability.is-sold {
  color: var(--accent);
}

.order-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0.9rem 1.75rem;
  border-radius: 0.5rem;
  border: none;
  background: var(--dark);
  color: var(--light);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease;
  margin-block: 0 0.5rem;
}

.order-btn:hover:not(:disabled) {
  opacity: 0.85;
}

.order-btn:disabled,
.order-btn.is-sold {
  background: #ccc;
  color: #666;
  cursor: not-allowed;
}

.product-description {
  margin-block: 2.5rem 0;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(1, 2, 29, 0.12);
}

.product-description p {
  line-height: 1.6;
  margin-block: 0.75rem;
  max-width: 65ch;
}

.spec-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.spec-list li {
  line-height: 1.6;
  padding-block: 0.4rem;
  border-bottom: 1px solid rgba(1, 2, 29, 0.08);
}

.gallery-press {
  margin-block: 2.5rem 2rem;
  padding: 1.5rem;
  border: 1px solid rgba(1, 2, 29, 0.12);
  border-radius: 1rem;
  background: rgba(1, 2, 29, 0.02);
}

.gallery-press h3 {
  margin-block: 0 0.5rem;
}

.gallery-press p {
  margin-block: 0 0.75rem;
}

.gallery-press .inquire-link {
  font-weight: 600;
  text-decoration: underline;
}

@media (max-width: 800px) {
  .product-layout {
    grid-template-columns: 1fr;
  }

  .order-btn {
    width: 100%;
    text-align: center;
  }
}
