#mg-buscador-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 10px;
    position: relative;
}

#mg-buscador-barra {
    display: flex;
    align-items: center;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    position: relative;
}

#mg-buscador-input {
    flex: 1;
    padding: 15px;
    border: none;
    outline: none;
    font-size: 16px;
}

#mg-clear-input {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    cursor: pointer;
    color: #999;
    z-index: 2;
    padding: 0 8px;
    background: white;
    border-radius: 50%;
    line-height: 1;
}

#mg-clear-input:hover {
    color: #c60045;
}

#mg-buscador-boton {
    background: #c60045;
    border: none;
    color: white;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
}

#mg-buscador-contenedor {
    position: fixed;
    top: 167px;
    left: 0;
    right: 0;
    width: 100vw;
    height: calc(100vh - 130px);
    margin: 0 !important;
    padding: 40px 55px;
    box-sizing: border-box;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 9999;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;

    opacity: 0;
    transform: translateY(160px);
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;

    overflow-y: auto;
}

#mg-buscador-contenedor.mostrar {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

#mg-buscador-header {
    position: relative;
    width: 100%;
    text-align: center;
}

#mg-buscador-header h2 {
    font-size: 24px;
    margin: 0;
    color: #c60045;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.mg-close {
    font-size: 36px;
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 0;
}

.mg-placeholder {
    text-align: center;
    font-size: 16px;
    margin: 30px 0 0 0;
    padding-top: 20px;
    max-width: 700px;
    width: 100%;
}

.mg-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    max-width: 100%;
    width: 100%;
    padding: 12px;
}

.mg-item {
    text-align: left;
    text-decoration: none;
    color: inherit;
    border: none;
    padding: 0;
    background: none;
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

.mg-item h4 {
    font-size: 16px !important;
    font-weight: 400;
    color: #222 !important;
    margin: 8px 0 4px;
    text-align: center;
    line-height: 1.4;
    min-height: 4em !important;
}

.mg-item p {
    font-size: 14px;
    text-align: left;
    margin: 0;
    color: #000;
    font-weight: 500;
}

.mg-item del {
    color: #888;
    margin-right: 5px;
     font-weight: 400 !important;
}

.mg-item ins {
    color: #b40f28 !important;
    text-decoration: none;
    font-weight: 600 !important;
}

.mg-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.mg-ver-todos {
    margin-top: 30px;
    text-align: center;
}

.mg-ver-todos a {
    background: none;
    color: black;
    padding: 0;
    border-radius: 0;
    text-decoration: none;
    display: inline-block;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
}

@media screen and (max-width: 1200px) {
    .mg-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media screen and (max-width: 900px) {
    .mg-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 600px) {
    .mg-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Scroll lock */
body.mg-no-scroll {
    overflow: hidden;
}

/* Precio */
.mg-precios {
    display: flex;
    justify-content: center !important;
    gap: 5px;
    align-items: center;
}

.mg-precios:not(:has(del)) .amount {
    font-weight: 500 !important;
    color: #000 !important;
}

