/* 文件职责：商品页面抽屉样式。 */
.product-editor-drawer,
.product-quick-edit-drawer,
.product-soldout-drawer {
  .ant-drawer-header {
    min-height: 56px;
    padding: 0 22px;
    border-bottom: 1px solid #f0f0f0;
  }

  .ant-drawer-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
  }

  .ant-drawer-body {
    padding: 18px 20px 12px;
  }

  .ant-drawer-footer {
    padding: 12px 20px;
    border-top: 1px solid #f0f0f0;
  }

  .product-drawer-section {
    margin-bottom: 16px;
  }

  .product-drawer-section-title {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
  }

  .drawer-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .drawer-form-item.full {
    grid-column: 1 / -1;
  }

  .drawer-form-item.compact {
    display: inline-flex;
    gap: 8px;
    align-items: center;
  }

  .drawer-form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
  }

  .drawer-form-label.required::before {
    margin-right: 4px;
    color: #ef4444;
    content: '*';
  }

  .stock-input {
    width: 120px;
  }

  .unit {
    font-size: 12px;
    color: #6b7280;
  }

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

  .switch-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: #4b5563;
  }
}

.product-editor-drawer {
  .product-kind-radio-group {
    width: 100%;
  }

  .product-kind-radio-group .ant-radio-button-wrapper {
    width: 96px;
    text-align: center;
  }

  .product-shelf-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .shelf-radio-item {
    padding: 8px 10px;
    margin-inline-start: 0;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
  }

  .shelf-time-row {
    margin-top: 10px;
  }
}

.product-quick-edit-drawer,
.product-soldout-drawer {
  .product-quick-card,
  .product-soldout-card {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px;
    margin-bottom: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
  }

  .product-quick-cover {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    font-size: 16px;
    font-weight: 700;
    color: #94a3b8;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
  }

  .product-quick-meta {
    flex: 1;
    min-width: 0;
  }

  .product-quick-meta .name {
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
  }

  .product-quick-meta .sub {
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
  }
}

.product-soldout-drawer {
  .soldout-mode-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
  }

  .soldout-mode-item {
    padding: 8px 10px;
    margin-inline-start: 0;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
  }
}

.product-drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-drawer-footer-right {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

.product-drawer-footer-right .ant-btn {
  min-width: 92px;
  height: 40px;
  border-radius: 10px;
}
