/* ============================================================
   Página: Formatos e Medidas do Pinus Tratado
   Armazém do Eucalipto
   ============================================================ */

/* ==========================================================
   MINI-HERO (cabeçalho interno)
   ========================================================== */
.formatos-hero {
    position: relative;
    padding: 160px 1.5rem 56px;
    text-align: center;
    overflow: hidden;
    background-color: #201101;
}

/* Foto de fundo */
.formatos-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 40%;
    filter: brightness(0.35);
    transition: transform 10s ease;
}

.formatos-hero:hover .formatos-hero__bg {
    transform: scale(1.03);
}

/* Gradiente sobre a foto para integrar com o header e dar foco ao texto */
.formatos-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(32,17,1,0.65)  0%,
        rgba(32,17,1,0.1)  45%,
        rgba(32,17,1,0.55) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.formatos-hero__inner {
    max-width: 860px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Reutiliza .page-hero__breadcrumb do eucalipto-tratado.css */
.formatos-hero .page-hero__breadcrumb {
    justify-content: center;
    margin-bottom: 1.75rem;
}

.formatos-hero__label {
    display: inline-block;
    color: #CD9C3D;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 0.75rem;
}

.formatos-hero__title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

/* ==========================================================
   INTRODUÇÃO
   ========================================================== */
.formatos-intro {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.formatos-intro__title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    font-weight: 800;
    color: #201101;
    margin-bottom: 1.5rem;
    letter-spacing: -0.2px;
}

.formatos-intro p {
    font-size: 1rem;
    color: #4a3728;
    line-height: 1.85;
    margin-bottom: 1rem;
}

.formatos-intro p:last-child { margin-bottom: 0; }
.formatos-intro strong { color: #201101; font-weight: 700; }

/* ==========================================================
   BLOCOS DE PRODUTO (alternância texto / fotos)
   ========================================================== */
.produto-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
}

/* Versão invertida: fotos à esquerda, texto à direita */
.produto-block--reverse .produto-block__photos { order: -1; }

.produto-block__title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #201101;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #CD9C3D;
    display: inline-block;
    margin-bottom: 1.25rem;
}

.produto-block__text p {
    font-size: 1rem;
    color: #4a3728;
    line-height: 1.85;
    margin-bottom: 1rem;
}

.produto-block__text p:last-child { margin-bottom: 0; }

/* Títulos de produto na seção "DECK - peças prontas" */
.pecas-header {
    margin-bottom: 1.5rem;
}

.pecas-header p {
    font-size: 1rem;
    color: #4a3728;
    line-height: 1.85;
    max-width: 640px;
}

/* ==========================================================
   LISTA DE MEDIDAS
   ========================================================== */
.medidas-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.medidas-list li {
    font-size: 1rem;
    font-weight: 600;
    color: #201101;
    padding: 0.35rem 0 0.35rem 1.4rem;
    position: relative;
}

.medidas-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.75em;
    width: 8px;
    height: 8px;
    background: #CD9C3D;
    border-radius: 50%;
}

/* ==========================================================
   GRADE DE FOTOS DO PRODUTO (3 miniaturas por bloco)
   ========================================================== */
.produto-block__photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.produto-photo {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    position: relative;
}

.produto-photo picture,
.produto-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.produto-photo:hover img { transform: scale(1.07); }

.produto-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(32,17,1,0);
    transition: background 0.3s ease;
    pointer-events: none;
    border-radius: 8px;
}

.produto-photo:hover::after { background: rgba(32,17,1,0.15); }

/* ==========================================================
   GRID DE PEÇAS PRONTAS (linha de 3)
   ========================================================== */
.pecas-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

/* ==========================================================
   SEÇÃO TÁBUAS E VIGAS (fundo escuro)
   ========================================================== */
.tabuas-section {
    background: linear-gradient(160deg, #201101 0%, #2e1604 50%, #201101 100%);
    padding: 4.5rem 0;
    position: relative;
    overflow: hidden;
}

/* Detalhe ornamental */
.tabuas-section::before {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(205,156,61,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.tabuas-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tabuas-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.75rem;
    letter-spacing: -0.2px;
}

.tabuas-subtitle {
    color: rgba(233,228,208,0.7);
    font-size: 1rem;
    line-height: 1.75;
    max-width: 700px;
    margin: 0 auto;
}

/* Grade de 4 colunas para as categorias de medidas */
.tabuas-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.tabuas-col {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(205,156,61,0.2);
    border-radius: 10px;
    padding: 1.5rem 1.25rem;
}

.tabuas-col__title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #CD9C3D;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.35rem;
}

.tabuas-col__sub {
    font-size: 0.8rem;
    color: rgba(233,228,208,0.5);
    line-height: 1.5;
    margin-bottom: 1rem;
    min-height: 2.5rem;
}

.tabuas-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.tabuas-list li {
    font-size: 0.95rem;
    color: #E9E4D0;
    padding: 0.3rem 0 0.3rem 1.2rem;
    position: relative;
    line-height: 1.5;
}

.tabuas-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 6px;
    height: 6px;
    background: #CD9C3D;
    border-radius: 50%;
}

.tabuas-obs {
    display: block;
    font-size: 0.78rem;
    color: rgba(233,228,208,0.45);
    margin-top: 0.1rem;
}

/* Fotos de vigas (linha de 3) */
.tabuas-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.tabuas-photo {
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    position: relative;
}

.tabuas-photo picture,
.tabuas-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.tabuas-photo:hover img { transform: scale(1.06); }

/* Reutiliza .photos-grid__overlay do eucalipto-tratado.css */
.tabuas-photo .photos-grid__overlay {
    position: absolute;
    inset: 0;
    background: rgba(32,17,1,0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: background 0.3s ease, opacity 0.3s ease;
    z-index: 1;
}

.tabuas-photo:hover .photos-grid__overlay {
    background: rgba(32,17,1,0.35);
    opacity: 1;
}

/* ==========================================================
   RESPONSIVO
   ========================================================== */
@media (max-width: 1024px) {
    .tabuas-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .formatos-hero {
        padding: 100px 1.5rem 40px;
    }

    .produto-block {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Na versão invertida mobile, texto vem depois das fotos */
    .produto-block--reverse .produto-block__photos { order: 0; }

    .tabuas-grid {
        grid-template-columns: 1fr 1fr;
    }

    .tabuas-photos,
    .pecas-photos {
        grid-template-columns: repeat(2, 1fr);
    }

    .produto-block__photos {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .tabuas-grid {
        grid-template-columns: 1fr;
    }

    .produto-block__photos,
    .tabuas-photos,
    .pecas-photos {
        grid-template-columns: repeat(2, 1fr);
    }

    .tabuas-col__sub { min-height: unset; }
}
