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

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

/* ==========================================
   HEADER Y NAVEGACIÓN (IGUAL AL INDEX)
   ========================================== */
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; 
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    display: block;
    padding: 10px 0; 
}

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

/* MENÚ DESPLEGABLE */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%; 
    left: 0;
    background-color: #a41e22; 
    min-width: 230px; 
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 2000;
    padding: 0;
    border-radius: 4px;
    overflow: hidden; 
}

.dropdown:hover .dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 0;
}

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

.dropdown-menu li a {
    color: #ffffff; 
    padding: 15px 20px;
    display: block;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
    transition: background-color 0.3s ease, padding-left 0.3s ease;
}

.dropdown-menu li:last-child a {
    border-bottom: none; 
}

.dropdown-menu li a:hover {
    background-color: #7d161a; 
    padding-left: 25px; 
}

/* REDES SOCIALES Y BOTÓN SHOP */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.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;
}

/* ==========================================
   BANNER PRINCIPAL DE CATEGORÍA
   ========================================== */
.categoria-hero {
    width: 100%;
    height: 250px; 
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 20px;
}

.categoria-hero-content h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    text-transform: uppercase;
}

.categoria-hero-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #eee;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

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

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

/* ==========================================
   CATÁLOGO DE PRODUCTOS
   ========================================== */
.catalogo-seccion {
    padding: 40px 5%;
    max-width: 1300px;
    margin: 0 auto;
}

.catalogo-dinamico {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.prod-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1 1 calc(33.333% - 30px);
    min-width: 300px; 
    max-width: 400px; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.prod-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.prod-img {
    width: 100%;
    height: 250px;
    background-color: #fff;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    cursor: pointer;
}

.prod-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.prod-img .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; 
}

.prod-card:hover .overlay {
    opacity: 1; 
}

.prod-img .overlay i {
    color: white;
    font-size: 3rem;
}

.prod-info {
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.prod-info h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

.prod-info p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1; 
}

.btn-mas {
    align-self: flex-start;
    background-color: #a41e22;
    color: #fff;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
    border-radius: 5px; 
    transition: background-color 0.3s;
}

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

/* ==========================================
   MARCAS (NUEVA SECCIÓN)
   ========================================== */
#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 Y BOTONES FLOTANTES
   ========================================== */
footer {
    background-color: #383c40;
    color: #aaa;
    text-align: center;
    padding: 40px 20px;
    font-size: 0.9rem;
    border-top: 1px solid #555;
    margin-top: 40px;
}

.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 QUERIES
   ========================================== */
@media (min-width: 600px) {
    .categoria-hero { height: 350px; }
    .categoria-hero-content h1 { font-size: 3rem; }
    .prod-card { flex: 1 1 calc(50% - 30px); max-width: 450px; }
}

@media (min-width: 900px) {
    .prod-card { flex: 1 1 calc(33.333% - 30px); max-width: 400px; }
    .prod-info h3 { font-size: 1.4rem; }
    .prod-info p { font-size: 1rem; }
    .btn-mas { width: 45px; height: 45px; }
}
/* 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
   ========================================================== */
@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 {
        flex-wrap: wrap;
        justify-content: center;
        gap: 2px 14px;
    }
    nav a { font-size: 13px; padding: 8px 4px; white-space: nowrap; }
    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 { gap: 0 10px; }
    nav a { font-size: 12.5px; }
}

/* ==========================================================
   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; }
}
