/* =====================================================
 * 白酒B2B对接平台 - 样式文件
 * JiuChain (酒链) Styles
 * 主色调: 酒红色 #722F37
 * ===================================================== */

/* === 全局 === */
:root {
    --wine: #722F37;
    --wine-dark: #5a252b;
    --wine-light: #f8e8ea;
    --agent: #1a73e8;
    --agent-light: #e8f0fe;
    --agent-dark: #1557b0;
    --bg-light: #f5f5f5;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-light);
    color: #333;
}

/* === 酒红色主题按钮/背景 === */
.bg-wine { background-color: var(--wine) !important; }
.text-wine { color: var(--wine) !important; }
.bg-wine-light { background-color: var(--wine-light) !important; }
.wine-border { border-color: var(--wine) !important; }

.btn-wine {
    background-color: var(--wine);
    border-color: var(--wine);
    color: #fff;
}
.btn-wine:hover, .btn-wine:focus {
    background-color: var(--wine-dark);
    border-color: var(--wine-dark);
    color: #fff;
}
.btn-outline-wine {
    color: var(--wine);
    border-color: var(--wine);
}
.btn-outline-wine:hover {
    background-color: var(--wine);
    border-color: var(--wine);
    color: #fff;
}

/* === 代发端主题 === */
.bg-agent { background-color: var(--agent) !important; }
.text-agent { color: var(--agent) !important; }
.text-agent-light { color: #6aabff !important; }
.border-agent-left { border-left: 4px solid var(--agent) !important; }

.btn-agent {
    background-color: var(--agent);
    border-color: var(--agent);
    color: #fff;
}
.btn-agent:hover {
    background-color: var(--agent-dark);
    border-color: var(--agent-dark);
    color: #fff;
}
.btn-outline-agent {
    color: var(--agent);
    border-color: var(--agent);
}
.btn-outline-agent:hover {
    background-color: var(--agent);
    color: #fff;
}

/* === 导航 === */
.navbar-main {
    background: linear-gradient(135deg, var(--wine-dark) 0%, var(--wine) 100%);
    box-shadow: 0 2px 8px rgba(114, 47, 55, 0.3);
}
.navbar-main .nav-link {
    color: rgba(255,255,255,0.85) !important;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s;
}
.navbar-main .nav-link:hover,
.navbar-main .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.15);
}

/* === 页脚 === */
.footer-main {
    background: #1a1a2e;
    color: #ccc;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
}

/* body 底部留出 footer 空间 */
body {
    padding-bottom: 120px;
}

/* === 产品卡片 === */
.product-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 8px;
    overflow: hidden;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12) !important;
}

.product-img-wrap {
    position: relative;
    overflow: hidden;
    background: #f8f8f8;
}
.product-img {
    height: 220px;
    object-fit: cover;
    width: 100%;
    transition: transform 0.3s;
}
.product-card:hover .product-img {
    transform: scale(1.05);
}
.product-img-placeholder {
    height: 220px;
}
.brand-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255,255,255,0.9);
    padding: 4px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* === 价格卡片 === */
.price-card {
    background: linear-gradient(135deg, #fff5f5 0%, #fff 50%);
    border: 1px solid #f0d0d0;
}

/* === 产品详情页 === */
.product-detail-img {
    max-height: 500px;
    object-fit: contain;
    background: #f8f8f8;
}
.product-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    border: 2px solid transparent;
}
.product-thumb:hover,
.product-thumb.active {
    opacity: 1;
    border-color: var(--wine);
}
.product-info-table td {
    padding: 8px 16px;
    border-bottom: 1px solid #f0f0f0;
}
.product-info-table tr:last-child td {
    border-bottom: none;
}
.product-info-table .w-30 { width: 30%; }

/* === 统计卡片 === */
.stat-card {
    border-radius: 8px;
    transition: transform 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
}

/* === 选中卡片样式 === */
.card-radio input[type="radio"] { display: none; }
.card-radio label {
    cursor: pointer;
    transition: all 0.2s;
}
.card-radio input[type="radio"]:checked + label {
    border-color: var(--wine) !important;
    background-color: var(--wine-light);
}

/* === 分页 === */
.page-link {
    color: var(--wine);
}
.page-item.active .page-link {
    background-color: var(--wine);
    border-color: var(--wine);
}

/* === 表格通用 === */
.table > :not(caption) > * > * {
    vertical-align: middle;
}

/* === 后台表格 === */
.admin-sidebar {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
}

/* === 响应式调整 === */
@media (max-width: 768px) {
    .product-img, .product-img-placeholder { height: 180px; }
    .product-detail-img { max-height: 300px; }
}

/* === 滚动条美观 === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #999; }

/* === 打印样式 === */
@media print {
    .navbar, .footer-main, .btn, form { display: none !important; }
}

/* === 取消按钮的 hover === */
a.btn-outline-danger:hover, button.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}
