/* ==========================================================
   ALLMYCRAFT NAVBAR
   ========================================================== */


/* ==========================================================
   NAVBAR
   ========================================================== */

.main-navbar{
    position:fixed;
    top:0;
    left:0;
    right:0;

    width:100%;
    z-index:99999;

    padding:2px 0;

    background:#F8F5F0 !important;

    border-bottom:1px solid rgba(249,194,83,.35);

    box-shadow:0 4px 18px rgba(85,51,32,.08);

    transition:
        padding .35s ease,
        background .35s ease,
        box-shadow .35s ease;
}


/* ==========================================================
   SCROLL
   ========================================================== */

.main-navbar.scrolled{
    padding:3px 0;

    box-shadow:
        0 4px 18px rgba(85,51,32,.10);
}


/* ==========================================================
   LOGO
   ========================================================== */

.navbar-logo{
    height:58px;
    display:block;
}


/* ==========================================================
   MAIN NAV
   ========================================================== */

.navbar-nav{
    align-items:center;
}


.main-navbar .nav-link{
    position:relative;

    margin:0 16px;
    padding:22px 0 !important;

    font-size:15px;
    font-weight:600;

    letter-spacing:.4px;
    text-transform:uppercase;

    color:#553320 !important;

    text-decoration:none;

    cursor:pointer;

    transition:
        color .3s ease;
}


.main-navbar .nav-link:hover,
.main-navbar .nav-link:focus{
    color:#DD3F30 !important;
}


/* ==========================================================
   DROPDOWN ARROW
   ========================================================== */

.main-navbar .dropdown-toggle::after{
    margin-left:8px;
    vertical-align:middle;

    transition:
        transform .3s ease;
}


.main-navbar
.dropdown-open
.dropdown-toggle::after{
    transform:rotate(180deg);
}


/* ==========================================================
   IMPORTANT
   BOOTSTRAP DROPDOWN OVERRIDE
   ========================================================== */

.main-navbar .dropdown-menu{
    display:block;
}


/* ==========================================================
   PRODUCTS + PATTERNS
   MEGA MENU
   ========================================================== */

.mega-dropdown{
    position:static;
}


.mega-dropdown > .dropdown-menu{

    position:absolute;

    top:calc(100% - 12px);
    left:0;

    width:100vw;

    margin:0;

    padding:45px 0 50px;

    border:none;
    border-radius:0;

    background:#F8F5F0;

    box-shadow:
        0 18px 45px rgba(85,51,32,.12);

    opacity:0;
    visibility:hidden;

    pointer-events:none;

    transform:translateY(20px);

    transition:
        opacity .3s ease,
        transform .3s ease,
        visibility .3s ease;

    z-index:999998;
}


/* OPEN */

.mega-dropdown.dropdown-open > .dropdown-menu{

    opacity:1;
    visibility:visible;

    pointer-events:auto;

    transform:translateY(0);
}


/* ==========================================================
   MEGA CONTAINER
   ========================================================== */

.mega-container{
    max-width:1500px;

    margin:0 auto;

    padding:0 35px;
}


/* ==========================================================
   MEGA HEADER
   ========================================================== */

.mega-header{
    display:flex;

    justify-content:space-between;
    align-items:center;

    margin-bottom:30px;

    padding-bottom:18px;

    border-bottom:
        1px solid rgba(0,0,0,.08);
}


.mega-title{
    margin:0;

    font-size:20px;
    font-weight:700;

    color:#2F241C;

    letter-spacing:1px;
    text-transform:uppercase;
}


.mega-view-all{
    text-decoration:none;

    color:#8A5A32;

    font-weight:600;

    transition:
        color .3s ease;
}


.mega-view-all:hover{
    color:#5E3A1B;
}


/* ==========================================================
   MEGA PRODUCT GRID
   ========================================================== */

.mega-products{

    display:grid;

    grid-template-columns:
        repeat(7,1fr);

    gap:10px;
}


/* ==========================================================
   MEGA PRODUCT
   ========================================================== */

