/* Vale Rio V6.2 - imagem inteira, sem corte */
.catalog-shell .product-card .product-image{
    height:250px !important;
    min-height:250px !important;
    padding:0 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    overflow:hidden !important;
    background:#f5f6f7 !important;
}

.catalog-shell .product-card .product-image img{
    display:block !important;
    width:100% !important;
    height:100% !important;
    max-width:100% !important;
    max-height:100% !important;
    object-fit:contain !important;
    object-position:center center !important;
    padding:18px !important;
    box-sizing:border-box !important;
    transform:none !important;
    margin:0 !important;
}

.catalog-shell .product-card:hover .product-image img{
    transform:none !important;
}

.product-modal .modal-product-image{
    height:330px !important;
    min-height:330px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    background:#f5f6f7 !important;
    overflow:hidden !important;
    padding:0 !important;
}

.product-modal .modal-product-image img{
    display:block !important;
    width:100% !important;
    height:100% !important;
    max-width:100% !important;
    max-height:100% !important;
    object-fit:contain !important;
    object-position:center center !important;
    padding:22px !important;
    box-sizing:border-box !important;
    transform:none !important;
}

/* Mantém o layout dos filtros organizado */
.catalog-filter-row-with-export{
    grid-template-columns:1fr 1fr 1fr auto auto;
    align-items:end;
}

@media(max-width:1100px){
    .catalog-shell .product-card .product-image{height:225px !important;min-height:225px !important;}
}
@media(max-width:820px){
    .catalog-filter-row-with-export{grid-template-columns:1fr 1fr;}
    .catalog-shell .product-card .product-image{height:240px !important;min-height:240px !important;}
}
@media(max-width:560px){
    .catalog-filter-row-with-export{grid-template-columns:1fr;}
    .catalog-shell .product-card .product-image{height:300px !important;min-height:300px !important;}
}


/* Vale Rio V6.3 - imagem clicável e visualização ampliada */
.catalog-shell .product-image-clickable{
    cursor: zoom-in !important;
    position: relative !important;
    outline: none;
}

.catalog-shell .product-image-clickable:focus-visible{
    box-shadow: inset 0 0 0 3px rgba(18,112,210,.42) !important;
}

.catalog-shell .product-image-zoom{
    position:absolute;
    right:14px;
    bottom:14px;
    z-index:3;
    display:inline-flex;
    align-items:center;
    gap:6px;
    min-height:32px;
    padding:0 10px;
    border-radius:999px;
    background:rgba(4,34,69,.82);
    color:#fff;
    font-size:10px;
    opacity:0;
    transform:translateY(5px);
    transition:opacity .2s ease,transform .2s ease;
    pointer-events:none;
    box-shadow:0 8px 20px rgba(0,0,0,.16);
}

.catalog-shell .product-image-clickable:hover .product-image-zoom,
.catalog-shell .product-image-clickable:focus-visible .product-image-zoom{
    opacity:1;
    transform:none;
}

.product-modal .modal-card{
    width:min(1180px,94vw) !important;
    max-height:92vh !important;
    padding:26px !important;
    border-radius:22px !important;
}

.product-modal .modal-product-large{
    display:grid !important;
    grid-template-columns:minmax(0,1.15fr) minmax(340px,.85fr) !important;
    gap:34px !important;
    align-items:stretch !important;
}

.product-modal .modal-product-image-large{
    height:min(70vh,650px) !important;
    min-height:470px !important;
    border-radius:18px !important;
    background:#f5f6f7 !important;
    border:1px solid #e0e7ee !important;
}

.product-modal .modal-product-image-large img{
    width:100% !important;
    height:100% !important;
    max-width:100% !important;
    max-height:100% !important;
    object-fit:contain !important;
    object-position:center center !important;
    padding:28px !important;
    box-sizing:border-box !important;
}

.product-modal .modal-product-info{
    display:flex;
    flex-direction:column;
    justify-content:center;
    padding:18px 4px 12px 0;
}

