/* ============================================================
   MARKETPLACE - ESTILOS PRO
   ============================================================ */

.marketplace {
    min-height: 100vh;
    background: linear-gradient(135deg, #f4f7ff, #dde6ff);
    position: relative;
    padding: 60px 20px;
    font-family: 'Roboto', sans-serif;
}

.logo-ingredio-hero {
    width: 180px;
    max-width: 60%;
    display: block;
    margin: 0 auto 40px auto;
    opacity: 0.95;
}

/* Patrón suave */
.marketplace::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.4) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    opacity: 0.4;
}

/* Buscador */
.marketplace #buscador {
    border-radius: 30px;
    padding: 18px 24px;
    font-size: 1.1rem;
    border: none;
    background: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: 0.3s ease;
}

.marketplace #buscador:focus {
    outline: none;
    box-shadow: 0 8px 25px rgba(90, 110, 255, 0.35);
}

/* GRID HOME */
.marketplace .marketplace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 28px;
    justify-items: center;
    padding-top: 60px;
    padding-bottom: 60px;
}

/* MOBILE */
@media (max-width: 600px) {

    .marketplace .marketplace-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding-top: 20px;
        padding-bottom: 20px;
    }

}

/* Tarjetas */
.marketplace .comercio-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    width: 100%;
    max-width: 100%;
    padding: 0; /* importante */
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(4px);
    border-radius: 22px;
    overflow: hidden; /* permite que el nombre encaje perfecto */
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: all .25s ease;
}

.comercio-item {
    margin-bottom: 10px;
}

.marketplace .comercio-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.marketplace .comercio-logo {
    margin: 20px auto 14px auto; /* centrado real */
    width: 100px;
    height: 100px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* Nombre comercio */
.marketplace .comercio-item p {
    width: 100%;
    margin-top: auto; /* lo empuja al fondo */
    text-align: center;

    padding: 10px 0;
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;

    background: linear-gradient(135deg, #4f6dff, #6a8bff);
    color: white;

    border-radius: 0 0 22px 22px; /* solo abajo redondeado */
    letter-spacing: 0.5px;
    box-shadow: none;
}

/* ============================================================
   RESULTADOS DE BUSQUEDA
   ============================================================ */

.resultados-busqueda {
    margin-top: 40px;
}

.resultado-comercio {
    width: 100%;
    margin-bottom: 40px;
    padding: 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.resultado-comercio .comercio-header {
    text-align: center;
    margin-bottom: 20px;
}

.resultado-comercio .comercio-header img {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.resultado-comercio .comercio-header h3 {
    margin-top: 12px;
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    color: #1b2559;
}

.resultado-comercio .productos-encontrados {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.resultado-comercio .producto-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.resultado-comercio .producto-item img {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* ============================================================
   TARJETA DE PRODUCTO (MARKETPLACE)
   ============================================================ */

.producto-item {
    width: 180px;
    background: white;
    padding: 18px 14px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transition: .25s ease;
}

.producto-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.producto-comercio-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.producto-thumb {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.producto-info p {
    margin: 0;
}

/* ============================================================
   SKELETON LOADER
   ============================================================ */

.skeleton-comercio {
    height: 140px;
    background: linear-gradient(90deg, #e6e9f0 0%, #f2f4f8 50%, #e6e9f0 100%);
    background-size: 200% 100%;
    border-radius: 20px;
    margin-bottom: 20px;
    animation: skeleton 1.2s infinite ease-in-out;
}

@keyframes skeleton {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Fade-in */
.fade-in {
    animation: fadeIn 0.35s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}