/* ==========================================================================
   PALETA ESTILO REAL FASTCARS: FONDO BLANCO, AZUL CORPORATIVO Y ACENTOS AMARILLOS
   ========================================================================== */
:root {
    --bg-blanco: #ffffff;
    --bg-gris-claro: #f8fafc;
    --azul-oscuro: #0731ca;
    --azul-medio: #052665;
    --amarillo-marca: #fdfa3d;
    --amarillo-hover: #fdfa3d;
    --texto-cuerpo: #334155;
    --rojo-borrar: #ef4444;
    --verde-exito: #22c55e;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-blanco);
    color: var(--texto-cuerpo);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    scroll-behavior: smooth;
}

.container {
    width: 92%;
    max-width: 1300px;
    margin: 0 auto;
}

/* ==========================================================================
   1. HEADER (EN UNA SOLA LÍNEA)
   ========================================================================== */
.main-header {
    background-color: var(--bg-blanco);
    padding: 20px 4%;
    border-bottom: 4px solid #e2e8f0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.logo a {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--azul-oscuro);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--azul-medio);
}

.logo-ppl img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-search-block {
    flex: 1;
    max-width: 750px;
    display: flex;
    align-items: center;
    background: var(--bg-gris-claro);
    border: 2px solid var(--azul-medio);
    border-radius: 6px;
    overflow: hidden;
}

.brand-select {
    background: #ffffff;
    border: none;
    border-right: 2px solid #e2e8f0;
    padding: 12px 15px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--azul-oscuro);
    outline: none;
    cursor: pointer;
}

.search-wrapper {
    flex: 1;
    display: flex;
}

.search-box {
    width: 100%;
    padding: 12px 20px;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    color: var(--azul-oscuro);
}

.search-btn {
    background-color: var(--amarillo-marca);
    border: none;
    padding: 0 22px;
    color: var(--azul-oscuro);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background-color: var(--amarillo-hover);
}

/* ==========================================================================
   2. CINTA INFORMATIVA Y BANNER AVISOS
   ========================================================================== */
.ticker-ribbon {
    background-color: var(--bg-gris-claro);
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 0;
    overflow: hidden;
}

.ticker-wrap {
    width: 100%;
    overflow: hidden;
    display: flex;
}

.ticker-content {
    display: flex;
    white-space: nowrap;
    animation: tickerAnimation 25s linear infinite;
    gap: 50px;
}

.ticker-content span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--azul-medio);
    display: flex;
    align-items: center;
}

