/*
 Theme Name: Blocksy Child
 Theme URI: https://nobox.co.ke
 Description: Child theme for Blocksy
 Author: Charles Mwangi
 Template: blocksy
 Version: 1.0.3
*/

/* =========================
   HEADER
========================= */
.my-custom-header {
    width: 100%;
    height: 70px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #eee;
    position: relative;
    z-index: 500;
    padding: 0 20px;
    box-sizing: border-box;
}

.my-custom-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    position: relative;
    box-sizing: border-box;
}

/* LOGO */
.my-custom-header .logo {
    display: flex;
    align-items: center;
    height: 70px;
    margin-right: 20px;
    z-index: 1000;
}

.my-custom-header .logo img {
    height: 70px;
    width: auto;
    object-fit: contain;
}

/* =========================
   NAVIGATION
========================= */
.main-menu {
    display: flex;
    justify-content: center;
    flex: 1;
}

.my-menu {
    display: flex;
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 70px;
    align-items: center;
}

.my-menu li a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #000;
    font-weight: 500;
    padding: 0 10px;
    transition: color 0.3s ease;
}

.my-menu li a:hover {
    color: #0073ff;
}

.my-menu li.dropdown {
    position: static;
}

/* =========================
   MEGA MENU
========================= */
.mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100vw;
    height: 500px;           /* fixed height */
     max-width: 100%;    /* prevent overflow */
    background: #fff;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    border-top: 1px solid #eee;
    z-index: 9999;
    box-sizing: border-box;

    overflow-y: scroll;       /* enable scrolling */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;     /* Firefox */
}

/* Hide scrollbar for Chrome, Safari, Opera */
.mega-menu::-webkit-scrollbar {
    display: none;
}

.mega-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.mega-item {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.mega-item .heading {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 17px;
    color: #000;
}

.mega-item .items {
    display: flex;
    flex-direction: column;
}

.mega-item .items p {
    margin: 3px 0;
    font-size: 15px;
    color: #333;
    cursor: pointer;
}

.mega-item .items p:hover {
    color: #0073ff;
}
/* Underline on the menu item when dropdown is open */
.my-menu li.dropdown:hover > a {
    border-bottom: 2px solid #0073ff;
    padding-bottom: 5px;
}

/* Show mega menu when hovering over parent */
.my-menu li.dropdown:hover .mega-menu {
    display: block;
}

/* this is for the three collums in the accesories in  camera */


/* Target only your Accessories mega-item inside a mega-menu */
.mega-menu .mega-item.has-submenu .items.two-columns {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* three equal columns */
    gap: 5px 15px !important; /* row and column spacing */
}

.mega-menu .mega-item.has-submenu .items.two-columns p {
    margin: 0 !important; /* remove extra spacing */
}

/* Responsive: single column on mobile */
@media (max-width: 768px) {
    .mega-menu .mega-item.has-submenu .items.two-columns {
        grid-template-columns: 1fr !important; /* single column on small screens */
    }
}




/* ------------------------------------------------------------
   DESKTOP ONLY
------------------------------------------------------------ */
@media (min-width: 769px) {
    .hamburger-toggle {
        display: none;
    }
}

/* ------------------------------------------------------------
   MOBILE ONLY (≤ 768px)
------------------------------------------------------------ */
@media (max-width: 768px) {

    /* Collapse top menu */
    .my-menu {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .mega-row {
        grid-template-columns: 1fr;
        height: auto;
        align-items: flex-start;
    }

    .mega-menu {
        width: 100vw;
        height: auto;
        max-height: 90vh;
    }

    /* MOBILE MENU PANEL */
    .main-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: 50vh;
        background: #fff;
        z-index: 9999;
        padding: 20px;
        box-sizing: border-box;
        overflow-y: auto;
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.35s ease;

        /* layout */
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* Show when active */
    .main-menu.active {
        display: grid !important;
        transform: translateY(0);
        opacity: 1;
    }

    /* Mega items layout */
    .mega-item {
        margin-bottom: 15px;
    }

    .mega-item .heading {
        font-weight: bold;
        font-size: 16px;
        margin-bottom: 6px;
        color: #000;
    }

    .mega-item .items {
        display: flex;
        flex-direction: column;
        margin-left: 10px;
    }

    .mega-item .items p {
        margin: 3px 0;
        font-size: 15px;
        cursor: pointer;
        color: #333;
    }
}
@media (max-width: 768px) {
    .mega-menu {
        display: block !important;
        position: static;
        height: auto;
        box-shadow: none;
        padding: 0;
        border: none;
    }
}
