/* Contenedor principal */
/*
.mgu-registro-container {
    max-width: 500px;
    margin: 20px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.mgu-registro-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

/* Grupos de campos (Nombre y Apellido en la misma línea) 
.mgu-field-group {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.mgu-field {
    margin-bottom: 15px;
}

/* Estilo de inputs y select 
.mgu-registro-form input[type="text"],
.mgu-registro-form input[type="email"],
.mgu-registro-form input[type="password"],
.mgu-registro-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Crucial para que el padding no rompa el ancho 
}

.mgu-registro-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #555;
}

/* Efecto al hacer clic *
.mgu-registro-form input:focus,
.mgu-registro-form select:focus {
    outline: none;
    border-color: #0073aa; /* Color azul WordPress *
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Botón de envío *
.mgu-btn-submit {
    width: 100%;
    padding: 14px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 10px;
}

.mgu-btn-submit:hover {
    background-color: #005177;
}

/* Adaptación para móviles *
@media (max-width: 480px) {
    .mgu-field-group {
        flex-direction: column;
        gap: 0;
    }
}

*/
/* --- TU CSS DE REGISTRO EXISTENTE --- */
.mgu-registro-container {
    max-width: 500px;
    margin: 20px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.mgu-registro-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.mgu-field {
    margin-bottom: 15px;
}

.mgu-registro-form input[type="text"],
.mgu-registro-form input[type="email"],
.mgu-registro-form input[type="password"],
.mgu-registro-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.mgu-registro-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #555;
}

.mgu-registro-form input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.mgu-btn-submit {
    width: 100%;
    padding: 14px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 10px;
}

.mgu-btn-submit:hover {
    background-color: #005177;
}

/* --- ESTILOS EXTRA PARA EL LOGIN --- */
.mgu-login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.mgu-login-footer a {
    color: #0073aa;
    text-decoration: none;
}

.mgu-login-footer a:hover {
    text-decoration: underline;
}

.mgu-error-msg {
    background: #fee2e2;
    color: #b91c1c;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    border: 1px solid #f87171;
}

/* ESTILOS PARA LAS OFERTAS */
.mgu-grid-ofertas {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 20px;
            padding: 20px 0;
        }
        .mgu-card {
            border: 1px solid #ddd;
            border-radius: 12px;
            overflow: hidden;
            background: #fff;
            transition: transform 0.2s;
            box-shadow: 0 4px 6px rgba(0,0,0,0.05);
        }
        .mgu-card:hover { transform: translateY(-5px); }
        .mgu-card-img {
            width: 100%;
            height: 200px;
            object-fit: cover;
            background: #f9f9f9;
        }
        .mgu-card-body { padding: 15px; }
        .mgu-precio-old { text-decoration: line-through; color: #888; font-size: 0.9em; }
        .mgu-precio-new { color: #e63946; font-size: 1.4em; font-weight: bold; }
        .mgu-caracts { 
            margin: 10px 0; 
            padding-left: 18px; 
            font-size: 0.85em; 
            color: #555;
        }
        .mgu-fecha-fin {
            font-size: 0.8em;
            color: #ff9800;
            font-weight: bold;
            display: block;
            margin-top: 10px;
        }

/* ESTILO CARROUSEL */


/*
.mgu-carousel-container {
    position: relative;
    overflow: hidden;
    width: 80%;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    background: #fff;
    border: 1px solid #1f1f1f; 
}

.mgu-slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.mgu-slide {
    min-width: 100%;
    box-sizing: border-box;
    padding: 20px;
    text-align: center;
}

.mgu-slide img {
    max-width: 100%;
    height: 250px;
    object-fit: cover;    
    border-radius: 15px; 
    display: block; 
    margin: 0 auto;
    border: 2px #1f1f1f
}

.mgu-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,61,113,0.7);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
}

.btn-prev { left: 10px; }
.btn-next { right: 10px; }
*/
.mgu-carousel-container {
    position: relative;
    overflow: hidden;
    width: 100%; /* Ajustado al 100% de su columna */
    max-width: 400px; /* Limita el ancho total si quieres que sea pequeño */
    height: 450px; /* ALTURA FIJA: Evita que el contenedor baile o deje huecos */
    margin: 0 auto;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    background: #fff;
    border: 1px solid #1f1f1f;
    display: flex;
    flex-direction: column;
}

.mgu-carousel-container .mgu-card-image img {
    width: 100% !important;
    height: 200px !important;
    object-fit: contain !important;
    display: block; /* Evita espacios extraños abajo */
}

.mgu-carousel-container, 
.mgu-carousel-container * {
    box-sizing: border-box !important;
}

.mgu-slides {
    display: flex;
    height: 100%; /* Ocupa todo el alto fijo */
    transition: transform 0.5s ease-in-out;
}

.mgu-slide {
    min-width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Empuja el botón y textos abajo uniformemente */
    align-items: center;
}

.mgu-slide img {
    width: 100%;
    height: 200px; /* Altura fija para la imagen dentro del slide */
    object-fit: cover; /* CORTA la imagen para que siempre llene el recuadro sin dejar blancos */
    border-radius: 15px;
    margin-bottom: 10px;
}

/* El resto de tus estilos (botones nav, etc) se mantienen igual */
.mgu-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,61,113,0.7);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
}
.btn-prev { left: 10px; }
.btn-next { right: 10px; }

.mgu-btn-ver {
    display: inline-block;
    background-color: #003d71; 
    color: white !important;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9em;
    transition: background 0.3s ease, transform 0.2s;
    margin-top: 5px;
}

