/* =====================================================
   Shared GameCard (ProductFilter, NewHome, ProductDetails Upsell)
   Single source of truth: dimensions only here. No width/height on .gamecard in page CSS.
   ===================================================== */

.gamecard {
    width: 100%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(19, 46, 85, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

.gamecard:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(251, 142, 49, 0.3);
}

/* Image area: fixed-height wrapper so card height stays fixed; image contained (no crop). */
.card-image-link {
    display: block;
    overflow: hidden;
}

.card-image-wrapper {
    height: 16rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 1.25rem 1.25rem 0 0;
    background: linear-gradient(180deg, rgba(10, 25, 47, 0.6) 0%, rgba(5, 15, 30, 0.4) 100%);
}

.cardimg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.5s ease;
}

/* Cover only inside GameCard image wrapper */
.card-image-wrapper .cardimg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gamecard:hover .cardimg {
    transform: scale(1.08);
}

.cardcontent {
    background: linear-gradient(0deg, rgba(10, 25, 47, 0.95) 0%, rgba(10, 25, 47, 0.8) 100%);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    z-index: 2;
}

.cardcontent-disabled {
    background: linear-gradient(0deg, rgba(80, 80, 80, 0.95) 0%, rgba(50, 50, 50, 0.8) 100%);
    filter: grayscale(100%);
}

.cardcontent > a {
    padding: 1rem;
    text-align: center;
    text-decoration: none;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-title,
.card-title-text,
.cardcontent > a > p {
    min-height: 2.6em;
}

.cardcontent > a > p {
    color: #ffffff !important;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.cardcontent > a > div {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: auto;
    flex-wrap: nowrap;
}

.cardcontent > a > div > p {
    font-size: 0.85rem;
    color: #adb5bd !important;
    margin: 0;
    font-weight: 500;
    width: auto !important;
    padding: 0 !important;
    flex-shrink: 1;
}

.cardcontent > a > div > img {
    width: 20px;
    height: 20px;
    min-width: 20px;
    object-fit: contain;
    margin: 0;
    flex-shrink: 0;
    padding: 0 !important;
    box-sizing: content-box;
}

.cardcontent > div.row {
    padding: 1rem;
    align-items: center;
    margin: 0;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cardprice {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
}

.cardprice > p {
    font-size: 1.2rem;
    color: #fb8e31;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

.cardprice > del {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 4px;
}

.card-Cart-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fb8e31 0%, #f59e0b 100%);
    border: none;
    border-radius: 0.75rem;
    color: #fff;
    padding: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(251, 142, 49, 0.3);
}

.card-Cart-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(251, 142, 49, 0.5);
    background: linear-gradient(135deg, #f59e0b 0%, #fb8e31 100%);
}

.card-Cart-button:disabled {
    background: #656565;
    box-shadow: none;
    cursor: not-allowed;
}

.card-Cart-button > i {
    font-size: 1.5rem;
}

/* Mobile: single breakpoint for image area height. No overrides in page CSS. */
@media (max-width: 576px) {
    .card-image-wrapper {
        height: 13rem;
    }
}

/* Variant: card with ScarcityAssistant (ProductDetails Upsell). Must not clip the badge. */
.gamecard-with-assistant {
    position: relative;
    overflow: visible;
}
