/* =========================================================
   BAKELEARN MEGA MENU & LAYOUT
   Complete Stylesheet
========================================================= */

/* ---------------------------------------------------------
   GENERAL
--------------------------------------------------------- */

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Poppins", sans-serif;
    color: #1e293b;
    background: #ffffff;
}


/* =========================================================
   NAVBAR
========================================================= */

.custom-navbar {
    position: relative;
    width: 100%;
    z-index: 1000;
    transition:
        background 0.35s ease,
        box-shadow 0.35s ease,
        padding 0.35s ease;
}


/* ---------------------------------------------------------
   NAVBAR CONTAINER
--------------------------------------------------------- */

.custom-navbar .navbar-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* ---------------------------------------------------------
   LOGO
--------------------------------------------------------- */

.custom-navbar .navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.custom-navbar .navbar-logo {
    max-height: 48px;
    width: auto;
    object-fit: contain;
    filter: none;
}

.custom-navbar .brand-text {
    font-size: 25px;
    font-weight: 700;
    color: #59b5f7;
    text-decoration: none;
}


/* ---------------------------------------------------------
   NAVBAR MENU
--------------------------------------------------------- */

.custom-navbar .navbar-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    margin-left: 45px;
}


/* ---------------------------------------------------------
   NAVIGATION LINKS
--------------------------------------------------------- */

.custom-navbar .navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;

    gap: 3px;
    margin: 0;
    padding: 0;

    list-style: none;
}


.custom-navbar .nav-item {
    position: relative;
    list-style: none;
}


.custom-navbar .nav-link {
    display: flex;
    align-items: center;
    gap: 5px;

    padding: 12px 16px;

    color: #1e293b;
    font-size: 16px;
    font-weight: 500;

    text-decoration: none;

    border-radius: 8px;

    transition:
        color 0.25s ease,
        background 0.25s ease;
}


.custom-navbar .nav-link:hover {
    color: #59b5f7;
    background: rgba(89, 181, 247, 0.08);
}


/* ---------------------------------------------------------
   DROPDOWN ARROW
--------------------------------------------------------- */

.custom-navbar .mega-trigger i,
.custom-navbar .dropdown-toggle i {
    font-size: 11px;
    margin-left: 3px;
    transition: transform 0.3s ease;
}


/* =========================================================
   DROPDOWN MENU
========================================================= */

.custom-navbar .dropdown-menu {
    position: absolute;

    top: calc(100% + 10px);
    left: 50%;

    min-width: 220px;

    transform: translateX(-50%) translateY(10px);

    padding: 12px;

    background: #ffffff;

    border: none;
    border-radius: 16px;

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.12);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;

    display: block;
}


.custom-navbar .nav-item:hover > .dropdown-menu,
.custom-navbar .dropdown:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}


.custom-navbar .dropdown-menu a {
    display: flex;
    align-items: center;

    padding: 12px 16px;

    color: #1e293b;

    font-size: 15px;
    font-weight: 500;

    text-decoration: none;

    border-radius: 10px;

    transition:
        background 0.25s ease,
        color 0.25s ease;
}


.custom-navbar .dropdown-menu a:hover {
    color: #59b5f7;
    background: #f4faff;
}


/* =========================================================
   MEGA MENU WRAPPER
========================================================= */

.custom-navbar .mega-menu {
    position: absolute;

    top: calc(100% + 8px);
    left: 50%;

    width: min(1100px, calc(100vw - 40px));

    transform: translateX(-50%);

    padding: 30px;

    background: #ffffff;

    border: none;
    border-radius: 18px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.12);

    margin: 0;

    opacity: 0;

    visibility: hidden;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}


/* Bootstrap adds .show when clicked */

.custom-navbar .mega-menu.show {
    opacity: 1;
    visibility: visible;
}


/* ---------------------------------------------------------
   MEGA MENU GRID
--------------------------------------------------------- */

.custom-navbar .mega-menu-inner {
    display: grid;

    grid-template-columns:
        1fr
        1fr
        1.1fr;

    gap: 35px;

    width: 100%;
}


/* ---------------------------------------------------------
   MEGA MENU COLUMN
--------------------------------------------------------- */

