/*
Theme Name: Chagas Theme
Theme URI: https://chagas.pt
Author: Chagas
Author URI: https://chagas.pt
Description: Tema personalizado para Florêncio Augusto Chagas, S.A. - Armazéns de Ferro, Máquinas e Ferramentas
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chagas-theme
Tags: custom-menu, custom-logo, featured-images, full-width-template
*/

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   VARIÁVEIS CSS
   ============================================ */
:root {
    --primary-color: #ffd700;
    --primary-dark: #ffd700;
    --secondary-color: #333333;
    --text-color: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray-medium: #e0e0e0;
    --transition: all 0.3s ease;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 20px rgba(0,0,0,0.15);
}

/* ============================================
   TIPOGRAFIA
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

/* ============================================
   HEADER & NAVEGAÇÃO
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: var(--shadow);
    height: 120px;
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 3rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.header-left {
    flex-shrink: 0;
}

.site-logo img, .site-logo .custom-logo {
    height: 80px;
    width: auto;
    display: block;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.header-top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 5px;
}

.header-contactos-link {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #009640;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.header-contactos-link:hover,
.header-contactos-link:focus {
    color: #007a33;
    text-decoration: underline;
}

.header-search-form {
    display: flex;
    align-items: center;
    background: #e0e0e0;
    height: 35px;
}

.header-search-form .search-field {
    border: none;
    background: transparent;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: 200px;
    color: #666;
    outline: none;
}

.header-search-form .search-submit {
    background: #333;
    border: none;
    color: #fff;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.header-search-form .search-submit:hover {
    background: var(--primary-color);
}

/* Navegação Principal */
.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 0;
}

.main-navigation a:hover {
    color: #555; /* hover sutil */
}

.main-navigation .current-menu-item a {
    color: #555;
    /* destaque com underline amarelo de 5px na página ativa */
    border-bottom: 5px solid #ff0;
    padding-bottom: 0.2rem; /* espaço para o underline não encostar no texto */
}

/* Mobile Search - Hidden by default */
.mobile-search-container {
    display: none;
}

/* Menu Toggle (Hamburger) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    margin-left: 1rem;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 2px;
    transition: all 0.3s linear;
}

/* ============================================
   HERO SLIDER - PÁGINA INICIAL
   ============================================ */
.hero-slider {
    position: relative;
    height: calc(100vh - 120px);
    margin-top: 0;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-slide .slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-slide .slide-overlay {
    /* Overlay geral removido ou suavizado, pois teremos box no centro */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.1); 
    z-index: 2;
}

.hero-slide .slide-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--white);
    padding: 3rem;
    max-width: 600px;
    background: rgba(0, 0, 0, 0.65); /* Box escuro semi-transparente */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 0; /* Box quadrado */
}

.hero-slide .slide-title {
    font-size: 3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    color: #fff;
    line-height: 1.1;
}

.hero-slide .slide-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    line-height: 1.3;
    color: #fff;
}

.hero-slide .btn-saiba-mais {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.5rem;
    background: transparent;
    color: var(--white);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--white);
    transition: var(--transition);
    min-width: 160px;
    font-size: 0.9rem;
}

.hero-slide .btn-saiba-mais::after {
    content: '';
    display:  inline-block;
    width: 8px;
    height: 8px;
    border-right: 1px solid #fff;
    border-bottom: 1px solid #fff;
    transform: rotate(45deg);
    margin-left: 10px;
    margin-bottom: 2px;
}

.hero-slide .btn-saiba-mais:hover {
    background: var(--white);
    color: var(--text-color);
}

.hero-slide .btn-saiba-mais:hover::after {
    border-color: var(--text-color);
}

/* Navegação do Slider */
.slider-nav {
    /* Remover dots se não estiverem no design, mas manter funcionalidade */
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 1rem;
    display: none; /* Escondendo dots conforme imagem */
}

/* Setas do Slider */
.slider-arrows {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 4rem;
    pointer-events: none;
}

.slider-arrow {
    width: 60px;
    height: 60px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    pointer-events: auto;
}

.slider-arrow svg {
    width: 40px;
    height: 60px;
    fill: none;
    stroke: var(--white);
    stroke-width: 2px;
}
/* Recriar setas para serem apenas chevron fino */
.slider-arrow svg path {
    /* SVG precisa ser ajustado no HTML se não for apenas stroke */
}

/* Ajuste das setas para parecerem com a imagem ("<" grande e fino) */
.slider-arrow-prev::before {
    content: '';
    width: 30px;
    height: 30px;
    border-top: 3px solid #fff;
    border-left: 3px solid #fff;
    transform: rotate(-45deg);
}

.slider-arrow-next::before {
    content: '';
    width: 30px;
    height: 30px;
    border-top: 3px solid #fff;
    border-right: 3px solid #fff;
    transform: rotate(45deg);
}

.slider-arrow svg { display: none; } /* Ocultar o SVG antigo */


