:root {
    --primary-color: #8A4FFF;
    --primary-dark: #6a3acb;
    --text-color: #1a1a1a;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --gray: #e0e0e0;
    --shadow: 0 0.299vw 0.45vw rgba(0, 0, 0, 0.1);
}

.hero {
    background: linear-gradient(135deg, #1a1a1a 0%, var(--primary-color) 100%);
    color: var(--white);
    text-align: center;
    padding: 4.791vw 1.197vw;
}

.hero h1 {
    font-size: 3.353vw;
    margin-bottom: 0.959vw;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 12.5vw auto;
    gap: 1.2vw;
    padding: 3vw 1.5vw;
    align-items: start;
}

.filters {
    background: var(--white);
    padding: 1.25vw;
    border-radius: 0.898vw;
    box-shadow: var(--shadow);
    position: flex;
    top: 7.486vw;
}

.filters h3 {
    margin-bottom: 1.797vw;
    border-bottom: 0.149vw solid var(--primary-color);
    padding-bottom: 0.599vw;
}

.filter-group {
    margin-bottom: 1.797vw;
}

.filter-group label {
    display: block;
    margin-bottom: 0.719vw;
    font-weight: 600;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 0.749vw;
    border: 0.075vw solid var(--gray);
    border-radius: 0.45vw;
}

/* PRECIO */
.range-slider-wrapper {
    position: relative;
    width: 100%;
    height: 2.247vw;
    margin-top: 0.749vw;
    display: flex;
    align-items: center;
    padding: 0;
}

.slider-track {
    position: absolute;
    width: 100%;
    height: 0.374vw;
    background-color: var(--gray);
    border-radius: 0.374vw;
    z-index: 1;
}

.range-slider-wrapper input[type="range"] {
    position: absolute;
    width: calc(100% + 1.497vw);
    left: -0.749vw;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    z-index: 2;
    border: none;
    outline: none;
}

.range-slider-wrapper input[type="range"]::-webkit-slider-thumb {
    height: 1.348vw;
    width: 1.348vw;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    pointer-events: auto;
    -webkit-appearance: none;
    border: 0.149vw solid var(--white);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 5;
}

#min-price {
    z-index: 3;
}

/* FIN PRECIO */

.btn-secondary {
    width: 100%;
    padding: 0.898vw;
    background-color: transparent;
    border: 0.149vw solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 0.45vw;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.products-section {
    display: flex;
    flex-direction: column;
    width: 100%;
}

#pagination-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.599vw;
    margin-bottom: 1.871vw;
}

#pagination-container button {
    width: 2.845vw;
    height: 2.845vw;
    border-radius: 50%;
    border: 0.075vw solid var(--gray);
    background-color: var(--white);
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.079vw;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

#pagination-container button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-0.149vw);
}

#pagination-container button.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 24.2%);
    justify-content: space-between;
    gap: 0.8vw;
    width: 100%;
}

.game-card {
    background: var(--white);
    border-radius: 0.749vw;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-0.599vw);
}

.card-image {
    height: 9.5vw;
    background-color: #eeeeee;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 1vw;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.card-content h4 {
    text-align: left;
    margin-bottom: 0.6vw;
    font-size: 1.05vw;
    font-weight: 700;

    /* Puntos suspensivos */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.6vw;
    line-height: 1.3vw;
}

.game-card .card-image {
    position: relative;
    height: 12.5vw;
}

.game-card .card-image img {
    height: 100%;
}

.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 0.5vw;
}

.card-title-row h4 {
    margin: 0;
    font-size: 1vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%;
}

.favorite-btn {
    position: static;
    width: auto;
    height: auto;
    background: none;
    box-shadow: none;
    padding: 0;
    border: none;
    cursor: pointer;
    color: #ef4444;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorite-btn .material-symbols-outlined {
    font-size: 1.3vw !important;
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.favorite-btn.active .material-symbols-outlined {
    font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

.favorite-btn:hover {
    transform: scale(1.1);
}

.no-products {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background-color: var(--white);
    border-radius: 0.898vw;
    border: 0.149vw dashed var(--gray);
    color: #777;
    text-align: center;
    min-height: 25vw;
    margin: 0;
    padding: 2.995vw;
}

.no-products .material-symbols-outlined {
    font-size: 5.99vw;
    color: var(--gray);
    margin-bottom: 1.797vw;
}

.no-products h3 {
    color: var(--text-color);
    margin-bottom: 0.599vw;
}

.no-products p {
    font-size: 1.197vw;
}

.platform-tag,
.genre-tag {
    padding: 0.15vw 0.5vw;
    border-radius: 1vw;
    color: var(--white);
    font-size: 0.65vw;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03vw;
    margin-bottom: 0.4vw;
}

.playstation-5 {
    background-color: #003087;
}

.xbox-series-x {
    background-color: #107C10;
}

.nintendo-switch {
    background-color: #e60012;
}

.pc {
    background-color: #333333;
}

.genre-tag {
    background-color: var(--primary-dark);
    margin-bottom: 0.8vw;
}

.price {
    font-size: 1.15vw;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.4vw;
}

.stock {
    font-size: 0.85vw;
    color: #777777;
    margin-bottom: 0.8vw;
}

.btn-add-cart {
    width: 100%;
    padding: 0.6vw;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0.4vw;
    font-weight: 700;
    font-size: 0.9vw;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5vw;
    margin-top: auto;
}

.btn-add-cart:hover {
    background-color: var(--primary-dark);
    transform: translateY(-0.1vw);
}

.btn-add-cart .material-symbols-outlined {
    font-size: 1.2vw;
}