.mega-product{

    text-align:center;

    opacity:1;

    transform:none;

    transition:
        transform .3s ease;
}


.mega-product:hover{
    transform:translateY(-7px);
}


.mega-product a{
    display:block;

    text-decoration:none;
}


/* ==========================================================
   PRODUCT IMAGE
   ========================================================== */

.mega-image{
    overflow:hidden;

    border-radius:2px;

    background:#fff;
}


.mega-image img{

    display:block;

    width:100%;

    aspect-ratio:3 / 4;

    object-fit:cover;

    background:#fff;

    transition:
        transform .45s ease;
}


.mega-product:hover
.mega-image img{
    transform:scale(1.06);
}


/* ==========================================================
   PRODUCT NAME
   ========================================================== */

.mega-product h5{

    margin:15px 0 6px;

    font-size:15px;

    font-weight:600;

    color:#2F241C;

    transition:
        color .3s ease;
}


.mega-product:hover h5{
    color:#8A5A32;
}


/* ==========================================================
   PRICE
   ========================================================== */

.mega-product .price{

    color:#8A5A32;

    font-size:15px;

    font-weight:700;
}



/* ==========================================================
   RIGHT ICONS
   ========================================================== */

.navbar-icons{

    display:flex;

    align-items:center;

    gap:22px;
}


.nav-icon{

    position:relative;

    display:flex;

    align-items:center;
    justify-content:center;

    font-size:20px;

    color:#553320 !important;

    text-decoration:none;

    transition:
        color .3s ease,
        transform .3s ease;
}


.nav-icon:hover{

    color:#DD3F30 !important;

    transform:
        translateY(-2px);
}


/* ==========================================================
   CART COUNT
   ========================================================== */

.cart-count{

    position:absolute;

    top:-7px;
    right:-9px;

    width:18px;
    height:18px;

    border-radius:50%;

    background:#DD3F30;

    color:#FFF5E5;

    font-size:10px;
    font-weight:600;

    display:flex;

    align-items:center;
    justify-content:center;
}


/* ==========================================================
   TOGGLER
   ========================================================== */

.navbar-toggler{

    border:none !important;

    box-shadow:none !important;
}


.navbar-toggler i{

    font-size:30px;

    color:#553320;
}


/* ==========================================================
   BODY
   ========================================================== */

body{
    padding-top:78px;
}


/* ==========================================================
   TABLET
   ========================================================== */

@media(max-width:1200px){

    .mega-products{

        grid-template-columns:
            repeat(4,1fr);

        gap:14px;
    }

}

/* ----------------------------------------------
   MEGA MENU CLOSE BUTTON
   ---------------------------------------------- */

.mega-close-btn{
    display:none;
}


@media(max-width:991px){

    .mega-close-btn{

        display:flex;

        position:absolute;

        top:16px;
        right:18px;

        width:40px;
        height:40px;

        align-items:center;
        justify-content:center;

        border:1px solid rgba(85,51,32,.15);

        border-radius:50%;

        background:#F8F5F0;

        color:#553320;

        font-size:17px;

        cursor:pointer;

        z-index:10;

        transition:
            background .25s ease,
            color .25s ease,
            transform .25s ease;
    }


    .mega-close-btn:hover{

        background:#553320;

        color:#F8F5F0;

        transform:rotate(90deg);
    }

}
/* ==========================================================
   MOBILE
   ========================================================== */

