/***
 * 产品展示 / 商品详情 样式
 * 依赖：css/style.css（Bootstrap 5 模板 + JANSON 主题）
 * 用于：404.html（商品列表页）、product-detail.html（商品详情页）
 ***/

.shop-section {
    background: #fff;
}

.shop-intro {
    max-width: 820px;
}

/*** 类目筛选 Start ***/
.shop-filter {
    display: flex;
    flex-wrap: nowrap;
    gap: .75rem;
    justify-content: center;
    overflow-x: auto;
    padding: .25rem .25rem .75rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.shop-filter::-webkit-scrollbar {
    display: none;
}

.shop-filter .filter-btn {
    flex: 0 0 auto;
    border: 1px solid rgba(72, 116, 203, 0.35);
    background: var(--bs-white);
    color: var(--bs-dark);
    padding: .55rem 1.4rem;
    border-radius: 30px;
    font-size: .95rem;
    font-weight: 500;
    transition: .3s;
}

.shop-filter .filter-btn:hover {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.shop-filter .filter-btn.active {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: var(--bs-white);
}

@media (min-width: 768px) {
    .shop-filter {
        flex-wrap: wrap;
    }
}
/*** 类目筛选 End ***/

/*** 搜索 & 排序工具条 Start ***/
.shop-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bs-light);
    border-radius: 10px;
}

.shop-toolbar .shop-search {
    position: relative;
    flex: 1 1 260px;
    max-width: 380px;
}

.shop-toolbar .shop-search input {
    width: 100%;
    border: 1px solid rgba(72, 116, 203, 0.2);
    border-radius: 30px;
    padding: .55rem 1rem .55rem 2.6rem;
    outline: none;
    transition: .3s;
}

.shop-toolbar .shop-search input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(72, 116, 203, 0.12);
}

.shop-toolbar .shop-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bs-secondary);
    font-size: .9rem;
}

.shop-toolbar .shop-count {
    color: var(--bs-secondary);
    font-size: .9rem;
}

.shop-toolbar .shop-count strong {
    color: var(--bs-primary);
}
/*** 搜索 & 排序工具条 End ***/

/*** 商品卡片 Start ***/
.shop-card {
    height: 100%;
    background: var(--bs-white);
    border: 1px solid rgba(72, 116, 203, 0.15);
    border-radius: 12px;
    overflow: hidden;
    transition: .35s;
    display: flex;
    flex-direction: column;
}

.shop-card:hover {
    box-shadow: 0 16px 38px rgba(72, 116, 203, 0.18);
    transform: translateY(-6px);
    border-color: rgba(72, 116, 203, 0.4);
}

.shop-card-media {
    position: relative;
    overflow: hidden;
    background: #f4f6fb;
    border-bottom: 1px solid rgba(72, 116, 203, 0.1);
}

/* 产品图完整展示，不裁切 */
.shop-card-media img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    padding: 1rem;
    transition: .5s;
}

.shop-card:hover .shop-card-media img {
    transform: scale(1.06);
}

.shop-badge {
    position: absolute;
    top: .85rem;
    left: .85rem;
    z-index: 2;
    background: var(--bs-primary);
    color: var(--bs-white);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .5px;
    padding: .3rem .7rem;
    border-radius: 4px;
}

.shop-badge.badge-finished {
    background: #e88a1a;
}

.shop-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(14, 18, 29, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: .35s;
}

.shop-card:hover .shop-card-overlay {
    opacity: 1;
}

.shop-card-overlay .btn {
    border-radius: 30px;
    padding: .6rem 1.5rem;
}

.shop-card-body {
    padding: 1.1rem 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.shop-card-body .shop-model {
    font-size: .78rem;
    letter-spacing: .5px;
    color: var(--bs-secondary);
    text-transform: uppercase;
    margin-bottom: .35rem;
}

.shop-card-body h5 {
    font-size: 1.05rem;
    margin-bottom: .4rem;
}

.shop-card-body .shop-desc {
    font-size: .875rem;
    color: var(--bs-secondary);
    margin-bottom: .9rem;
    flex: 1;
}

.shop-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px dashed rgba(72, 116, 203, 0.25);
    padding-top: .85rem;
}

.shop-price {
    color: #e2453c;
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1;
}

.shop-price small {
    font-size: .72rem;
    color: var(--bs-secondary);
    font-weight: 400;
}

