/* ================================
   PÁGINA PRODUTOS - MECH
   Segue as variáveis e os componentes do style.css (.tag, .btn-primary,
   .section-label, .container), para a página ficar no mesmo padrão das
   demais do site.
================================ */

.produtos-hero {
    min-height: 420px;
    background:
        linear-gradient(90deg, rgba(3, 9, 20, .95) 0%, rgba(3, 9, 20, .78) 55%, rgba(3, 9, 20, .45) 100%),
        var(--mech-navy);
    display: flex;
    align-items: center;
    color: #fff;
    padding: 70px 0;
}

.produtos-hero-content {
    max-width: 780px;
}

.produtos-hero h1 {
    font-size: 46px;
    line-height: 1.1;
    margin-bottom: 18px;
}

.produtos-hero h1 span {
    color: var(--mech-blue);
}

.produtos-hero p {
    font-size: 19px;
    line-height: 1.6;
    color: #cfd6e0;
    margin: 0;
}

/* --- seção da grade ----------------------------------------------------- */

.produtos-section {
    padding: 70px 0;
    background: var(--mech-light);
}

.produtos-titulo {
    font-size: 32px;
    color: var(--mech-navy);
    margin: 6px 0 26px;
}

.produtos-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.filtro-btn {
    background: #fff;
    border: 1px solid #dce8f5;
    color: #52606d;
    padding: 9px 18px;
    border-radius: 30px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: .2s;
}

.filtro-btn:hover {
    border-color: var(--mech-blue);
    color: var(--mech-navy);
}

.filtro-btn.ativo {
    background: var(--mech-blue);
    border-color: var(--mech-blue);
    color: #fff;
}

/* Ícones menores: cards compactos, vários por linha. */
.produtos-grade {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 20px;
}

.produto-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e3ebf3;
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.produto-card:hover,
.produto-card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--mech-blue);
    box-shadow: 0 10px 24px rgba(7, 24, 39, .12);
}

.produto-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f4f8fc;
    overflow: hidden;
}

/* Sem aspect-ratio (navegador antigo), a altura fixa evita o card esticado. */
@supports not (aspect-ratio: 4 / 3) {
    .produto-thumb { height: 150px; }
}

.produto-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.produto-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px 15px 16px;
}

.produto-nome {
    font-size: 15px;
    color: var(--mech-navy);
    line-height: 1.3;
}

.produto-resumo {
    font-size: 13px;
    color: #52606d;
    line-height: 1.4;
}

.produto-ver {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--mech-blue);
}

/* Produto em destaque ocupa duas colunas, quando houver espaço. */
.produto-destaque {
    grid-column: span 2;
}

.produto-destaque .produto-thumb {
    aspect-ratio: 16 / 9;
}

.produto-destaque .produto-nome {
    font-size: 18px;
}

@media (max-width: 520px) {
    .produto-destaque { grid-column: span 1; }
    .produto-destaque .produto-thumb { aspect-ratio: 4 / 3; }
}

.produtos-vazio {
    background: #fff;
    border: 1px dashed #cfd6e0;
    border-radius: 10px;
    padding: 34px;
    text-align: center;
    color: #52606d;
}

/* --- chamada final ----------------------------------------------------- */

.produtos-cta {
    padding: 60px 0;
    background: var(--mech-navy);
    color: #fff;
}

.produtos-cta-box {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
}

.produtos-cta h2 {
    font-size: 28px;
    margin: 6px 0 10px;
}

.produtos-cta p {
    color: #cfd6e0;
    max-width: 560px;
    margin: 0;
}

/* --- pop-up ------------------------------------------------------------ */

.produto-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.produto-modal[hidden] {
    display: none;
}

.produto-modal-fundo {
    position: absolute;
    inset: 0;
    background: rgba(3, 9, 20, .72);
}

.produto-modal-caixa {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 980px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
}

.produto-modal-fechar {
    position: absolute;
    top: 10px;
    right: 14px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--mech-navy);
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.produto-modal-fechar:hover {
    background: var(--mech-blue);
    color: #fff;
}

.produto-modal-conteudo {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 0;
}

.modal-foto-principal {
    grid-column: 1;
    background: #f4f8fc;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.modal-foto-principal img {
    width: 100%;
    height: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.modal-miniaturas {
    grid-column: 1;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 12px 14px;
    background: #f4f8fc;
}

.miniatura {
    width: 58px;
    height: 58px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
}

.miniatura img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.miniatura.ativa,
.miniatura:hover {
    border-color: var(--mech-blue);
}

.modal-texto {
    grid-column: 2;
    grid-row: 1 / -1;
    padding: 34px 32px;
}

.modal-titulo {
    font-size: 26px;
    color: var(--mech-navy);
    margin: 0 0 8px;
    line-height: 1.2;
}

.modal-categoria {
    display: inline-block;
    background: rgba(0, 168, 255, .12);
    color: #0088cc;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 12px;
}

.modal-resumo {
    font-weight: 700;
    color: var(--mech-navy);
    margin: 0 0 12px;
}

.modal-descricao {
    color: #3f4a56;
    line-height: 1.65;
    margin-bottom: 24px;
}

.modal-descricao p {
    margin: 0 0 10px;
}

.modal-whatsapp {
    display: inline-block;
}

@media (max-width: 820px) {
    .produto-modal-conteudo {
        grid-template-columns: 1fr;
    }
    .modal-foto-principal,
    .modal-miniaturas,
    .modal-texto {
        grid-column: 1;
    }
    .modal-texto {
        grid-row: auto;
        padding: 24px 20px 30px;
    }
    .modal-foto-principal img {
        max-height: 44vh;
    }
}

/* Travar o fundo enquanto o pop-up está aberto. */
body.modal-aberto {
    overflow: hidden;
}
