/* 主导航样式 */
.marketplace-nav {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
}

.nav-tab {
    text-decoration: none;
    color: #6b7280;
    font-size: 1rem;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}

.nav-tab:hover {
    color: #111827;
    background: #f9fafb;
}

.nav-tab.active {
    color: #7c3aed;
    background: #f5f3ff;
}

.nav-tab .badge {
    background-color: #f3f4f6;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.25em 0.75em;
    border-radius: 1rem;
    margin-left: 0.5rem !important;
}

.nav-tab.active .badge {
    background-color: #7c3aed;
    color: #fff;
}

/* 调整搜索框和按钮的间距 */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-actions .filter-mobile-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 搜索框样式 */
.search-box {
    position: relative;
    width: 360px;
}
.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    pointer-events: none;
    color: #9ca3af;
}
.search-box .form-control {
    height: 44px;
    padding: 0 1rem 0 35px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    font-size: 0.9rem;
    background-color: #fff;
    color: #1f2937;
}
.search-box .form-control::placeholder {
    color: #9ca3af;
}
.search-box .form-control:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1);
    background-color: #fff;
}

/* 按钮样式 */
.btn-primary {
    background-color: #7c3aed;
    border-color: #7c3aed;
    border-radius: 12px;
    font-size: 0.9rem;
    padding: 0;
    height: 44px;
    line-height: 44px;
    padding: 0 1.25rem;
    transition: all 0.2s;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}
.btn-primary:hover {
    background-color: #6d28d9;
    border-color: #6d28d9;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}
.btn-primary i {
    font-size: 0.85rem;
}

/* 筛选项样式 */
.filter-section {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid #f3f4f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.filter-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    transition: all 0.15s;
}

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

.filter-check {
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    margin-right: 0.75rem;
    position: relative;
    flex-shrink: 0;
}

.filter-check::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: #7c3aed;
    opacity: 0;
    transition: opacity 0.15s;
}

.filter-option input:checked + .filter-check {
    border-color: #7c3aed;
}

.filter-option input:checked + .filter-check::after {
    opacity: 1;
}

.filter-option input:checked ~ .filter-label {
    color: #7c3aed;
    font-weight: 500;
}

.filter-label {
    font-size: 0.875rem;
    color: #4b5563;
    transition: color 0.15s;
}

.filter-option:hover .filter-label {
    color: #111827;
}

/* 通用卡片样式 */
.marketplace-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    background-color: #fff;
}

.marketplace-card:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.marketplace-card .card-header {
    padding: 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.marketplace-card .card-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
}

.marketplace-card .card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.marketplace-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.marketplace-card .card-meta {
    font-size: 0.875rem;
    color: #6b7280;
}

.marketplace-card .plugin-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    background-color: #f3f4f6;
    border-radius: 12px;
    font-size: 0.75rem;
    color: #4b5563;
}

.marketplace-card .plugin-tag i {
    font-size: 0.875rem;
}

.marketplace-card .card-desc {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.marketplace-card .card-footer {
    padding: 1.25rem;
    background-color: #fff;
    border-top: 1px solid #e5e7eb;
}

.marketplace-card .price-tag {
    font-weight: 600;
    color: #1f2937;
    font-size: 1rem;
}

.marketplace-card .price-tag .unit {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: normal;
}

.marketplace-card .free-tag {
    font-weight: 600;
    color: #059669;
    font-size: 1rem;
}

.marketplace-card .rating-box {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: #9ca3af;
}

.marketplace-card .rating-box .stars {
    color: #fbbf24;
}

.marketplace-card .rating-box .reviews {
    color: #d1d5db;
}

/* 主题卡片特殊样式 */
.theme-image {
    position: relative;
    height: 280px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.theme-image::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.02) 50%, rgba(0, 0, 0, 0.1) 100%);
    pointer-events: none;
}

.theme-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.marketplace-card:hover .theme-image img {
    transform: scale(1.05);
}

/* 主题卡片内容样式 */
.theme-card .card-header {
    padding: 1.75rem;
}

.theme-card .card-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.theme-card .card-desc {
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

.theme-card .card-footer {
    padding: 1.5rem 1.75rem;
    background-color: #fff;
    border-top: 1px solid #f3f4f6;
}

/* 横幅区域样式 */
.marketplace-banner {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-radius: 24px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.marketplace-banner::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%237c3aed' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.5;
}

.banner-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.banner-desc {
    font-size: 1.125rem;
    color: #4b5563;
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 540px;
}

.banner-stats {
    display: flex;
    gap: 3rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #7c3aed;
    line-height: 1;
}

.stat-label {
    font-size: 0.9375rem;
    color: #6b7280;
}

.banner-image {
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: cover;
    transform: scale(1.1);
    margin-right: -2rem;
    border-radius: 24px;
}

/* 排序下拉菜单样式 */
.sort-box {
    position: relative;
    width: 160px;
}

.sort-box .form-select {
    height: 44px;
    padding: 0 2.5rem 0 1rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    font-size: 0.9rem;
    background-color: #fff;
    color: #1f2937;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
}

.sort-box .form-select:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
    outline: none;
}

