/**
 * 商品列表页面样式 - 通用品
 */

/* 导航外框 */
.integrated-nav {
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 8px 12px;
    margin-bottom: 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.6);
    flex-wrap: wrap;
    align-items: center;
    overflow: hidden;
}

.integrated-nav .nav-tab {
    padding: 8px 14px;
    border: none;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    white-space: nowrap;
    flex-shrink: 0;
}

.integrated-nav .nav-tab:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

.integrated-nav .nav-tab.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.integrated-nav .search-wrapper {
    flex: 1;
    display: flex;
    gap: 8px;
    min-width: 240px;
    margin-left: auto;
    flex-shrink: 1;
    align-items: center;
}

.integrated-nav .search-wrapper input {
    flex: 1;
    padding: 8px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 0;
    background: rgba(255, 255, 255, 0.9);
    height: 38px;
    box-sizing: border-box;
}

.integrated-nav .search-wrapper input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    outline: none;
}

.integrated-nav .search-wrapper button {
    padding: 8px 16px !important;
    border-radius: 12px !important;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: none !important;
    height: 38px;
    box-sizing: border-box;
}

.integrated-nav .search-wrapper button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

@media (max-width: 768px) {
    .integrated-nav {
        padding: 8px 10px;
        gap: 6px;
        flex-wrap: wrap;
        border-radius: 16px;
    }
    .integrated-nav .nav-tab {
        padding: 6px 10px;
        font-size: 13px;
        white-space: nowrap;
    }
    .integrated-nav .search-wrapper {
        width: 100%;
        margin-left: 0;
        min-width: 100%;
        flex-shrink: 0;
        flex-basis: 100%;
        order: 10;
    }
    .integrated-nav .search-wrapper input,
    .integrated-nav .search-wrapper button {
        height: 36px;
    }
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.product-block {
    display: block;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.product-block:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
}

.product-block-image {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f3f4f6;
}

.product-block-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-block-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}

.product-block-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.product-block-badge.free {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.product-block-badge.price {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.product-block-content {
    padding: 16px;
}

.product-block-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-block-desc {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-block-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-light);
}

.product-block-meta i {
    margin-right: 4px;
}

@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-block-content {
        padding: 12px;
    }

    .product-block-title {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}
