.ebay-listing {
    clear: both;
    margin: 2rem 0;
}

.ebay-listing-heading {
    align-items: baseline;
    border-bottom: 2px solid #d3d6d8;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.ebay-listing-heading h2 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
}

.ebay-store-link {
    white-space: nowrap;
}

.ebay-items {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.ebay-item {
    background: #fff;
    border: 1px solid #d3d6d8;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    margin: 0;
    min-width: 0;
    overflow: hidden;
}

.ebay-item-image {
    align-items: center;
    aspect-ratio: 1 / 1;
    background: #f4f5f5;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.ebay-item-image img {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.ebay-image-unavailable {
    color: #555;
    font-size: 0.875rem;
    padding: 1rem;
    text-align: center;
}

.ebay-item-details {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 0.875rem;
}

.ebay-item-details h3 {
    font-size: 1rem;
    line-height: 1.4;
    margin: 0 0 0.75rem;
    overflow-wrap: anywhere;
}

.ebay-item-price {
    color: #1b1b1b;
    font-size: 1.125rem;
    font-weight: 700;
    margin: auto 0 0.25rem;
}

.ebay-item-condition {
    color: #555;
    font-size: 0.875rem;
    margin: 0 0 0.75rem;
}

.ebay-item-link {
    align-self: flex-start;
    background: #1f5f99;
    border-radius: 3px;
    color: #fff;
    display: inline-block;
    font-weight: 600;
    margin-top: 0.5rem;
    padding: 0.55rem 0.8rem;
    text-decoration: none;
}

.ebay-item-link:focus,
.ebay-item-link:hover {
    background: #163f66;
    color: #fff;
}

.ebay-listing-status {
    background: #f4f5f5;
    border-left: 4px solid #70777c;
    padding: 1rem;
}

@media screen and (max-width: 480px) {
    .ebay-listing-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 0;
    }

    .ebay-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ebay-item-details {
        padding: 0.65rem;
    }
}

