body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1d1d1d;
}

.categoria-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    padding: 10px;
    max-width: 1200px;
    margin: 0 auto;
    justify-items: center;
}

.categoria-item {
    position: relative;
    display: block;
    overflow: hidden;
    width: 100%;
}

.categoria-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.categoria-item:hover img {
    transform: scale(1.2);
}

.categoria-overlay {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.7);
    color: #8B4513;
    padding: 10px 20px;
    border-radius: 4px;
    opacity: 1;
    transition: all 0.3s ease;
    width: 150px;
    height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.categoria-item:hover .categoria-overlay {
    left: 10px;
    right: 10px; /* Agrega margen derecho igual al izquierdo */
    bottom: 10px;
    top: 10px; /* Agrega margen superior igual al inferior */
    width: auto; /* Permite que el ancho se ajuste automáticamente */
    height: auto;
    background: rgba(255, 255, 255, 0.9);
}


.categoria-overlay h3 {
    font-size: 1.2em;
    margin: 0;
    margin-bottom: 8px;
    text-align: center;
    transition: font-size 0.3s ease;
    width: 100%;
}

.categoria-item:hover .categoria-overlay h3 {
    font-size: 1.8em; /* Aumentado para mejor visibilidad en pantalla completa */
}

.categoria-overlay p {
    margin: 0;
    font-size: 0.85em;
    text-align: center;
    color: #8B4513;
    border: 1px solid #8B4513;
    padding: 3px 12px;
    border-radius: 15px;
    position: relative;
    background: transparent;
    transition: all 0.3s ease;
}

.categoria-item:hover .categoria-overlay p {
    background: rgba(139, 69, 19, 0.1);
    transform: scale(1.05);
    font-size: 1em; /* Aumentado para mejor visibilidad */
    padding: 5px 20px; /* Más padding para mejor proporción */
}

.categoria-overlay p::before,
.categoria-overlay p::after {
    content: '•';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #8B4513;
    font-size: 0.8em;
}

.categoria-overlay p::before {
    left: 5px;
}

.categoria-overlay p::after {
    right: 5px;
}

@media (max-width: 768px) {
    .categoria-overlay {
        width: 90%; /* Ajusta el ancho */
        left: 5%; /* Centra la overlay */
        right: 5%;
        padding: 8px 15px; /* Reduce el padding */
    }

    .categoria-overlay h3 {
        font-size: 1em; /* Reduce el tamaño del título */
    }

    .categoria-overlay p {
        font-size: 0.75em; /* Reduce el tamaño del texto */
        padding: 4px 10px;
    }

    .categoria-item:hover .categoria-overlay h3 {
        font-size: 1.4em; /* Ajusta el tamaño en hover */
    }

    .categoria-item:hover .categoria-overlay p {
        font-size: 0.85em;
    }
}
