/* 产品库自定义样式，配合 Bootstrap 5 */

:root {
    --pb-accent: #2563eb;
}

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

/* 产品卡片 */
.product-card {
    transition: transform .18s ease, box-shadow .18s ease;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 .75rem 1.5rem rgba(15, 23, 42, .12) !important;
}

.product-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #eef1f5;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform .35s ease;
}

.product-card:hover .product-thumb img {
    transform: scale(1.05);
}

/* 卡片标题固定两行，保证网格对齐 */
.product-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.75rem;
    line-height: 1.375rem;
    font-size: .95rem;
}

/* 顶部全宽筛选面板 */
.filter-panel .filter-row {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}

.filter-panel .filter-row + .filter-row {
    margin-top: .65rem;
    padding-top: .65rem;
    border-top: 1px dashed #eef1f5;
}

.filter-label {
    flex: 0 0 3.25rem;
    padding-top: .32rem;
    color: #64748b;
    font-size: .875rem;
    white-space: nowrap;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    flex: 1 1 auto;
    min-width: 0;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .32rem .7rem;
    border-radius: .375rem;
    background: #f1f3f6;
    color: #334155;
    font-size: .875rem;
    line-height: 1.4;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.filter-chip:hover {
    background: #e4e9f0;
    color: var(--pb-accent);
}

.filter-chip.active {
    background: var(--pb-accent);
    color: #fff;
}

.chip-count {
    color: #94a3b8;
    font-size: .75rem;
}

.filter-chip.active .chip-count {
    color: rgba(255, 255, 255, .78);
}

/* 颜色圆点 */
.color-dot {
    width: .85rem;
    height: .85rem;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, .12);
    flex: 0 0 auto;
}

.detail-image {
    background: #eef1f5;
    border-radius: .5rem;
    overflow: hidden;
}

.detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* 购买页 */
.buy-mode-btn {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    gap: .45rem;
    padding: .45rem 1.05rem;
    border: 1px solid var(--pb-accent);
    border-radius: .375rem;
    background: var(--pb-accent);
    cursor: pointer;
    user-select: none;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.buy-mode-btn:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.buy-mode-btn.active {
    background: #1e40af;
    border-color: #1e40af;
    box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .35);
}

.buy-mode-name {
    font-weight: 600;
    color: #fff;
}

.buy-mode-desc {
    font-size: .8rem;
    color: rgba(255, 255, 255, .82);
}

.buy-plan-btn {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    gap: .45rem;
    padding: .45rem 1.05rem;
    border: 1px solid #e2e8f0;
    border-radius: .375rem;
    background: #fff;
    cursor: pointer;
    user-select: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.buy-plan-btn:hover {
    border-color: #93b4f5;
}

.buy-plan-btn.active {
    border-color: var(--pb-accent);
    box-shadow: 0 0 0 .18rem rgba(37, 99, 235, .12);
}

.buy-plan-btn .badge {
    position: absolute;
    top: -.7rem;
    left: 50%;
    transform: translateX(-50%);
}

.buy-plan-name {
    font-weight: 600;
    color: #1f2937;
}

.buy-plan-price {
    font-weight: 700;
    color: var(--pb-accent);
}

.buy-chip {
    cursor: pointer;
    user-select: none;
}

.spec-table td {
    font-size: .85rem;
    padding: .55rem .75rem;
}

.spec-table .spec-label {
    width: 32%;
    background: #f8fafc;
}

@media (min-width: 992px) {
    .buy-summary {
        position: sticky;
        top: 1rem;
        z-index: 2;
    }
}

.buy-total {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--pb-accent);
    line-height: 1;
}

.text-accent {
    color: var(--pb-accent) !important;
}

.buy-sum-block {
    border: 1px solid #e9edf3;
    border-radius: .5rem;
    overflow: hidden;
}

.buy-sum-head {
    padding: .5rem .75rem;
    background: #f8fafc;
    border-bottom: 1px solid #e9edf3;
    font-size: .875rem;
    font-weight: 600;
    color: #1f2937;
}

.buy-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 50%;
    background: #64748b;
    color: #fff;
    font-size: .7rem;
    line-height: 1;
    cursor: help;
    flex: 0 0 auto;
}
