.header img {
    width: 10rem;
}

.footer img {
    width: 10rem;
    -webkit-text-fill-color: white;
}

/* 
   Chemspace - Stylesheet Corrigida
   Design: Minimalista, Moderno e 100% Responsivo
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --primary: #1B9B8A;
    --primary-dark: #158070;
    --primary-light: #E8F5F2;
    --text: #2d3436;
    --text-muted: #636e72;
    --bg: #ffffff;
    --bg-alt: #f9f9f9;
    --white: #ffffff;
    --border: #edf2f7;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

.highlight {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.95rem;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 155, 138, 0.3);
}

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

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

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    height: 100px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-box {
    background: var(--primary);
    color: var(--white);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 700;
    flex-shrink: 0;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-desktop {
    display: none;
    gap: 1.8rem;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.nav-link:hover {
    color: var(--primary);
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
}

.nav-mobile {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.2rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    z-index: 999;
}

.nav-mobile.active {
    display: flex;
}

/* Hero Section */
.hero {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdfa 100%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-carousel {
    width: 100%;
    height: 100%;
    min-height: 300px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
    background: #eee; /* Cor de fundo para carregar */
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

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

/* Quality Section */
.quality {
    padding: 80px 0;
}

.quality-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.quality-item {
    padding: 2.5rem;
    background: var(--bg-alt);
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
}

.quality-item:hover {
    transform: translateY(-5px);
    background: var(--white);
    box-shadow: var(--shadow);
}

.quality-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

/* Category Cards */
.category-cards {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.cat-card {
    height: 280px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.cat-card H3 {
    color: white;
}

.cat-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.cat-card:hover img {
    transform: scale(1.1);
}

.cat-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    color: white;
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--bg-alt);
}

.about-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-text h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-weight: 600;
    color: var(--text-muted);
}

/* Products Page & Table */
.products {
    padding: 140px 0 100px;
}

.products-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.products-display H3 {
    color: #158070;
}



.products-sidebar h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.category-list {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
}

.category-btn {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    text-align: left;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

.category-select-mobile {
    width: 100%;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-family: inherit;
    font-weight: 600;
}

.table-container {
    display: none; /* Oculto por padrão no mobile */
    width: 100%;
    overflow-x: auto;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

@media (min-width: 992px) {
    .table-container {
        display: block; /* Mostra apenas no desktop */
    }
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.products-table th {
    background: var(--primary);
    color: white;
    text-align: left;
    padding: 1.2rem 1.5rem;
    font-weight: 600;
}

.products-table td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.products-table tr:last-child td {
    border-bottom: none;
}

.products-table tr:hover td {
    background: var(--primary-light);
}

/* Modals - CORREÇÃO DE VISIBILIDADE */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1.5rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 24px;
    padding: 3rem 2rem;
    position: relative;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg-alt);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.2rem;
    background: var(--bg-alt);
    border-radius: 16px;
    transition: var(--transition);
}

.contact-item:hover {
    background: var(--primary-light);
    transform: scale(1.02);
}

.contact-item .icon {
    font-size: 1.5rem;
}

/* Footer */
.footer {
    background: #111111;
    color: #ffffff;
    padding: 80px 0 40px;
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center; /* Centralizado no mobile */
    margin-bottom: 4rem;
}

.footer-info .logo {
    justify-content: center;
    margin-bottom: 1.5rem;
}

.footer-info p {
    color: #a0a0a0;
    max-width: 300px;
    margin: 0 auto;
}

.footer h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.footer-links, .footer-contact, .footer-social {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a, .footer-contact p, .footer-social a {
    color: #a0a0a0;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.social-icons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.social-icons a {
    background: #222;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.8rem;
    border: 1px solid #333;
}

.social-icons a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2.5rem;
    border-top: 1px solid #222;
    font-size: 0.85rem;
    color: #666;
    letter-spacing: 0.5px;
}

@media (min-width: 992px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1.5fr 1fr;
        text-align: left; /* Alinhado à esquerda no desktop */
    }
    
    .footer-info .logo {
        justify-content: flex-start;
    }
    
    .footer-info p {
        margin: 0;
    }
    
    .social-icons {
        justify-content: flex-start;
    }
}

/* Responsive Queries */
@media (min-width: 768px) {
    .hero-text h1 { font-size: 3.5rem; }
    .hero-actions { flex-direction: row; }
    .quality-grid { grid-template-columns: repeat(3, 1fr); }
    .about-container { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
    .nav-desktop { display: flex; }
    .menu-toggle { display: none; }
    .hero-container { grid-template-columns: 1fr 1fr; }
    .category-list { display: flex; }
    .category-select-mobile { display: none; }
    .products-layout { grid-template-columns: 280px 1fr; }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* Animations */
section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Correção para Cards de Produtos Mobile */
.product-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.product-card h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.products-cards-mobile {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

@media (min-width: 992px) {
    .products-cards-mobile {
        display: none;
    }
}

.product-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    width: 100%;
}

/* Carousel Navigation & Indicators */
.carousel-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-indicator.active {
    background: var(--primary);
    width: 30px;
    border-radius: 10px;
}

