.comercios-section {
    padding: 50px 20px;
    background: #f8f9fa;
}

.comercios-header {
    text-align: center;
    margin-bottom: 40px;
}

/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Lato', sans-serif !important;
}

body {
    font-family: 'Lato', sans-serif !important;
    background-color: #f9f9f9;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header */
header {
    background-color: #333333;
    color: #fff;
    padding: 10px 0;
}

/* Navbar styling */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px 20px;
}

.navbar .logo img {
    height: 80px;
}

/* Estilo base para el menú */
nav ul {
    display: flex;
    list-style-type: none;
    padding: 0;
    position: relative;
    justify-content: center; /* Centrado de los elementos */
    align-items: left;
    z-index: 1000; /* Asegura que el menú esté en su lugar normal en pantallas grandes */
    margin-top: 30px;

}
nav ul.nav-active {
    display: flex;
}

nav ul li {
    margin-left: 20px;
    margin-right: 20px;
}

nav ul li a {
    color: #fff;
    font-size: 20px;
    font-weight: 300;
    text-decoration: none;
    margin-top: 5px;
}

.comercios-header h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.comercios-header p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

.comercios-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.comercio-card {
    width: 30%;
    max-width: 320px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    flex-grow: 1; /* Permite que las tarjetas crezcan para llenar el espacio disponible */
}

.comercio-card:hover {
    transform: translateY(-5px);
}

.comercio-fachada {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.comercio-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    border: 3px solid #fff;
    background: #fff;
}

.comercio-info {
    padding: 50px 15px 15px;
    text-align: center;
}

.comercio-info h3 {
    font-size: 18px;
    margin-bottom: 5px;
    color: #333;
}

.comercio-info p {
    font-size: 14px;
    color: #666;
}

/* Paginación */
.pagination {
    margin-top: 20px;
    text-align: center;
}

.page-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    margin: 0 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.page-btn.active {
    background: #0056b3;
}

.page-btn:hover {
    background: #0056b3;
}



/* Estilo del botón de hamburguesa */
.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    height: 20px;
    z-index: 2000;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: #fff;
}

/* MEDIA QUERIES */
@media (max-width: 1024px) {
    .comercio-card {
        width: 45%; /* 2 tarjetas por fila en pantallas más pequeñas */
    }
}

@media (max-width: 768px) {
    .comercio-card {
        width: 100%; /* 1 tarjeta por fila en pantallas móviles */
    }

    .comercios-header h2 {
        font-size: 24px; /* Ajuste del tamaño del encabezado */
    }

    .comercios-header p {
        font-size: 14px; /* Ajuste del tamaño del texto */
    }

    .comercios-section {
        padding: 30px 20px; /* Ajuste del padding */
    }
}

@media (max-width: 768px) {
    nav ul {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.9); /* Fondo oscuro */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateY(-100%); /* Ocultar el menú */
        transition: transform 0.3s; /* Agregar transición */
        z-index: 1000; /* Asegurar que el menú esté por encima de todo */
    }

    nav ul li {
        margin: 20px 0;
    }

    nav ul li a {
        font-size: 24px;
        color: #fff;
    }

    .menu-toggle {
        display: flex;
    }

    /* Estilo cuando el menú está activo */
    nav ul.nav-active {
        transform: translateY(0);
    }
    .menu-toggle.open .bar:nth-child(1) {
        transform: rotate(45deg);
        position: relative;
        top: 8px;
    }

    .menu-toggle.open .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.open .bar:nth-child(3) {
        transform: rotate(-45deg);
        position: relative;
        top: -8px;
    }

    nav ul li {
        margin: 20px 0;
    }

    nav ul li a {
        font-size: 24px;
        color: #fff;
        text-decoration: none;
        font-weight: 300;
    }
}