* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f8f8;
    color: #333;
}

header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo img {
    width: 171px;
    margin-top: -21px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li {
    position: relative; /* Necesario para ubicar el menú desplegable debajo de cada ítem */
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    display: block;
    padding: 10px 0; /* Agregado para hacer un área de hover más cómoda */
}

nav a i {
    font-size: 12px;
}

/* ==========================================
   ESTILOS PARA EL MENÚ DESPLEGABLE (DROPDOWN) 
   ========================================== */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%; /* Justo debajo del ítem del menú principal */
    left: 0;
    background-color: #a41e22; /* Color corporativo Woodtools */
    min-width: 230px; /* Ancho del menú desplegable */
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 2000;
    padding: 0;
    border-radius: 4px;
    overflow: hidden; /* Para respetar el borde redondeado */
}

/* Mostrar el menú cuando el mouse pasa por encima del "li" principal */
.dropdown:hover .dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu li a {
    color: #ffffff; /* Letras blancas como en tu captura */
    padding: 15px 20px;
    display: block;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Linea sutil entre items */
    transition: background-color 0.3s ease, padding-left 0.3s ease;
}

.dropdown-menu li:last-child a {
    border-bottom: none; /* Quitamos la linea del último elemento */
}

.dropdown-menu li a:hover {
    background-color: #7d161a; /* Rojo más oscuro al hacer hover */
    padding-left: 25px; /* Pequeño efecto de movimiento al pasar el mouse */
}
/* ========================================== */

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Colores institucionales de las redes sociales */
.social-icons a {
    font-size: 24px;
    margin-left: 15px;
    text-decoration: none;
}
.facebook { color: #1877F2; }
.youtube { color: #FF0000; }
.instagram { color: #E4405F; }

.btn-shop {
    background-color: #a41e22;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.btn-shop:hover {
    background-color: #7d161a;
}

/* HERO BANNER */
#hero {
    position: relative;
    width: 100%;
    height: 380px; 
    overflow: hidden;
    background-color: #000; 
}

.slider-container {
    width: 100%;
    height: 100%;
}

.slides-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.8s ease-in-out;
}

.slide {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
    background-color: #1a1a1a;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: bottom; 
}

/* AJUSTES ESPECÍFICOS DEL BANNER */
.slide:nth-child(2) img {
    object-position: bottom;
    transform: rotate(360deg);
}

.slide:nth-child(3) img {
    object-position: top;
}

.slide:nth-child(4) img {
    object-position: top;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    color: white;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
}

.slide-content h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.slide-content p {
    font-size: 1.2rem;
    line-height: 1.5;
}

.btn-slider {
    display: inline-block;
    margin-top: 20px;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    background-color: rgba(164, 30, 34, 0.6);
    border: none;
    z-index: 10;
}

.next { right: 0; border-radius: 3px 0 0 3px; }
.prev:hover, .next:hover { background-color: #a41e22; }

.dots-container {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 5px;
    background-color: #ffffff;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.dot.active, .dot:hover { background-color: #a41e22; }

/* PRODUCTOS */
#productos {
    text-align: center;
    padding: 60px 5%;
    max-width: 1300px;
    margin: 0 auto;
}

.titulo-seccion {
    font-weight: 300;
    color: #666;
    margin-bottom: 50px;
    font-size: 2.5rem;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 30px;
}

.card {
    text-decoration: none;
    color: inherit;
    display: block;
    background: #fff;
    border-radius: 5px;
    padding-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.card:hover { transform: translateY(-5px); }

.img-container {
    position: relative;
    width: 100%;
    height: 250px; 
    background-color: #fff;
    overflow: hidden;
    border-radius: 5px 5px 0 0;
    margin-bottom: 20px;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    padding: 15px;
}

.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5); 
    display: flex; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.3s ease;
}

.card:hover .overlay { opacity: 1; }
.overlay i { color: white; font-size: 3rem; }

.card h1 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

.card p {
    font-size: 0.95rem;
    color: #777;
    line-height: 1.5;
    padding: 0 15px;
}

/* NOVEDADES */
#novedades { text-align: center; }

.banner-contacto {
    background-size: cover;
    background-position: center;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: #333; 
}

.banner-text { color: white; z-index: 1; padding: 20px; }

.banner-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 400;
}

.btn-rojo {
    background-color: #a41e22;
    color: #fff;
    padding: 10px 30px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-rojo:hover { background-color: #7d161a; }

.franja-roja {
    background-color: #a41e22;
    color: white;
    padding: 20px;
    font-size: 1.2rem;
}

.texto-inferior {
    padding: 30px 20%;
    color: #666;
    line-height: 1.6;
}

/* VIDEOS CON MINIATURAS OPTIMIZADAS */
#videos {
    background-color: #b0b5b9;
    padding: 50px 0;
}

.video-block {
    max-width: 800px;
    margin: 0 auto 50px;
    text-align: center;
}

.video-block h2 {
    font-weight: 300;
    color: #555;
    margin-bottom: 20px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; 
    height: 0;
    background-color: #000; 
}

.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

/* Estilos para la miniatura falsa de Youtube */
.youtube-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background-color: #000;
}

.youtube-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Evita que queden bordes negros feos de youtube */
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.youtube-thumbnail:hover img {
    opacity: 1;
}