@media(max-width:991px){

    /* ----------------------------------------------
       NAVBAR
       ---------------------------------------------- */

    .main-navbar{

        padding:4px 0 1px;

        background:#FFF5E5 !important;

        backdrop-filter:blur(10px);
    }


    /* ----------------------------------------------
       MOBILE MAIN MENU
       ---------------------------------------------- */

    .main-navbar .navbar-collapse{

        position:fixed;

        top:70px;
        left:0;

        width:100%;

        height:calc(100vh - 70px);
        height:calc(100dvh - 70px);

        margin:0;

        padding:
            38px 24px
            calc(35px + env(safe-area-inset-bottom));

        box-sizing:border-box;

        background:#F8F5F0;

        flex-direction:column;

        overflow-y:auto;
        overflow-x:hidden;

        z-index:1049;
    }


    .main-navbar
    .navbar-collapse.show{

        display:flex;
    }


    /* ----------------------------------------------
       MOBILE NAV ITEMS
       ---------------------------------------------- */

    .main-navbar .navbar-nav{

        width:100%;

        margin:0 !important;
        padding:0;

        display:flex;

        flex-direction:column;

        align-items:center;

        justify-content:flex-start;

        flex:1 1 auto;
    }


    .main-navbar
    .navbar-nav
    .nav-item{

        width:100%;

        text-align:center;
    }


    .main-navbar
    .navbar-nav
    .nav-link{

        display:inline-flex;

        align-items:center;
        justify-content:center;

        margin:0;

        padding:16px 10px !important;

        font-size:22px;

        font-weight:600;

        letter-spacing:1px;
    }



/* ----------------------------------------------
   MOBILE MEGA MENU
   ---------------------------------------------- */

.mega-dropdown{
    position:static;
}

.mega-dropdown > .dropdown-menu{

    position:fixed;

    top:70px;
    left:0;

    width:100vw;

    height:calc(100vh - 70px);
    height:calc(100dvh - 70px);

    margin:0;

    padding:65px 16px 30px;

    box-sizing:border-box;

    background:#F8F5F0;

    border:none;
    border-radius:0;

    box-shadow:
        0 10px 30px rgba(85,51,32,.12);

    display:block;

    overflow-y:auto;
    overflow-x:hidden;

    opacity:0;
    visibility:hidden;

    pointer-events:none;

    transform:translateY(-12px);

    transition:
        opacity .25s ease,
        transform .25s ease,
        visibility .25s ease;

    z-index:99998;
}


/* OPEN */

.mega-dropdown.dropdown-open
> .dropdown-menu{

    opacity:1;
    visibility:visible;

    pointer-events:auto;

    transform:translateY(0);
}


/* ----------------------------------------------
   MOBILE MEGA CONTAINER
   ---------------------------------------------- */

.mega-container{

    width:100%;
    max-width:none;

    margin:0;
    padding:0;
}


/* ----------------------------------------------
   MOBILE 2 PRODUCTS PER ROW
   ---------------------------------------------- */

.mega-products{

    display:grid;

    grid-template-columns:
        repeat(2,minmax(0,1fr));

    gap:18px 12px;

    width:100%;
}


.mega-product{

    min-width:0;

    transform:none !important;
}


.mega-image{

    width:100%;
}


.mega-product h5{

    margin:
        9px 0 4px;

    font-size:13px;

    line-height:1.35;
}


.mega-product .price{

    font-size:13px;
}


/* ----------------------------------------------
   MOBILE MEGA HEADER
   ---------------------------------------------- */

.mega-header{

    display:flex !important;

    align-items:center;

    justify-content:space-between;

    margin-bottom:20px;

    padding-bottom:14px;
}


.mega-title{

    font-size:17px;
}


.mega-view-all{

    font-size:12px;
}
    /* ----------------------------------------------
       MOBILE 2 PRODUCTS PER ROW
       ---------------------------------------------- */

    .mega-container{

        width:100%;

        padding:0;
    }


    .mega-products{

        display:grid;

        grid-template-columns:
            repeat(2,minmax(0,1fr));

        gap:18px 12px;
    }


    .mega-product{

        min-width:0;

        transform:none !important;
    }


    .mega-product h5{

        margin-top:9px;

        font-size:13px;

        line-height:1.35;
    }


    .mega-product .price{

        font-size:13px;
    }



    /* ----------------------------------------------
       MOBILE ICONS
       ---------------------------------------------- */

    .main-navbar .navbar-icons{

        width:100%;

        margin:0;

        padding:18px 0 12px;

        display:flex;

        align-items:center;

        justify-content:center;

        gap:42px;

        flex:0 0 auto;

        border-top:
            1px solid rgba(85,51,32,.12);
    }


    .main-navbar
    .navbar-icons
    .nav-icon{

        width:42px;
        height:42px;

        display:flex;

        align-items:center;
        justify-content:center;

        font-size:27px;

        color:#553320 !important;
    }


    .main-navbar
    .navbar-icons
    .cart-count{

        top:0;
        right:-3px;

        width:20px;
        height:20px;

        font-size:10px;
    }


    /* ----------------------------------------------
       BODY
       ---------------------------------------------- */

    body{
        padding-top:70px;
    }

}