.mgu-btn-ver:hover {
    background-color: #0056a3;
    transform: scale(1.05);
}

/* Contenedor de la tarjeta */
.mgu-slide-card {
    min-width: 100%; /* Obliga a que cada tarjeta ocupe todo el ancho del contenedor */
    box-sizing: border-box;
    background: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
    /*transition: transform 0.3s ease;*/
}
/* SALTO DEL CARRUSEL
.mgu-slide-card:hover {
    transform: translateY(-5px);
}
*/
.mgu-service-tag {
    color: #003d71;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 1px;
    border: 1px solid #003d71;
    padding: 2px 10px;
    border-radius: 4px;
}

/* Asegura que el contenedor de precio mantenga un alto mínimo 
   para que el botón "Ver Oferta" siempre esté en la misma posición */
.mgu-price-container {
    min-height: 40px; 
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

/* Badge de oferta */
.mgu-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e63946;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9em;
    z-index: 2;
}

/* Imagen */ /* FUNCIONA CON LA IMAGEN RECORTADA
.mgu-card-image img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.mgu-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    display: block;
}
*/

.mgu-card-image {
    width: 100%;
    height: 200px; 
    position: relative;
    overflow: hidden; 
    background-color: #ffffff; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.mgu-card-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important; 
    display: block;
}

/* Cuerpo de la tarjeta */
.mgu-card-content {
    padding: 20px;
    text-align: center;
}

.mgu-product-title {
    color: #003d71;
    font-size: 1.2em;
    margin: 0 0 10px 0;
    min-height: 45px; /* Alinea los títulos si unos son más largos que otros */
}

.mgu-product-description {
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Corta el texto a 2 líneas para que no rompa el diseño */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Precios */
.mgu-price-container {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px; /* La separación que buscabas */
}

.mgu-price-old {
    text-decoration: line-through;
    color: #a0a0a0;
    font-size: 0.95em;
}

.mgu-price-current {
    color: #e63946;
    font-weight: 800;
    font-size: 1.4em;
}

.mgu-offer-end {
    font-size: 0.75em;
    color: #888;
    margin-bottom: 10px;
    text-transform: uppercase;
}

/*ESTILOS OFERTAS ADMIN*/
.mgu-admin-table { width: 100%; border-collapse: collapse; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.1); border-radius: 8px; overflow: hidden; }
.mgu-admin-table th { background: #003d71; color: white; padding: 15px; text-align: left; }
.mgu-admin-table td { padding: 12px; border-bottom: 1px solid #eee; vertical-align: middle; }
.mgu-status-badge { padding: 5px 10px; border-radius: 20px; font-size: 0.8em; font-weight: bold; cursor: pointer; border: none; }
.status-on { background: #d4edda; color: #155724; }
.status-off { background: #f8d7da; color: #721c24; }
.btn-accion { padding: 6px 12px; border-radius: 4px; text-decoration: none; font-size: 0.9em; margin-right: 5px; cursor: pointer; border: none; color: white; }
.btn-edit { background: #ffc107; color: #212529; }
.btn-delete { background: #dc3545; }
.img-preview { width: 50px; height: 50px; object-fit: cover; border-radius: 4px; }

/* LANDING DE OFERTA */
.mgu-detalle-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin: 20px 0;
}
.mgu-detalle-img img {
    width: 100%;
    border-radius: 15px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.mgu-badge-ahorro {
    background: #e63946;
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 15px;
}
.mgu-precio-box {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}
.mgu-old-price { text-decoration: line-through; color: #888; font-size: 1.2rem; }
.mgu-new-price { color: #e63946; font-size: 2.5rem; font-weight: bold; display: block; }

.mgu-btn-contacto {
    display: inline-block;
    background: #003d71;
    color: white !important;
    padding: 15px 30px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.2s;
    text-align: center;
}
.mgu-btn-contacto:hover { transform: scale(1.05); background: #0056a3; }

@media (max-width: 768px) {
    .mgu-detalle-container { grid-template-columns: 1fr; }
}

/* Para el Modal de articulo */
.close-btn { position: absolute; right: 15px; top: 10px; font-size: 24px; cursor: pointer; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 5px; }
.form-group input, .form-group textarea { width: 100%; padding: 8px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; }
.btn-abrir { background: #0073aa; color: white; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; }
.btn-guardar { background: #2271b1; color: white; border: none; padding: 10px; width: 100%; border-radius: 4px; cursor: pointer; font-size: 16px; }
.btn-guardar:hover { background: #135e96; }

.modal-articulo { 
        display: none; 
        position: fixed; 
        z-index: 9999; 
        left: 0; 
        top: 0; 
        width: 100%; 
        height: 100%; 
        background-color: rgba(0,0,0,0.6); 
        /* Cambiamos align-items para que si es muy largo, empiece desde arriba */
        align-items: flex-start; 
        justify-content: center; 
        overflow-y: auto; /* Permite scroll en toda la pantalla si el modal es gigante */
        padding: 20px 0;
    }

    .modal-content { 
        background-color: #fff; 
        margin: auto; /* Centrado automático */
        padding: 25px; 
        border-radius: 8px; 
        width: 90%; 
        max-width: 500px; 
        position: relative; 
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        /* Evita que el modal sea más alto que la ventana del navegador */
        max-height: 90vh; 
        overflow-y: auto; /* Scroll interno si el formulario crece mucho */
    }

    /* Estilo para que el encabezado del modal parezca una "barra de agarre" */
    .modal-header {
        cursor: move;
        padding-bottom: 15px;
        margin-bottom: 15px;
        border-bottom: 1px solid #eee;
    }