/* ==========================================================================
   ESTILOS DE LA SECCIÓN "MI CUENTA" - TEMA QUEBRANTA
   ========================================================================== */

/* 1. ESTRUCTURA (LOGUEADO) */
@media (min-width: 769px) {
    body.logged-in.woocommerce-account .woocommerce {
        display: flex !important;
        gap: 40px !important;
        max-width: 1200px !important;
        margin: 40px auto !important;
        align-items: flex-start !important;
        width: 100% !important;
    }
    .woocommerce-account .woocommerce-MyAccount-navigation {
        flex: 0 0 280px !important;
        width: 280px !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
    }
    .woocommerce-account .woocommerce-MyAccount-content {
        flex: 1 !important;
        min-width: 0 !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        color: #000000 !important;
    }
}

.quebranta-account-main-title {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #000000 !important;
    margin-top: 0 !important;
    margin-bottom: 25px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}
.quebranta-account-main-title svg {
    width: 26px !important;
    height: 26px !important;
    fill: none !important;
    stroke: #000000 !important;
    stroke-width: 2 !important;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.woocommerce-account .woocommerce-MyAccount-navigation li {
    margin: 0 !important;
    padding: 0 !important;
    border-left: 3px solid transparent !important;
    transition: all 0.2s ease !important;
}
.woocommerce-account .woocommerce-MyAccount-navigation li a {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 14px 22px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #666666 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-decoration: none !important;
    transition: all 0.2s ease-in-out !important;
}
.woocommerce-account .woocommerce-MyAccount-navigation li a svg {
    width: 18px !important;
    height: 18px !important;
    fill: none !important;
    stroke: #666666 !important;
    stroke-width: 2 !important;
}
.woocommerce-account .woocommerce-MyAccount-navigation li .qb-menu-wishlist-count {
    margin-left: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 20px !important;
    height: 20px !important;
    padding: 0 6px !important;
    background-color: #000000 !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
}
.woocommerce-account .woocommerce-MyAccount-navigation li:hover a {
    color: #000000 !important;
    font-weight: 600 !important;
}
.woocommerce-account .woocommerce-MyAccount-navigation li:hover a svg {
    stroke: #000000 !important;
}
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active {
    border-left-color: #000000 !important;
    background-color: rgba(0, 0, 0, 0.03) !important;
}
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
    color: #000000 !important;
    font-weight: 600 !important;
}

/* 2. ESTRUCTURA SPLIT SCREEN (DESCONECTADO) */
.woocommerce-account:not(.logged-in) .woocommerce {
    max-width: 1240px !important;
    margin: 40px auto 80px auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
    display: block !important;
}

.qb-split-auth-wrapper {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05) !important;
    min-height: 620px !important;
}

/* Lado Izquierdo: SVG */
.qb-split-visual {
    background: #0f0f11 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 40px !important;
}

.qb-split-visual-inner {
    max-width: 80% !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.qb-auth-svg {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.4)) !important;
}

/* Lado Derecho: Formulario */
.qb-split-form-panel {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    padding: 50px 60px !important;
    background: #ffffff !important;
}

/* Pestañas Centradas */
.qb-auth-tabs-wrapper {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin-bottom: 35px !important;
}

.qb-auth-tabs {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 32px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
    padding-bottom: 10px !important;
    width: auto !important;
    margin: 0 auto !important;
}

.qb-auth-tab {
    background: none !important;
    border: none !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    color: #888888 !important;
    cursor: pointer !important;
    padding: 6px 4px !important;
    position: relative !important;
    transition: color 0.2s ease !important;
}

.qb-auth-tab:hover,
.qb-auth-tab.is-active {
    color: #000000 !important;
}

.qb-auth-tab.is-active::after {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    bottom: -11px !important;
    width: 100% !important;
    height: 2px !important;
    background-color: #000000 !important;
}

/* Visibilidad de Paneles */
.qb-auth-pane {
    display: none;
    width: 100%;
}

.qb-auth-pane.is-active {
    display: block;
    animation: qbFadeIn 0.25s ease-in-out;
}

@keyframes qbFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 3. CAMPOS DE ENTRADA Y TEXTOS */
.qb-field-group {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    margin-bottom: 20px !important;
}

.qb-field-group label {
    display: block !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    letter-spacing: 1.2px !important;
    text-transform: uppercase !important;
    margin-bottom: 6px !important;
    color: #333333 !important;
}

.woocommerce-account input[type="text"],
.woocommerce-account input[type="password"],
.woocommerce-account input[type="email"],
.woocommerce-account input.input-text {
    width: 100% !important;
    min-width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25) !important;
    border-radius: 0 !important;
    padding: 4px 0 !important;
    font-size: 0.95rem !important;
    color: #000000 !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.woocommerce-account input:focus {
    border-bottom: 1.5px solid #b29370 !important;
}

.woocommerce-account span.password-input {
    width: 100% !important;
    position: relative !important;
    display: block !important;
}

.woocommerce-account span.password-input .show-password-input {
    position: absolute !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
}

/* Casilla Recuérdame */
.qb-remember-row {
    margin: 4px 0 16px 0 !important;
}

.woocommerce-account .woocommerce-form-login__rememberme {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 0.84rem !important;
    color: #444444 !important;
    cursor: pointer !important;
}

/* Botón de envío (ACCESO / REGISTRARSE) */
.qb-btn-submit {
    width: 100% !important;
    height: 46px !important;
    background-color: #000000 !important;
    color: #ffffff !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    border: 1px solid #000000 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    display: block !important;
    margin: 0 !important;
}

