:root {
    --primary: #1a1a1a;
    --accent: #e63946; 
    --bg-page: #f4f4f4;
    --white: #ffffff;
    --text-main: #333333;
    --border-color: #dddddd;
}

/* Modo Dark - Variáveis Reescritas */
body.dark-theme {
    --bg-page: #121212;
    --white: #1e1e1e;
    --text-main: #e0e0e0;
    --primary: #000000;
    --border-color: #444444;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; transition: background 0.3s, color 0.3s; }

body { background-color: var(--bg-page); color: var(--text-main); line-height: 1.6; }

/* Cabeçalho */
header { background: var(--primary); padding: 1rem 5%; display: flex; justify-content: space-between; align-items: center; color: white; position: sticky; top: 0; z-index: 1000; }
.logo { font-size: 1.5rem; font-weight: bold; color: var(--accent); text-decoration: none; }
nav ul { display: flex; list-style: none; gap: 20px; align-items: center; }
nav a { color: white; text-decoration: none; font-size: 0.9rem; transition: 0.3s; }
nav a:hover { color: var(--accent); }

.container { 
    max-width: 1000px; 
    margin: 10px auto; /* Reduzi de 30px para 10px para aproximar mais */
    padding: 0 20px; 
    min-height: auto; /* MUDANÇA AQUI: de 70vh para auto */
    text-align: center; 
}
/* --- CARROSSEL  --- */
.carousel-container { 
    width: 350px;           
    height: 600px;        
    position: relative; 
    overflow: hidden; 
    border-radius: 15px; 
    margin: 20px auto;      
    border: none;           
    background: transparent; 
}

.carousel-track { 
    display: flex; 
    transition: transform 1.0s ease-in-out; 
    height: 100%; 
}

.carousel-item { 
    min-width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

/* Ajuste para telas pequenas */
@media (max-width: 400px) {
    .carousel-container {
        width: 100%;       
        height: auto;
        aspect-ratio: 9 / 16; 
    }
}

/* Tabelas */
.table-wrapper { background: var(--white); padding: 20px; border-radius: 10px; box-shadow: 0 4px 15px #e63946; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { background: var(--primary); color: white; padding: 12px; text-align: center; }
td { padding: 12px; border-bottom: 1px solid var(--border-color); color: var(--text-main); }
tr:hover { background: rgba(0,0,0,0.02); }

.galeria-conquistas {
    display: flex;         /* Ativa o modo flexível */
    flex-wrap: wrap;       /* Se não couber na linha, pula para a de baixo */
    gap: 20px;            /* Espaço entre as imagens */
    justify-content: center; /* Centraliza as imagens */
}

.galeria-conquistas img {
    width: 100%;           /* Largura total em telas pequenas (celular) */
    max-width: 450px;      /* Tamanho máximo para não estourar em telas grandes */
    height: auto;          /* Mantém a proporção */
    border-radius: 10px;   /* Cantos arredondados (estético) */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Sombra leve */
}

/* Calculadora */
.calc-container {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    border-left: 5px solid var(--accent);
    text-align: left;
}
.calc-inputs { display: flex; gap: 15px; margin-top: 15px; flex-wrap: wrap; }
.calc-inputs input {
    flex: 1;
    min-width: 150px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-page);
    color: var(--text-main);
    outline: none;
}
.calc-inputs input:focus { border-color: var(--accent); }

.btn-calc {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}
.btn-calc:hover { background: #c0392b; transform: scale(1.02); }

#resultadoPace {
    margin-top: 20px;
    font-size: 1.1rem;
    padding: 15px;
    border-radius: 8px;
    display: none;
    background: rgba(230, 57, 70, 0.1);
    color: var(--accent);
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Grid de Tênis */
.shoes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.shoe-card { background: var(--white); border-radius: 10px; padding: 15px; text-align: center; box-shadow: 0 4px 10px #e63946; color: var(--text-main); }
.shoe-card img { width: 100%; height: 200px; object-fit: contain; margin-bottom: 10px; background: white; border-radius: 5px; }

/* Rodapé */
footer { background: var(--primary); color: white; padding: 30px; text-align: center; margin-top: 50px; }
.footer-icons { display: flex; justify-content: center; gap: 25px; margin: 15px 0; }
.footer-icons img { width: 30px; height: 30px; filter: brightness(0) invert(1); transition: 0.3s; }
.footer-icons img:hover { transform: scale(1.2); filter: none; }
.btn-back { display: inline-block; margin-top: 15px; padding: 8px 20px; background: var(--accent); color: white; text-decoration: none; border-radius: 5px; font-size: 0.8rem; }

/* Responsividade */
@media (max-width: 768px) { 
    .carousel-container { height: 350px; } 
    nav ul { gap: 10px; }
    header { flex-direction: column; gap: 15px; text-align: center; }
}
