/* index.css - 自研样式，替代 Bootstrap（适配你的模板类名） */

/* nav nav-pills */
.nav {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

.nav-pills .nav-link {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid #e6e9ee;
    background: #fff;
    color: #6b7280;
    font-size: 14px;
}

.nav-pills .nav-link.active {
    background: #f5f7fb;
    color: #2b6ea6;
    border-color: #d7e6f5;
    box-shadow: 0 2px 8px rgba(43, 110, 166, 0.06);
}

/* ---------- 通告区 ---------- */
.notice {
    margin-top: 80px;
}

.notice p {
    margin: 0;
}

.jumbotron {
    background: #fbfdff;
    padding: 18px;
    border-radius: 6px;
    border: 1px solid #eef6fb;
}

.jumbotron h4 {
    color: #1f6fb8;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.notice .custom {
    color: #0b6aa3;
    line-height: 1.7;
}

/* ---------- 主标题 ---------- */
.main-container {
    padding: 0px 0 20px;
}

.main-container h3 {
    font-size: 32px;
    font-weight: 800;
    margin: 8px 0;
    text-align: center;
}

.separator {
    width: 48px;
    height: 4px;
    margin: 10px auto;
    background: linear-gradient(90deg, #2b9ad6, #6fd1b0);
    border-radius: 3px;
}

.lead {
    text-align: center;
    color: #6b7280;
    margin: 6px 0 24px;
    font-size: 16px;
}

/* ---------- 分类 pills 支持换行 ---------- */
.category-menus {
    text-align: center;
    margin-top: 8px;
}

.category-menus .nav {
    flex-wrap: wrap;
    justify-content: center;
}

.category-menus .nav .nav-item {
    margin: 4px;
}

/* ---------- Card（商品） ---------- */
.goods-list .card {
    border-radius: 12px;
    border: 1px solid #eef1f6;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 320px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(35, 46, 63, 0.04);
    transition: transform .12s ease;
}

.goods-list .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(35, 46, 63, 0.08);
}

/* card image as big circle */
.card-img-top {
    width: 90%;
    height: 90%;
    /*border-radius: 50%;*/
    object-fit: cover;
    margin: 20px auto 8px;
    border: 8px solid #fff;
    box-shadow: 0 6px 18px rgba(34, 122, 180, 0.08);
    background: linear-gradient(180deg, #e8f7ff, #eaf6fb);
}

/* badge left-top */
.position-relative {
    position: relative;
}

.position-absolute {
    position: absolute;
}

.top-0 {
    top: 10px;
}

.start-0 {
    left: 10px;
}

.badge {
    display: inline-block;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 12px;
    color: #fff;
    background: #12b76a;
    box-shadow: 0 6px 12px rgba(18, 183, 106, 0.12);
}

/* card body */
.card-body {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    margin: 6px 0;
    color: #1f2d3d;
    word-break: break-word;
    line-height: 1.4;
    height: calc(1.4em * 3) !important;
    max-height: calc(1.4em * 3) !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    white-space: normal !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
}

.card-price {
    display: inline-flex;
    align-items: center;
}

.card-stock {
    display: inline-flex;
    align-items: center;
}

/* price / stock / actions */
.btn-outline-success[disabled] {
    border: 1px solid #d6f1e6;
    color: #0f9a67;
    padding: 6px 10px;
    border-radius: 10px;
    font-weight: 700;
}

.btn-primary {
    background: linear-gradient(180deg, #3370ff, #2b5be6);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    border: 0;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(51, 112, 255, 0.12);
}

.btn-primary.disabled {
    opacity: 0.6;
    pointer-events: none;
}

/* align bottom area */
.mt-auto {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* helpers */
.text-truncate {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.text-muted {
    font-weight: 700;
    margin: 6px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #9aa1aa;
    font-size: 15px;
}

.row-cols-md-5 > .col, .row-cols-md-5 .col {
    flex: 0 0 20%;
    max-width: 20%;
}

/* small tweaks for accessibility */
button:focus, a:focus {
    outline: 3px solid rgba(43, 110, 166, 0.14);
    outline-offset: 2px;
}

/* make tab content visible via .active.show */
.tab-pane {
    display: none;
}

.tab-pane.active.show {
    display: block;
}

@media (max-width: 767.98px) {
    .notice {
        margin-top: 60px;
    }

    .col-md-3, .col-md-9, .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .form-control {
        width: 100%;
        margin-bottom: 8px;
    }

    .row-cols-2 > .col {
        flex: 0 0 50%;
        max-width: 50%;
    }
}