.custom-navbar .mega-column {
    min-width: 0;
}


.custom-navbar .mega-column h6 {
    margin: 0 0 15px;

    color: #1e293b;

    font-size: 14px;
    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.8px;
}


.custom-navbar .mega-column h6 i {
    color: #59b5f7;
    margin-right: 7px;
}


/* ---------------------------------------------------------
   MEGA MENU LINKS
--------------------------------------------------------- */

.custom-navbar .mega-link {
    display: flex;

    align-items: flex-start;

    gap: 10px;

    padding: 9px 10px;

    margin: 2px 0;

    color: #475569;

    font-size: 14px;

    font-weight: 500;

    line-height: 1.4;

    text-decoration: none;

    border-radius: 10px;

    transition:
        color 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease;
}


.custom-navbar .mega-link i {
    flex-shrink: 0;

    margin-top: 2px;

    color: #59b5f7;
}


.custom-navbar .mega-link:hover {
    color: #59b5f7;

    background: #f4faff;

    transform: translateX(4px);
}


/* ---------------------------------------------------------
   MEGA MENU FEATURE CARD
--------------------------------------------------------- */

.custom-navbar .mega-feature {
    position: relative;

    overflow: hidden;

    min-height: 230px;

    padding: 0;

    border-radius: 16px;

    background: #f5faff;
}


.custom-navbar .mega-feature img {
    width: 100%;

    height: 125px;

    object-fit: cover;

    display: block;
}


.custom-navbar .mega-feature-content {
    padding: 15px 18px;
}


.custom-navbar .mega-feature-label {
    display: block;

    margin-bottom: 5px;

    color: #59b5f7;

    font-size: 11px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 1px;
}


.custom-navbar .mega-feature h5 {
    margin: 0 0 7px;

    color: #1e293b;

    font-size: 18px;

    font-weight: 700;
}


.custom-navbar .mega-feature p {
    margin: 0;

    color: #64748b;

    font-size: 13px;

    line-height: 1.6;
}


/* ---------------------------------------------------------
   MEGA MENU FEATURE LINK
--------------------------------------------------------- */

.custom-navbar .mega-feature-link {
    display: inline-flex;

    align-items: center;

    gap: 5px;

    margin-top: 10px;

    color: #1677ff;

    font-size: 13px;

    font-weight: 600;

    text-decoration: none;
}


.custom-navbar .mega-feature-link:hover {
    color: #59b5f7;
}


/* =========================================================
   MEGA MENU DIVIDER
========================================================= */

.custom-navbar .mega-divider {
    width: 100%;
    height: 1px;

    margin: 20px 0;

    background: #edf2f7;
}


/* =========================================================
   MEGA MENU FOOTER
========================================================= */

.custom-navbar .mega-footer {
    display: flex;

    align-items: center;

    justify-content: space-between;

    padding-top: 15px;
}


.custom-navbar .mega-footer-text {
    color: #363fb6;

    font-size: 13px;
}


.custom-navbar .mega-footer-link {
    display: inline-flex;

    align-items: center;

    gap: 6px;

    color: #1677ff;

    font-size: 13px;

    font-weight: 600;

    text-decoration: none;
}


.custom-navbar .mega-footer-link:hover {
    color: #59b5f7;
}


/* =========================================================
   PREVENT MEGA MENU FROM AFFECTING PAGE FLOW
========================================================= */

.custom-navbar,
.custom-navbar .navbar-container {
    overflow: visible;
}


/* =========================================================
   NAVBAR ACTIONS
========================================================= */

.custom-navbar .navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}


.custom-navbar .nav-action {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #1e293b;

    border-radius: 50%;

    text-decoration: none;

    transition:
        background 0.25s ease,
        color 0.25s ease;
}


.custom-navbar .nav-action:hover {
    color: #59b5f7;
    background: rgba(89, 181, 247, 0.08);
}


/* ---------------------------------------------------------
   CART BADGE
--------------------------------------------------------- */

.custom-navbar .cart-wrapper {
    position: relative;
}