/* ==========================================================
   SMALL MOBILE
   ========================================================== */

@media(max-width:575px){

    .main-navbar
    .navbar-nav
    .nav-link{

        font-size:20px;

        padding:
            14px 10px !important;
    }


    .mega-dropdown > .dropdown-menu{

        padding:
            18px 16px;
    }


    .mega-products{

        gap:12px;
    }


    .mega-product h5{

        font-size:12px;
    }


    .mega-product .price{

        font-size:12px;
    }


    .about-dropdown
    .dropdown-item{

        padding:
            12px 15px;

        font-size:14px;
    }


    .main-navbar .navbar-icons{

        gap:34px;
    }

}

/* ==========================================================
   ABOUT MEGA MENU
   ========================================================== */

.about-mega-grid{

    display:grid;

    grid-template-columns:
        repeat(3,1fr);

    gap:18px;

}


.about-mega-item{

    display:flex;

    align-items:center;

    gap:18px;

    padding:22px 20px;

    text-decoration:none;

    background:#F8F5F0;

    border:1px solid rgba(85,51,32,.10);

    transition:
        background .3s ease,
        border-color .3s ease,
        transform .3s ease;
}


.about-mega-item:hover{

    background:#ffffff;

    border-color:
        rgba(138,90,50,.25);

    transform:translateY(-4px);

}


.about-mega-icon{

    flex:0 0 52px;

    width:52px;
    height:52px;

    display:flex;

    align-items:center;
    justify-content:center;

    border-radius:50%;

    background:
        rgba(138,90,50,.08);

    color:#8A5A32;

    font-size:23px;

    transition:
        background .3s ease,
        color .3s ease;
}


.about-mega-item:hover
.about-mega-icon{

    background:#553320;

    color:#F8F5F0;

}


.about-mega-content{

    min-width:0;

}


.about-mega-content h5{

    margin:0 0 5px;

    color:#2F241C;

    font-size:15px;

    font-weight:700;

}


.about-mega-content span{

    display:block;

    color:#777;

    font-size:12px;

    line-height:1.4;

}
/* ==========================================================
   MOBILE ABOUT MEGA MENU
   ========================================================== */

@media(max-width:991px){

    .about-mega-grid{

        display:grid;

        grid-template-columns:1fr;

        gap:12px;

        width:100%;

        max-width:100%;

        box-sizing:border-box;

    }


    .about-mega-item{

        width:100%;

        min-width:0;

        box-sizing:border-box;

        display:flex;

        flex-direction:row;

        align-items:center;

        justify-content:flex-start;

        text-align:left;

        gap:14px;

        padding:16px 14px;

        overflow:hidden;

    }


    .about-mega-icon{

        width:46px;
        height:46px;

        flex:0 0 46px;

        font-size:20px;

    }


    .about-mega-content{

        min-width:0;

        flex:1;

    }


    .about-mega-content h5{

        margin:0 0 4px;

        font-size:13px;

        line-height:1.3;

    }


    .about-mega-content span{

        font-size:11px;

        line-height:1.35;

        white-space:normal;

        overflow-wrap:anywhere;

    }


    .about-mega-item:last-child{

        grid-column:auto;

    }

}
@media(max-width:991px){

    .main-navbar .navbar-nav{
        align-items:flex-start;
    }

    .main-navbar .navbar-nav .nav-item{
        text-align:left;
    }

    .main-navbar .navbar-nav .nav-link{
        display:flex;
        align-items:center;
        justify-content:flex-start;

        width:100%;

        text-align:left;

        padding-left:10px !important;
        padding-right:10px !important;
    }

}