.product-modal .modal-product-kicker{
    font-size:10px;
    font-weight:800;
    letter-spacing:.13em;
    color:#1473ca;
    text-transform:uppercase;
    margin-bottom:10px;
}

.product-modal .modal-product-info h2{
    font-size:clamp(24px,2.2vw,34px) !important;
    line-height:1.14 !important;
    margin:0 0 14px !important;
}

.product-modal .modal-product-info p{
    font-size:13px !important;
    line-height:1.65 !important;
    margin:0 0 20px !important;
}

.product-modal .modal-facts{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
}

.product-modal .modal-facts>div{
    padding:12px 13px !important;
    border-radius:12px !important;
}

.product-modal .modal-facts small{
    font-size:9px !important;
}

.product-modal .modal-facts strong{
    font-size:11px !important;
    line-height:1.35 !important;
    word-break:break-word;
}

.product-modal .modal-close{
    z-index:5;
    width:40px !important;
    height:40px !important;
    right:16px !important;
    top:16px !important;
    box-shadow:0 8px 20px rgba(0,0,0,.10);
}

@media(max-width:900px){
    .product-modal .modal-card{
        width:min(760px,96vw) !important;
        padding:20px !important;
    }
    .product-modal .modal-product-large{
        grid-template-columns:1fr !important;
        gap:20px !important;
    }
    .product-modal .modal-product-image-large{
        height:48vh !important;
        min-height:320px !important;
    }
    .product-modal .modal-product-info{
        padding:0 2px 8px !important;
    }
}

@media(max-width:560px){
    .catalog-shell .product-image-zoom{
        opacity:1;
        transform:none;
    }
    .product-modal{
        padding:8px !important;
    }
    .product-modal .modal-card{
        width:100% !important;
        max-height:95vh !important;
        padding:14px !important;
        border-radius:16px !important;
    }
    .product-modal .modal-product-image-large{
        height:44vh !important;
        min-height:260px !important;
    }
    .product-modal .modal-product-image-large img{
        padding:18px !important;
    }
    .product-modal .modal-facts{
        grid-template-columns:1fr 1fr !important;
    }
}


/* Vale Rio V6.4 - correção definitiva da camada do modal */
body > .product-modal{
    position:fixed !important;
    inset:0 !important;
    z-index:2147483000 !important;
    display:none;
    align-items:center !important;
    justify-content:center !important;
    padding:20px !important;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    isolation:isolate;
}

body > .product-modal.open{
    display:flex !important;
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
}

body > .product-modal > .modal-backdrop{
    position:absolute !important;
    inset:0 !important;
    z-index:0 !important;
    background:rgba(4,20,38,.74) !important;
    backdrop-filter:blur(7px) !important;
    -webkit-backdrop-filter:blur(7px) !important;
}

body > .product-modal > .modal-card{
    position:relative !important;
    z-index:10 !important;
    display:block !important;
    width:min(1180px,94vw) !important;
    max-height:92vh !important;
    overflow:auto !important;
    opacity:1 !important;
    visibility:visible !important;
    transform:none !important;
    background:#fff !important;
    border:1px solid rgba(207,221,234,.9) !important;
    box-shadow:0 38px 110px rgba(0,0,0,.38) !important;
}

body.modal-open{
    overflow:hidden !important;
}

@media(max-width:560px){
    body > .product-modal{
        padding:8px !important;
    }
}

/* Vale Rio V6.6 - botão PDF inteiro clicável, uma única exportação */
.catalog-control-panel,
.catalog-control-panel .filter-row,
.catalog-filter-row-with-export{
    position:relative !important;
    overflow:visible !important;
}

.catalog-pdf-button{
    position:relative !important;
    z-index:50 !important;
    isolation:isolate !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:10px !important;
    width:100% !important;
    min-width:180px !important;
    height:50px !important;
    min-height:50px !important;
    padding:0 18px !important;
    box-sizing:border-box !important;
    cursor:pointer !important;
    pointer-events:auto !important;
    user-select:none !important;
    -webkit-user-select:none !important;
    touch-action:manipulation !important;
    text-decoration:none !important;
}

