/* =========================================================
   PRODUTOS — mobile first
   ========================================================= */

/* =========================================================
   Seção 1: Faixa topo cinza com CALHA
   ========================================================= */

.produtos-topo {
    background-color: #d9d9d9;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}


/* =========================================================
   Seção 2: Hero (cor sólida, com texto)
   ========================================================= */

.produtos-hero {
    width: 100%;
    background-color: var(--color-primary);
    padding-block: var(--space-12);
}

.produtos-hero__inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.produtos-hero__title {
    font-size: var(--text-hero);
    font-weight: var(--fw-bold);
    color: var(--color-white);
    line-height: var(--line-tight);
}

.produtos-hero__desc {
    font-size: var(--text-base);
    font-weight: var(--fw-light);
    color: var(--color-white);
    line-height: var(--line-loose);
    margin-bottom: var(--space-3);
}

.produtos-hero__desc:last-child {
    margin-bottom: 0;
}

.produtos-hero__desc-html,
.produtos-hero__desc-html h1,
.produtos-hero__desc-html h2,
.produtos-hero__desc-html h3,
.produtos-hero__desc-html h4,
.produtos-hero__desc-html h5,
.produtos-hero__desc-html h6 {
    color: var(--color-white);
}

.produtos-hero__desc-html p,
.produtos-hero__desc-html li {
    font-size: var(--text-base);
    font-weight: var(--fw-light);
    color: var(--color-white);
    line-height: var(--line-loose);
    margin-bottom: var(--space-3);
}

.produtos-hero__desc-html p:last-child,
.produtos-hero__desc-html li:last-child {
    margin-bottom: 0;
}

.produtos-hero__desc-html ul {
    list-style: disc;
    padding-left: var(--space-5);
    margin-bottom: var(--space-3);
}

.produtos-hero__desc-html ol {
    list-style: decimal;
    padding-left: var(--space-5);
    margin-bottom: var(--space-3);
}

.produtos-hero__desc-html li::marker { color: var(--color-white); }

.produtos-hero__desc-html strong { font-weight: var(--fw-bold); }

.produtos-hero__desc-html a {
    color: var(--color-white);
    text-decoration: underline;
}


/* =========================================================
   Seção 3: Especificações
   ========================================================= */

.produtos-specs {
    background-color: #ffffff;
    padding-block: var(--space-10);
}

.produtos-specs__inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.produtos-specs__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: var(--space-3);
}

.produtos-specs__icon {
    width: 76px;
    height: 76px;
    flex-shrink: 0;
}

.produtos-specs__heading {
    font-size: 1.75rem;
    font-weight: var(--fw-bold);
    color: var(--color-primary);
    line-height: var(--line-tight);
    margin-bottom: 0;
}

.produtos-specs__list {
    list-style: disc;
    padding-left: 108px;
    margin: 0;
}

.produtos-specs__list li {
    font-size: var(--text-base);
    font-weight: var(--fw-light);
    color: #3b3b3b;
    line-height: var(--line-tight);
    margin-bottom: var(--space-2);
}

.produtos-specs__list li:last-child {
    margin-bottom: 0;
}

.produtos-specs__btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 245px;
    height: 32px;
    padding: 20px;
    background-color: var(--color-primary);
    color: var(--color-white);
    font-size: 0.75rem;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.05em;
    margin-top: var(--space-4);
    transition: background-color var(--transition-normal);
}

.produtos-specs__btn:hover {
    background-color: var(--color-accent);
}

/* Mobile: ocultar botões dentro das colunas de specs */
.produtos-specs__col .produtos-specs__btn {
    display: none;
}

/* Container de botões mobile — entre specs e busca */
.produtos-specs__btns-mobile {
    background-color: var(--color-white);
    padding-block: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    align-items: center;
}

/* =========================================================
   Seção 4: Grid de Produtos
   ========================================================= */

.produtos-grid-section {
    background-color: var(--color-white);
    padding-top: 31px;
    padding-bottom: var(--space-12);
}

.produtos-search {
    margin-bottom: var(--space-8);
}

.produtos-search__wrap {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 263px;
    height: 43px;
    background-color: #d9d9d9;
    padding: 0 var(--space-3) 0 var(--space-4);
    gap: var(--space-2);
}

.produtos-search__input {
    flex: 1;
    min-width: 0;
    background: none;
    border: none;
    outline: none;
    font-size: var(--text-base);
    color: var(--color-black);
}

.produtos-search__input::placeholder {
    color: #888;
}

.produtos-search__clear {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: #666;
    line-height: 0;
    flex-shrink: 0;
}

.produtos-search__clear:hover {
    color: var(--color-primary);
}

.produtos-search__btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-black);
    display: flex;
    align-items: center;
    padding: 0;
    line-height: 0;
    flex-shrink: 0;
}

.produtos-search__btn:hover {
    color: var(--color-primary);
}

.produtos-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
}

.produto-card {
    display: flex;
    flex-direction: column;
    background-color: #d9d9d9;
}

