/* 软件商城页（参考稿转 div+css），头尾见 site-shell.css */
.software-market .page {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.market-banner {
    padding: 48px 20px 56px;
    background: linear-gradient(135deg, #164E96 0%, #2B7DE9 100%);
}

.banner-content {
    width: min(1200px, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.banner-title {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 700;
    color: #fff;
}

.banner-subtitle {
    margin: 0;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.search-box {
    width: min(640px, 100%);
    height: 52px;
    padding: 0 8px 0 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.search-box > i {
    color: #999;
}

.search-input {
    flex: 1;
    height: 100%;
    border: 0;
    outline: 0;
    font-size: 14px;
    color: #333;
    background: transparent;
}

.search-btn {
    height: 38px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #164E96 0%, #2B7DE9 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.hot-tags {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hot-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.hot-tag {
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.95);
    font-size: 13px;
}

.hot-tag:hover {
    background: rgba(255, 255, 255, 0.28);
}

.tag-divider {
    color: rgba(255, 255, 255, 0.45);
}

.filter-section {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.filter-inner {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 8px 0;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.filter-row:last-child {
    border-bottom: 0;
}

.filter-label {
    width: 84px;
    flex: none;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.filter-tags {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-dropdown {
    position: relative;
    flex: 1;
    max-width: 360px;
}

.filter-dropdown-selected {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border: 2px solid #FFD0B5;
    border-radius: 10px;
    background: #fff3e8;
    color: #FF5722;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.filter-dropdown-options {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 20;
    max-height: 280px;
    overflow: auto;
    border: 1px solid #e0e6f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.filter-dropdown.open .filter-dropdown-options {
    display: block;
}

.filter-option {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
    color: #666;
    font-size: 14px;
}

.filter-option:last-child {
    border-bottom: 0;
}

.filter-option.child {
    padding-left: 28px;
}

.filter-option:hover {
    background: #fff3e8;
    color: #FF5722;
}

.filter-option.active {
    background: linear-gradient(135deg, #FF6A00 0%, #FF4D00 100%);
    color: #fff;
    font-weight: 600;
}

.filter-tag-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border: 2px solid #e0e6f0;
    border-radius: 10px;
    background: #f5f7fa;
    color: #666;
    font-size: 14px;
    transition: all 0.2s ease;
}

.filter-tag-btn:hover {
    border-color: #FFD0B5;
    background: #fff3e8;
    color: #FF5722;
}

.filter-tag-btn.active {
    border-color: transparent;
    background: linear-gradient(135deg, #FF6A00 0%, #FF4D00 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 90, 0, 0.22);
}

.software-grid {
    width: min(1200px, calc(100% - 40px));
    margin: 28px auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    flex: 1;
}

.software-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: 0.25s ease;
}

.software-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.card-image-wrapper {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: #eef0f6;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-image-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #98a2b3;
    font-weight: 600;
}

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    background: #ff6b6b;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.card-hover-mask {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.software-card:hover .card-hover-mask {
    opacity: 1;
}

.hover-btn {
    min-width: 120px;
    padding: 10px 18px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.hover-btn.primary {
    background: var(--accent-gradient);
    color: #fff;
    border: 0;
    box-shadow: 0 4px 12px rgba(255, 90, 0, 0.22);
}

.hover-btn.secondary {
    background: #EFF6FF;
    border: 1px solid #93C5FD;
    color: #2B7DE9;
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    flex: 1;
}

.card-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-title a:hover {
    color: var(--brand);
}

.card-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #EFF6FF;
    color: var(--brand);
    font-size: 12px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.card-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price-label,
.price-unit,
.card-meta {
    font-size: 12px;
    color: #999;
}

.price-value {
    font-size: 20px;
    font-weight: 700;
    color: #ff6b6b;
}

.placeholder-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 320px;
    padding: 28px 18px;
    border: 2px dashed #e0e0e0;
    border-radius: 14px;
    background: #fff;
    text-align: center;
    transition: 0.25s ease;
}

.placeholder-card:hover {
    border-color: var(--brand);
    background: #EFF6FF;
}

.placeholder-icon {
    font-size: 36px;
    color: #ccc;
}

.placeholder-title {
    font-size: 14px;
    color: #999;
}

.placeholder-btn {
    padding: 10px 18px;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font-size: 13px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.pagination-btn,
.pagination-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #666;
    font-size: 14px;
}

.pagination-number.active,
.pagination-btn:hover,
.pagination-number:hover {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
    font-weight: 600;
}

@media (max-width: 1100px) {
    .software-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 720px) {
    .filter-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-dropdown {
        max-width: none;
        width: 100%;
    }

    .software-grid {
        grid-template-columns: 1fr;
    }
}
