.container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 - 参考index.css的卡片风格 */
.sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    padding: 20px;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
}

.category-list {
    list-style: none;
}

.category-item {
    margin-bottom: 0.5rem;
}

.category-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 0.9375rem;
    text-align: left;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.625rem;
}

.category-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.category-btn.active {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 600;
}

.category-btn .left {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.category-btn .icon {
    font-size: 1.125rem;
}

.category-btn .badge {
    background: #e5e7eb;
    padding: 0.125rem 0.5rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.category-btn.active .badge {
    background: #bfdbfe;
    color: #1e40af;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* 搜索栏样式 - 参考index.css的通用搜索框 */
.search-container {
    margin-bottom: 2rem;
    max-width: 100%;
}

.search-bar-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.search-box {
    position: relative;
    flex: 0 1 auto;
    min-width: 200px;
    max-width: 350px;
}

.search-input {
    width: 300px;
    height: 2.5rem;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    color: #374151;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    outline: none;
}

.search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #9ca3af;
    pointer-events: none;
}

.search-clear {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    display: none;
    transition: color 0.2s ease;
}

.search-clear:hover {
    color: #6b7280;
}

.search-clear.show {
    display: block;
}

/* 价格筛选按钮 - 参考btn-blue样式 */
.price-filters {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.price-filter-btn {
    padding: 0.625rem 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.price-filter-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.price-filter-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.price-filter-btn .count {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.125rem 0.5rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
}

.price-filter-btn.active .count {
    background: rgba(255, 255, 255, 0.2);
}

.search-results-info {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

/* 卡片网格 - 参考shop-card-list */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* 卡片样式 - 参考shop-card */
.card {
    display: flex;
    width: 100%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0 3rem -1rem rgba(0, 0, 0, 0.1);
    transition: transform 0.1s ease-in-out, box-shadow 0.1s;
    cursor: pointer;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-0.5rem) scale(1.0125);
    box-shadow: 0 0.5em 3rem -1rem rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 160px;
    background-size: cover!important;
    background-position: center!important;
}

.card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1f2937;
    line-height: 1.35;
}

.card-description {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 价格标签行 - 在描述下方 */
.card-price-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 1.25rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.card-footer-left {
    display: flex;
    gap: 0.75rem;
}

.card-footer-right {
    display: flex;
    gap: 0.75rem;
}

/* 价格标签 */
.price-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 1.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
    gap: 0.25rem;
}

.price-badge .icon {
    font-size: 0.875rem;
}

.price-badge .divider {
    width: 1px;
    height: 0.75rem;
    background: currentColor;
    opacity: 0.4;
    margin: 0 0.25rem;
}

.price-badge .main-price {
    font-weight: 600;
}

.price-badge .sub-price {
    font-weight: 400;
    opacity: 0.85;
}

/* 免费 - 绿色主题，大号文字 */
.price-free {
    background: #dcfce7;
    color: #166534;
}

.price-free .main-price {
    font-size: 0.95rem;
    font-weight: 700;
}

/* 付费 - 蓝色主题，紧凑格式 */
.price-paid {
    background: #dbeafe;
    color: #1e40af;
}

.price-paid .main-price {
    font-size: 1rem;
    font-weight: 700;
}

.price-paid .sub-price {
    font-size: 0.8rem;
}

/* 免费增值 - 黄色主题，强调+基础 */
.price-freemium {
    background: #fef3c7;
    color: #92400e;
}

.price-freemium .main-price {
    font-size: 0.85rem;
    font-weight: 500;
}

.price-freemium .sub-price {
    font-size: 0.75rem;
}

/* 查看详情按钮 */
.view-btn {
    padding: 0.5rem 1rem;
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.view-btn:hover {
    background: #bfdbfe;
    border-color: #60a5fa;
}

/* 下载按钮 */
.download-btn {
    padding: 0.5rem 1rem;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.download-btn:hover {
    background: #fde68a;
    border-color: #fbbf24;
}

/* Alpine.js x-cloak - 隐藏未编译的模板 */
[x-cloak] {
    display: none !important;
}

/* 分类内容区域 - 现在始终显示，由Vue控制内容 */
.category-section {
    display: block;
}

/* 无结果提示 */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2.5rem;
    color: #6b7280;
    font-size: 1rem;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f9fafb;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding: 1rem;
    }

    .category-list {
        display: flex;
        gap: 0.625rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .category-item {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .category-btn {
        padding: 0.5rem 1rem;
        white-space: nowrap;
    }

    .main-content {
        padding: 1rem;
    }

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

    .search-box {
        max-width: 100%;
        min-width: 100%;
    }

    .search-bar-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .price-filters {
        justify-content: flex-start;
    }
}
