/* 二手市场插件主样式 */
.im-list-container {
    display: flex;
    gap: 30px;
    margin: 20px 0;
}
.im-filter-sidebar {
    width: 250px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}
.im-filter-group {
    margin-bottom: 20px;
}
.im-filter-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}
.im-filter-group select, .im-filter-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.im-products-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.im-product-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    background: #fff;
}
.im-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.im-product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}
.im-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.im-badge-virtual {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff9800;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}
.im-product-info {
    padding: 12px;
}
.im-product-title {
    font-size: 16px;
    margin: 0 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.im-product-price {
    font-size: 18px;
    font-weight: bold;
    color: #e53935;
    margin-bottom: 8px;
}
.im-product-meta {
    font-size: 12px;
    color: #777;
    display: flex;
    justify-content: space-between;
}
.im-btn, button.im-btn {
    background: #2196f3;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}
.im-btn:hover {
    background: #0b7dda;
}
.im-btn-primary {
    background: #4caf50;
}
.im-btn-primary:hover {
    background: #45a049;
}
.im-form-group {
    margin-bottom: 20px;
}
.im-form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}
.im-form-group input[type="text"], 
.im-form-group input[type="number"], 
.im-form-group select, 
.im-form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.im-single-product {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 30px 0;
}
.im-product-gallery {
    flex: 1;
    min-width: 300px;
}
.im-product-gallery img {
    width: 100%;
    border-radius: 8px;
}
.im-product-details {
    flex: 1;
}
.im-price {
    font-size: 28px;
    font-weight: bold;
    color: #e53935;
    margin: 10px 0;
}
.im-original-price {
    text-decoration: line-through;
    color: #999;
    margin-bottom: 10px;
}
.im-actions {
    margin: 20px 0;
    display: flex;
    gap: 10px;
}
.im-seller-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-top: 20px;
}
.im-messages-container {
    display: flex;
    height: 600px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}
.im-conversations-list {
    width: 300px;
    background: #f9f9f9;
    border-right: 1px solid #ddd;
    overflow-y: auto;
}
.im-conversations-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.im-conversations-list li {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
}
.im-conversations-list li.active {
    background: #e3f2fd;
}
.im-conversations-list li img {
    border-radius: 50%;
}
.im-conversations-list .unread {
    background: #f44336;
    color: #fff;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}
.im-chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
}
#im-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #fff;
}
.message {
    display: flex;
    margin-bottom: 15px;
}
.message.left {
    justify-content: flex-start;
}
.message.right {
    justify-content: flex-end;
}
.message .avatar {
    width: 32px;
    margin-right: 10px;
}
.message.right .avatar {
    order: 2;
    margin-left: 10px;
    margin-right: 0;
}
.message .content {
    max-width: 70%;
    background: #f1f1f1;
    padding: 8px 12px;
    border-radius: 18px;
}
.message.right .content {
    background: #dcf8c6;
}
.im-chat-input-area {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
    background: #fafafa;
}
.im-chat-input-area textarea {
    flex: 1;
    margin-right: 10px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: none;
    height: 60px;
}
.im-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
.im-table th, .im-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
.im-table th {
    background: #f2f2f2;
}
.im-pagination {
    margin-top: 20px;
    text-align: center;
}
.im-pagination a, .im-pagination span {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.im-pagination .current {
    background: #2196f3;
    color: #fff;
    border-color: #2196f3;
}
@media (max-width: 768px) {
    .im-list-container {
        flex-direction: column;
    }
    .im-filter-sidebar {
        width: 100%;
    }
    .im-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}