/* Homepage — "Items from the swap marketplace"
   Real inventory, styled to match the product cards used elsewhere on the site. */

.swp-market-area {
    padding: 70px 0 80px;
    background: #fff;
}

.swp-market-head {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 40px;
}

.swp-market-head h2 {
    margin: 0 0 12px;
    font-size: 38px;
    line-height: 1.15;
}

.swp-market-head p {
    margin: 0;
    color: #5a6b6d;
    font-size: 16px;
    line-height: 1.6;
}

.swp-market-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 20px;
}

.swp-market-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #dde5e3;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(16, 22, 25, .07), 0 6px 16px -6px rgba(16, 22, 25, .12);
    transition: transform .18s ease, box-shadow .18s ease;
}

.swp-market-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 2px 6px rgba(16, 22, 25, .10), 0 18px 34px -18px rgba(16, 22, 25, .42);
}

.swp-market-shop {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border-bottom: 1px solid #dde5e3;
    text-decoration: none;
    color: inherit;
    min-height: 51px;
}

.swp-market-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex: none;
    border: 1px solid #dde5e3;
    background: #f1f5f4;
}

.swp-market-avatar--empty {
    display: block;
}

.swp-market-shop-name {
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.swp-market-shop:hover .swp-market-shop-name {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.swp-market-shot {
    display: block;
    background: #f1f5f4;
    line-height: 0;
}

.swp-market-shot img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.swp-market-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 12px 14px;
    flex: 1;
}

.swp-market-name {
    font-size: 13.5px;
    line-height: 1.4;
    color: #101619;
    text-decoration: none;
    /* Two lines keeps every card the same height so the buttons line up. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
}

.swp-market-name:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.swp-market-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    color: #101619;
    font-variant-numeric: tabular-nums;
}

.swp-market-star {
    color: #f5a623;
    font-size: 14px;
    line-height: 1;
}

.swp-market-count {
    color: #777;
}

.swp-market-btn {
    display: block;
    margin-top: auto;
    padding: 11px 10px;
    background: #000;
    color: #fff;
    text-align: center;
    font-size: 11.5px;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
}

.swp-market-btn:hover,
.swp-market-btn:focus {
    background: #fa3f80;
    color: #fff;
}

.swp-market-more {
    text-align: center;
    margin-top: 42px;
}

.swp-market-more a {
    display: inline-block;
    padding: 15px 34px;
    border: 1px solid #000;
    color: #000;
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
}

.swp-market-more a:hover,
.swp-market-more a:focus {
    background: #000;
    color: #fff;
}

@media (max-width: 991px) {
    .swp-market-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .swp-market-head h2 { font-size: 32px; }
}

@media (max-width: 767px) {
    .swp-market-area { padding: 50px 0 56px; }
    .swp-market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
    .swp-market-head h2 { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
    .swp-market-card { transition: none; }
    .swp-market-card:hover { transform: none; }
}
