.page-product-detail {
  font-size: 13px;

  .pd-header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
  }

  .pd-back-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 8px;
  }

  .pd-head-main {
    min-width: 0;
  }

  .pd-head-title {
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    white-space: nowrap;
  }

  .pd-head-subtitle {
    margin-top: 2px;
    font-size: 12px;
    color: #6b7280;
  }

  .pd-head-spu {
    margin-top: 2px;
    font-family: monospace;
    font-size: 12px;
    color: #9ca3af;
  }

  .pd-head-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 2px 12px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    border-radius: 6px;
  }

  .pd-head-spacer {
    flex: 1;
  }

  .pd-body {
    display: flex;
    gap: 18px;
    align-items: flex-start;
  }

  .pd-nav-card {
    position: sticky;
    top: 8px;
    flex-shrink: 0;
    width: 160px;
    border-radius: 10px;
  }

  .pd-nav-item {
    display: block;
    padding: 9px 18px;
    margin: 2px 0;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
  }

  .pd-nav-item:hover {
    color: #1677ff;
    background: #f8f9fb;
  }

  .pd-nav-item.active {
    font-weight: 600;
    color: #1677ff;
    background: #f3f8ff;
    border-left-color: #1677ff;
  }

  .pd-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
  }

  .pd-section-card {
    border-radius: 10px;
  }

  .pd-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
  }

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

  .pd-label {
    flex-shrink: 0;
    width: 84px;
    font-size: 13px;
    font-weight: 500;
    line-height: 32px;
    color: #4b5563;
    text-align: right;
  }

  .pd-label.required::before {
    margin-right: 2px;
    color: #ef4444;
    content: '*';
  }

  .pd-ctrl {
    flex: 1;
    min-width: 0;
  }

  .pd-inline {
    display: flex;
    gap: 8px;
    align-items: center;
  }

  .pd-unit {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
  }

  .pd-input-fluid {
    width: 100%;
  }

  .pd-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #9ca3af;
  }

  .pd-upload-dragger {
    .ant-upload-drag {
      min-height: 160px;
      padding: 24px 16px;
      background: #fafafa;
      border: 1px dashed #d9d9d9;
      border-radius: 14px;
      transition: all 0.2s ease;
    }

    .ant-upload-btn {
      padding: 0;
    }
  }

  .pd-upload-dragger:not(.is-disabled):hover .ant-upload-drag {
    background: #f6f9ff;
    border-color: #1677ff;
  }

  .pd-upload-dragger.is-disabled .ant-upload-drag {
    cursor: not-allowed;
    background: #f7f7f7;
    border-color: #e5e7eb;
  }

  .pd-upload-dragger-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    text-align: center;
  }

  .pd-upload-dragger-plus {
    font-size: 48px;
    line-height: 1;
    color: #9ca3af;
  }

  .pd-upload-dragger-title {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
  }

  .pd-upload-dragger-hint {
    margin: 0;
    font-size: 13px;
    color: #9ca3af;
  }

  .pd-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 16px;
  }

  .pd-thumb {
    position: relative;
    width: 120px;
    height: 120px;
    overflow: hidden;
    cursor: pointer;
    background: #f8f9fb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s ease;
  }

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

  .pd-thumb-main {
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgb(22 119 255 / 25%);
  }

  .pd-thumb-badge {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 26px;
    font-size: 13px;
    font-weight: 600;
    line-height: 26px;
    color: #fff;
    text-align: center;
    background: #1677ff;
  }

  .pd-thumb-del {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    font-size: 18px;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    background: #ef4444;
    border: none;
    border-radius: 50%;
  }

  .pd-price-alert {
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #1677ff;
    background: rgb(22 119 255 / 6%);
    border: 1px solid rgb(22 119 255 / 20%);
    border-radius: 8px;
  }

  .pd-pricing-card .pd-ctrl {
    flex: 0 0 auto;
    width: 460px;
    max-width: 100%;
  }

  .pd-pricing-inline {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) 34px;
    gap: 8px;
    align-items: center;
    width: 100%;
  }

  .pd-pricing-unit {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    white-space: nowrap;
  }

  .pd-pricing-unit.is-empty {
    visibility: hidden;
  }

  .pd-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .pd-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 12px;
    font-size: 12px;
    color: #4b5563;
    cursor: pointer;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: all 0.2s ease;
  }

  .pd-pill:hover {
    color: #1677ff;
    border-color: #1677ff;
  }

  .pd-pill.checked {
    font-weight: 600;
    color: #1677ff;
    background: rgb(22 119 255 / 8%);
    border-color: #1677ff;
  }

  .pd-sku-hd {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
  }

  .pd-sku-hd-left {
    display: flex;
    gap: 10px;
    align-items: center;
  }

  .pd-sku-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
  }

  .pd-sku-count {
    font-size: 12px;
    color: #9ca3af;
  }

  .pd-sku-hint {
    font-size: 12px;
    color: #9ca3af;
  }

  .pd-sku-batch {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
  }

  .pd-sku-batch label {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
  }

  .pd-sku-batch-input {
    width: 110px;
  }

  .pd-sku-batch-gap {
    width: 16px;
  }

  .pd-table-wrap {
    max-height: 520px;
    overflow: auto;
    border-radius: 8px;
  }

  .pd-sku-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
  }

  .pd-sku-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-align: left;
    white-space: nowrap;
    background: #f8f9fb;
    border-bottom: 1px solid #f0f0f0;
  }

  .pd-sku-table td {
    padding: 8px 12px;
    vertical-align: top;
    color: #1a1a2e;
    border-bottom: 1px solid #f3f4f6;
  }

  .pd-sku-table tr:last-child td {
    border-bottom: none;
  }

  .pd-sku-spec {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    color: #4b5563;
    white-space: nowrap;
    background: #f0f0f0;
    border-radius: 4px;
  }

  .pd-sku-code {
    font-family: monospace;
    font-size: 11px;
    color: #9ca3af;
  }

  .pd-sku-stock-warn {
    margin-top: 2px;
    font-size: 11px;
    color: #fa8c16;
  }

  .pd-sku-stock-warn.soldout {
    color: #ef4444;
  }

  .pd-sku-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .pd-tag-wrap {
    display: flex;
    flex-wrap: wrap;
  }

  .pd-tag-sel {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    margin: 0 8px 8px 0;
    font-size: 12px;
    color: #4b5563;
    cursor: pointer;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: all 0.2s ease;
  }

  .pd-tag-sel:hover {
    color: #1677ff;
    border-color: #1677ff;
  }

  .pd-tag-sel.selected {
    font-weight: 600;
    color: #1677ff;
    background: rgb(22 119 255 / 8%);
    border-color: #1677ff;
  }

  .pd-combo-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .pd-combo-card {
    padding: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
  }

  .pd-combo-head {
    display: flex;
    gap: 10px;
    align-items: center;
  }

  .pd-combo-range {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
  }

  .pd-combo-range .ant-input-number {
    width: 70px;
  }

  .pd-combo-items {
    margin-top: 10px;
  }

  .pd-combo-item {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
  }

  .pd-combo-item .name {
    font-size: 13px;
    color: #374151;
  }

  .pd-combo-item .actions {
    display: inline-flex;
    gap: 8px;
    align-items: center;
  }

  .pd-combo-item .actions .ant-input-number {
    width: 70px;
  }

  .pd-combo-empty {
    font-size: 12px;
    color: #9ca3af;
  }

  .pd-combo-add-item {
    padding-left: 0;
  }

  .pd-combo-add-group {
    height: 36px;
    color: #1677ff;
    cursor: pointer;
    background: #fff;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
  }

  .pd-shelf-group {
    display: flex;
    gap: 8px;
    align-items: flex-start;
  }

  .pd-kind-pills {
    display: inline-flex;
    gap: 8px;
    align-items: center;
  }

  .pd-kind-pill {
    min-width: 64px;
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    transition: all 0.2s ease;
  }

  .pd-kind-pill:hover {
    color: #1677ff;
    background: #f8fbff;
    border-color: #8ec5ff;
  }

  .pd-kind-pill.active {
    font-weight: 600;
    color: #1677ff;
    background: rgb(22 119 255 / 8%);
    border-color: #1677ff;
  }

  .pd-shelf-opt {
    display: flex;
    flex: 1;
    gap: 6px;
    align-items: flex-start;
    min-width: 0;
    min-height: 0;
    padding: 9px 10px;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.2s ease;
  }

  .pd-shelf-opt:hover {
    border-color: #1677ff;
  }

  .pd-shelf-opt.active {
    background: rgb(22 119 255 / 5%);
    border-color: #1677ff;
  }

  .pd-shelf-opt input[type='radio'] {
    margin-top: 1px;
    accent-color: #1677ff;
  }

  .pd-shelf-opt-body {
    flex: 1;
    min-width: 0;
  }

  .pd-shelf-opt-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    color: #1a1a2e;
  }

  .pd-shelf-opt-desc {
    margin-top: 0;
    font-size: 11px;
    line-height: 1.3;
    color: #9ca3af;
  }

  .pd-shelf-time-row {
    display: flex;
    gap: 8px;
    align-items: center;
    max-width: 420px;
    margin-top: 10px;
  }

  .pd-save-bar {
    position: sticky;
    bottom: 0;
    z-index: 11;
    padding: 12px 20px;
    background: #fafbfc;
    border-radius: 10px;
  }

  .pd-save-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
  }

  .pd-picker-search {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
  }

  .pd-picker-list {
    max-height: 320px;
    overflow: auto;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
  }

  .pd-picker-empty {
    padding: 20px 12px;
    color: #9ca3af;
    text-align: center;
  }

  .pd-picker-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
  }

  .pd-picker-item:last-child {
    border-bottom: none;
  }

  .pd-picker-item .name {
    flex: 1;
    min-width: 0;
  }

  .pd-picker-item .spu {
    font-family: monospace;
    font-size: 12px;
    color: #9ca3af;
  }

  .pd-picker-item .price {
    font-size: 12px;
    color: #111827;
    white-space: nowrap;
  }

  .pd-picker-selected {
    margin-top: 10px;
    font-size: 12px;
    color: #1677ff;
  }
}

@media (width <= 1024px) {
  .page-product-detail {
    .pd-body {
      flex-direction: column;
    }

    .pd-nav-card {
      position: static;
      width: 100%;
    }

    .pd-label {
      width: 72px;
    }

    .pd-combo-head {
      flex-direction: column;
      align-items: stretch;
    }

    .pd-pricing-card .pd-ctrl {
      width: 100%;
    }

    .pd-table-wrap {
      max-height: 420px;
    }

    .pd-kind-pills {
      width: 100%;
    }

    .pd-kind-pill {
      flex: 1;
      min-width: 0;
    }

    .pd-shelf-group {
      flex-direction: column;
    }

    .pd-upload-dragger .ant-upload-drag {
      min-height: 140px;
      padding: 16px 12px;
    }

    .pd-thumb {
      width: 96px;
      height: 96px;
      border-radius: 10px;
    }

    .pd-thumb-badge {
      height: 22px;
      font-size: 12px;
      line-height: 22px;
    }
  }
}
