body {
    padding: 10px;
}

.listing-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 12px;
}

.listing-card {
    display: flex;
    background: #fff;
    border: 1px solid #d7dce2;
    border-radius: 8px;
    overflow: hidden;
}

.listing-card-image-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667085;
    font-size: 14px;
    text-align: center;
    padding: 8px;
}

.listing-card-content {
    flex: 1;
    padding: 16px 18px;
}

.listing-card-title {
    margin: 0 0 8px 0;
    font-size: 34px;
    line-height: 1.15;
}

.listing-card-title a {
    color: #111;
    text-decoration: none;
}

.listing-card-title a:hover {
    text-decoration: underline;
}

.listing-card-price {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 700;
    color: #111;
}

.listing-card-description {
    margin: 0 0 8px 0;
    color: #2f3640;
    font-size: 18px;
}

.listing-card-meta {
    margin: 0;
    color: #7a8594;
    font-size: 14px;
}

@media (max-width: 760px) {
    .listing-card {
        flex-direction: column;
    }

    .listing-card-image {
        flex: none;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        height: 220px;
        max-height: 220px;
    }

    .listing-card-title {
        font-size: 28px;
    }
}

.listing-card-image {
    flex: 0 0 260px;
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    height: 180px;
    max-height: 180px;
    overflow: hidden;
    background: #f1f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.listing-card-image img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    display: block;
}

/* Listing detail page */

.listing-detail {
    max-width: 520px;
    margin-top: 8px;
}

.listing-detail-title {
    margin: 0 0 10px 0;
}

.watchlist-form {
    display: inline-block;
    margin: 0 0 16px 0;
}

.watchlist-btn {
    background: #495057;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    padding: 4px 10px;
}

.watchlist-btn:hover {
    background: #343a40;
    color: #fff;
}

.watchlist-btn.btn-danger {
    background: #dc3545;
}

.watchlist-btn.btn-danger:hover {
    background: #c82333;
}

.watchlist-btn-active {
    background: #212529;
}

.listing-detail-image {
    width: 100%;
    max-height: 340px;
    overflow: hidden;
    background: #f1f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.listing-detail-image img {
    width: 100%;
    max-height: 340px;
    object-fit: contain;
    display: block;
}

.listing-detail-description {
    margin: 0 0 10px 0;
    color: #2f3640;
    font-size: 16px;
}

.listing-detail-price {
    margin: 0 0 4px 0;
    font-size: 26px;
    font-weight: 700;
    color: #111;
}

.listing-detail-bid-status {
    margin: 0 0 10px 0;
    color: #7a8594;
    font-size: 13px;
}

.bid-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 320px;
    margin-bottom: 24px;
}

.bid-input {
    width: 100%;
}

.bid-submit {
    align-self: flex-start;
}

.listing-detail-section-title {
    margin: 0 0 8px 0;
    font-weight: 700;
}

.listing-detail-list {
    padding-left: 20px;
    color: #2f3640;
    font-size: 15px;
}

/* Inactive (closed) listing page */

.listing-detail-inactive {
    filter: grayscale(100%);
    opacity: 0.75;
    pointer-events: none;
    user-select: none;
}

.comment-form {
    display: flex;
    gap: 8px;
    max-width: 480px;
    margin-bottom: 16px;
}

.comment-form .form-control {
    flex: 1;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 480px;
}

.comment {
    border-top: 1px solid #e3e6ea;
    padding: 10px 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-date {
    color: #7a8594;
    font-size: 12px;
}

.comment-content {
    margin: 0;
    color: #2f3640;
    font-size: 15px;
}

.comment-empty {
    color: #7a8594;
    font-size: 14px;
    padding: 10px 0;
}

.listing-inactive-badge {
    display: inline-block;
    background: #6c757d;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    padding: 3px 8px;
    margin-bottom: 16px;
}