/* =====================================================================================
   PRODUTO — PÁGINA INDIVIDUAL
   Arquivo: /views/style_produtos.css
   Autor: UNIÃO MADEIRAS (2025)
   Descrição: Estilos completos da página de produto, incluindo:
   - Header moderno
   - Galeria
   - Layout base
   - Bloco de medidas
   - Modal avançado
   - Produtos relacionados
===================================================================================== */

/* ================= TOPO ================= */
.topo-produtos {
    text-align: center;
    padding: 35px 0 15px;
}

.topo-produtos h1 {
    font-size: 32px;
    font-weight: 800;
    color: #0d4d1f;
    margin-bottom: 10px;
}

.selo-capelinha {
    display: inline-flex;
    align-items: center;
    background: #e1f5e6;
    color: #0d4d1f;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 14px;
    gap: 8px;
    margin-top: 5px;
}

/* ================= CATEGORIAS TOPO ================= */
.categorias-topo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 25px auto 10px;
    flex-wrap: wrap;
}

.categorias-topo .label {
    font-weight: 700;
    color: #0d4d1f;
}

.categorias-topo a {
    background: #0d4d1f;
    color: #fff;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: .25s;
}

.categorias-topo a:hover {
    background: #145c28;
}

.categorias-topo a.active {
    background: #083a18;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
}

/* ================= GRID DE PRODUTOS ================= */
.produtos-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
    margin: 40px auto 90px;
}

/* ================= CARD PRODUTO ================= */
.card-prod-home {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    width: 260px;
    border: 1px solid #e7e7e7;
    box-shadow: 0px 8px 18px rgba(0,0,0,0.07);
    transition: .3s;
}

.card-prod-home:hover {
    transform: translateY(-6px);
    box-shadow: 0px 12px 28px rgba(0,0,0,0.10);
}

.card-prod-home img {
    width: 100%;
    display: block;
}

.card-prod-info {
    padding: 20px;
    text-align: center;
}

.card-prod-info h3 {
    font-size: 17px;
    font-weight: 700;
    color: #0d4d1f;
    margin-bottom: 14px;
}

.btn-vermais {
    width: 100%;
    background: #0d4d1f;
    color: #fff;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.btn-vermais:hover {
    background: #145c28;
}

/* ================= MOBILE ================= */
@media(max-width: 600px){
    .card-prod-home { width: 100%; }
    .topo-produtos h1 { font-size: 26px; }

    .categorias-topo {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 0 15px;
    }
}

/* ================= MOBILE ================= */
@media(max-width: 600px){

    .topo-produtos h1 {
        font-size: 26px;
    }

    /* CATEGORIAS MOBILE - LISTA VERTICAL */
    .categorias-topo {
        display: block;
        padding: 15px;
        margin: 10px 0 20px;
    }

    .categorias-topo .label {
        display: block;
        font-weight: 700;
        color: #0d4d1f;
        margin-bottom: 10px;
    }

    .categorias-topo a {
        display: block;
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
        padding: 12px 16px;
        font-size: 15px;
        border-radius: 10px;
        white-space: normal;
    }

    .categorias-topo a.active {
        background: #083a18;
        box-shadow: none;
    }
}

/* ================= CATEGORIAS + BUSCA ================= */
.categorias-busca-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 25px auto 20px;
    max-width: 1200px;
    padding: 0 15px;
}

.busca-produtos {
    display: flex;
    align-items: center;
    gap: 8px;
}

.busca-produtos input {
    border: 2px solid #0d4d1f;
    border-radius: 30px;
    padding: 8px 14px;
    font-size: 14px;
    outline: none;
    min-width: 220px;
}

.busca-produtos button {
    background: #0d4d1f;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 600;
}

.busca-produtos button:hover {
    background: #145c28;
}

.categorias-topo a.active {
    background: #083a18;
    border: 2px solid #3fd17a;
    box-shadow: 0 0 0 3px rgba(63,209,122,0.25);
    font-weight: 700;
}

/* ================= CATEGORIAS + BUSCA ================= */
.categorias-busca-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin: 30px auto 25px;
    max-width: 1300px;
    padding: 0 20px;
}

