/* =============================================================================
 * awa-pdp-b2b-pro.css
 * AWA Motos — PDP B2B Gate Premium Styling
 * Carregado via catalog_product_view.xml order=1215 (após awa-bundle-pdp)
 *
 * DOM real do gate B2B (deslogado):
 *   .product-info-price
 *     > .b2b-login-to-see-price.price-box
 *       > .price-label
 *         > <a href="/b2b/account/login/">Faça login</a> para ver preços
 *
 * ACHADOS da inspeção (2026-04-17):
 *   - NÃO há duplicação de texto dentro do <a>
 *   - O <a> contém apenas "Faça login", o "para ver preços" é texto irmão
 *   - O botão "Adicionar ao Carrinho" aparece com disabled no deslogado
 *   - Nos relacionados: .awa-related-price-notice > a[href*="/b2b/account/login/"]
 * ============================================================================= */

/* AWA-AUDIT:pdp-b2b-gate-premium-2026-04-16:start */

/* --------------------------------------------------------------------------
 * 1. GATE B2B — Container (.b2b-login-to-see-price)
 *
 * Transforma o wrapper do gate num card vermelho dominante full-width.
 * É o CTA mais destacado na página quando deslogado.
 * -------------------------------------------------------------------------- */
body.catalog-product-view .product-info-main .b2b-login-to-see-price.price-box {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 56px !important;
    padding: 12px 20px !important;
    border-radius: 10px !important;
    background: var(--awa-primary, #b73737) !important;
    box-shadow: 0 4px 12px rgba(183, 55, 55, 0.25) !important;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease !important;
    text-align: center !important;
}

body.catalog-product-view .product-info-main .b2b-login-to-see-price.price-box:hover {
    background: var(--awa-primary-dark, #8e2023) !important;
    box-shadow: 0 6px 18px rgba(183, 55, 55, 0.30) !important;
    transform: translateY(-1px) !important;
}

/* --------------------------------------------------------------------------
 * 2. GATE B2B — Texto (.price-label)
 *
 * Texto branco dentro do gate. O "para ver preços" fica visível e integrado.
 * -------------------------------------------------------------------------- */
body.catalog-product-view .product-info-main .b2b-login-to-see-price .price-label {
    display: inline !important;
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    line-height: 1.4 !important;
}

/* --------------------------------------------------------------------------
 * 3. GATE B2B — Link "Faça login"
 *
 * O link dentro do gate: branco, sublinhado e bold para chamar atenção.
 * -------------------------------------------------------------------------- */
body.catalog-product-view .product-info-main .b2b-login-to-see-price a[href*="/b2b/account/login/"],
body.catalog-product-view .product-info-main .b2b-login-to-see-price a[href*="/customer/account/login/"] {
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    text-decoration: underline !important;
    text-decoration-color: rgba(255, 255, 255, 0.6) !important;
    text-underline-offset: 2px !important;
    transition: text-decoration-color 0.15s ease !important;
}

body.catalog-product-view .product-info-main .b2b-login-to-see-price a[href*="/b2b/account/login/"]:hover,
body.catalog-product-view .product-info-main .b2b-login-to-see-price a[href*="/customer/account/login/"]:hover {
    text-decoration-color: #fff !important;
}

/* --------------------------------------------------------------------------
 * 4. GATE B2B — Botão "Adicionar ao Carrinho" desabilitado
 *
 * No estado deslogado o botão está presente mas disabled.
 * Reduzimos destaque para não competir com o gate vermelho.
 * -------------------------------------------------------------------------- */
body.catalog-product-view .product-info-main .action.tocart[disabled],
body.catalog-product-view .product-info-main #product-addtocart-button[disabled] {
    opacity: 0.35 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    background: #ccc !important;
    color: #888 !important;
}

/* --------------------------------------------------------------------------
 * 5. RELACIONADOS — Gate B2B nos cards de produto
 *
 * DOM: .price-box.price-box--hidden > .awa-related-price-notice > a
 * Estiliza de forma compacta dentro do card.
 * -------------------------------------------------------------------------- */
body.catalog-product-view .awa-pdp-related .awa-related-price-notice {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 6px 10px !important;
    border-radius: 6px !important;
    background: var(--awa-primary, #b73737) !important;
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-align: center !important;
    margin-top: 8px !important;
}

body.catalog-product-view .awa-pdp-related .awa-related-price-notice a {
    color: #fff !important;
    font-weight: 700 !important;
    text-decoration: underline !important;
    text-decoration-color: rgba(255, 255, 255, 0.5) !important;
    font-size: 12px !important;
}

body.catalog-product-view .awa-pdp-related .awa-related-price-notice a:hover {
    text-decoration-color: #fff !important;
}

/* --------------------------------------------------------------------------
 * 6. NÃO necessário: supressão de duplicação
 *
 * Inspeção DOM (2026-04-17) confirmou:
 *   - <a> contém APENAS "Faça login" (sem filhos duplicados)
 *   - "para ver preços" é texto irmão dentro de .price-label
 * → Regra de supressão NÃO aplicada.
 * -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
 * 7. Ocultar "Adicionar ao Carrinho" no estado deslogado
 *
 * DESCOMENTAR apenas se desejado — atualmente o botão disabled dá feedback
 * que a ação existe mas requer login. Mantido como referência.
 * -------------------------------------------------------------------------- */
/*
body.catalog-product-view .product-info-main .box-tocart:has(~ .b2b-login-to-see-price) {
    display: none !important;
}
*/

/* AWA-AUDIT:pdp-b2b-gate-premium-2026-04-16:end */