.custom-navbar .cart-count {
    position: absolute;

    top: -4px;
    right: -3px;

    min-width: 18px;
    height: 18px;

    padding: 0 5px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ff9fc5;
    color: #ffffff;

    font-size: 10px;
    font-weight: 700;

    border-radius: 50%;
}


/* =========================================================
   DASHBOARD BUTTON
========================================================= */

.custom-navbar .dashboard-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 22px;

    background: #59b5f7;
    color: #ffffff;

    border-radius: 12px;

    font-size: 15px;
    font-weight: 600;

    text-decoration: none;

    transition:
        background 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}


.custom-navbar .dashboard-btn:hover {
    background: #3da5ef;
    color: #ffffff;

    transform: translateY(-2px);

    box-shadow:
        0 10px 25px rgba(89, 181, 247, 0.25);
}


/* =========================================================
   HOMEPAGE NAVBAR
========================================================= */

.custom-navbar.navbar-home {
    background: rgba(255, 255, 255, 0.97);

    box-shadow:
        0 5px 25px rgba(0, 0, 0, 0.05);
}


.custom-navbar.navbar-home:not(.scrolled) .nav-link,
.custom-navbar.navbar-home:not(.scrolled) .nav-action {
    color: #1e293b;
}


.custom-navbar.navbar-home:not(.scrolled) .nav-link:hover,
.custom-navbar.navbar-home:not(.scrolled) .nav-action:hover {
    color: #59b5f7;
}


.custom-navbar.navbar-home:not(.scrolled) .navbar-logo {
    filter: none;
}


/* =========================================================
   SCROLLED NAVBAR
========================================================= */

.custom-navbar.scrolled {
    position: fixed;
    top: 0;
    left: 0;

    background: rgba(255, 255, 255, 0.97);

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.08);

    backdrop-filter: blur(12px);
}


.custom-navbar.scrolled .nav-link,
.custom-navbar.scrolled .nav-action {
    color: #1e293b;
}


/* =========================================================
   NAVBAR TOGGLER
========================================================= */

.custom-navbar .navbar-toggler {
    width: 45px;
    height: 42px;

    display: none;

    align-items: center;
    justify-content: center;

    border: 1px solid #e2e8f0;
    border-radius: 10px;

    background: #ffffff;

    color: #1e293b;
}


.custom-navbar .navbar-toggler:focus {
    box-shadow: none;
}


/* =========================================================
   HERO / PAGE LAYOUT
========================================================= */

.page-wrapper {
    width: 100%;
    overflow: hidden;
}


main {
    width: 100%;
}


/* =========================================================
   SECTION CONTAINER
========================================================= */

.section-container {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;

    padding-left: 20px;
    padding-right: 20px;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    width: 100%;
}


/* =========================================================
   MOBILE MEGA MENU
========================================================= */

@media (max-width: 991px) {

    .custom-navbar .mega-menu {
        position: static;

        width: 100%;

        transform: none;

        opacity: 1;
        visibility: visible;

        pointer-events: auto;

        display: none;

        padding: 20px;

        margin-top: 5px;

        border-radius: 12px;

        box-shadow: none;

        border: 1px solid #edf2f7;
    }


    .custom-navbar .nav-item:hover > .mega-menu {
        display: none;
    }


    .custom-navbar .nav-item.mega-open > .mega-menu {
        display: block;
    }


    .custom-navbar .mega-menu-inner {
        grid-template-columns: 1fr;

        gap: 20px;
    }


    .custom-navbar .mega-feature {
        min-height: auto;
    }


    .custom-navbar .mega-feature img {
        height: 160px;
    }


    .custom-navbar .mega-footer {
        flex-direction: column;

        align-items: flex-start;

        gap: 10px;
    }


    /* Mobile navbar toggler */
    .custom-navbar .navbar-toggler {
        display: flex;
    }


    /* Mobile menu */
    .custom-navbar .navbar-menu {
        position: absolute;

        top: 100%;
        left: 0;

        width: 100%;

        margin: 0;

        padding: 20px;

        background: #ffffff;

        box-shadow:
            0 15px 35px rgba(0, 0, 0, 0.08);

        display: none;

        flex-direction: column;
        align-items: stretch;
    }


    .custom-navbar .navbar-menu.show {
        display: flex;
    }


    .custom-navbar .navbar-nav {
        width: 100%;

        flex-direction: column;
        align-items: stretch;

        gap: 2px;
    }


    .custom-navbar .nav-link {
        width: 100%;
        padding: 13px 15px;

        justify-content: space-between;
    }


    .custom-navbar .dropdown-menu {
        position: static;

        width: 100%;
        min-width: 100%;

        margin: 5px 0;

        transform: none;

        opacity: 1;
        visibility: visible;

        display: none;

        box-shadow: none;

        border: 1px solid #edf2f7;
    }


    .custom-navbar .nav-item:hover > .dropdown-menu {
        display: block;

        transform: none;
    }


    .custom-navbar .navbar-actions {
        width: 100%;

        margin-top: 15px;
        padding-top: 15px;

        border-top: 1px solid #edf2f7;

        justify-content: flex-start;
    }


    .custom-navbar .dashboard-btn {
        margin-left: auto;
    }
}