/* Os filhos deixam o clique para o próprio <a>. */
.catalog-pdf-button > *{
    pointer-events:none !important;
    position:relative;
    z-index:2;
}

/* O próprio <a> ocupa toda a área. Nenhuma camada extra intercepta o clique. */
.catalog-pdf-button::after{
    content:none !important;
    pointer-events:none !important;
}

.catalog-pdf-button:focus-visible{
    outline:3px solid rgba(17,115,209,.28) !important;
    outline-offset:3px !important;
}

.catalog-pdf-button:active{
    transform:translateY(1px) !important;
}

@media(max-width:820px){
    .catalog-pdf-button{
        min-width:0 !important;
        width:100% !important;
    }
}


/* Vale Rio V6.9 - configuração da exportação PDF */
.catalog-pdf-button{border:0;cursor:pointer;font-family:inherit;}
body.pdf-export-open{overflow:hidden;}
.pdf-export-modal{position:fixed;inset:0;z-index:2147483100;display:none;align-items:center;justify-content:center;padding:20px;}
.pdf-export-modal.open{display:flex;}
.pdf-export-backdrop{position:absolute;inset:0;background:rgba(4,20,38,.68);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);}
.pdf-export-card{position:relative;z-index:2;width:min(720px,96vw);background:#fff;border:1px solid #d9e5ef;border-radius:22px;padding:28px;box-shadow:0 28px 90px rgba(3,31,60,.28);}
.pdf-export-close{position:absolute;right:16px;top:16px;width:38px;height:38px;border:1px solid #dbe5ee;border-radius:50%;background:#f8fbfe;color:#19344f;font-size:23px;cursor:pointer;}
.pdf-export-head>span{display:block;font-size:9px;font-weight:800;letter-spacing:.16em;color:#1370c9;margin-bottom:8px;}
.pdf-export-head h2{margin:0 44px 8px 0;font-size:25px;line-height:1.15;color:#082e55;}
.pdf-export-head p{margin:0;color:#6f8193;font-size:11px;line-height:1.6;max-width:590px;}
.pdf-export-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:22px;}
.pdf-export-grid label{display:grid;gap:6px;}
.pdf-export-grid label>span{font-size:8px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#7d8e9e;}
.pdf-export-grid select{height:46px;border:1px solid #d8e3ed;border-radius:11px;background:#fbfdff;color:#243f59;padding:0 12px;font-size:11px;outline:none;}
.pdf-export-grid select:focus{border-color:#77afe4;box-shadow:0 0 0 3px rgba(25,121,209,.10);}
.pdf-export-summary{margin-top:18px;padding:12px 14px;border-radius:11px;background:#f2f8fd;border:1px solid #dbeaf7;color:#567086;font-size:10px;line-height:1.55;}
.pdf-export-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px;}
.pdf-export-cancel,.pdf-export-generate{height:44px;border-radius:10px;padding:0 17px;font:700 11px inherit;cursor:pointer;}
.pdf-export-cancel{border:1px solid #d9e4ed;background:#fff;color:#53687c;}
.pdf-export-generate{border:0;background:linear-gradient(135deg,#0874d8,#0860b8);color:#fff;box-shadow:0 10px 26px rgba(10,98,184,.20);display:inline-flex;align-items:center;gap:9px;}
.pdf-export-generate span{font-size:8px;border:1px solid rgba(255,255,255,.28);padding:5px 6px;border-radius:6px;}
@media(max-width:620px){.pdf-export-card{padding:22px 16px}.pdf-export-grid{grid-template-columns:1fr}.pdf-export-actions{display:grid;grid-template-columns:1fr 1fr}.pdf-export-cancel,.pdf-export-generate{justify-content:center;width:100%}}


/* Vale Rio V6.10 - configurador PDF acima do backdrop + botão inteiro clicável */
.catalog-filter-row-with-export{
    position:relative !important;
    isolation:isolate !important;
}

.catalog-pdf-button{
    position:relative !important;
    z-index:9999 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:100% !important;
    height:50px !important;
    min-height:50px !important;
    border:0 !important;
    border-radius:10px !important;
    cursor:pointer !important;
    pointer-events:auto !important;
    appearance:none !important;
    -webkit-appearance:none !important;
    overflow:hidden !important;
}

.catalog-pdf-button::before,
.catalog-pdf-button::after{
    content:none !important;
    display:none !important;
    pointer-events:none !important;
}

.catalog-pdf-button > *{
    pointer-events:none !important;
}

/* O modal é movido para filho direto do body pelo JS. */
body > .pdf-export-modal{
    position:fixed !important;
    inset:0 !important;
    z-index:2147483500 !important;
    display:none;
    align-items:center !important;
    justify-content:center !important;
    padding:20px !important;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    isolation:isolate !important;
}

body > .pdf-export-modal.open{
    display:flex !important;
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
}

body > .pdf-export-modal > .pdf-export-backdrop{
    position:absolute !important;
    inset:0 !important;
    z-index:0 !important;
    background:rgba(4,20,38,.72) !important;
    backdrop-filter:blur(6px) !important;
    -webkit-backdrop-filter:blur(6px) !important;
}

body > .pdf-export-modal > .pdf-export-card{
    position:relative !important;
    z-index:20 !important;
    display:block !important;
    width:min(720px,96vw) !important;
    max-height:92vh !important;
    overflow:auto !important;
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
    transform:none !important;
    background:#fff !important;
    border:1px solid #d9e5ef !important;
    border-radius:22px !important;
    padding:28px !important;
    box-shadow:0 34px 100px rgba(3,31,60,.38) !important;
}

body > .pdf-export-modal .pdf-export-grid,
body > .pdf-export-modal .pdf-export-actions,
body > .pdf-export-modal .pdf-export-summary,
body > .pdf-export-modal button,
body > .pdf-export-modal select{
    position:relative !important;
    z-index:21 !important;
    pointer-events:auto !important;
}

body.pdf-export-open{
    overflow:hidden !important;
}

@media(max-width:620px){
    body > .pdf-export-modal{padding:8px !important;}
    body > .pdf-export-modal > .pdf-export-card{padding:22px 16px !important;}
}


/* Vale Rio V6.11 - botão PDF com hitbox real em toda a largura */
#catalogPdfButton.catalog-pdf-button{
    grid-column:1 / -1 !important;
    width:100% !important;
    min-width:100% !important;
    max-width:none !important;
    height:56px !important;
    min-height:56px !important;
    margin:2px 0 0 !important;
    padding:0 24px !important;
    position:relative !important;
    z-index:2147480000 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:11px !important;
    background:linear-gradient(135deg,#0b76d8 0%,#1167bd 100%) !important;
    color:#fff !important;
    border:1px solid rgba(4,77,148,.18) !important;
    border-radius:11px !important;
    box-shadow:0 12px 28px rgba(11,93,174,.17) !important;
    cursor:pointer !important;
    pointer-events:auto !important;
    touch-action:manipulation !important;
}

#catalogPdfButton.catalog-pdf-button:hover{
    background:linear-gradient(135deg,#087fe9 0%,#0e6ecb 100%) !important;
    box-shadow:0 15px 32px rgba(11,93,174,.23) !important;
    cursor:pointer !important;
}

#catalogPdfButton.catalog-pdf-button,
#catalogPdfButton.catalog-pdf-button *,
#catalogPdfButton.catalog-pdf-button:hover,
#catalogPdfButton.catalog-pdf-button:hover *{
    cursor:pointer !important;
}

#catalogPdfButton.catalog-pdf-button > *{
    pointer-events:none !important;
}

/* Camadas decorativas do painel nunca podem capturar o mouse sobre o botão. */
.catalog-control-panel::before,
.catalog-control-panel::after,
.catalog-filter-row-with-export::before,
.catalog-filter-row-with-export::after{
    pointer-events:none !important;
}

@media(max-width:820px){
    #catalogPdfButton.catalog-pdf-button{
        grid-column:1 / -1 !important;
        min-width:100% !important;
        width:100% !important;
    }
}
