.product-detail-page {
  display: relative;
  background: #fff;
  padding: 32px 0 80px;
  min-height: 70vh;
}

.product-detail-container {
  max-width: 1392px;
  margin: 0 auto;
  display: flex;
  gap: 100px;
  align-items: flex-start;
  padding: 0 24px;
}

.product-detail-left {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.product-detail-right {
  width: 583px;
  flex-shrink: 0;
}

@media (min-width: 1025px) {
  .product-detail-right {
    position: sticky;
    top: 104px;
    align-self: flex-start;
  }

  .product-detail-right.product-detail-right--scrollable {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 136px);
    min-height: 0;
    overflow: hidden;
  }

  .product-detail-right.product-detail-right--scrollable
    .product-detail-sidebar-summary {
    flex: 0 0 auto;
  }

  .product-detail-right.product-detail-right--scrollable
    .product-detail-purchase-panel {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-gutter: stable;
  }

  .product-detail-right.product-detail-right--scrollable
    .product-detail-purchase-panel::-webkit-scrollbar {
    width: 6px;
  }

  .product-detail-right.product-detail-right--scrollable
    .product-detail-purchase-panel::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #d2d9e0;
  }

  .product-detail-right.product-detail-right--scrollable
    .product-detail-purchase-panel::-webkit-scrollbar-track {
    background: transparent;
  }

  .product-detail-right.product-detail-right--scrollable
    .product-detail-actions--desktop {
    flex: 0 0 auto;
    margin-top: 0;
    padding-top: 24px;
    background: #fff;
  }
}

.product-detail-empty {
  max-width: 640px;
  margin: 64px auto;
  padding: 48px 32px;
  background: #fff;
  border-radius: 16px;
  text-align: center;
  border: 1px solid #e6e9ee;
}

.product-detail-empty h1 {
  font-size: 22px;
  margin-bottom: 12px;
  color: #323843;
}

.product-detail-empty__link {
  display: inline-flex;
  margin-top: 16px;
  padding: 10px 24px;
  border-radius: 999px;
  background: #3b82f6;
  color: #fff;
  font-weight: 500;
}

.product-detail-gallery {
  display: flex;
  gap: 48px;
  background: #fff;
  min-height: 420px;
}

.product-detail-gallery__thumbs-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-height: 540px;
}

.product-detail-gallery__thumbs-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
}

.product-detail-gallery__thumbs-inner::-webkit-scrollbar {
  display: none;
}

.product-detail-gallery__thumb-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 9999px;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    border-color 0.2s;
}

.product-detail-gallery__thumb-btn:hover {
  background: #eef0f3;
  border-color: #d2d9e0;
}

.product-detail-gallery__thumb-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.product-detail-thumb {
  width: 86px;
  height: 86px;
  border-radius: 4px;
  border: 2px solid transparent;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease;
  padding: 2px;
}

.product-detail-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.product-detail-thumb.is-active {
  border-color: #3b82f6;
  background: #eef5ff;
}

.product-detail-gallery__main {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
}

.product-detail-gallery__main img {
  max-width: 540px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Main wrap: on PC just contains main + mobile-only arrows/counter (arrows/counter hidden) */
.product-detail-gallery__main-wrap {
  flex: 1;
  position: relative;
}

.product-detail-gallery__arrow,
.product-detail-gallery__counter {
  display: none;
}

.product-detail-card {
  background: #fff;
  border: 1px solid #e6e9ee;
  border-radius: 8px;
  padding: 24px;
}

.product-detail-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.product-detail-card__header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #323843;
}

.product-detail-info-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 0;
  margin-bottom: 20px;
  font-size: 14px;
}