/* =========================================================
   TABLET
========================================================= */

@media (min-width: 992px) and (max-width: 1199px) {

    .custom-navbar .mega-menu {
        width: calc(100vw - 30px);

        padding: 25px;
    }

    .custom-navbar .mega-menu-inner {
        gap: 20px;
    }


    .custom-navbar .navbar-container {
        padding: 0 20px;
    }

    .custom-navbar .navbar-menu {
        margin-left: 20px;
    }

    .custom-navbar .nav-link {
        padding: 10px 11px;
        font-size: 15px;
    }

    .custom-navbar .dashboard-btn {
        padding: 11px 17px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 575px) {

    .custom-navbar .navbar-container {
        padding: 10px 15px;
    }


    .custom-navbar .navbar-logo {
        max-height: 40px;
        max-width: 180px;
    }


    .custom-navbar .navbar-actions {
        flex-wrap: wrap;
    }


    .custom-navbar .dashboard-btn {
        padding: 10px 15px;
        font-size: 14px;
    }


    .section-container {
        padding-left: 15px;
        padding-right: 15px;
    }
}


/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes navbarFadeDown {

    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


.custom-navbar {
    animation: navbarFadeDown 0.5s ease;
}


/* ============================================================
   CART BADGE
============================================================ */

.cart-action {
    position: relative;
}


.cart-badge {
    position: absolute;
    top: -7px;
    right: -9px;

    min-width: 18px;
    height: 18px;

    padding: 0 5px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #59B5F7;
    color: #ffffff;

    border-radius: 50px;

    font-size: 10px;
    font-weight: 700;

    line-height: 1;
}


/* ============================================================
   NOTIFICATION
============================================================ */

.nav-notification {
    position: relative;
}


.notification-action {
    border: none;
    background: transparent;
    cursor: pointer;
}


.notification-badge {
    position: absolute;
    top: -7px;
    right: -8px;

    min-width: 18px;
    height: 18px;

    padding: 0 5px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #FFA6C9;
    color: #ffffff;

    border-radius: 50px;

    font-size: 10px;
    font-weight: 700;

    line-height: 1;
}


/* ============================================================
   NOTIFICATION DROPDOWN
============================================================ */

.notification-dropdown {
    position: absolute;

    top: calc(100% + 15px);
    right: 0;

    width: 320px;

    background: #ffffff;

    border-radius: 12px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.12);

    border: 1px solid rgba(0, 0, 0, 0.06);

    overflow: hidden;

    z-index: 1050;
}


.notification-header {
    padding: 15px 18px;

    border-bottom: 1px solid #eeeeee;

    font-size: 15px;
}


.notification-item {
    display: flex;

    align-items: flex-start;

    gap: 10px;

    padding: 14px 18px;

    font-size: 14px;

    color: #333333;

    border-bottom: 1px solid #f2f2f2;
}


.notification-item:last-child {
    border-bottom: none;
}


.notification-item i {
    margin-top: 2px;
}


.notification-item.success i {
    color: #198754;
}


.notification-item.error i {
    color: #dc3545;
}


.notification-item.warning i {
    color: #ffc107;
}


.notification-item.info i {
    color: #0dcaf0;
}