﻿/* Clean, responsive navbar */
.ml-nav {
    background: linear-gradient(180deg,#F7F1F2,#EFE4E5);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-family: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

    .ml-nav .container-fluid {
        padding: 0.35rem 1rem;
    }

/* Desktop category list */
.ml-cats {
    display: flex;
    gap: 1rem;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

    .ml-cats .cat-link {
        color: #111;
        text-decoration: none;
        font-weight: 600;
        padding: .5rem .35rem;
        border-radius: .25rem;
        transition: background .18s, color .18s, transform .12s;
    }

        .ml-cats .cat-link:hover,
        .ml-cats .cat-link:focus {
            background: rgba(0,0,0,0.03);
            transform: translateY(-2px);
        }

/* Megamenu */
.megamenu {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    background: #ffffffd4;
    box-shadow: 0 8px 24px rgba(16,24,40,0.08);
    padding: 1rem;
    z-index: 1050;
    border-top: 4px solid rgba(0,0,0,0.02);
}

.nav-item:hover > .megamenu
 {
    display: block;
}

/* Megamenu grid */
.megamenu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0 25px;
}

.megamenu-col h5 {
    margin: 0 0 .5rem 0;
    font-size: 0.95rem;
    color: #222;
}

.megamenu-col a {
    display: block;
    color: #444;
    padding: 0.18rem 0;
    text-decoration: none;
    font-size: 0. nine rem;
}

    .megamenu-col a:hover {
        color: #000;
        text-decoration: underline;
    }

/* image panel */
.megamenu-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding:10px;
}

    .megamenu-image img {
        width: 100%;
        max-width: 480px;
        border-radius: 8px;
    }

/* Mobile: collapse / accordion */
@media (max-width: 991.98px) {
    .ml-cats {
        display: none;
    }

    .megamenu {
        position: static;
        display: block;
        padding: 0;
        box-shadow: none;
        border-top: none;
    }

    .megamenu-grid {
        display: block;
    }

    .megamenu-col {
        padding: .5rem 1rem;
        border-bottom: 1px solid rgba(0,0,0,0.04);
    }

    .mobile-toggle {
        background: transparent;
        border: none;
        font-weight: 700;
        width: 100%;
        text-align: left;
        padding: .6rem 0;
    }

    .mobile-sublist {
        padding: .25rem 0 0 .75rem;
    }

    /* position hamburger at left edge and keep brand centered */
    .mobile-hamburger {
        
        z-index: 1100;
        background: transparent;
        border: none;
        padding: .45rem;
    }
    .m-nav .container-fluid {
        padding-left: 3.25rem; /* make room for the hamburger */
        padding-right: 1rem;
    }
    .m-nav .navbar-brand {
        margin: 0 auto;
    }
    .tata {
        margin: 0 !important;
    }
}
@media (min-width: 991.98px) {
    .tata {
        margin: 0 auto !important;
    }
}
    /* small helpers */
    .icon-btn {
        background: transparent;
        border: none;
        color: #111;
        font-size: 1.05rem;
        padding: .35rem;
    }

    .cart-badge {
        font-size: .65rem;
        padding: .2rem .45rem;
        border-radius: 999px;
        transform: translate(40%, -40%);
    }

/* Watermarked background in desktop megamenu */
@media (min-width: 992px) {
    .megamenu {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        overflow: hidden; /* keep pseudoelement contained */
    }

    .megamenu::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: var(--megamenu-image);
        background-repeat: no-repeat;
        background-position: right bottom;
        background-size: 40% auto; /* adjust size as needed */
        opacity: 0.5; /* subtle watermark */
        filter:  blur(1px) ;
        pointer-events: none;
        z-index: 0;
        transition: opacity 250ms ease;
    }

    /* Ensure menu content sits above the watermark */
    .megamenu-grid,
    .megamenu > * {
        position: relative;
        z-index: 1;
    }
}