.produto-card__cover {
    width: 100%;
    aspect-ratio: 437 / 281;
    overflow: hidden;
    background-color: #c0c0c0;
}

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

.produto-card__footer {
    display: flex;
    align-items: center;
    padding: var(--space-2) var(--space-3);
    min-height: 35px;
}

.produto-card__label {
    font-size: 0.844rem;
    font-weight: var(--fw-bold);
    color: var(--color-primary);
    line-height: var(--line-tight);
}

/* =========================================================
   Breakpoints
   ========================================================= */

@media (min-width: 1024px) {

    .produtos-topo {
        height: 400px;
    }

    .produtos-hero {
        padding-top: 135px;
        padding-bottom: 135px;
    }

    .produtos-hero__inner {
        flex-direction: row;
        align-items: flex-start;
        gap: 16px;
    }

    .produtos-hero__left {
        flex: 0 0 373px;
    }

    .produtos-hero__right {
        flex: 1;
        max-width: 741px;
    }

    .produtos-hero__desc {
        font-size: 1.25rem;
    }

    .produtos-hero__desc-html p,
    .produtos-hero__desc-html li {
        font-size: 1.25rem;
    }

    /* Specs */
    .produtos-specs {
        padding-block: var(--space-16);
    }

    .produtos-specs__inner {
        flex-direction: row;
        align-items: stretch;
        justify-content: center;
        gap: 60px;
    }

    .produtos-specs__col {
        flex: 0 0 460px;
        display: flex;
        flex-direction: column;
        gap: var(--space-6);
    }

    /* Botões dentro das colunas: visíveis no desktop */
    .produtos-specs__col .produtos-specs__btn {
        display: inline-flex;
        margin-top: auto;
        align-self: flex-start;
    }

    .produtos-specs__col:first-child .produtos-specs__btn {
        align-self: flex-end;
    }

    /* Container mobile de botões: oculto no desktop */
    .produtos-specs__btns-mobile {
        display: none;
    }

    .produtos-specs {
        padding-bottom: var(--space-20);
    }

    .produtos-specs__list li {
        font-size: 1.125rem;
    }

    .produtos-specs__heading {
        font-size: 1.75rem;
    }

    /* Grid */
    .produtos-grid-section {
        padding-bottom: 90px;
    }

    .produtos-cards {
        grid-template-columns: repeat(3, 1fr);
        column-gap: 31px;
        row-gap: 78px;
    }

}

.produtos-categoria__logo-link {
    display: inline-block;
}

.produtos-categoria__logo {
    display: block;
    height: 27px;
    width: auto;
    margin-block: var(--space-8) var(--space-4);
    scroll-margin-top: calc(var(--header-height-mobile) + var(--space-4));
}

@media (min-width: 1024px) {
    .produtos-categoria__logo {
        scroll-margin-top: calc(var(--header-height-desktop) + var(--space-4));
    }
}

.produto-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.categoria-imagem {
    margin-top: var(--space-10);
    display: flex;
    justify-content: center;
}

.categoria-imagem img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* ================================================================
   Modal — Solicitar Catálogo Técnico
   ================================================================ */

button.produtos-specs__btn {
    cursor: pointer;
    border: none;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 900;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.is-visible {
    display: flex;
}

.modal-overlay.is-open {
    opacity: 1;
}

.modal {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: var(--space-8);
    max-width: 540px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-24px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal-overlay.is-open .modal {
    transform: translateY(0);
    opacity: 1;
}

.modal__close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: 1.5rem;
    line-height: 1;
    padding: 4px 8px;
    transition: color var(--transition-fast);
}

.modal__close:hover {
    color: var(--color-text-dark);
}

.modal__title {
    font-size: var(--text-lg);
    font-weight: var(--fw-bold);
    color: var(--color-primary);
    margin-bottom: var(--space-6);
    padding-right: var(--space-8);
}

.modal__form {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.modal__row {
    display: grid;
    gap: var(--space-3);
}

.modal__row--2 {
    grid-template-columns: 1fr 1fr;
}

.modal__row--3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.modal__row--center {
    justify-items: center;
}

.modal__field {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    color: var(--color-text-dark);
    background: var(--color-white);
    transition: border-color var(--transition-fast);
    box-sizing: border-box;
}

.modal__field:focus {
    outline: none;
    border-color: var(--color-primary);
}

.modal__field::placeholder {
    color: var(--color-text-muted);
}

.modal__textarea {
    resize: vertical;
    min-height: 80px;
}

.modal__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 40px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--fw-bold);
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background-color var(--transition-normal);
}

.modal__submit:hover {
    background-color: var(--color-accent);
}

.modal__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.modal__feedback {
    text-align: center;
    font-size: var(--text-sm);
    min-height: 1.2em;
    margin: 0;
}

.modal__feedback--ok  { color: #2a7d4f; }
.modal__feedback--err { color: #c0392b; }

@media (max-width: 479px) {
    .modal__row--2,
    .modal__row--3 {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: var(--space-6) var(--space-4);
    }
}