.sort-box .form-select:hover {
    border-color: #7c3aed;
}

/* 调整搜索框和按钮的间距 */
.d-flex.align-items-center.gap-3 {
    gap: 1rem !important;
}

/* 响应式样式 */
@media (max-width: 768px) {
    /* 横幅区域响应式 */
    .marketplace-banner {
        padding: 2rem;
    }
    
    .banner-title {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    .banner-desc {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .banner-stats {
        gap: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    /* 导航响应式 */
    .marketplace-nav {
        margin: 1rem 0;
        padding: 1rem;
    }
    
    .marketplace-nav .d-flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .marketplace-nav .d-flex.align-items-center {
        width: 100%;
    }
    
    .nav-actions {
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .search-box {
        width: 100%;
    }
    
    .filter-mobile-actions {
        display: flex;
        gap: 0.75rem;
        width: 100%;
    }
    
    .sort-box {
        flex: 1;
    }

    .filter-toggle {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1.25rem;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        background: #fff;
        color: #6b7280;
        font-size: 0.9rem;
        cursor: pointer;
        height: 44px;
        white-space: nowrap;
    }

    .filter-toggle i {
        font-size: 1.25rem;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
    }
    
    /* 内容区域响应式 */
    .filter-section {
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    /* 卡片响应式 */
    .theme-image {
        height: 200px;
    }
    
    .marketplace-card .card-header {
        padding: 1rem;
    }
    
    .marketplace-card .card-footer {
        padding: 1rem;
    }

    /* 显示筛选按钮 */
    .filter-toggle {
        display: flex !important;
    }

    /* 隐藏原筛选区域 */
    .col-3 {
        display: none;
    }

    /* 内容区域占满宽度 */
    .col-9 {
        width: 100%;
    }

    /* 筛选抽屉样式 */
    .filter-drawer {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 360px;
        height: 100%;
        background: #fff;
        z-index: 1000;
        transition: right 0.3s ease;
        display: block;
        padding: 1.5rem;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }

    .filter-drawer.active {
        right: 0;
    }

    /* 遮罩层 */
    .drawer-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }

    .drawer-overlay.active {
        display: block;
    }

    /* 抽屉头部 */
    .drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid #e5e7eb;
    }

    .drawer-title {
        font-size: 1.125rem;
        font-weight: 600;
        color: #111827;
    }

    .drawer-close {
        padding: 0.5rem;
        color: #6b7280;
        cursor: pointer;
        margin: -0.5rem;
    }

    /* 筛选按钮激活状态 */
    .filter-toggle.active {
        color: #7c3aed;
        border-color: #7c3aed;
        background: #f5f3ff;
    }
}

@media (max-width: 576px) {
    /* 横幅区域在小屏幕上的调整 */
    .marketplace-banner .row {
        flex-direction: column;
    }
    
    .marketplace-banner .col-7,
    .marketplace-banner .col-5 {
        width: 100%;
    }
    
    .banner-image {
        margin: 1.5rem 0 0 0;
        transform: none;
    }
    
    /* 列表布局调整 */
    .col-3, .col-9 {
        width: 100%;
    }
    
    .col-4, .col-6 {
        width: 100%;
    }
    
    /* 导航标签调整 */
    .nav-tab {
        width: 100%;
        justify-content: space-between;
    }
}

/* 移动端筛选按钮和抽屉的默认状态 */
.filter-toggle {
    display: none;
}

.filter-drawer {
    display: block;
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 360px;
    height: 100%;
    background: #fff;
    z-index: 1000;
    transition: right 0.3s ease;
    padding: 1.5rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.filter-drawer.active {
    right: 0;
}

.drawer-overlay {
    display: none;
}

.marketplace-nav .filter-mobile-actions {
    display: flex;
    gap: 0.75rem;
}

/* PC端样式 (>= 769px) */
@media (min-width: 769px) {
    .marketplace-nav {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 16px;
        padding: 1rem 1.5rem;
        margin: 2rem 0;
    }

    .marketplace-nav .d-flex {
        display: flex;
        align-items: center;
    }

    .marketplace-nav .d-flex > div:first-child {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .nav-actions {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-left: auto;
    }

    .search-box {
        position: relative;
        width: 280px;
    }

    .sort-box {
        width: 160px;
    }

    .filter-toggle {
        display: none;
    }

    .btn-primary {
        white-space: nowrap;
    }
}

/* 通用样式（不受屏幕尺寸影响） */
.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    pointer-events: none;
    color: #9ca3af;
}

.search-box .form-control {
    height: 44px;
    padding: 0 1rem 0 35px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    font-size: 0.9rem;
    background-color: #fff;
    color: #1f2937;
}

.sort-box .form-select {
    height: 44px;
    padding: 0 2.5rem 0 1rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    font-size: 0.9rem;
    background-color: #fff;
    color: #1f2937;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    height: 44px;
    padding: 0 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background-color: #7c3aed;
    border-color: #7c3aed;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
} 