.qb-btn-submit:hover {
    background-color: #b29370 !important;
    border-color: #b29370 !important;
    color: #ffffff !important;
}

/* Divisor O */
.qb-auth-divider {
    display: flex !important;
    align-items: center !important;
    text-align: center !important;
    margin: 22px 0 18px 0 !important;
    width: 100% !important;
}
.qb-auth-divider::before, .qb-auth-divider::after {
    content: '' !important;
    flex: 1 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
}
.qb-auth-divider span {
    padding: 0 14px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: #888888 !important;
    text-transform: uppercase !important;
}

/* Botón de Google adaptable (Desktop y Mobile) */
.qb-google-auth-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 44px !important;
    margin: 0 auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.g_id_signin,
.g_id_signin > div,
.g_id_signin iframe {
    margin: 0 auto !important;
    max-width: 100% !important;
    display: flex !important;
    justify-content: center !important;
}

/* Enlace Olvidaste la contraseña */
.woocommerce-account .woocommerce-LostPassword {
    margin: 24px auto 0 auto !important;
    font-size: 0.85rem !important;
    text-align: center !important;
    width: 100% !important;
    display: block !important;
}
.woocommerce-account .woocommerce-LostPassword a {
    color: #444444 !important;
    text-decoration: underline !important;
}

/* Textos de privacidad */
.qb-register-notice {
    font-size: 0.82rem !important;
    line-height: 1.5 !important;
    color: #555555 !important;
    margin: 15px 0 20px 0 !important;
}

/* 4. MODO OSCURO */
body.dark-mode .woocommerce-account, html.dark-mode .woocommerce-account { color: #ffffff !important; }
body.dark-mode .woocommerce-account .qb-field-group label { color: #e6e6e6 !important; }
body.dark-mode .woocommerce-account input[type="text"], body.dark-mode .woocommerce-account input[type="password"], body.dark-mode .woocommerce-account input[type="email"], html.dark-mode .woocommerce-account input.input-text { border-bottom: 1px solid rgba(255, 255, 255, 0.35) !important; color: #ffffff !important; }
body.dark-mode .woocommerce-account input:focus { border-bottom: 1.5px solid #b29370 !important; }
body.dark-mode .woocommerce-account .woocommerce-form-login__rememberme { color: #d0d0d0 !important; }
body.dark-mode .qb-register-notice { color: #b5b5b5 !important; }
body.dark-mode .qb-auth-divider::before, body.dark-mode .qb-auth-divider::after { border-bottom: 1px solid rgba(255, 255, 255, 0.18) !important; }
body.dark-mode .qb-auth-divider span { color: #a0a0a0 !important; }
body.dark-mode .qb-btn-submit { background-color: #ffffff !important; border-color: #ffffff !important; color: #000000 !important; }
body.dark-mode .qb-btn-submit:hover { background-color: #b29370 !important; border-color: #b29370 !important; color: #ffffff !important; }
body.dark-mode .woocommerce-account .woocommerce-LostPassword a { color: #b5b5b5 !important; }
body.dark-mode .woocommerce-account .woocommerce-LostPassword a:hover { color: #ffffff !important; }
body.dark-mode .woocommerce-account span.password-input .show-password-input { filter: invert(1) !important; }

body.dark-mode .qb-split-auth-wrapper, 
html.dark-mode .qb-split-auth-wrapper {
    background: #141416 !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4) !important;
}

body.dark-mode .qb-split-form-panel, 
html.dark-mode .qb-split-form-panel {
    background: #141416 !important;
}

body.dark-mode .qb-auth-tabs,
html.dark-mode .qb-auth-tabs {
    border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}

body.dark-mode .qb-auth-tab,
html.dark-mode .qb-auth-tab {
    color: #666666 !important;
}

body.dark-mode .qb-auth-tab:hover,
body.dark-mode .qb-auth-tab.is-active {
    color: #ffffff !important;
}

body.dark-mode .qb-auth-tab.is-active::after {
    background-color: #ffffff !important;
}

/* 5. ADAPTABILIDAD MÓVIL Y TABLET (RESPONSIVE FLUIDO CON CLAMP) */
@media (max-width: 900px) {
    /* Pasa de dos columnas a una sola fila vertical */
    .qb-split-auth-wrapper {
        grid-template-columns: 1fr !important;
        min-height: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Imagen superior proporcional */
    .qb-split-visual {
        min-height: clamp(150px, 25vh, 220px) !important;
        padding: clamp(15px, 4vw, 30px) !important;
    }
    .qb-split-visual-inner {
        max-width: clamp(130px, 35vw, 180px) !important;
    }

    /* Contenedor exterior: márgenes dinámicos anti-desbordamiento */
    .woocommerce-account:not(.logged-in) .woocommerce {
        padding: 0 clamp(8px, 3vw, 16px) !important;
        margin: 20px auto 40px auto !important;
        overflow-x: hidden !important;
    }

    /* Panel interior: rellenos escalables según anchura de pantalla */
    .qb-split-form-panel {
        padding: clamp(20px, 5vw, 35px) clamp(12px, 4vw, 24px) !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Pestañas: separación y tipografía escalable */
    .qb-auth-tabs {
        gap: clamp(14px, 4vw, 28px) !important;
    }
    .qb-auth-tab {
        font-size: clamp(0.8rem, 2.8vw, 0.95rem) !important;
    }
}