.product-detail-info-item {
  flex: 0 0 calc(50% - 12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.product-detail-info-label {
  color: #707a91;
  margin-right: 4px;
}

.product-detail-info-value {
  color: #323843;
  font-weight: 500;
}

/* 移动端：label 与 value 首行对齐，label 不换行等宽，value 自动换行 */
.product-detail-info-mobile__row {
  align-items: flex-start;
  gap: 8px;
}

.product-detail-info-mobile .product-detail-info-label {
  flex-shrink: 0;
  white-space: nowrap;
  min-width: 5.5em;
  color: #707a91;
}

.product-detail-info-mobile .product-detail-info-value {
  flex: 1;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: #323843;
  font-weight: 500;
}

.product-detail-description {
  font-size: 14px;
  line-height: 1.8;
  color: #4e5564;
}

.product-detail-description__empty {
  margin: 0;
  font-size: 14px;
  color: #9ca3af;
}

.product-detail-spec-table__wrapper {
  border: 1px solid #e6e9ee;
  border-radius: 12px;
  overflow: hidden;
}

.product-detail-spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.product-detail-spec-table th,
.product-detail-spec-table td {
  padding: 12px;
  border: 1px solid #e6e9ee;
  text-align: center;
}

.product-detail-spec-table th {
  background: #e6e9ee;
  border-color: #d2d9e0;
  font-weight: 600;
  color: #323843;
}

.product-detail-spec-table td {
  background: #f8f9fa;
}

.product-detail-spec-table__empty {
  text-align: center;
  color: #9ca3af;
  padding: 24px 12px;
}

@media (max-width: 768px) {
  .product-detail-spec-table__wrapper {
    overflow-x: auto;
  }
}

.product-detail-summary__id {
  font-size: 13px;
  color: #707a91;
  margin-bottom: 4px;
}

.product-detail-sidebar-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.product-detail-summary__title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.5;
  color: #323843;
  margin: 0;
}

.product-detail-summary__subtitle {
  margin: 8px 0 16px;
  color: #5d697a;
  font-size: 14px;
}

.product-detail-price-block {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 0;
}

.product-detail-price {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.5;
  color: #1461e1;
}

.product-detail-price__currency {
  font-size: 24px;
  color: #1461e1;
}

.product-detail-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0;
}

.product-detail-meta__row {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #5d697a;
  gap: 4px;
}

.product-detail-meta__row strong {
  color: #323843;
  font-weight: 400;
}

.product-detail-option-group {
  margin-bottom: 16px;
}

.product-detail-option-group header {
  font-size: 14px;
  font-weight: 600;
  color: #323843;
  margin-bottom: 10px;
}

