/* ===================================================
   AJUSTES GENERALES
   =================================================== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: url('imagenes/imgFondo.webp') no-repeat center center fixed;
    background-size: cover;
    font-family: Arial, sans-serif;
}

/* ===================================================
   CINTA SUPERIOR / HEADER
   =================================================== */
.cinta {
    background-color: #104e12;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    width: 100%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    border-bottom: 2px solid #28a745;
}

.social-icons-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.social-icon {
    background-color: #28a745;
    color: white;
    font-size: 20px;
    padding: 12px;
    border-radius: 50%;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-icon:hover {
    background-color: #1f6b0e;
    transform: scale(1.2);
}

.social-icons-container a:last-child {
    margin-left: 15px;
}

.search-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-title {
    color: #FFD700;
    font-size: 28px;
    font-weight: bold;
    font-family: 'Georgia', serif;
    margin-right: 20px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
}

.logo-barra {
    height: auto;
    max-height: 40px;
    max-width: 140px;
    object-fit: contain;
}

#searchBox {
    padding: 8px 12px;
    width: 200px;
    max-width: 100%;
    border-radius: 5px;
    border: 1px solid #ddd;
}

/* ===================================================
   MENÚ PRINCIPAL
   =================================================== */
nav ul.menu {
    list-style: none;
    display: flex;
    gap: 20px;
    padding: 0;
    margin: 0;
    align-items: center;
}

nav ul.menu li {
    position: relative;
}

nav ul.menu li a {
    color: white;
    text-decoration: none;
    font-size: 15px;
    padding: 6px 10px;
    transition: all 0.3s ease;
}

nav ul.menu li a:hover {
    color: #FFD700;
}

.submenu {
    display: none;
    position: absolute;
    top: 32px;
    left: 0;
    background: #28a745;
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 999;
}

nav ul.menu li:hover .submenu {
    display: block;
}

.submenu li {
    margin-bottom: 10px;
}

.submenu li:last-child {
    margin-bottom: 0;
}

.submenu li a {
    color: white;
}

/* ===================================================
   BOTÓN HAMBURGUESA (MÓVIL)
   =================================================== */
.hamburger {
    display: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
    z-index: 1000;
}

/* ===================================================
   LOGO FLOTANTE
   =================================================== */
.logo-center {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    background: transparent;
    z-index: 10;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.logo-center.hide {
    opacity: 0;
    transform: scale(1.2);
}

.logo-center img {
    width: 180px;
    height: auto;
}

/* ===================================================
   GALERÍA
   =================================================== */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    padding: 20px;
    margin-top: 20px;
}

.gallery-item {
    border: 2px solid #28a745;
    border-radius: 12px;
    overflow: hidden;
    background-color: rgba(0,0,0,0.4);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

@media (hover: hover) {
    .gallery-item:hover {
        transform: translateY(-8px);
        box-shadow: 0 6px 14px rgba(0,0,0,0.25);
    }

    .gallery-item:hover img {
        transform: scale(1.06);
    }
}

.gallery-item h3 {
    color: white;
    font-size: 18px;
}

.descripcion-producto {
    padding: 10px;
    color: #eee;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.descripcion-producto:hover {
    color: white;
    background-color: #104e12;
}

/* ===================================================
   FOOTER
   =================================================== */
.footer-cinta {
    background-color: black;
    color: white;
    padding: 30px 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 25px;
}

.footer-content > div {
    flex: 1 1 220px;
}

.footer-cinta h3 {
    color: gold;
}

.footer-cinta a {
    color: white;
    text-decoration: none;
}

.footer-cinta a:hover {
    text-decoration: underline;
}

.btn-register {
    display: inline-block;
    padding: 10px 20px;
    background: #ff9900;
    color: white;
    border-radius: 5px;
    font-weight: bold;
}

.btn-register:hover {
    background: #e68900;
}

/* ===================================================
   RESPONSIVE query de movil
   =================================================== */
@media (max-width: 768px) {

    .cinta {
        flex-direction: column;
        align-items: center;
    }

    .header-title {
        font-size: 22px;
        margin-bottom: 5px;
    }

    #searchBox {
        width: 90%;
        margin-top: 5px;
    }

    .social-icons-container {
        justify-content: center;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .social-icons-container img {
        height: 35px;
        margin-left: 10px;
    }

    .logo-barra {
        max-height: 30px;
        max-width: 110px;
    }

    .search-logo {
        width: 100%;
        justify-content: center;
    }

    /* Botón hamburguesa */
    .hamburger {
        display: block;
        margin-bottom: 10px;
    }

    nav ul.menu {
        flex-direction: column;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 10px 0;
        background-color: #104e12;
        border-top: 1px solid #28a745;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out;
        align-items: center;
    }

    nav ul.menu.active {
        max-height: 1000px;
    }

    nav ul.menu li {
        width: 90%;
        margin: 5px 0;
        text-align: center;
    }

    nav ul.menu li a {
        display: block;
        width: 100%;
        padding: 12px 20px;
        border-radius: 50px;
        background-color: #28a745;
        color: white !important;
        text-align: center;
        font-weight: bold;
    }

    .logo-center img {
        width: 110px;
    }
    

/* =========================
   Submenús ocultos en móvil
========================= */
nav ul.menu li .submenu {
    display: none !important; /* siempre oculto */
    position: static;         /* para que no flote fuera del menú */
    padding: 0;
    margin: 0;
}

/* Submenú se muestra solo si el padre tiene clase "active" */
nav ul.menu li.active .submenu {
    display: block;
}

}

/* Pantallas muy pequeñas: < 400px */
@media (max-width: 400px) {
    nav ul.menu li {
        width: 100%;
    }
    .header-title {
        font-size: 18px;
    }
}

/* Ajustes adicionales para móviles < 450px */
@media (max-width: 450px) {
    .social-icon {
        font-size: 18px;
        padding: 6px;
    }
    .gallery-item img {
        height: 100px;
    }
    #searchBox {
        width: 95%;
    }
}
