.page-main--pd {
  background: var(--color-white);
}

/* ========== Machine Price / Gallery ========== */
.pd-price {
  padding: 48px 0 56px;
}

.pd-price__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: start;
}

.pd-gallery__stage {
  position: relative;
  margin-bottom: 12px;
}

.pd-gallery__main {
  margin: 0;
  overflow: hidden;
  background: #f4f5f7;
  border: 1px solid var(--color-border);
}

.pd-gallery__main-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.pd-gallery__nav {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #222;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background var(--transition), box-shadow var(--transition);
}

.pd-gallery__nav:hover,
.pd-gallery__nav:focus-visible {
  background: var(--color-white);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
  outline: none;
}

.pd-gallery__nav--prev {
  left: 12px;
}

.pd-gallery__nav--next {
  right: 12px;
}

.pd-gallery__thumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.pd-gallery__thumb {
  flex: 0 0 auto;
  width: 88px;
  height: 66px;
  padding: 0;
  border: 2px solid transparent;
  background: #f4f5f7;
  cursor: pointer;
  transition: border-color var(--transition);
}

.pd-gallery__thumb:hover,
.pd-gallery__thumb:focus-visible {
  border-color: var(--color-primary);
  outline: none;
}

.pd-gallery__thumb.is-active {
  border-color: var(--color-primary);
}

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

.pd-price__title {
  margin: 0 0 20px;
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

.pd-price__desc {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--color-text-muted);
}

.pd-price__desc > :first-child {
  margin-top: 0;
}

.pd-price__desc > :last-child {
  margin-bottom: 0;
}

.pd-tabs__content {
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-text);
}

.pd-tabs__content > :first-child {
  margin-top: 0;
}

.pd-tabs__content > :last-child {
  margin-bottom: 0;
}

.pd-tabs__content table {
  width: 100%;
  border-collapse: collapse;
}

.pd-tabs__content table th,
.pd-tabs__content table td {
  padding: 16px 20px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px dotted #ccc;
}

.pd-tabs__content table tbody tr:nth-child(even) {
  background: #f9f9f9;
}

.pd-tabs__content ul,
.pd-tabs__content ol {
  padding-left: 1.4em;
}

.pd-price__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-white);
  background: var(--color-primary);
  border-radius: 2px;
  transition: background var(--transition), transform var(--transition);
}

.pd-price__cta:hover,
.pd-price__cta:focus-visible {
  background: #00406a;
  outline: none;
}

.pd-price__cta:active {
  transform: translateY(1px);
}

/* ========== Tabs ========== */
.pd-tabs {
  padding: 0 0 64px;
}

.pd-tabs__wrapper {
  position: relative;
}

.pd-tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
}

.pd-tabs__tab {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 12px 24px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text-muted);
  background: #f7f7f7;
  border: 1px solid var(--color-border);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.pd-tabs__tab + .pd-tabs__tab {
  margin-left: -1px;
}

.pd-tabs__tab:hover {
  color: var(--color-text);
}

.pd-tabs__tab:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.pd-tabs__tab.is-active {
  z-index: 2;
  margin-bottom: -1px;
  padding-bottom: 13px;
  color: var(--color-text);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-white);
}

.pd-tabs__panel {
  padding: 32px 36px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
}

.pd-tabs__panel[hidden] {
  display: none;
}

.pd-spec-list {
  margin: 0;
  padding: 0;
  list-style: disc;
  padding-left: 1.4em;
}

.pd-spec-list li {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-text);
}

.pd-spec-list li:last-child {
  margin-bottom: 0;
}

.pd-spec-list strong {
  font-weight: 700;
}

.pd-spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}

.pd-spec-table tbody tr:nth-child(even) {
  background: #f9f9f9;
}

.pd-spec-table th,
.pd-spec-table td {
  padding: 16px 20px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px dotted #ccc;
}

.pd-spec-table tr:last-child th,
.pd-spec-table tr:last-child td {
  border-bottom: none;
}

.pd-spec-table th {
  width: 38%;
  font-weight: 700;
  color: var(--color-text);
}

.pd-spec-table td {
  color: var(--color-text-muted);
}

/* ========== Related Products ========== */
.pd-related {
  padding: 0 0 80px;
}

.pd-related__title {
  margin: 0 0 28px;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-text);
}

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

.pd-related-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: 0 0 24px;
  text-align: center;
  background: var(--color-white);
}

.pd-related-card--featured {
  padding: 20px 16px 24px;
  border-radius: 6px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.pd-related-card__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.06;
  pointer-events: none;
}

.pd-related-card__media {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  margin-bottom: 16px;
  overflow: hidden;
  background: #f0f1f3;
}

.pd-related-card__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.pd-related-card__title {
  position: relative;
  z-index: 1;
  margin: 0 12px 20px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--color-text);
}

.pd-related-card__title--link {
  font-weight: 600;
}

.pd-related-card__title--link a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pd-related-card__title--link a:hover,
.pd-related-card__title--link a:focus-visible {
  color: #00406a;
  outline: none;
}

.pd-related-card__btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-white);
  background: var(--color-primary);
  border-radius: 2px;
  transition: background var(--transition);
}

.pd-related-card__btn:hover,
.pd-related-card__btn:focus-visible {
  background: #00406a;
  outline: none;
}

/* ========== Tablet ========== */
@media (max-width: 1024px) {
  .pd-price__inner {
    gap: 36px;
  }

  .pd-related__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .pd-price__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .pd-tabs__panel {
    padding: 24px 20px;
  }
}

/* ========== Mobile ========== */
@media (max-width: 640px) {
  .pd-price {
    padding: 32px 0 40px;
  }

  .pd-gallery__nav {
    width: 36px;
    height: 36px;
  }

  .pd-gallery__nav--prev {
    left: 8px;
  }

  .pd-gallery__nav--next {
    right: 8px;
  }

  .pd-gallery__thumb {
    width: 72px;
    height: 54px;
  }

  .pd-price__cta {
    width: 100%;
    justify-content: center;
  }

  .pd-tabs {
    padding-bottom: 48px;
  }

  .pd-tabs__tab {
    flex: 1 1 auto;
    padding: 10px 14px;
    font-size: 13px;
    text-align: center;
  }

  .pd-tabs__panel {
    padding: 20px 16px;
  }

  .pd-spec-table th,
  .pd-spec-table td {
    display: block;
    width: 100%;
    padding: 12px 16px;
  }

  .pd-spec-table th {
    padding-bottom: 4px;
    border-bottom: none;
  }

  .pd-spec-table td {
    padding-top: 0;
    padding-bottom: 16px;
  }

  .pd-related {
    padding-bottom: 56px;
  }

  .pd-related__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