.product-detail-color-grid,
.product-detail-size-grid,
.product-detail-factory-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-detail-color {
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 9999px;
  padding: 2px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color: #4e5564;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}
.product-detail-size {
  min-height: 38px;
  border: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: transparent;
  color: #323843;
  font-size: 16px;
  line-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  cursor: pointer;
}
.product-detail-factory {
  cursor: pointer;
}

.product-detail-color.is-active,
.product-detail-size.is-active {
  border-color: #3b82f6;
  color: #3b82f6;
  background: #eef5ff;
}

.product-detail-color__chip {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid #d2d9e0;
}

.product-detail-purchase-panel {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.product-detail-single-factory-view,
.product-detail-multi-factory-view,
.product-detail-selection-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-detail-multi-factory-view {
  gap: 24px;
}

.product-detail-factory-card {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e6e9ee;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.product-detail-factory-card.is-active {
  border-color: #3b82f6;
  border-width: 1.5px;
}

.product-detail-factory-card__header,
.product-detail-factory-card__title,
.product-detail-price-row,
.product-detail-factory-options,
.product-detail-option-row,
.product-detail-option-track,
.product-detail-text-row {
  display: flex;
  align-items: center;
}

.product-detail-factory-card__header {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.product-detail-factory-card__title {
  gap: 8px;
  min-width: 0;
}

.product-detail-factory-name {
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #323843;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.product-detail-factory-name span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-detail-factory-name:hover span {
  color: #3b82f6;
}

.product-detail-factory-name--label {
  cursor: default;
}

.product-detail-factory-name--label:hover span {
  color: #323843;
}

.product-detail-factory-name--static {
  cursor: default;
}

.product-detail-factory-name--static:hover span {
  color: #323843;
}

.product-detail-factory-name__icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.product-detail-ship-time {
  margin: 0;
  flex: 0 0 auto;
  color: #5d697a;
  font-size: 14px;
  white-space: nowrap;
}

.product-detail-ship-divider {
  width: 1px;
  height: 18px;
  background: #b6bcc8;
  margin: 0 10px;
  flex-shrink: 0;
}

.product-detail-factory-tag {
  flex: 0 0 auto;
  border: 1px solid #e1f3d8;
  border-radius: 4px;
  background: #f0f9eb;
  color: #67c23a;
  font-size: 13px;
  line-height: 22px;
  padding: 3px 8px;
}

.product-detail-factory-detail-btn {
  flex: 0 0 auto;
  min-height: 28px;
  border: 1px solid #d2d9e0;
  border-radius: 4px;
  background: #f2f3f5;
  color: #5d697a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 22px;
  cursor: pointer;
}

.product-detail-factory-detail-btn img {
  width: 16px;
  height: 16px;
  display: block;
}

.product-detail-factory-detail-btn:hover {
  border-color: #bfc8d6;
  color: #323843;
}

.product-detail-price-row {
  justify-content: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.product-detail-selection-block {
  gap: 16px;
}

.product-detail-option-row {
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.product-detail-option-row--compact {
  flex: 1 1 0;
}

.product-detail-option-label {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 32px;
  color: #323843;
  font-size: 14px;
  line-height: 1.4;
}

.product-detail-option-row--size .product-detail-option-label {
  min-height: 38px;
}

.product-detail-option-row--size .product-detail-factory-detail-btn {
  align-self: center;
}

.product-detail-option-track {
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.product-detail-option-track--scroll {
  flex-wrap: nowrap;
  overflow: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.product-detail-option-track--scroll::-webkit-scrollbar {
  display: none;
}

.product-detail-option-arrow {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: #fff;
  box-shadow: 0 2px 5px rgba(58, 77, 131, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.5;
  transition:
    opacity 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.product-detail-option-arrow[hidden] {
  display: none;
}

.product-detail-option-arrow img {
  width: 12px;
  height: 12px;
  transition: filter 0.2s ease;
}

.product-detail-option-arrow:hover,
.product-detail-option-arrow:focus-visible {
  opacity: 1;
  box-shadow: 0 2px 5px rgba(58, 77, 131, 0.15);
}

.product-detail-option-arrow:focus-visible {
  outline: 1px solid #3b82f6;
  outline-offset: 2px;
}

.product-detail-option-arrow:hover img,
.product-detail-option-arrow:focus-visible img {
  filter: brightness(0) saturate(100%) invert(52%) sepia(76%) saturate(2801%)
    hue-rotate(201deg) brightness(101%) contrast(93%);
}

.product-detail-option-arrow--prev img {
  transform: rotate(90deg);
}

.product-detail-option-arrow--next img {
  transform: rotate(-90deg);
}

.product-detail-text-row {
  align-items: flex-start;
  gap: 8px;
  color: #323843;
  font-size: 14px;
  line-height: 23px;
}

.product-detail-text-row span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.product-detail-text-row strong {
  min-width: 0;
  font-weight: 400;
}

.product-detail-factory-options {
  gap: 8px;
  margin-bottom: 16px;
}

.product-detail-factory-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 16px;
  color: #707a91;
  font-size: 14px;
}

.product-detail-factory-meta__item {
  display: inline-flex;
  align-items: center;
}

.product-detail-factory-meta__item strong {
  margin-left: 4px;
  color: #323843;
  font-weight: 400;
}

.product-detail-factory-options__divider {
  width: 1px;
  align-self: stretch;
  min-height: 32px;
  background: #e6e9ee;
}

.product-detail-color__label {
  font-size: 13px;
}

.product-detail-factory__iso {
  color: #9ca3af;
  font-size: 12px;
}

.product-detail-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.product-detail-actions--desktop {
  margin-top: 32px;
}

.product-detail-actions--mobile {
  display: none;
}

.product-detail-cta--main {
  flex: 1 1 auto;
  width: auto;
  margin-top: 0;
}

/* .product-detail-cta {
  width: 100%;
  border: none;
  border-radius: 999px;
  background: #3b82f6;
  color: #fff;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 600;
  margin-top: 32px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.product-detail-cta:hover {
  background: #2563eb;
} */

.product-detail-dialog {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.product-detail-dialog__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
}

.product-detail-dialog__panel {
  position: relative;
  z-index: 1;
  width: min(360px, 100%);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.18);
  text-align: center;
}

.product-detail-custom-dialog__panel {
  width: min(482px, 100%);
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 4px 25px rgba(58, 77, 131, 0.15);
  overflow: hidden;
}

.product-detail-custom-dialog__body {
  padding: 32px 24px;
}

.product-detail-custom-dialog__content {
  width: min(343px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.product-detail-custom-dialog__title {
  margin: 0;
  color: #323843;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}

.product-detail-custom-dialog__message {
  margin: 16px 0 0;
  color: #4e5564;
  font-size: 14px;
  line-height: 22px;
  letter-spacing: -0.01px;
  text-align: center;
  width: 100%;
}

.product-detail-custom-dialog__phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  width: fit-content;
  max-width: 100%;
}

.product-detail-custom-dialog__phone-icon {
  width: 20px;
  height: 20px;
  display: block;
  flex: 0 0 20px;
  filter: brightness(0) saturate(100%) invert(20%) sepia(8%) saturate(968%)
    hue-rotate(182deg) brightness(91%) contrast(90%);
}

.product-detail-custom-dialog__phone-text {
  margin: 0;
  color: #323843;
  font-size: 20px;
  font-weight: 500;
  line-height: normal;
}

.product-detail-custom-dialog__qr-wrap {
  width: fit-content;
  margin: 16px auto 0;
  padding: 4px;
  border: 1px solid #e6e9ee;
  border-radius: 8px;
  background: #fff;
}

.product-detail-custom-dialog__qr-inner {
  width: 137px;
  height: 137px;
  border-radius: 8px;
  overflow: hidden;
  background: #d9d9d9;
}

.product-detail-custom-dialog__qr-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.product-detail-custom-dialog__footer {
  display: flex;
  justify-content: center;
  padding: 0 24px 32px;
}

.product-detail-custom-dialog__button {
  min-width: 120px;
  min-height: 44px;
  padding: 6px 32px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: -0.01px;
}

.product-detail-factory-dialog__panel {
  width: min(514px, 100%);
  border-radius: 16px;
  padding: 24px 0 32px;
  text-align: left;
}

.product-detail-factory-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 32px 16px;
}

.product-detail-factory-dialog__title {
  margin: 0;
  color: #323843;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.product-detail-factory-dialog__close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #707a91;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.product-detail-factory-dialog__table {
  margin: 0 32px;
  border: 1px solid #d2d9e0;
  border-radius: 4px;
  overflow: hidden;
  background: #f8f9fa;
}

.product-detail-factory-dialog__row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
}

.product-detail-factory-dialog__row + .product-detail-factory-dialog__row {
  border-top: 1px solid #d2d9e0;
}

.product-detail-factory-dialog__label,
.product-detail-factory-dialog__value {
  min-height: 48px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #323843;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  word-break: break-word;
}

.product-detail-factory-dialog__label {
  background: #e6e9ee;
  font-weight: 600;
}

.product-detail-factory-dialog__value {
  border-left: 1px solid #d2d9e0;
  font-weight: 400;
}

.product-detail-size-chart-dialog__panel {
  width: min(600px, 100%);
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 4px 25px rgba(58, 77, 131, 0.15);
  overflow: hidden;
  background: #fff;
}

.product-detail-size-chart-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #e6e9ee;
}

.product-detail-size-chart-dialog__title {
  margin: 0;
  color: #323843;
  font-size: 18px;
  font-weight: 600;
}

.product-detail-size-chart-dialog__close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #707a91;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-detail-size-chart-dialog__close:hover {
  background: #f2f3f5;
}

.product-detail-size-chart-dialog__body {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}

.product-detail-size-chart-dialog__image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

@media (max-width: 1024px) {
  .product-detail-container {
    flex-direction: column;
  }

  .product-detail-right {
    position: static;
    width: 100%;
  }

  .product-detail-factory-options {
    flex-direction: column;
    align-items: stretch;
  }

  .product-detail-factory-meta {
    flex-wrap: wrap;
    gap: 12px 24px;
  }

  .product-detail-factory-options__divider {
    display: none;
  }

  /* .product-detail-gallery {
    flex-direction: column;
  } */

  .product-detail-gallery__thumbs {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Mobile: gallery per Figma - main image only, overlay arrows, counter below */
@media (max-width: 768px) {
  /* 移动端轮播图（容器第一个子元素）排在最上方 */
  .product-detail-container > .product-detail-gallery:first-child {
    order: -2;
  }

  .product-detail-right {
    order: -1;
  }

  .product-detail-left {
    order: 0;
  }

  .product-detail-actions {
    gap: 16px;
  }

  .product-detail-actions--desktop {
    display: none;
  }

  .product-detail-actions--mobile {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 16px;
    padding-left: 8px;
    padding-right: 8px;
    box-sizing: border-box;
  }

  .product-detail-actions--mobile .product-detail-cta--main {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    height: 44px;
    padding: 12px 32px;
    border-radius: 80px;
    font-size: 14px;
    line-height: 22px;
  }

  .product-detail-gallery {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: 0;
  }

  .product-detail-gallery__thumbs-wrap {
    display: none;
  }

  .product-detail-gallery__main-wrap {
    flex: none;
    width: 100%;
    max-width: 359px;
    margin: 0 auto;
  }

  .product-detail-gallery__main {
    width: 100%;
    min-height: 359px;
    height: 359px;
    border-radius: 8px;
    background: #f8f9fa;
  }

  .product-detail-gallery__main img {
    max-width: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .product-detail-gallery__arrow {
    display: flex;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(58, 77, 131, 0.12);
    transition: opacity 0.2s ease;
  }

  .product-detail-gallery__arrow:hover,
  .product-detail-gallery__arrow:focus {
    opacity: 1;
  }

  .product-detail-gallery__arrow--prev {
    left: 4px;
  }

  .product-detail-gallery__arrow--next {
    right: 4px;
  }

  .product-detail-gallery__arrow img {
    width: 16px;
    height: 16px;
    display: block;
  }

  .product-detail-gallery__counter {
    display: block;
    margin: 0;
    margin-top: 8px;
    font-size: 16px;
    color: #323843;
    text-align: center;
    line-height: normal;
  }

  .product-detail-factory-dialog__panel {
    padding: 20px 0 24px;
  }

  .product-detail-custom-dialog {
    padding: 16px;
  }

  .product-detail-custom-dialog__body {
    padding: 28px 20px;
  }

  .product-detail-custom-dialog__content {
    width: 100%;
  }

  .product-detail-custom-dialog__phone-text {
    font-size: 18px;
  }

  .product-detail-custom-dialog__footer {
    padding: 0 20px 28px;
  }

  .product-detail-factory-dialog__header {
    padding: 0 20px 16px;
  }

  .product-detail-factory-dialog__table {
    margin: 0 20px;
  }

  .product-detail-factory-dialog__row {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .product-detail-option-row--size .product-detail-factory-detail-btn {
    align-self: center;
  }

  /* 移动端：工厂卡片头部换行，发货时效移到标题下一行 */
  .product-detail-factory-card__header {
    flex-wrap: wrap;
    row-gap: 16px;
  }

  /* 移动端：有尺码表按钮时，尺码选项换行并对齐按钮左侧；无按钮时保持同行 */
  .product-detail-option-row--size:has(.product-detail-factory-detail-btn) {
    flex-wrap: wrap;
  }

  .product-detail-option-row--size:has(.product-detail-factory-detail-btn) .product-detail-option-track {
    flex-basis: 100%;
    padding-left: 50px;
  }
}