/* Estilo del botón rojo de Youtube falso */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 50px;
    background-color: rgba(33, 33, 33, 0.8);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

/* Triángulo blanco del botón Play */
.play-button::before {
    content: '';
    border-style: solid;
    border-width: 15px 0 15px 25px;
    border-color: transparent transparent transparent #fff;
    margin-left: 5px;
}

.youtube-thumbnail:hover .play-button {
    background-color: #ff0000; /* Se pone rojo original al pasar el mouse */
}


/* MARCAS */
#marcas {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    padding: 50px 5%;
    background-color: #fff;
}

#marcas img {
    height: 60px;
    object-fit: contain;
}

/* FOOTER & BOTONES FLOTANTES */
footer {
    background-color: #383c40;
    color: #aaa;
    text-align: center;
    padding: 40px 20px;
    font-size: 0.9rem;
    border-top: 1px solid #555;
}

.floating-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 15px; 
    z-index: 1000;
}

.floating-buttons a {
    display: inline-block;
    width: 50px;
    height: 50px;
    transition: transform 0.3s;
    text-decoration: none;
}

.floating-buttons a:hover { transform: scale(1.1); }

.floating-buttons img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
}

@media (max-width: 900px) {
    .productos-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .productos-grid { grid-template-columns: 1fr; }
}
/* ==========================================
   ICONOS DE HERRAMIENTAS EN EL MENÚ PRODUCTOS
   ========================================== */
.dropdown-menu li a img.menu-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 10px;
    background: #ffffff;
    border-radius: 4px;
    padding: 2px;
    box-sizing: border-box;
}

/* Menú desplegado por clic (1er toque en celular / 1er clic) */
.dropdown.open .dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ==========================================================
   RESPONSIVE MOBILE - HEADER Y NAVEGACIÓN
   (logo arriba, menú abajo a ancho completo, desplegables
   ocupando todo el ancho del header)
   ========================================================== */
@media (max-width: 900px) {
    .header-container {
        flex-wrap: wrap;
        padding: 10px 4%;
        row-gap: 4px;
    }
    .logo { order: 1; }
    .logo img { width: 110px; margin-top: 0; }
    .header-actions { order: 2; gap: 10px; }
    .btn-shop { padding: 8px 12px; font-size: 12px; }
    .social-icons a { font-size: 20px; margin-left: 8px; }
    nav { order: 3; width: 100%; }
    nav > ul, nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 2px 14px;
    }
    nav a { font-size: 13px; padding: 8px 4px; white-space: nowrap; }

    /* Los desplegables dejan de colgar del ítem y ocupan el ancho del header */
    nav > ul > li, nav ul li { position: static; }
    .dropdown-menu {
        left: 3%;
        right: 3%;
        min-width: 0;
        max-height: 60vh;
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    .logo img { width: 95px; }
    .social-icons { display: none; }
    .btn-shop { font-size: 11px; padding: 7px 10px; }
    nav > ul, nav ul { gap: 0 10px; }
    nav a { font-size: 12.5px; }
}

/* ==========================================================
   RESPONSIVE MOBILE - PORTADA (hero, secciones, marcas)
   ========================================================== */
@media (max-width: 700px) {
    #hero { height: 320px; }
    .slide-content {
        left: 5%;
        right: 5%;
        max-width: none;
        padding: 18px;
    }
    .slide-content h1 { font-size: 1.7rem; }
    .slide-content p { font-size: 1rem; }
    .prev, .next { padding: 10px; font-size: 18px; }
    .dot { height: 11px; width: 11px; }
    .titulo-seccion { font-size: 1.9rem; margin-bottom: 30px; }
    #productos { padding: 40px 5%; }
    .img-container { height: 200px; }
    .texto-inferior { padding: 25px 6%; }
    .franja-roja { font-size: 1rem; }
    .banner-contacto { height: 240px; }
    .banner-text h3 { font-size: 1.4rem; }
    #marcas { gap: 24px; padding: 35px 5%; }
    #marcas img { height: 40px; }
    .floating-buttons { bottom: 15px; right: 15px; gap: 10px; }
    .floating-buttons a { width: 44px; height: 44px; }
    footer { padding: 30px 15px; }
}

/* ==========================================================
   LUPA / BUSCADOR EN EL HEADER
   ========================================================== */
.header-search { display: flex; align-items: center; }
.header-search .lupa-btn {
    background: none; border: none; color: #333; font-size: 18px;
    cursor: pointer; padding: 6px 8px; line-height: 1;
}
.header-search .lupa-btn:hover { color: #a41e22; }
.header-search .lupa-input {
    flex: 0 0 0; width: 0; padding: 0; border: 1px solid transparent; opacity: 0;
    font-size: 14px; box-sizing: border-box;
    transition: flex-basis .25s ease, opacity .2s ease, padding .25s ease;
}
.header-search.abierto .lupa-input {
    flex: 0 0 190px; width: 190px; padding: 7px 10px; opacity: 1;
    border: 1px solid #a41e22; border-radius: 6px; outline: none;
}
@media (max-width: 480px) {
    .header-search.abierto .lupa-input { flex-basis: 130px; width: 130px; }
}
