/*
Theme Name: hoffmann
Theme URI: https://carpinteriashoffmannsa.com/
Description: Tema hijo de Astra para personalización de WooCommerce
Author: Rodas
Author URI: https://carpinteriashoffmannsa.com/
Template: astra
Version: 1.0
*/

/* === Menú desplegable personalizado en mega menú === */
#mega-menu-item-custom_html-3 .menu-productos,
#mega-menu-item-custom_html-3 .menu-productos ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#mega-menu-item-custom_html-3 .menu-productos li {
    position: relative;
}

/* Oculta submenús por defecto */
#mega-menu-item-custom_html-3 .menu-productos li ul {
    display: none;
    position: absolute;
    top: 0;
    right: 100%; /* submenús a la izquierda */
    left: auto;
    background: #fff;
    z-index: 1000;
    min-width: 200px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Muestra submenús al hacer hover */
#mega-menu-item-custom_html-3 .menu-productos li:hover > ul {
    display: block;
}

/* Asegura que subniveles de subcategorías también se abran hacia la izquierda */
#mega-menu-item-custom_html-3 .menu-productos .nivel-2 ul,
#mega-menu-item-custom_html-3 .menu-productos .nivel-3 ul {
    right: 100%;
    left: auto;
    top: 0;
}

/* Estilos opcionales de los ítems */
#mega-menu-item-custom_html-3 .menu-productos li a,
#mega-menu-item-custom_html-3 .menu-productos li strong,
#mega-menu-item-custom_html-3 .menu-productos .nivel-2 {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
    background: #f9f9f9;
}

#mega-menu-item-custom_html-3 .menu-productos .nivel-2 {
    padding: 0;
}

#mega-menu-item-custom_html-3 .menu-productos li a:hover,
#mega-menu-item-custom_html-3 .menu-productos li strong:hover {
    background: #ccc;
}

#mega-menu-item-custom_html-3 .menu-productos .nivel-1 > a {
    background: #f9f9f9;
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
}

#mega-menu-item-custom_html-3 .menu-productos .nivel-1 > a:hover {
    background: #ccc;
}

.fake-footer.wp-block-columns {
    display: flex;
    align-items: center !important; /* centra verticalmente */
    justify-content: center; /* opcional, centra horizontalmente */
    gap: 2rem; /* opcional, separa columnas si hace falta */
}

.fake-footer{background-color:#111;margin-bottom: 0 !important;}
.fake-footer a,.fake-footer p{color:#fff;}
.fake-footer img{display: block;margin: 10px auto;width:150px;max-width: 80%;}
.fake-footer .central-column{margin:30px auto;}


/* Forzar imágenes de catálogo a encajar sin recorte vertical */
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1; /* asegura que el a sea cuadrado */
    overflow: hidden;
}

.woocommerce ul.products li.product a.woocommerce-LoopProduct-link img {
    object-fit: contain !important;
    max-width: 100%;
    max-height: 100%;
    height: auto !important;
    width: auto !important;
    display: block;
    margin:0 !important;
}