/* ============================================
   MEGA MENÚ - ESTILOS
   ============================================ */

/* Contenedor principal del mega menú */
.bt-mega-menu-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 9999;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 0 0 8px 8px;
	display: block;
}
@media (min-width: 600px) {
/* Cuando el header está fijo: el mega menú también debe fijarse */
.bt-header-nav-row.is-fixed ~ .bt-mega-menu-container{
  position: fixed;
  top: var(--bt-header-nav-h, 72px); /* la setea el JS */
  left: 0;
  right: 0;

  /* mantiene tu idea de max-width centrado */
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;

  /* para que quede por encima del contenido */
  z-index: 9999;
}
.admin-bar .bt-header-nav-row.is-fixed ~ .bt-mega-menu-container{
  top: calc(var(--bt-header-nav-h, 72px) + 32px);
}
}


/* Wrapper del header para posicionamiento */
.bt-header-nav-row {
    position: relative;
}

/* Item de navegación "Productos" */
.bt-main-navigation .wp-block-navigation-item:has(.bt-mega-menu-trigger) {
    position: relative;
}

/* Mostrar mega menú al hacer hover sobre "Productos" */
.bt-main-navigation .wp-block-navigation-item:hover .bt-mega-menu-container {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Contenido del mega menú */
.bt-mega-menu-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    min-height: 400px;
}

/* ============================================
   COLUMNA 1: CATEGORÍAS
   ============================================ */
.bt-mega-menu-categories {
    /* background: #f8f9fa; */
    border-right: 1px solid #e9ecef;
}

.bt-mega-menu-categories h4 {
    color: #2c3e50;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #132D7D;
}

.bt-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
	min-width: 210px;
	/* padding-right: 1rem; */
}

.bt-category-list li {
    margin-bottom: 0;
}
.bt-category-list a.is-active {
    color: #132D7D;
    font-weight: 700;
	font-family: 'prompt';
    /* padding-left: 0.5rem; */
}
.bt-category-list li a {
    color: #495057;
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 500;
    display: flex;
    align-items: center;
	justify-content: space-between;
    padding: 0.5rem 0;
    transition: all 0.2s ease;
	font-family: 'prompt';
	outline: none;
}

.bt-category-list li a:hover {
    color: #132D7D;
    /* padding-left: 0.5rem; */
}

.bt-category-list li a::after {
    content: "›";
    margin-right: 0.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.bt-category-list li a:hover::after {
    opacity: 1;
}

/* ============================================
   COLUMNA 2: PRODUCTOS
   ============================================ */
.bt-mega-menu-products {
    background: #ffffff;
	flex: 1;
}

.bt-mega-menu-products h4 {
    color: #2c3e50;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #132D7D;
}

.bt-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.bt-product-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.bt-product-item:hover {
    /* background: #f8f9fa; */
    transform: translateY(-5px);
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); */
}

.bt-product-item figure {
    margin: 0 0 0.75rem 0;
}

.bt-product-item img {
    width: 150px;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.bt-product-item:hover img {
    transform: scale(1.05);
}

.bt-product-item p {
    margin: 0;
}

.bt-product-item a {
    color: #4D4D4D;
    text-decoration: none;
    font-weight: 500;
	font-family: 'prompt';
    font-size: 1.25rem;
	line-height: 1;
	text-transform: uppercase;
    transition: color 0.2s ease;
}

.bt-product-item:hover a {
    color: #4D4D4D;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .bt-mega-menu-content {
        grid-template-columns: 250px 1fr;
    }
    
    .bt-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .bt-mega-menu-container {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        max-width: 100%;
        border-radius: 0;
    }
    
    .bt-mega-menu-content {
        grid-template-columns: 1fr;
    }
    
    .bt-mega-menu-categories {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .bt-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .bt-products-grid {
        grid-template-columns: 1fr;
    }
}