.categorias-topo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.busca-produtos {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.categorias-topo a {
    transition: all .25s ease;
}

.categorias-topo a:hover {
    background: #145c28;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.busca-produtos input {
    transition: border-color .2s ease, box-shadow .2s ease;
}

.busca-produtos input:focus {
    border-color: #3fd17a;
    box-shadow: 0 0 0 3px rgba(63,209,122,0.25);
}

.busca-produtos button {
    transition: background .2s ease, transform .2s ease;
}

.busca-produtos button:hover {
    background: #145c28;
    transform: translateY(-1px);
}



/* MOBILE */
@media(max-width: 768px){
    .categorias-busca-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .busca-produtos {
        width: 100%;
    }

    .busca-produtos input {
        width: 100%;
    }
}




/* ============================================================
   1) HEADER DO PRODUTO
============================================================ */
.produto-header {
    background: linear-gradient(180deg, #f3fff5 0%, #ffffff 100%);
    padding: 15px 0 20px;
    text-align: center;
}

.produto-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #0f4a1c;
    margin-bottom: 10px;
}

.produto-breadcrumb {
    font-size: 15px;
    color: #1b5e20;
    margin-top: 5px;
}

.produto-breadcrumb a {
    color: #1b5e20;
    text-decoration: none;
    font-weight: 500;
}

.produto-breadcrumb span {
    margin: 0 6px;
}

.selo-capelinha {
    display: inline-block;
    margin-top: 18px;
    background: #e7f8ea;
    color: #0b3d17;
    padding: 7px 16px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #b7e6bf;
}

/* ================= CTA ORÇAMENTO ================= */
.cta-orcamento {
    background: #f1fbf4;
    border-left: 5px solid #0d4d1f;
    padding: 14px 16px;
    margin-bottom: 15px;
    border-radius: 8px;
    font-size: 14px;
    color: #0d4d1f;
    line-height: 1.5;
}

.cta-orcamento strong {
    font-weight: 700;
}



/* ============================================================
   2) IMAGEM PRINCIPAL E GALERIA
============================================================ */

.produto-foto img {
    width: 100%;
    border-radius: 24px !important;
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    transition: .3s;
    cursor: zoom-in;
}

.produto-foto img:hover {
    transform: scale(1.02);
}

.galeria-mini {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.galeria-mini img {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: 14px;
    cursor: pointer;
    transition: .3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.galeria-mini img:hover {
    transform: scale(1.06);
}


/* ============================================================
   3) LAYOUT PRINCIPAL
============================================================ */

.produto-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 40px;
}

.produto-esquerda { flex: 1 1 48%; }
.produto-direita  { flex: 1 1 48%; }

.descricao-produto {
    font-size: 16px;
    line-height: 1.75;
    color: #444;
}

.descricao-produto h2,
.descricao-produto h3 {
    font-weight: 700;
    color: #0f4a1c;
}


/* ============================================================
   4) BOTÕES PADRÃO
============================================================ */

.btn-orcamento {
    margin-top: 25px;
    background: #0f4a1c;
    color: #fff;
    padding: 14px 26px;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    cursor: pointer;
    width: 100%;
    transition: .3s;
}

.btn-orcamento:hover {
    background: #2d7b36;
}


/* ============================================================
   5) BLOCO DE MEDIDAS
============================================================ */

.bloco-medidas {
    margin-top: 25px;
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid #dceedd;
    border-radius: 12px;
    background: #f6fff7;
}

.titulo-medidas {
    font-size: 20px;
    color: #0f4a1c;
    margin-bottom: 12px;
    font-weight: 700;
}

.medidas-lista {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.medida-item {
    background: white;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid #bcd9c4;
    cursor: pointer;
    font-size: 15px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.medida-item input {
    transform: scale(1.2);
}

.medida-item .ok {
    color: green;
    font-size: 14px;
    display: none;
}

.medida-item input:checked + span + .ok {
    display: inline-block;
}


/* ============================================================
   6) MODAL DE COTAÇÃO
============================================================ */

.um-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.um-modal.open {
    display: flex;
}

.um-modal-box {
    background: white;
    padding: 30px;
    border-radius: 14px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0px 12px 32px rgba(0,0,0,.25);
}

.modal-item {
    background: #f8f8f8;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    margin-bottom: 12px;
}

.modal-qtd {
    width: 80px;
    padding: 6px;
    margin-top: 6px;
}

.modal-btns {
    display: flex;
    gap: 14px;
    margin-top: 20px;
}

.btn-outline {
    flex: 1;
    background: #fff;
    border: 1px solid #0f4a1c;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
}

.btn-solid {
    flex: 1;
    background: #0f4a1c;
    color: white;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
}


/* ============================================================
   7) FAIXA FINAL
============================================================ */

.faixa-destaque-final {
    background: #0f4a1c;
    color: #fff;
    padding: 14px;
    font-size: 17px;
    border-radius: 12px;
    text-align: center;
    margin: 55px 0 35px;
    font-weight: 500;
}


/* ============================================================
   8) PRODUTOS RELACIONADOS
============================================================ */

.relacionados-titulo {
    margin-top: 60px;
    font-size: 24px;
    font-weight: 700;
    color: #0f4a1c;
}

.produto-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #ececec;
    box-shadow: 0px 8px 18px rgba(0,0,0,0.08);
    transition: .3s;
    margin-bottom: 25px;
}

.produto-card:hover {
    transform: translateY(-6px);
}

.produto-card img {
    width: 100%;
    height: auto;
}

.produto-info {
    padding: 18px;
    text-align: center;
}

.produto-info h3 {
    font-size: 17px;
    color: #0f4a1c;
    font-weight: 600;
}

.btn-produto {
    width: 100%;
    background: #0f4a1c;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    margin-top: 12px;
    border: none;
    cursor: pointer;
    transition: .3s;
}

.btn-produto:hover {
    background: #2d7b36;
}

/* ================= CARD PRODUTO (ALTURA UNIFORME) ================= */

.produto-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.produto-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    flex-grow: 1;
}
.produto-info h3 {
    font-size: 16px;
    line-height: 1.3;
    margin-bottom: 12px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;

    min-height: calc(1.3em * 2); /* garante altura fixa */
}



/* ============================================================
   9) REMOVER CABEÇALHO ANTIGO
============================================================ */

#breadcrumbs,
#title-box {
    display: none !important;
}


/* ============================================================
   10) RESPONSIVO
============================================================ */

@media (max-width: 768px) {

    .produto-wrapper {
        flex-direction: column;
    }

    .medidas-lista {
        flex-direction: column;
    }

    .galeria-mini img {
        width: 100px;
        height: 100px;
    }
}
