/* Estilos del grid */
/* Contenedor principal */
.grid-marcas {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 4 columnas en desktop */
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}
/* Tarjeta de marca */
.marca-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    background: white;
}

.marca-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    box-sizing: border-box;
}


/* Imagen de la marca */
.marca-logo img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    max-height: 390px;
}

/* Textos */
.marca-info h3 {
    margin: 10px 0;
    font-size: 1.2rem;
    color: #333;
}

.marca-info p {
    color: #666;
    font-size: 0.9rem;
}

.marca-votos {
    font-weight: bold;
    color: #4CAF50;
    margin-top: 10px;
}


/***************************************** Estilos del modal **************************************************************/
#modal-voto {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-contenido {
    background: white;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    position: relative;
}

.cerrar-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s ease;
}

.cerrar-modal:hover {
    color: #ff0000;
}

#modal-voto input,
#modal-voto select,
#modal-voto button {
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 15px;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #ccc;
}

#modal-voto button[type="submit"] {
    background-color: #FFBE00;
    color: #000;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

#modal-voto button[type="submit"]:hover {
    background-color: #f2b000;
}

#modal-voto .wpforms-form input,
#modal-voto .wpforms-form select,
#modal-voto .wpforms-form textarea {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
}


#modal-voto .cerrar-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 26px;
    font-weight: bold;
    line-height: 1;
    color: #666;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1000;
    padding: 5px;
    transition: color 0.2s ease;
}

#modal-voto .cerrar-modal:hover {
    color: #ff0000;
}


/* Animación para el contador de votos */
.votos-count.updated {
    animation: pulse 0.5s ease-in-out;
    color: #4CAF50;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Spinner de carga */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/***************  Cargar mas márcas **********************************/

.load-more-button {
    background-color: #FFBE00;
    color: #000;
    padding: 12px 24px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}
.load-more-button:hover {
    background-color: #f2b000;
}

/***************  Mobile **********************************/

@media (max-width: 767px) {
        .grid-marcas {
            grid-template-columns: 1fr !important;
            gap: 15px;
            padding-left: 10px;
            padding-right: 10px;
            box-sizing: border-box;
            padding-top: 130px;
        }

        .load-more-wrapper {
            overflow: visible !important;
            padding: 20px 10px !important;
            margin: 60px auto !important;
            text-align: center;
            position: relative;
            z-index: 1000;
            margin-top: 10px !important; /* Reduce el espacio superior */
        }
        .load-more-button {
            width: 90% !important;
            max-width: 300px !important;
            font-size: 1.1rem !important;
            padding: 15px 0 !important;
            display: inline-block !important;
        }    

}