/* ============================================
   PÁGINA HISTÓRIA
   ============================================ */
.page-historia {
    padding-top: 0;
}

.historia-hero {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.historia-content {
    padding: 5rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.historia-content .section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 2rem;
    text-align: center;
}

.historia-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.historia-text p {
    color: var(--text-light);
    line-height: 1.8;
    text-align: justify;
}

/* Lojas / Localizações */
.lojas-section {
    background: var(--gray-light);
    padding: 5rem 3rem;
}

.lojas-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.loja-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.loja-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.loja-card h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.loja-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.loja-card .telefone {
    margin-top: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

/* ============================================
   PÁGINA MÁQUINAS E FERRAMENTAS
   ============================================ */
.page-maquinas {
    padding-top: 0;
}

.maquinas-hero {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.maquinas-intro {
    padding: 3rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.maquinas-intro p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* Grid de Categorias */
.categorias-section {
    padding: 4rem 3rem;
}

.categorias-section .section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 3rem;
}

.categorias-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.categoria-card {
    background: var(--white);
    padding: 2rem 1rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.categoria-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.categoria-card .icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.categoria-card .icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.categoria-card h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.categoria-card .btn-catalogos {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background: var(--primary-color);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: var(--transition);
}

.categoria-card:hover .btn-catalogos {
    background: var(--primary-dark);
}

/* ============================================
   PÁGINA CATÁLOGOS FORNECEDORES
   ============================================ */
.page-catalogos {
    padding-top: 0;
    min-height: 100vh;
    background-color: #f8f8f8;
}

.catalogos-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.catalogos-hero {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* ============================================
   PÁGINA PRODUTOS SIDERÚRGICOS
   ============================================ */
.page-siderurgicos {
    padding-top: 0;
    min-height: 100vh;
    background-color: #f8f8f8;
}

.siderurgicos-hero {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.siderurgicos-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.siderurgicos-intro {
    padding: 3rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.siderurgicos-intro p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* Manuais Técnicos */
.manuais-section {
    padding: 4rem 3rem;
    background: transparent;
}

.manuais-section .section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 3rem;
}

.manuais-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.manual-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.manual-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.manual-card .manual-number {
    background: var(--primary-color);
    color: var(--white);
    font-size: 2rem;
    font-weight: 700;
    padding: 1.5rem;
    text-align: center;
}

.manual-card .manual-content {
    padding: 1.5rem;
}

.manual-card h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.manual-card ul {
    margin-bottom: 1rem;
}

.manual-card ul li {
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 0.25rem 0;
    padding-left: 1rem;
    position: relative;
}

.manual-card ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.manual-card .btn-download {
    display: block;
    text-align: center;
    padding: 0.75rem;
    background: var(--gray-light);
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.manual-card:hover .btn-download {
    background: var(--primary-color);
    color: var(--white);
}

/* Nota Legal */
.nota-legal {
    padding: 2rem 3rem;
    background: var(--secondary-color);
    color: var(--white);
    text-align: center;
}

.nota-legal p {
    font-size: 0.85rem;
    opacity: 0.8;
    max-width: 900px;
    margin: 0 auto;
}

/* ============================================
   PÁGINA PROMOÇÕES
   ============================================ */
.page-promocoes {
    padding-top: 0;
}

.promocoes-hero {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.promocoes-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    padding: 4rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.promocao-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.promocao-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.promocao-card .badge-promocao {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
}

.promocao-card .produto-imagem {
    position: relative;
    height: 200px;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.promocao-card .produto-imagem img {
    max-height: 80%;
    max-width: 80%;
    object-fit: contain;
}

.promocao-card .produto-info {
    padding: 1.5rem;
}

.promocao-card .produto-nome {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.promocao-card .produto-ref {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.promocao-card .produto-preco {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.promocao-card .produto-preco span {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-light);
    display: block;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--white);
    padding: 0;
    color: var(--text-color);
}

.location-details {
  /* min-height removido para aproveitar melhor o espaço */
}

.location-postal {
  /* min-height removido */
}

.footer-top-bar {
    height: 2px;
    width: 100%;
    /* Use the texture image provided by user */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Yellow fallback */
    background-color: #187741;
}

.footer-content-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 3rem 2.5rem;
}

.footer-branding {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1.5rem;
}

.footer-contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.65rem 1.1rem;
    border: 2px solid #009640;
    border-radius: 6px;
    color: #009640;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.footer-contact-link:hover,
.footer-contact-link:focus {
    background-color: #009640;
    color: #fff;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: #009640; /* Chagas Green */
    border-radius: 8px; /* Slightly rounded corners */
    transition: background 0.3s ease;
}

.social-icon:hover {
    background-color: #007a33;
}

.social-icon svg {
    width: 28px;
    height: 28px;
}

/* Footer Locations grid (7 colunas) */
.footer-locations {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1.5rem 2rem;
    align-items: stretch;
    font-size: 0.78rem;
}

.footer-location-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.footer-location-item h5 {
    color: #009640;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.15;
    margin: 0 0 0.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ccc;
}

.footer-location-item h5 a {
    color: #009640;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-location-item h5 a:hover,
.footer-location-item h5 a:focus {
    color: #007a33;
    text-decoration: underline;
}

/* Morada cresce para preencher o espaço disponível,
   empurrando código postal e telefone sempre para baixo */
.footer-location-item .location-details {
    flex: 1;
}

.footer-location-item .location-details p,
.footer-location-item .location-maps-link {
    margin: 0;
    line-height: 1.5;
    color: #1c1c1c;
    font-weight: 400;
    display: block;
    text-decoration: none;
}

.footer-location-item .location-maps-link:hover,
.footer-location-item .location-maps-link:focus {
    color: #009640;
    text-decoration: underline;
}

.footer-location-item .location-postal {
    margin-top: 0.9rem;
}

.footer-location-item .location-postal p {
    margin: 0;
    line-height: 1.5;
    color: #1c1c1c;
    font-weight: 400;
}

.footer-location-item .location-phone {
    margin-top: 0.9rem;
}

.footer-location-item .location-phone p {
    margin: 0;
    line-height: 1.5;
    color: #1c1c1c;
    font-weight: 400;
}

.footer-bottom-bar {
    background-color: #000;
    height: 30px;
    width: 100%;
}

/* Responsividade do Footer */
@media (max-width: 1200px) {
    .footer-locations {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem 2.5rem;
    }
}

@media (max-width: 900px) {
    .footer-locations {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem 2.5rem;
    }
}

@media (max-width: 768px) {
    .footer-content-container {
        padding: 1.75rem 1.25rem 2rem;
    }

    .footer-branding {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-contact-link {
        width: 100%;
        max-width: 260px;
    }
}

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

/* ============================================
   BOTÕES COMUNS
   ============================================ */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (max-width: 1200px) {
    .categorias-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .lojas-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .manuais-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .promocoes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-lojas {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    .hero-slide .slide-title {
        font-size: 3rem;
        letter-spacing: 4px;
    }
    
    .historia-hero .hero-title,
    .maquinas-hero .hero-title,
    .siderurgicos-hero .hero-title {
        font-size: 2.5rem;
    }
    
    .categorias-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .historia-text {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Hide desktop search */
    .header-top {
        display: none !important;
    }

    /* Show mobile search */
    .mobile-search-container {
        display: block;
        width: 100%;
        margin-bottom: 2rem;
    }
    
    .mobile-search-container .header-search-form {
        width: 100%;
        height: 45px;
        background: #f5f5f5;
    }
    
    .mobile-search-container .header-search-form .search-field {
        width: 100%;
        font-size: 1rem;
        padding-left: 1.5rem;
    }
    
    .mobile-search-container .header-search-form .search-submit {
        width: 45px;
        height: 45px;
    }

    /* Center remaining header right content (menu toggle) */
    .header-right {
        justify-content: center;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .site-header {
        height: 80px;
    }

    .site-logo img, .site-logo .custom-logo {
        height: 50px;
    }

    .header-container {
        padding: 0 1.5rem;
    }
    
    .main-navigation {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--white);
        padding: 2rem;
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        box-shadow: none;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        height: calc(100vh - 80px);
        border-top: 1px solid #eee;
    }
    
    .main-navigation.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
        text-align: center;
    }

    .main-navigation ul li {
        width: 100%;
        border-bottom: 1px solid #f5f5f5;
        padding-bottom: 1rem;
    }

    .main-navigation ul li:last-child {
        border-bottom: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero-slider {
        margin-top: 80px;
        height: calc(100vh - 80px);
    }

    .page-historia {
        padding-top: 80px;
    }

    .hero-slide .slide-title {
        font-size: 2rem;
        letter-spacing: 3px;
    }
    
    .hero-slide .slide-subtitle {
        font-size: 1.1rem;
    }
    
    .categorias-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .lojas-grid {
        grid-template-columns: 1fr;
    }
    
    .manuais-grid {
        grid-template-columns: 1fr;
    }
    
    .promocoes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-lojas {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links a {
        margin: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero-slide .slide-title {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
    
    .categorias-grid,
    .promocoes-grid {
        grid-template-columns: 1fr;
    }
    
    .categoria-card {
        padding: 1.5rem;
    }
}

/* Responsive adjustments for Boxed Heroes */
@media (max-width: 900px) {
    .historia-hero,
    .maquinas-hero,
    .siderurgicos-hero {
        height: 500px;
        align-items: flex-end;
    }

    .historia-hero .hero-content,
    .maquinas-hero .hero-content,
    .siderurgicos-hero .hero-content {
        position: relative;
        left: 0;
        top: auto;
        bottom: 0;
        transform: none;
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        padding: 2rem;
    }
}