.banner-avisos {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(135deg, var(--azul-oscuro), #0470f5);
    color: white;
    padding: 12px 10px;
    font-size: 0.9em;
    font-weight: 500;
    margin-top: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.anuncio-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.anuncio-item strong {
    background-color: #fdfa3d;
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

@keyframes tickerAnimation {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* ==========================================================================
   3. MENÚ PRINCIPAL
   ========================================================================== */
.main-menu {
    background-color: var(--azul-oscuro);
    border-bottom: 4px solid var(--amarillo-marca);
    position: relative;
}

.menu-links {
    display: flex;
    list-style: none;
    gap: 45px;
    flex-wrap: wrap;
    justify-content: center;
}

.menu-links li a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    padding: 14px 20px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.menu-links li a:hover,
.menu-links li a.active {
    background-color: var(--amarillo-marca);
    color: var(--azul-oscuro);
    font-weight: 700;
    border-radius: 6px;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--azul-oscuro);
    padding: 10px;
}

/* ==========================================================================
   4. ZONA HERO
   ========================================================================== */
.hero-section {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 50px 0;
    border-bottom: 1px solid #e2e8f0;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-text-block {
    flex: 1;
    max-width: 550px;
}

.hero-tag {
    color: var(--azul-medio);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 8px;
}

.hero-text-block h1 {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--azul-oscuro);
    margin-bottom: 15px;
}

.hero-text-block p {
    font-size: 1.05rem;
    color: var(--texto-cuerpo);
    margin-bottom: 25px;
}

.btn-cotizar {
    display: inline-block;
    padding: 12px 28px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    background-color: var(--verde-exito);
    color: #ffffff;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.2);
}

.btn-cotizar:hover {
    background-color: #0aee3b;
    transform: translateY(-2px);
}

.hero-slider-block {
    flex: 1;
    max-width: 580px;
    height: 330px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.slide.active {
    opacity: 1;
    position: relative;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   5. GRID DE PRODUCTOS
   ========================================================================== */
.catalog-main {
    padding: 50px 0;
}

.grid-productos {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.producto-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    min-height: 400px;
    position: relative;
}

.producto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 22px rgba(0,0,0,0.08);
    border-color: var(--azul-medio);
}

.producto-imagen-wrap {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--bg-gris-claro);
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.producto-imagen-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    background-color: white;
}

.producto-card:hover .producto-imagen-wrap img {
    transform: scale(1.04);
}

.producto-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.producto-marca-tag {
    background: #eff6ff;
    color: var(--azul-medio);
    font-size: 15px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 4px;
    align-self: flex-start;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.producto-titulo {
    font-size: 14px;
    font-weight: 500;
    color: var(--azul-oscuro);
    line-height: 1.3;
    margin: 15px 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.6rem;
}

.producto-compatibilidad {
    font-size: 11px;
    color: #475569;
    background: var(--bg-gris-claro);
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.producto-meta {
    font-size: 11px;
    color: #64748b;
    margin: 4px;
    display: block;
}

.producto-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px dashed #e2e8f0;
    padding-top: 8px;
    margin-top: auto;
}

.producto-precio {
    font-size: 17px;
    font-weight: 800;
    color: var(--azul-oscuro);
}

.btn-comprar-whatsapp {
    background-color: var(--amarillo-marca);
    color: var(--azul-oscuro);
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    text-align: center;
    font-size: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s ease;
}

.btn-comprar-whatsapp:hover {
    background-color: var(--amarillo-hover);
}

/* ==========================================================================
   6. CARRUSEL MAS VENDIDOS
   ========================================================================== */
.ticker-productos-wrap {
    display: flex;
    overflow: hidden;
    width: 100%;
    height: 400px;
    align-items: center;
    background: #f8fafc;
}

#grid-mas-vendidos {
    display: flex;
    gap: 20px;
    animation: tickerAnimation 40s linear infinite;
    width: max-content;
}

#grid-mas-vendidos:hover { animation-play-state: paused; }

.producto-card-carrusel {
    min-width: 200px !important;
    width: 200px !important;
    height: 250px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}
/* ==========================================================================
   7. SECCIONES INFORMATIVAS ADICIONALES
   ========================================================================== */
.info-blocks-section { 
    background-color: var(--bg-gris-claro); 
    padding: 50px 0; 
    border-top: 1px solid #e2e8f0; 
}

.info-grid { 
    display: flex; 
    gap: 30px; 
    justify-content: space-between; 
    flex-wrap: wrap; 
}

.info-card { 
    flex: 1; 
    min-width: 280px; 
    background: #ffffff; 
    padding: 30px; 
    border-radius: 6px; 
    border-top: 4px solid var(--azul-medio); 
    box-shadow: 0 4px 6px rgba(0,0,0,0.02); 
}

.info-card h3 { 
    color: var(--azul-oscuro); 
    margin-bottom: 12px; 
    font-size: 1.2rem; 
}

.info-card p { 
    font-size: 0.95rem; 
    line-height: 1.6; 
    color: var(--texto-cuerpo); 
}


/* ==========================================================================
   7. PAGINACIÓN Y FOOTER
   ========================================================================== */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
}

.btn-page {
    background: var(--azul-medio);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}

footer {
    background: linear-gradient(135deg, var(--azul-oscuro), #030f1e);
    color: white;
    padding: 45px 20px 25px;
    text-align: center;
    border-top: 5px solid var(--amarillo-marca);
}

.footer-content { max-width: 900px; margin: 0 auto; }
.footer-grid-info { display: flex; justify-content: center; flex-wrap: wrap; gap: 40px; margin-bottom: 30px; }
.tag { background: rgba(255, 255, 255, 0.05); padding: 6px 14px; border-radius: 4px; font-size: 12px; font-weight: 700; border: 1px solid rgba(255, 255, 255, 0.1); }

/* ==========================================================================
   8. MEDIA QUERIES (RESPONSIVO)
   ========================================================================== */
@media (max-width: 1100px) {
    .grid-productos { grid-template-columns: repeat(3, 1fr); gap: 15px; }
}

@media (max-width: 768px) {
    /* CORRECCIÓN: Header en fila para logo y menú toggle */
    .header-container { 
        display: flex; 
        flex-wrap: wrap; 
        gap: 15px; 
    }
    
    .logo, .logo-ppl { 
        order: 1; 
    }
    
    .menu-toggle { 
        order: 2; 
        display: block; 
    }

    .header-search-block { 
        order: 3; 
        width: 100%; 
        flex-direction: column; 
    }
    
    .brand-select { width: 100%; border-right: none; border-bottom: 1px solid #e2e8f0; }
    
    .hero-container { flex-direction: column; gap: 30px; }
    .hero-slider-block { width: 100%; height: 240px; }
    .info-grid { flex-direction: column; }
    .grid-productos { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .banner-avisos { flex-direction: column; gap: 10px; text-align: center; }

    /* Menú Hamburguesa Móvil */
    .menu-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--azul-oscuro);
        padding-bottom: 10px;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
    }
    .menu-links.active {
        display: flex !important;
    }
    .menu-links li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 480px) {
    .grid-productos { grid-template-columns: 1fr; gap: 15px; }
}