/* 列表页公共样式（供应、回收、求购） */

/* 页面头部 */
.page-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--bg-dark) 100%);
    padding: 30px 0;
    color: var(--white);
}

.page-header-content {
    text-align: center;
}

.page-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.page-header p {
    font-size: 14px;
    opacity: 0.8;
}

/* 筛选栏 */
.filter-section {
    background: var(--white);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.filter-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-groups {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-size: 13px;
    color: var(--text-light);
    white-space: nowrap;
}

.filter-group select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    background: var(--white);
    cursor: pointer;
    outline: none;
    min-width: 100px;
}

.filter-group select:focus {
    border-color: var(--primary-color);
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.filter-actions .btn {
    padding: 6px 15px;
    font-size: 13px;
}

/* 排序栏 */
.sort-bar {
    background: var(--bg-light);
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.sort-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sort-options {
    display: flex;
    gap: 5px;
}

.sort-option {
    padding: 6px 15px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.sort-option:hover,
.sort-option.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.sort-info {
    font-size: 13px;
    color: var(--text-light);
}

.sort-info strong {
    color: var(--primary-color);
}

/* 列表内容区 */
.list-section {
    padding: 20px 0;
}

.list-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* 列表卡片增强样式 */
.list-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.list-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.list-card-img {
    position: relative;
    height: 140px;
    overflow: hidden;
}

.list-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.list-card:hover .list-card-img img {
    transform: scale(1.05);
}

.list-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.list-card-badge.supply {
    background: #e8f5e9;
    color: #4caf50;
}

.list-card-badge.recycle {
    background: #fff3e0;
    color: #ff9800;
}

.list-card-badge.buy {
    background: #e3f2fd;
    color: #2196f3;
}

.list-card-verify {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 12px;
}

.list-card-body {
    padding: 15px;
}

.list-card-title-wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.list-card-title-wrap .list-card-title {
    flex: 1;
    margin-bottom: 0;
}

.btn-favorite {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-favorite:hover {
    background: var(--bg-light);
}

.btn-favorite i {
    font-size: 16px;
    color: var(--text-light);
    transition: var(--transition);
}

.btn-favorite:hover i {
    color: var(--primary-color);
}

.btn-favorite.active i {
    color: var(--primary-color);
    font-weight: 900;
}

.list-card-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-card-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.list-card-tag {
    padding: 2px 8px;
    background: var(--bg-light);
    border-radius: 12px;
    font-size: 11px;
    color: var(--text-light);
}

.list-card-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.list-card-price .price {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-color);
}

.list-card-price .unit {
    font-size: 13px;
    color: var(--text-light);
}

.list-card-price .negotiable {
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 500;
}

.list-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.list-card-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.list-card-user img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.list-card-user-info {
    display: flex;
    flex-direction: column;
}

.list-card-user-info .name {
    font-size: 12px;
    color: var(--text-dark);
    font-weight: 500;
}

.list-card-user-info .time {
    font-size: 10px;
    color: var(--text-light);
    margin-top: 1px;
}

.list-card-location {
    font-size: 11px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 3px;
}

/* 发布按钮 */
.publish-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(201,162,39,0.4);
    transition: var(--transition);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.publish-btn:hover {
    transform: scale(1.1);
}

.publish-btn::after {
    content: '发布';
    position: absolute;
    bottom: -20px;
    font-size: 11px;
    color: var(--text-dark);
    white-space: nowrap;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 60px;
    color: var(--border-color);
    margin-bottom: 15px;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 15px;
}

/* 热门推荐 */
.hot-section {
    padding: 30px 0;
    background: var(--white);
    margin-top: 30px;
}

.hot-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.hot-tag {
    padding: 6px 15px;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
}

.hot-tag:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .list-layout {
        grid-template-columns: 1fr;
    }

    .list-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .filter-content {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-groups {
        justify-content: center;
    }

    .filter-actions {
        justify-content: center;
    }

    .list-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sort-content {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 28px;
    }

    .filter-groups {
        flex-direction: column;
        width: 100%;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        flex: 1;
    }

    .sort-options {
        flex-wrap: wrap;
        justify-content: center;
    }

    .list-grid {
        grid-template-columns: 1fr;
    }

    .publish-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
        bottom: 80px;
        right: 20px;
    }
}

/* 求购列表专用样式 */
.buy-list {
    grid-template-columns: repeat(3, 1fr);
}

.buy-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.buy-card-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.buy-card-header .btn-favorite {
    margin-left: auto;
}

.buy-badge {
    padding: 4px 10px;
    background: #2196f3;
    color: var(--white);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.buy-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    margin: 0;
}

.buy-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.buy-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.buy-price .price {
    font-size: 20px;
    font-weight: 700;
    color: #2196f3;
}

.buy-price .unit {
    font-size: 13px;
    color: var(--text-light);
}

.buy-price .negotiable {
    font-size: 16px;
    font-weight: 600;
    color: #4caf50;
}

.buy-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.buy-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.buy-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.buy-user img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.buy-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.buy-user-info .name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
}

.buy-user-info .time {
    font-size: 11px;
    color: var(--text-light);
}

.buy-location {
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.buy-location i {
    color: var(--primary-color);
}

.btn-view-detail {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* 弹出框样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-light);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--border-color);
}

.modal-close i {
    font-size: 16px;
    color: var(--text-light);
}

.modal-body {
    padding: 25px;
}

.modal-seller-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-seller-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.modal-seller-detail {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.modal-seller-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.modal-publish-time {
    font-size: 12px;
    color: var(--text-light);
}

.modal-location {
    font-size: 13px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-location i {
    color: var(--primary-color);
}

.modal-buy-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-buy-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
}

.modal-buy-price {
    font-size: 24px;
    font-weight: 700;
    color: #2196f3;
}

.modal-buy-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 8px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
}

.modal-footer .btn {
    flex: 1;
    padding: 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-phone {
    background: #2196f3;
    color: var(--white);
    border: none;
}

.btn-phone:hover {
    background: #1976d2;
}

.btn-success {
    background: #4caf50;
    color: var(--white);
    border: none;
}

.btn-success:hover {
    background: #388e3c;
}

.wechat-wrapper {
    position: relative;
    flex: 1;
}

.wechat-qrcode {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    background: var(--white);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    text-align: center;
    min-width: 150px;
}

.wechat-qrcode::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--white);
}

.wechat-qrcode img {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.wechat-qrcode p {
    font-size: 12px;
    color: var(--text-light);
    margin: 0;
}

.wechat-wrapper:hover .wechat-qrcode {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (max-width: 992px) {
    .buy-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .buy-list {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 10px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
}

/* 留言弹出框样式 */
.modal-sm {
    max-width: 450px;
}

.message-product-info {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.message-product-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.message-product-badge {
    background: var(--primary-color);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.message-product-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0;
    flex: 1;
}

.message-product-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.message-user-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.message-user-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.message-user-name {
    font-size: 13px;
    color: var(--text-dark);
}

.message-user-location {
    font-size: 12px;
    color: var(--text-light);
}

.message-user-location i {
    margin-right: 4px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
    resize: vertical;
}

.form-group .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.1);
}

textarea.form-control {
    min-height: 100px;
}
