/* 自定义全局样式 */
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
    background-color: #f8f9fa;
    line-height: 1.6;
}

.container-main {
    margin-top: 2rem;
    margin-bottom: 3rem;
}

/* 卡片阴影优化 */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* 商品ID样式 */
.goods-id-text {
    color: #dc3545;
    font-weight: 600;
}

/* 限价金额样式 */
.limit-price-amount {
    color: #dc3545;
    font-weight: 600;
}

/* 图片容器样式 */
.img-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* 商品详情项样式 */
.detail-item {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    border: 1px solid #e9ecef;
}

/* 商品详情内容样式 */
.goods-info-content {
    line-height: 1.8;
    padding: 0.5rem 0;
}

/* 暂无数据提示样式 */
.empty-tip {
    padding: 3rem 1rem;
    text-align: center;
    color: #6c757d;
    font-size: 1rem;
}

/* 首次加载提示样式 */
.first-load-tip {
    padding: 4rem 1rem;
    text-align: center;
    color: #6c757d;
    font-size: 1.1rem;
}

/* 加载动画样式 */
.loader {
    border: 0.3rem solid #f3f3f3;
    border-top: 0.3rem solid #0d6efd;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 分页样式优化 */
.pagination {
    justify-content: center;
    margin-top: 1.5rem;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* ==============================================
* 核心优化：表格横向滚动（手机/电脑端均支持）
* ============================================== */
/* 自定义表格响应式容器：所有设备强制横向滚动 */
.table-responsive-custom {
    overflow-x: auto;
    min-width: 100%;
    padding: 0.5rem 0;
    /* 火狐滚动条样式 */
    scrollbar-width: thin;
    scrollbar-color: #0d6efd #f1f1f1;
}

/* Chrome/Safari/Webkit 滚动条样式美化 */
.table-responsive-custom::-webkit-scrollbar {
    height: 8px; /* 横向滚动条高度 */
}

.table-responsive-custom::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive-custom::-webkit-scrollbar-thumb {
    background: #0d6efd;
    border-radius: 4px;
}

.table-responsive-custom::-webkit-scrollbar-thumb:hover {
    background: #0a58ca;
}

/* 表格列最小宽度设置（保持原有比例，防止挤压） */
.goods-table th:nth-child(1), .goods-table td:nth-child(1) {
    min-width: 100px; /* 商品ID列 */
    width: 12%;
}

.goods-table th:nth-child(2), .goods-table td:nth-child(2) {
    min-width: 180px; /* 商品名称列 */
    width: 20%;
}

.goods-table th:nth-child(3), .goods-table td:nth-child(3) {
    min-width: 80px; /* 商品图片列 */
    width: 10%;
}

.goods-table th:nth-child(4), .goods-table td:nth-child(4) {
    min-width: 70px; /* 商品类型列 */
    width: 8%;
}

.goods-table th:nth-child(5), .goods-table td:nth-child(5) {
    min-width: 70px; /* 面值列 */
    width: 8%;
}

.goods-table th:nth-child(6), .goods-table td:nth-child(6) {
    min-width: 70px; /* 价格列 */
    width: 8%;
}

.goods-table th:nth-child(7), .goods-table td:nth-child(7) {
    min-width: 90px; /* 限价信息列 */
    width: 10%;
}

.goods-table th:nth-child(8), .goods-table td:nth-child(8) {
    min-width: 70px; /* 状态列 */
    width: 8%;
}

.goods-table th:nth-child(9), .goods-table td:nth-child(9) {
    min-width: 70px; /* 库存列 */
    width: 8%;
}

.goods-table th:nth-child(10), .goods-table td:nth-child(10) {
    min-width: 70px; /* 操作列 */
    width: 8%;
}

/* 表格单元格优化 */
.goods-table th, .goods-table td {
    white-space: nowrap; /* 禁止单元格内容换行（可选，需换行可删除） */
    vertical-align: middle;
    padding: 0.75rem 0.5rem;
}

/* 商品图片固定尺寸，防止变形 */
.goods-table .img-wrap img {
    width: 50px;
    height: 50px;
    object-fit: cover;
}