/* Unified Grid Layout for Game Cards */
.game-cards-grid,
.latest-game-cards-grid,
.ebay-game-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Flexible card sizing */
    gap: 20px; /* Uniform spacing between cards */
    padding: 20px;
    margin: 0 auto;
    width: 100%; /* Full-width grid */
    background-color: #f3f3f3; /* Subtle light background */
    border: 1px solid #e0e0e0; /* Soft border */
    border-radius: 10px; /* Smooth corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

/* Game Card */
.game-card {
    background: #ffffff;
    border: 2px solid #d1d1d1; /* Soft border */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
    height: auto; /* Flexible height */
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    border-color: #6c63ff; /* Accent color */
}

/* Card Image */
.game-card img {
    width: 100%;
    height: 180px; /* Consistent height */
    border-bottom: 2px solid #6c63ff;
    background-color: #eaeaea;
}

/* Game Card Content */
.game-card .game-info {
    padding: 10px;
    text-align: left; /* Align text for readability */
}

/* Card Title */
.game-card .game-info h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #444444;
    margin-bottom: 10px;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit title to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 3rem;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.game-card .game-info h3:hover {
    color: #6c63ff;
}

/* Card Description */
.game-card .game-info p {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: #555555;
    margin: 5px 0;
    line-height: 1.4;
}

/* Release Date */
.game-card .game-info .game-release {
    font-size: 0.85rem;
    color: #777777;
}

/* Rating */
.game-card .game-info .game-rating {
    font-weight: bold;
    color: #f75d59;
}

/* Section Header */
.section-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: bold;
    color: #333333;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 2px solid #6c63ff;
    display: inline-block;
    padding-bottom: 5px;
}

.section-header p {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: #666666;
    text-align: center;
    margin-bottom: 25px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .game-cards-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 cards per row */
    }
}

@media (max-width: 768px) {
    .game-cards-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cards per row */
    }
}

@media (max-width: 480px) {
    .game-cards-grid {
        grid-template-columns: 1fr; /* 1 card per row */
    }

    .game-card {
        flex-direction: row; /* Switch to horizontal layout */
        align-items: center;
        padding: 10px;
    }

    .game-card img {
        width: 120px;
        height: 120px;
        border-radius: 8px;
        margin-right: 10px;
    }

    .game-card .game-info {
        text-align: left;
        padding: 0;
    }

    .game-card .game-info h3 {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }

    .game-card .game-info p {
        font-size: 0.8rem;
    }
}
