/* 全局样式 */
body {
    background-color: #f5f7fa;
    padding-bottom: 80px;
}

/* 卡片样式 */
.product-card {
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-card.selected {
    border: 2px solid #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

/* 图片样式 */
.product-img-container {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    position: relative;
    overflow: hidden;
}

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

.product-img-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.product-img-error {
    color: #6c757d;
    font-size: 3rem;
}

/* 无图片占位符样式 */
.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    height: 100%;
}

.no-image-placeholder i {
    font-size: 4rem;
    margin-bottom: 10px;
}

.no-image-placeholder span {
    font-size: 0.85rem;
}

/* 卡片内容样式 */
.card-body {
    padding: 15px;
}

.brand-badge {
    background-color: #17a2b8;
    color: white;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
}

.keyword-tag {
    color: #6c757d;
    font-size: 0.85rem;
}

.asin-text {
    color: #6c757d;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
}

/* 复选框样式 */
.product-checkbox {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 24px;
    height: 24px;
    z-index: 10;
    cursor: pointer;
}

/* 操作按钮样式 */
.btn-sm {
    font-size: 0.85rem;
}

/* 底部操作栏 */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #dee2e6;
    padding: 15px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* 加载动画 */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .product-img-container {
        height: 150px;
    }
    
    .bottom-bar {
        padding: 10px 0;
    }
    
    .btn {
        font-size: 0.9rem;
    }
}

/* 链接样式 */
.product-link {
    text-decoration: none;
    color: #0066cc;
}

.product-link:hover {
    text-decoration: underline;
    color: #0052a3;
}

/* 徽章样式 */
.badge {
    font-weight: normal;
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeIn 0.3s ease-in;
}

/* 分页样式 */
.pagination-container {
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pagination-info {
    color: #6c757d;
    font-size: 0.9rem;
}

.pagination {
    display: flex;
    gap: 5px;
}

.pagination .page-link {
    border-radius: 4px;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 8px 14px;
    transition: all 0.2s;
}

.pagination .page-link:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: #adb5bd;
    cursor: not-allowed;
}

/* 底部操作栏按钮调整 */
.bottom-bar .btn-success {
    min-width: 120px;
}

/* ==================== 运营审核页面特定样式 ==================== */

/* 运营卡片样式 - 无复选框 */
.op-card {
    position: relative;
}

/* 产品号输入框样式 */
.product-code-input {
    border: 2px solid #dee2e6;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.product-code-input:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* 已填写产品号的卡片样式 */
.op-card.filled {
    border: 2px solid #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.15);
}

.op-card.filled .product-code-input {
    border-color: #28a745;
    background-color: #f8fff8;
}

/* 未填写产品号的卡片样式 */
.op-card.unfilled {
    opacity: 0.8;
}

/* 运营页面提示框样式 */
.alert-info {
    background-color: #e7f3ff;
    border-color: #b8daff;
}

/* 动态产品号输入框容器 */
.product-code-inputs {
    max-height: 200px;
    overflow-y: auto;
}

/* 单个产品号输入框样式 */
.product-code-single-input {
    border: 2px solid #dee2e6;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: monospace;
}

.product-code-single-input:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* 已填写产品号的卡片中的所有输入框 */
.op-card.filled .product-code-single-input {
    border-color: #28a745;
    background-color: #f8fff8;
}

/* 添加产品号按钮样式 */
#addInputBtn {
    transition: all 0.2s;
}

#addInputBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 输入框组的删除按钮样式 */
.input-group .btn-outline-danger {
    border-color: #dee2e6;
    color: #6c757d;
    transition: all 0.2s;
}

.input-group .btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* 输入框组的输入框获得焦点时，删除按钮也获得焦点效果 */
.input-group .product-code-single-input:focus + .btn-outline-danger {
    border-color: #28a745;
    color: #28a745;
}

/* 输入框组的输入框获得焦点时，删除按钮悬停效果 */
.input-group .product-code-single-input:focus + .btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}
