:root {
    --bg-dark: #0b0e14;       
    --bg-card: #151922;       
    --bg-card-white: #ffffff; 
    --gsm-blue: #0A5282;      
    --gsm-red: #D61C23;       
    --text-light: #f0f3f6;    
    --text-muted: #8b949e;    
    --border-color: #21262d;  
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: '-apple-system', BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
}

/* Cabecera / Navbar Limpia y Centrada */
.main-header {
    background-color: rgba(11, 14, 20, 0.96);
    border-bottom: 2px solid var(--gsm-blue);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center; 
    align-items: center;
    padding: 18px 20px;
}

.nav-menu {
    display: flex;
    justify-content: center;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    margin: 0 18px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.nav-menu a:hover {
    color: var(--gsm-red);
}

/* Sección Portada (Hero) */
.hero {
    background: linear-gradient(rgba(11, 14, 20, 0.85), rgba(11, 14, 20, 0.95)), url('marcas/japan-racing-wheels.jpg') no-repeat center center/cover;
    min-height: 70vh; /* Un poco más de aire para el logo grande */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
    border-bottom: 2px solid var(--gsm-red);
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
}

/* LOGO XL ARRIBA: Ajustado para que sea tan largo como el texto GSMMOTORSPORT */
.hero-brand-logo-xl {
    width: 100%;
    max-width: 480px; /* Ajuste óptimo para equilibrar con las letras de abajo */
    height: auto;
    margin-bottom: 20px;
    object-fit: contain;
}

.hero-content h1 {
    font-size: 3.8rem;
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 15px;
    color: #fff;
    line-height: 1;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 650px;
    margin: 0 auto 30px auto;
    color: var(--text-muted);
}

/* Contenedores de Secciones */
.container-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.bg-alt {
    max-width: 100% !important;
    background-color: #11151d;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.bg-alt .products-grid {
    max-width: 1200px;
    margin: 30px auto 0 auto;
}

/* Títulos Globales */
.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2.2rem;
    text-transform: uppercase;
    font-weight: 700;
}

.red-line {
    width: 50px;
    height: 4px;
    background-color: var(--gsm-red);
    margin: 12px auto;
}

.section-title p {
    color: var(--text-muted);
}

/* Botones */
.btn-primary {
    display: inline-block;
    background-color: var(--gsm-blue);
    color: #fff;
    padding: 12px 32px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-bottom: 3px solid var(--gsm-red);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #0d639c;
    transform: translateY(-2px);
}

/* Grids */
.marcas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

/* Efecto Gris Dinámico y Zoom en Marcas */
.marca-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.3s;
}

.card-image-wrapper {
    background-color: var(--bg-card-white);
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 25px;
    overflow: hidden;
}

.gray-effect {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.4s ease, transform 0.4s ease, opacity 0.4s ease;
}

.marca-card:hover {
    transform: translateY(-5px);
    border-color: var(--gsm-blue);
}

.marca-card:hover .gray-effect {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.08);
}

.card-content {
    padding: 20px;
    flex-grow: 1;
}

.card-content h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Tarjetas de Productos Destacados */
.product-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-img-wrapper {
    background-color: var(--bg-card-white);
    height: 240px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.product-img-wrapper img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.product-info {
    padding: 15px;
    flex-grow: 1;
}

.product-info h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.product-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--gsm-red);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 3px;
    text-transform: uppercase;
    z-index: 10;
}

/* Zona Especialista Miata/Mazda */
.mx5-special {
    background: linear-gradient(rgba(10, 82, 130, 0.92), rgba(11, 14, 20, 0.97)), url('marcas/cybul.png') no-repeat center center/contain;
    border-top: 2px solid var(--gsm-blue);
    border-bottom: 2px solid var(--gsm-red);
    padding: 80px 20px;
}

.mx5-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.mx5-intro {
    font-size: 1.2rem;
    font-style: italic;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: #fff;
}

.mx5-detailed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: left;
    margin-top: 20px;
}

.mx5-block {
    background-color: rgba(11, 14, 20, 0.85);
    border: 1px solid rgba(10, 82, 130, 0.5);
    padding: 30px;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.mx5-block h3 {
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 12px;
    border-left: 3px solid var(--gsm-red);
    padding-left: 10px;
}

.mx5-block p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Formulario de Contacto (Logo Removido) */
.contact-section {
    background-color: #0d1117;
    padding: 80px 20px;
    border-top: 1px solid var(--border-color);
}

.contact-container {
    max-width: 650px;
    margin: 0 auto;
}

.contact-header {
    text-align: center;
    margin-bottom: 40px;
}

.contact-header h2 {
    font-size: 2rem;
    font-weight: 700;
}

.contact-form {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.form-group input, .form-group textarea {
    width: 100%;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 12px 16px;
    color: #fff;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--gsm-blue);
    box-shadow: 0 0 0 3px rgba(10, 82, 130, 0.2);
}

.btn-submit {
    width: 100%;
    background-color: var(--gsm-red);
    color: #fff;
    border: none;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.btn-submit:hover {
    background-color: #b51218;
    transform: translateY(-1px);
}

.alert-success {
    background-color: rgba(10, 82, 130, 0.2);
    border: 1px solid var(--gsm-blue);
    color: #fff;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 25px;
}

/* Bloque del Pie de Página y Redes Sociales */
.main-footer {
    background-color: #07090d;
    padding: 40px 20px 20px 20px;
    border-top: 1px solid var(--border-color);
}

.footer-socials {
    margin-bottom: 25px;
    text-align: center;
}

.socials-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 15px;
    font-weight: 700;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.social-item {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 16px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.social-item:hover {
    color: #fff;
    background-color: var(--gsm-blue);
    border-color: var(--gsm-blue);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    margin-top: 20px;
}

/* Ajustes para Dispositivos Móviles */
@media (max-width: 768px) {
    .nav-menu { flex-wrap: wrap; }
    .nav-menu a { margin: 8px 12px; font-size: 0.8rem; }
    .hero-brand-logo-xl { max-width: 85%; }
    .hero-content h1 { font-size: 2.5rem; }
    .contact-form { padding: 25px; }
}