/* شورتکد [steamprice_steam_deals] — هم‌عرض recent + گرید پرکنندهٔ ردیف */

.steamprice-steam-deals {
    --steam-deals-min: 140px;
    --steam-deals-gap: 14px;
    --steam-deals-radius: 12px;
    font-family: 'KalamehWebFaNum', Tahoma, 'Segoe UI', Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    direction: rtl;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 20px 0 28px;
    box-sizing: border-box;
    background: transparent;
    container-type: inline-size;
    container-name: sp-deals;
}

@media (min-width: 480px) {
    .steamprice-steam-deals {
        --steam-deals-min: 170px;
        --steam-deals-gap: 16px;
    }
}

@media (min-width: 900px) {
    .steamprice-steam-deals {
        --steam-deals-min: 200px;
        --steam-deals-gap: 18px;
    }
}

.steamprice-steam-deals__head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
    width: 100%;
    align-self: stretch;
    margin-bottom: 0;
    direction: rtl;
}

/* عنوان: استایل مشترک در game-search.css (.steamprice-recent-title) */

/* زیرعنوان اختیاری */
.steamprice-steam-deals__subtitle {
    margin: 10px 0 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #94a3b8;
    max-width: 42em;
    text-align: right;
}

.steamprice-steam-deals__empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #64748b;
    background: #f8fafc;
    border-radius: var(--steam-deals-radius);
    border: 1px dashed #cbd5e1;
    width: 100%;
    box-sizing: border-box;
}

.steamprice-steam-deals__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--steam-deals-min)), 1fr));
    gap: var(--steam-deals-gap);
    width: 100%;
    min-width: 0;
    align-self: stretch;
    justify-items: stretch;
    align-items: stretch;
}

/* ستون‌های ثابت (پیش‌فرض شورتکد: ۳ ستون × ۲ ردیف = ۶ بازی) */
.steamprice-steam-deals[data-cols="2"] .steamprice-steam-deals__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.steamprice-steam-deals[data-cols="3"] .steamprice-steam-deals__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.steamprice-steam-deals[data-cols="4"] .steamprice-steam-deals__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.steamprice-steam-deals[data-cols="5"] .steamprice-steam-deals__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.steamprice-steam-deals[data-cols="6"] .steamprice-steam-deals__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

@container sp-deals (max-width: 720px) {
    .steamprice-steam-deals[data-cols="5"] .steamprice-steam-deals__grid,
    .steamprice-steam-deals[data-cols="6"] .steamprice-steam-deals__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@container sp-deals (max-width: 560px) {
    .steamprice-steam-deals[data-cols="3"] .steamprice-steam-deals__grid,
    .steamprice-steam-deals[data-cols="4"] .steamprice-steam-deals__grid,
    .steamprice-steam-deals[data-cols="5"] .steamprice-steam-deals__grid,
    .steamprice-steam-deals[data-cols="6"] .steamprice-steam-deals__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@container sp-deals (max-width: 320px) {
    .steamprice-steam-deals[data-cols] .steamprice-steam-deals__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.steamprice-steam-deals__card {
    margin: 0;
    padding: 0;
    min-width: 0;
    display: flex;
}

.steamprice-steam-deals__inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    background: #fff;
    border-radius: var(--steam-deals-radius);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.22s ease, border-color 0.2s ease, transform 0.22s ease;
}

.steamprice-steam-deals__card:hover .steamprice-steam-deals__inner {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(27, 40, 56, 0.12);
    border-color: rgba(102, 192, 244, 0.5);
}

.steamprice-steam-deals__media-link,
.steamprice-steam-deals__media-btn {
    display: block;
    position: relative;
    width: 100%;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    line-height: 0;
    font: inherit;
    text-align: inherit;
    box-sizing: border-box;
}
.steamprice-steam-deals__media-btn:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

.steamprice-steam-deals__badge {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    z-index: 2;
    min-width: 3.1em;
    padding: 6px 10px;
    font-size: 0.85rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    background: linear-gradient(135deg, #be1e2d 0%, #e11d48 100%);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(190, 30, 45, 0.45);
    direction: ltr;
    unicode-bidi: embed;
    text-align: center;
}

.steamprice-steam-deals__media {
    display: block;
    aspect-ratio: 616 / 353;
    background: linear-gradient(180deg, #1b2838 0%, #2a475e 100%);
    overflow: hidden;
}

.steamprice-steam-deals__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.steamprice-steam-deals__name-btn,
.steamprice-steam-deals__name-link {
    display: block;
    width: 100%;
    margin: 0;
    padding: 12px 12px 14px;
    font-size: clamp(0.75rem, 2.8cqi, 0.88rem);
    font-weight: 700;
    line-height: 1.4;
    color: #1e293b;
    text-align: right;
    font-family: inherit;
    background: #fff;
    border: none;
    border-top: 1px solid #f1f5f9;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    transition: color 0.15s ease, background 0.15s ease;
}

.steamprice-steam-deals__name-btn:hover,
.steamprice-steam-deals__name-btn:focus-visible {
    color: #0284c7;
    background: #f8fafc;
    outline: none;
}

.steamprice-steam-deals__name-link:hover {
    color: #0284c7;
    background: #f8fafc;
}

.steamprice-steam-deals__name-btn:focus-visible {
    box-shadow: inset 0 0 0 2px #0ea5e9;
}
