/* ═══ 路必顺轮胎商城 样式 ═══ */

:root {
    --brand-color: #1a237e;
    --brand-light: #3949ab;
    --danger-color: #d32f2f;
}

/* PC端 sticky 导航栏 */
.navbar.bg-dark.d-none.d-lg-flex {
    position: sticky;
    top: 0;
    z-index: 1050;
    transition: box-shadow 0.3s;
}
.navbar.bg-dark.d-none.d-lg-flex.scrolled {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}


/* 移动端导航栏 sticky */
.navbar-brand-custom {
    position: sticky;
    top: 0;
    z-index: 1050;
    transition: box-shadow 0.3s;
}
.navbar-brand-custom.scrolled {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* 管理员提醒条 sticky */
.admin-alert-bar {
    position: sticky;
    top: 50px;  /* 默认值，JS会动态调整 */
    z-index: 1040;
    transition: box-shadow 0.3s;
}
.admin-alert-bar.scrolled {
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 会员信息 sticky */
.sticky-member-info {
    position: sticky;
    top: 50px;  /* 默认值，JS会动态调整 */
    z-index: 1030;
    transition: box-shadow 0.2s, background-color 0.2s;
}
.sticky-member-info.stuck {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background-color: #f5f6fa !important;
    border-radius: 0 !important;
    margin: 0 !important;
    left: 0;
    right: 0;
}

body {
    background-color: #f5f6fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 导航栏 */
.navbar-brand-custom {
    background: linear-gradient(135deg, #1a237e, #283593);
}
.navbar-brand-custom .navbar-brand {
    font-size: 1.3rem;
}
.navbar-brand-custom .nav-link {
    font-size: 0.9rem;
    transition: opacity 0.2s;
}
.navbar-brand-custom .nav-link:hover {
    opacity: 0.8;
}

/* 品牌按钮 */
.btn-brand {
    background: linear-gradient(135deg, #1a237e, #3949ab);
    color: #fff;
    border: none;
}
.btn-brand:hover {
    background: linear-gradient(135deg, #283593, #5c6bc0);
    color: #fff;
    opacity: 0.9;
}

/* 品牌色文字 */
.text-brand {
    color: var(--brand-color);
}

/* 商品卡片 */
.product-card {
    transition: all 0.3s ease;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
}
.product-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.product-img-wrap {
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.product-card:hover .product-img-wrap img {
    transform: scale(1.05);
}
.product-img-placeholder {
    color: #ccc;
    font-size: 48px;
}

/* 价格区域 */
.price-box {
    background: linear-gradient(135deg, #fff3e0, #fff8e1);
    border: 1px solid #ffe0b2;
}

/* 充值选项 */
.recharge-card {
    cursor: pointer;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.2s;
}
.recharge-card:hover {
    border-color: #ffc107;
}
.recharge-card.selected {
    border-color: #ffc107;
    background: #fff8e1;
}

/* 支付方式选项 */
.pay-card {
    cursor: pointer;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.2s;
}
.pay-card:hover {
    border-color: #28a745;
}
.pay-card.selected {
    border-color: #28a745;
    background: #f0fff4;
}

/* 会员卡 */
.member-card {
    transition: all 0.3s;
}

/* 管理员待处理提醒浮动条样式补充 */
.admin-alert-bar {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #fff;
    padding: 8px 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.admin-alert-bar a {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.2s;
}
.admin-alert-bar a:hover {
    color: #ffc107;
}
.admin-alert-bar .alert-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.admin-alert-bar .badge-count {
    background: #fff;
    color: #ee5a24;
    border-radius: 10px;
    padding: 2px 8px;
    font-weight: 700;
    font-size: 12px;
}

/* 页脚 */
.footer-custom {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: rgba(255, 255, 255, 0.9);
}
.footer-custom h6 {
    color: #ffc107;
    font-weight: 600;
}
.footer-custom h6 i {
    margin-right: 4px;
}
.footer-custom p,
.footer-custom .text-muted {
    color: rgba(255, 255, 255, 0.75) !important;
}
.footer-custom p i {
    margin-right: 4px;
}
.footer-custom a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-custom a:hover {
    color: #ffc107;
}
.footer-custom hr {
    border-color: rgba(255, 255, 255, 0.2);
    opacity: 0.5;
}

/* 卡片通用 */
.card {
    border: 1px solid #e8eaf6;
    border-radius: 10px;
}
.card-header {
    border-radius: 10px 10px 0 0 !important;
}

/* 表格 */
.table > :not(caption) > * > * {
    padding: 0.6rem 0.75rem;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .product-img-wrap {
        height: 150px;
    }
    .navbar-brand {
        font-size: 1.1rem;
    }
    /* PWA底部导航栏 */
    .mobile-tabbar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: #fff;
        border-top: 1px solid #e0e0e0;
        display: flex;
        align-items: center;
        justify-content: space-around;
        z-index: 9999;
        padding-bottom: env(safe-area-inset-bottom);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    }
    .tabbar-item {
        flex: 1;
        text-align: center;
        text-decoration: none;
        color: #999;
        font-size: 11px;
        padding: 6px 0;
        position: relative;
    }
    .tabbar-item i {
        font-size: 22px;
        display: block;
        margin-bottom: 2px;
    }
    .tabbar-item.active {
        color: #1a237e;
        font-weight: 600;
    }
    .tabbar-item.active i {
        color: #ffc107;
    }
    .tabbar-badge {
        position: absolute;
        top: 0;
        right: 25%;
        background: #d32f2f;
        color: #fff;
        border-radius: 10px;
        font-size: 10px;
        padding: 1px 5px;
        line-height: 1.4;
    }
    /* PWA全屏模式 */
    body {
        padding-bottom: 0;
    }
    /* 移动端隐藏大导航的间距 */
    .container.mt-3 {
        margin-top: 0.5rem !important;
    }
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