.navbar-toggle-icon{

    transition:
        transform .25s ease;

}


@media(max-width:991px){

    .main-navbar .navbar-toggler{

        display:flex;

        align-items:center;
        justify-content:center;

        width:44px;
        height:44px;

        padding:0;

    }


    .main-navbar .navbar-toggler i{

        font-size:28px;

        color:#553320;

    }

}

.navbar-toggle-icon{

    position:relative;

    display:block;

    width:28px;
    height:28px;

    font-size:0;

    transition:
        transform .35s cubic-bezier(.4,0,.2,1);

}


/* HAMBURGER */

.navbar-toggle-icon::before,
.navbar-toggle-icon::after{

    content:"";

    position:absolute;

    left:3px;

    width:22px;
    height:2px;

    background:#553320;

    border-radius:2px;

    transition:
        transform .35s cubic-bezier(.4,0,.2,1),
        top .35s cubic-bezier(.4,0,.2,1),
        opacity .2s ease;

}


.navbar-toggle-icon::before{

    top:8px;

    box-shadow:
        0 6px 0 #553320,
        0 12px 0 #553320;

}


/* OPEN */

.navbar-toggler[aria-expanded="true"]
.navbar-toggle-icon::before{

    top:13px;

    box-shadow:none;

    transform:rotate(45deg);

}


.navbar-toggler[aria-expanded="true"]
.navbar-toggle-icon::after{

    top:13px;

    transform:rotate(-45deg);

}


@media(max-width:991px){

    .main-navbar .navbar-toggler{

        display:flex;

        align-items:center;
        justify-content:center;

        width:44px;
        height:44px;

        padding:0;

    }

}

/* ==========================================================
   PRODUCTS MEGA MENU - CATEGORY GRID
   ========================================================== */

.mega-categories {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    padding: 22px;
    box-sizing: border-box;
    background: #FFF5E5;
    border: 1px solid rgba(85, 51, 32, .18);
    border-radius: 10px;
}

.mega-categories > .mega-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    min-height: 60px;
    padding: 15px 16px;
    box-sizing: border-box;
    color: #553320;
    background: #fff;
    border: 1px solid rgba(85, 51, 32, .22);
    border-left: 4px solid #F9C253;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

.mega-category-name {
    font-size: 14px;
    font-weight: 600;
}

.mega-category i {
    flex-shrink: 0;
    color: #553320;
    transition: transform .25s ease, color .25s ease;
}

.mega-categories > .mega-category:hover {
    color: #FFF5E5;
    background: #553320;
    border-color: #553320;
    border-left-color: #DD3F30;
}

.mega-categories > .mega-category:hover i {
    color: #F9C253;
    transform: translate(3px, -2px);
}

@media (max-width: 575.98px) {
.mega-categories {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}
    .mega-categories {
        gap: 8px;
        padding: 12px;
    }

    .mega-categories > .mega-category {
        min-height: 52px;
        padding: 11px 9px;
    }

    .mega-category-name {
        font-size: 12px;
    }
}


/* AllMyCraft — Pattern Mega Menu Cards */
.mega-pattern-products .mega-product {
    background: #fbf9f5;
    border: 1px solid #e8e1d7;
    border-radius: 8px;
    padding: 10px;
    transition: border-color 0.25s ease,
                box-shadow 0.25s ease,
                transform 0.25s ease;
}

.mega-pattern-products .mega-product:hover {
    border-color: #c9b89e;
    box-shadow: 0 4px 14px rgba(45, 35, 25, 0.08);
    transform: translateY(-2px);
}

.mega-pattern-products .mega-product a {
    display: block;
    text-decoration: none;
}

.mega-pattern-products .mega-product h5 {
    margin-top: 10px;
    margin-bottom: 6px;
}

.mega-pattern-products .mega-product .price {
    display: block;
    color: #756858;
    font-size: 12px;
    line-height: 1.5;
}


/* Responsive logo sizing */
@media (max-width: 991px) {
    .navbar-logo {
        height: 52px;
        width: auto;
        max-width: 190px;
        object-fit: contain;
    }
}
