/* ============================================================
   YAMAHA RENOSTO — Hoja de estilos compartida (header, footer,
   barra superior, botones comunes y home). Cada página interna
   (productos / service / accesorios) conserva además su propio
   <style> con las reglas específicas que ya tenías.
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    color: #1e2b37;
    background: #ffffff;
    line-height: 1.5;
    /* Compensa el header fijo. El valor exacto lo corrige site.js apenas
       carga la página (ver syncHeaderHeight), esto es solo el respaldo
       para el primer instante antes de que corra el JS. */
    padding-top: 140px;
}

a {
    color: inherit;
}

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

/* --- ENVOLTORIO FIJO (top-bar + header pegados arriba) --- */
.header-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background-color: #000000;
}

/* --- BARRA SUPERIOR (horarios) --- */
.top-bar {
    padding: 15px 0 10px 0;
    text-align: center;
}

.top-bar-inner span {
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Horario: una línea en escritorio, dos renglones (sin "y" entre
   semana/sábados) en mobile, para que ocupe menos alto en el header. */
.horario-mobile {
    display: none;
}

@media (max-width: 850px) {
    .horario-desktop {
        display: none;
    }
    .horario-mobile {
        display: inline;
    }
}

.top-bar-inner i.fa-clock {
    display: none;
}

.top-bar-social {
    display: none;
}

/* --- HEADER / NAV --- */
.site-header {
    padding: 10px 0 25px 0;
}

.site-header-inner {
    max-width: none;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 3.5rem;
}

.site-logo img {
    max-height: 55px;
    object-fit: contain;
}

.site-nav {
    display: flex;
    gap: 40px;
    align-items: center;
}

.site-nav a {
    color: #ff0000;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding-bottom: 4px;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.site-nav a.active {
    color: #ffffff;
    border-bottom: 2px solid #ffffff;
}

.site-nav a:hover {
    color: #ffffff;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

@media (max-width: 850px) {
    /* Al scrollear en mobile, la barra de horarios se pliega para que
       el header ocupe menos pantalla mientras se navega (el logo y el
       menú ☰ quedan igual, siempre accesibles). */
    .top-bar {
        overflow: hidden;
        max-height: 60px;
        opacity: 1;
        transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.25s ease;
    }

    .header-wrapper.header-compacto .top-bar {
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        opacity: 0;
    }

    .site-header {
        transition: padding-top 0.3s ease;
    }

    .header-wrapper.header-compacto .site-header {
        padding-top: 18px;
    }

    .site-logo img {
        transition: max-height 0.3s ease;
    }

    .header-wrapper.header-compacto .site-logo img {
        max-height: 42px;
    }

    .site-header-inner {
        flex-direction: column;
        gap: 20px;
        position: relative;
    }

    /* Panel desplegable: oculto por defecto, se abre con .open
       (lo agrega/saca site.js al tocar el botón hamburguesa). */
    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #000000;
        flex-direction: column;
        gap: 0;
        border-top: 1px solid rgba(255,255,255,0.15);
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav a {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        width: 100%;
        box-sizing: border-box;
    }

    .nav-toggle {
        display: block;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        transition: top 0.3s ease;
    }
}

/* --- FOOTER --- */
.site-footer {
    background: #000000;
    color: #cbd5e1;
    margin-top: 0;
}

.site-footer-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 2rem;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2.5rem;
}

.footer-logo {
    height: 56px;
    margin-bottom: 1rem;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.1rem;
}

.footer-col p {
    font-size: 0.9rem;
    font-weight: 300;
    margin-bottom: 0.7rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.footer-col p i {
    color: #d32f2f;
    margin-top: 3px;
}

.footer-col a {
    text-decoration: none;
    color: #cbd5e1;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: #ffffff;
}

.footer-brand p {
    font-weight: 300;
    font-size: 0.9rem;
    max-width: 320px;
}

.footer-social {
    display: flex;
    gap: 0.8rem;
}

.footer-social a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.25s ease;
}

.footer-social a:hover {
    background: #d32f2f;
    color: #fff;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    padding: 1.2rem 1.5rem;
    font-size: 0.8rem;
    font-weight: 300;
    color: #8fa0b3;
}

/* --- BOTONES FLOTANTES (WhatsApp + volver arriba) --- */
.float-whatsapp {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25D366;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
    z-index: 998;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.float-whatsapp:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}

.float-top {
    position: fixed;
    right: 24px;
    bottom: 94px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #111111;
    color: #ffffff;
    border: 2px solid #d32f2f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.35s ease, transform 0.3s ease, background 0.25s ease, border-color 0.25s ease;
}

.float-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.float-top:hover {
    background: #d32f2f;
    border-color: #ffffff;
    transform: translateY(-4px) scale(1.08);
}

@media (max-width: 600px) {
    .float-whatsapp {
        right: 16px;
        bottom: 16px;
        width: 52px;
        height: 52px;
        font-size: 1.6rem;
    }
    .float-top {
        right: 16px;
        bottom: 80px;
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
}

@media (max-width: 900px) {
    .site-footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .site-footer-inner {
        grid-template-columns: 1fr;
        padding: 2.5rem 1.5rem 1.5rem;
    }
}

/* --- BOTONES CTA REUTILIZABLES --- */
.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 0.9rem 2.2rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid transparent;
}

.btn-cta-primary {
    background: #d32f2f;
    color: #fff;
    border-color: #d32f2f;
}

.btn-cta-primary:hover {
    background: transparent;
    color: #d32f2f;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -8px rgba(211, 47, 47, 0.4);
}

.btn-cta-secondary {
    background: transparent;
    color: #1e2b37;
    border-color: #1e2b37;
}

.btn-cta-secondary:hover {
    background: #1e2b37;
    color: #fff;
    transform: translateY(-3px);
}

/* ============================================================
   HOME
   ============================================================ */

.hero-carousel {
    position: relative;
    height: 78vh;
    min-height: 420px;
    max-height: 720px;
    overflow: hidden;
    background: #000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease;
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.35);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(211,47,47,0.85);
}

