#mayler-tryon-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mayler-tryon-hidden {
    display: none !important;
}

/*.mayler-tryon-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
}*/

.mayler-tryon-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/*.mayler-tryon-box {
    position: relative;
    background: #ffffff;
    padding: 20px 20px 30px;
    width: 90%;
    max-width: 420px;
    z-index: 10000;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.4);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}*/
/* Evita scroll del body cuando el modal está abierto */
body.mayler-modal-open {
    overflow: hidden;
}

/* Caja modal */
.mayler-tryon-box {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 90vh; /* clave */
    margin: auto;
    background: #fff;
    border-radius: 10px;
    padding: 20px 18px 24px;
    overflow-y: auto; /* scroll interno */
    -webkit-overflow-scrolling: touch; /* iOS smooth */
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    z-index: 10000;
}

/* Móvil */
@media (max-width: 480px) {
    .mayler-tryon-box {
        max-height: 92vh;
        width: 94%;
        padding: 18px 16px 22px;
    }
}

.mayler-tryon-box h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 20px;
}

.mayler-tryon-box p {
    margin-top: 0;
    font-size: 14px;
}

.mayler-tryon-box label {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
}

.mayler-tryon-box input[type="number"],
.mayler-tryon-box input[type="file"] {
    width: 100%;
    margin-top: 5px;
    margin-bottom: 10px;
}

#mayler-generate,
#mayler-download,
#mayler-add-cart {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    background: #000;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}

#mayler-generate:hover,
#mayler-download:hover,
#mayler-add-cart:hover {
    opacity: 0.9;
}

#mayler-processing {
    margin-top: 10px;
    font-size: 14px;
}

#mayler-canvas {
    margin-top: 15px;
    max-width: 100%;
    border-radius: 12px;
    border: 1px solid #eee;
}

.mayler-tryon-close {
    padding: 15px;
    position: absolute;
    top: 10px;
    right: 15px;
    border: none;
    background: #000;
    font-size: 20px;
    cursor: pointer;
}

.mayler-tryon-error {
    margin-top: 10px;
    color: #c0392b;
    font-size: 13px;
}

.mayler-tryon-btn {
    background-color: #000 !important;
    width: 100% !important;
    font-size: 18px;
    margin-bottom: 20px;
}

/* Aseguramos que el botón sea un contenedor flex para alinear el icono */
.gafa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px; /* Espacio entre las gafas y el texto */
}

.gafa span.subtexto {
    font-size: 9px;
}

.gafa img {
    width: 64px;
    height: auto;
    padding-bottom: 6px;
}

@media (max-width: 921px) {
    .gafa img {
        display: block;
        margin: 0 auto;
    }
}

/* Insertamos el archivo gafa.svg */
/*.gafa::before {
    content: "";
    width: 30px;
    height: 15px;
    background-image: url("gafa.svg");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    display: inline-block;
    flex-shrink: 0;
}*/

.mayler-label-help {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

/* Botón ? */
.mayler-help-toggle {
    padding: 16px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, transform 0.2s ease;
}

.mayler-help-toggle:hover,
.mayler-help-toggle:focus {
    background: #000;
    transform: scale(1.1);
    outline: none;
}

/* Caja explicativa */
.mayler-help-box {
    display: none;
    margin: 10px 0 15px;
    padding: 14px 16px;
    background: #f9fafb;
    border-left: 4px solid #000;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.mayler-help-box strong {
    display: block;
    margin-bottom: 6px;
    color: #1e88e5;
}
