/* 管理后台样式 */
body {
  background-color: #f2f2f2;
}

/* 内容区域居左显示 */
.layui-body {
  overflow-x: hidden !important;
}

.layui-body .layui-container,
.layui-body .layui-fluid {
  margin-left: 0 !important;
  margin-right: auto !important;
  max-width: 100% !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

/* 商品表格容器 */
.layui-card-body {
  overflow-x: auto;
  overflow-y: visible;
}

/* 商品列表页面 - 表格样式优化 */
#productsTable {
  width: 100% !important;
  table-layout: fixed;
  word-wrap: break-word;
}

#productsTable th,
#productsTable td {
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 9px 15px;
}

/* ID列 - 固定宽度 */
#productsTable th:nth-child(1),
#productsTable td:nth-child(1) {
  width: 60px;
  white-space: nowrap;
}

/* 商品编码列 - 固定宽度 */
#productsTable th:nth-child(2),
#productsTable td:nth-child(2) {
  width: 120px;
  white-space: nowrap;
}

/* 商品名称列 - 自适应，允许换行 */
#productsTable th:nth-child(3),
#productsTable td:nth-child(3) {
  width: auto;
  min-width: 150px;
  white-space: normal;
  word-break: break-word;
}

/* 图片列 - 固定宽度 */
#productsTable th:nth-child(4),
#productsTable td:nth-child(4) {
  width: 80px;
  text-align: center;
  white-space: nowrap;
}

/* 价格列 - 固定宽度 */
#productsTable th:nth-child(5),
#productsTable td:nth-child(5) {
  width: 100px;
  white-space: nowrap;
  text-align: right;
}

/* 排序列 - 固定宽度 */
#productsTable th:nth-child(6),
#productsTable td:nth-child(6) {
  width: 80px;
  white-space: nowrap;
  text-align: center;
}

/* 状态列 - 固定宽度 */
#productsTable th:nth-child(7),
#productsTable td:nth-child(7) {
  width: 80px;
  white-space: nowrap;
  text-align: center;
}

/* 创建时间列 - 固定宽度 */
#productsTable th:nth-child(8),
#productsTable td:nth-child(8) {
  width: 160px;
  white-space: nowrap;
}

/* 操作列 - 固定宽度 */
#productsTable th:nth-child(9),
#productsTable td:nth-child(9) {
  width: 120px;
  white-space: nowrap;
  text-align: center;
}

.page-title {
  margin-bottom: 20px;
  font-size: 24px;
  font-weight: 600;
  text-align: left;
}

/* 统计卡片 */
.stats-cards {
  margin-bottom: 20px;
}

.stat-card {
  text-align: center;
}

.stat-label {
  color: #999;
  font-size: 14px;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 28px;
  font-weight: 600;
  color: #333;
}

/* 表格样式 */
.layui-table {
  margin-top: 0;
}

/* 操作按钮 */
.action-btns {
  display: flex;
  gap: 10px;
}

/* 搜索表单 */
.search-form {
  background: #fff;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 2px;
}

/* 系统配置页面 - 使用网格布局 */
.config-form .layui-row {
  display: flex !important;
  align-items: center !important;
}

.config-form .layui-col-md2 {
  text-align: right !important;
  padding-right: 10px !important;
  overflow: visible !important;
}

.config-form .layui-col-md2 .layui-form-label {
  display: inline-block !important;
  text-align: right !important;
  white-space: nowrap !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