.hero-arrow.hero-prev { left: 20px; }
.hero-arrow.hero-next { right: 20px; }

@media (max-width: 600px) {
    .hero-arrow { width: 38px; height: 38px; font-size: 0.95rem; }
    .hero-arrow.hero-prev { left: 10px; }
    .hero-arrow.hero-next { right: 10px; }
}

.hero-dots {
    position: absolute;
    bottom: 18px;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.25);
    padding: 0;
    cursor: pointer;
    transition: all 0.25s ease;
}

.hero-dot:hover {
    background: rgba(255,255,255,0.6);
}

.hero-dot.active {
    background: #d32f2f;
    border-color: #d32f2f;
}

/* Bloque negro debajo del carrusel con el texto de bienvenida */
.hero-intro {
    background: #111111;
    text-align: center;
    padding: 3.5rem 1.5rem;
}

.hero-intro h1 {
    color: #fff;
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-intro p {
    color: #d7dee5;
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 650px;
    margin: 0 auto 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cta-outline-white {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

.btn-cta-outline-white:hover {
    background: #fff;
    color: #111111;
    transform: translateY(-3px);
}

@media (max-width: 600px) {
    .hero-intro h1 { font-size: 1.8rem; }
    .hero-intro p { font-size: 1rem; }
}

.home-section {
    max-width: 1300px;
    margin: 0 auto;
    padding: 4.5rem 1.5rem;
}

.home-section.tight {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.section-heading {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 3rem;
}

.section-heading h2 {
    font-size: 2.2rem;
    font-weight: 600;
    color: #1e2b37;
    margin-bottom: 1rem;
    letter-spacing: -0.3px;
}

.section-heading p {
    color: #5f6f80;
    font-size: 1.05rem;
    font-weight: 300;
}

/* Logos de marcas (dentro de la sección negra "Explora productos") */
.brand-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
    margin-top: 3.5rem;
}

.brand-logos img {
    opacity: 0.95;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.logo-yamaha-brand {
    width: 479px;
    aspect-ratio: 479 / 320;
}

.logo-yamalube-brand {
    width: 480px;
    aspect-ratio: 436 / 123;
}

@media (max-width: 900px) {
    .logo-yamaha-brand { width: 260px; }
    .logo-yamalube-brand { width: 240px; }
}

@media (max-width: 500px) {
    .logo-yamaha-brand { width: 215px; }
    .logo-yamalube-brand { width: 250px; }
}

/* ---------- Quiénes somos / Confianza y experiencia ---------- */
.about-section {
    background: #ffffff;
    padding-top: 8rem;
    padding-bottom: 8rem;
}

@media (max-width: 900px) {
    .about-section {
        padding-top: 4.5rem;
        padding-bottom: 4.5rem;
    }
}

.about-row {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.about-row + .about-row {
    margin-top: 4rem;
}

.about-col {
    flex: 1;
    min-width: 280px;
}

.heading-accent-red {
    color: #d32f2f;
    font-size: 3.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.heading-dark {
    color: #1e2b37;
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1.2rem;
    letter-spacing: -0.5px;
}

.about-col p {
    color: #4f6375;
    font-size: 1.2rem;
    font-weight: 350;
    line-height: 1.8;
}

.about-col p.justify-text {
    text-align: justify;
}

.stats-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.6rem;
}

.stats-row {
    display: flex;
    gap: 3.5rem;
    justify-content: center;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 700;
    color: #d32f2f;
    line-height: 1.2;
}

.stat-number i {
    font-size: 1.5rem;
    margin-right: 4px;
}

.stat-label {
    font-size: 0.98rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6f7f8f;
    margin-top: 0.3rem;
}

/* ---------- Explora nuestros productos (sección negra, 100% borde a borde) ---------- */
.explora-section {
    background: #000000;
    max-width: none;
    width: 100%;
    padding-left: 3rem;
    padding-right: 3rem;
}

@media (max-width: 900px) {
    .explora-section {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

.section-heading-dark {
    text-align: center;
    margin-bottom: 3rem;
}

.section-heading-dark h2 {
    color: #ffffff;
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.explora-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.explora-card {
    position: relative;
    height: 540px;
    border-radius: 10px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.explora-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 2rem;
    background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.94) 100%);
}

.explora-card-overlay h3 {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
}

.explora-card-overlay p {
    color: #e2e2e2;
    font-size: 0.88rem;
    font-weight: 300;
    line-height: 1.55;
    margin-bottom: 1.3rem;
}

.btn-outline-white {
    display: inline-block;
    border: 1.5px solid #ffffff;
    color: #ffffff;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.btn-outline-white:hover {
    background: #ffffff;
    color: #111111;
}

@media (max-width: 900px) {
    .explora-grid { grid-template-columns: 1fr; }
    .explora-card { height: 380px; }
}

/* ---------- Cómo nació Yamaha ---------- */
.historia-section {
    background: #ffffff;
    padding-top: 5.5rem;
    padding-bottom: 2rem;
}

@media (max-width: 900px) {
    .historia-section {
        padding-top: 3.5rem;
        padding-bottom: 1.5rem;
    }
}

.historia-content {
    max-width: 840px;
    margin: 0 auto;
    text-align: center;
}

.historia-content h2 {
    font-size: 2.6rem;
    font-weight: 600;
    color: #1e2b37;
    margin-bottom: 1.8rem;
}

.historia-content p {
    color: #5f6f80;
    font-weight: 350;
    line-height: 1.85;
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
}

.historia-content p:last-child {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .about-row,
    .about-col,
    .about-col p,
    .about-col p.justify-text {
        text-align: center;
    }
    .heading-accent-red { font-size: 1.9rem; }
    .heading-dark { font-size: 1.7rem; }
    .about-col p { font-size: 0.95rem; }
    .stats-row { gap: 2rem; }
    .historia-content h2 { font-size: 2.1rem; }
    .historia-content p { font-size: 1.05rem; }
}

/* Galería */
.gallery-section {
    max-width: 1650px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

.gallery-grid img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    cursor: default;
    pointer-events: none;
    user-select: none;
}

@media (max-width: 900px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .gallery-grid img { height: 150px; }
}

/* Dónde estamos (fondo 100% ancho, sin hueco antes del footer) */
.map-section {
    background: #f4f6f8;
    max-width: none;
    width: 100%;
    padding: 4.5rem 0;
    margin-bottom: 0;
}

.map-section-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.map-block {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    align-items: stretch;
}

.map-text {
    flex: 1;
    min-width: 260px;
}

.map-text h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.map-text p {
    color: #5f6f80;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.map-text .map-info {
    display: flex;
    gap: 10px;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: #4f6375;
}

.map-text .map-info i {
    color: #d32f2f;
    margin-top: 3px;
}

.map-embed {
    flex: 1.4;
    min-width: 280px;
    min-height: 320px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.map-embed iframe {
    width: 100%;
    height: 100%;
    min-height: 320px;
    border: 0;
}

@media (max-width: 900px) {
    .home-section { padding: 3rem 1.5rem; }
}
