/* ============================================================
   Astra Child — Mega Menu: Shop Dropdown
   ============================================================ */

/* Header is the positioning parent — panel is teleported here by JS */
.elementor-location-header {
    position: relative;
    overflow: visible !important;
}

/* Elementor containers must not clip the panel */
.elementor-location-header .elementor-element,
.elementor-location-header .e-con,
.elementor-location-header .elementor-widget-nav-menu,
.elementor-location-header .elementor-nav-menu--main {
    overflow: visible !important;
}

/* ── Panel container ──────────────────────────────────────── */
/* Teleported to .elementor-location-header by JS, so left/right
   are relative to the full header width, not an inner container. */
.mega-menu-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: auto;
    height: auto;
    box-sizing: border-box;
    z-index: 9999;
    background-color: #F8F8F8;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 0.5rem 0.5rem;
    padding: 16px 0;
    overflow: hidden;
}

/* Shown via JS .is-open class */
.mega-menu-panel.is-open {
    display: flex;
    animation: mmFadeIn 0.15s ease forwards;
}

@keyframes mmFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Inner layout — 1820px centred inside the full-width panel ── */
.mega-menu-inner {
    width: 1820px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* ── 5-column × 2-row image grid ─────────────────────────── */
.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 24px 12px;
    width: 80%;
    margin: 0 auto;
}

.mega-menu-card a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s;
    height: 100%;
}
.mega-menu-card a:hover {
    transform: scale(1.03);
}

.mega-menu-card .card-thumb {
    /* 218px on large screens, shrinks proportionally on smaller viewports */
    width: min(218px, 100%);
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    background-color: #efefef;
    border-radius: 12px;
    overflow: hidden;
}
.mega-menu-card .card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mega-menu-card h3 {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    padding: 4px 0 0;
    margin: 0;
    color: #1a1a2e;
    line-height: 1.3;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1023px) {
    .mega-menu-panel {
        display: none !important;
    }
}