.shop-card-foot .shop-link {
    color: var(--bs-primary);
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.shop-card-foot .shop-link:hover {
    color: var(--bs-dark);
}
/*** 商品卡片 End ***/

/*** 商品详情 Start ***/
.shop-detail-gallery .main-img {
    width: 100%;
    border-radius: 12px;
    background: #f4f6fb;
    border: 1px solid rgba(72, 116, 203, 0.1);
    object-fit: contain;
    padding: 1.5rem;
    aspect-ratio: 4 / 3;
}

.shop-detail-thumbs {
    display: flex;
    gap: .75rem;
    margin-top: .9rem;
    flex-wrap: wrap;
}

.shop-detail-thumbs img {
    width: 84px;
    height: 84px;
    object-fit: contain;
    padding: .3rem;
    border-radius: 8px;
    border: 2px solid transparent;
    background: #f4f6fb;
    cursor: pointer;
    transition: .3s;
}

.shop-detail-thumbs img:hover,
.shop-detail-thumbs img.active {
    border-color: var(--bs-primary);
}

.shop-detail-info .shop-detail-model {
    font-size: .8rem;
    letter-spacing: 1px;
    color: var(--bs-secondary);
    text-transform: uppercase;
    margin-bottom: .5rem;
}

.shop-detail-info h1 {
    font-size: calc(1.4rem + 1vw);
    margin-bottom: .75rem;
}

.shop-detail-price {
    background: var(--bs-light);
    border-radius: 10px;
    padding: 1.1rem 1.25rem;
    margin: 1.25rem 0;
}

.shop-detail-price .price-now {
    color: #e2453c;
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1;
}

.shop-detail-price .price-note {
    color: var(--bs-secondary);
    font-size: .85rem;
}

.shop-detail-highlights {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
}

.shop-detail-highlights li {
    position: relative;
    padding-left: 1.6rem;
    margin-bottom: .5rem;
    color: #555;
}

.shop-detail-highlights li::before {
    content: "\f00c";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--bs-primary);
    position: absolute;
    left: 0;
}

.shop-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(72, 116, 203, 0.3);
    border-radius: 6px;
    overflow: hidden;
}

.shop-qty button {
    border: none;
    background: var(--bs-light);
    color: var(--bs-dark);
    width: 38px;
    height: 42px;
    font-size: 1.1rem;
    line-height: 1;
}

.shop-qty input {
    border: none;
    width: 56px;
    height: 42px;
    text-align: center;
    outline: none;
}

.shop-meta {
    font-size: .875rem;
    color: var(--bs-secondary);
}

.shop-meta span {
    display: inline-block;
    margin: 0 1.25rem .5rem 0;
}

.shop-meta i {
    color: var(--bs-primary);
}

.shop-spec-table th {
    width: 30%;
    color: var(--bs-dark);
    font-weight: 600;
    background: var(--bs-light);
}

.shop-spec-table th,
.shop-spec-table td {
    padding: .85rem 1.1rem;
    border-color: rgba(72, 116, 203, 0.15);
    vertical-align: middle;
}

/*** 详情选项卡 ***/
.shop-detail-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
}

.shop-detail-tabs .nav-link {
    border: none;
    color: var(--bs-dark);
    font-weight: 600;
    padding: .85rem 1.5rem;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    white-space: nowrap;
}

.shop-detail-tabs .nav-link.active {
    color: var(--bs-primary);
    border-bottom-color: var(--bs-primary);
    background: transparent;
}
/*** 商品详情 End ***/

/*** 详情页通用小工具 ***/
.shop-mini-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: .9rem;
    border: 1px solid rgba(72, 116, 203, 0.15);
    border-radius: 10px;
    background: var(--bs-white);
    transition: .3s;
    text-decoration: none;
    height: 100%;
}

.shop-mini-card:hover {
    box-shadow: 0 12px 28px rgba(72, 116, 203, 0.15);
    border-color: rgba(72, 116, 203, 0.4);
}

.shop-mini-card img {
    width: 74px;
    height: 74px;
    object-fit: contain;
    padding: .3rem;
    border-radius: 8px;
    background: #f4f6fb;
    flex-shrink: 0;
}

.shop-mini-card h6 {
    margin-bottom: .25rem;
    color: var(--bs-dark);
}

.shop-mini-card .mini-price {
    color: #e2453c;
    font-weight: 700;
}

.shop-empty {
    display: none;
    text-align: center;
    color: var(--bs-secondary);
    padding: 3rem 0;
}

@media (max-width: 767.98px) {
    .shop-card-media img {
        height: 190px;
    }
}
