/* =========================================================
   RAVI PACKAGING HEADER
========================================================= */

/* =========================================================
   TOP BAR
========================================================= */

.top-bar {
    background: var(--rp-primary-dark);
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
}

.top-bar-inner {
    min-height: 36px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.top-bar-left {
    display: flex;
    align-items: center;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 22px;
}

.top-bar-right a {
    color: rgba(255, 255, 255, 0.72);
    transition: var(--rp-transition);
}

.top-bar-right a:hover {
    color: #ffffff;
}

/* =========================================================
   MAIN HEADER
========================================================= */

.main-header {
    background: #ffffff;
    border-bottom: 1px solid var(--rp-border);
}

.main-header-inner {
    min-height: 88px;

    display: flex;
    align-items: center;

    gap: 35px;
}

/* =========================================================
   BRAND LOGO
========================================================= */

.brand-logo {
    width: 175px;

    flex-shrink: 0;

    display: flex;
    flex-direction: column;

    color: var(--rp-primary);

    line-height: 1;
}

.brand-logo-main {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 1px;
}

.brand-logo-sub {
    margin-top: 5px;

    color: var(--rp-accent);

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 4px;
}

/* =========================================================
   SEARCH
========================================================= */

.header-search {
    flex: 1;

    max-width: 650px;

    margin: 0 auto;
}

.header-search form {
    width: 100%;
}

.search-box {
    height: 48px;

    display: flex;
    align-items: center;

    overflow: hidden;

    background: var(--rp-light);

    border: 1px solid var(--rp-border);

    border-radius: 8px;

    transition: var(--rp-transition);
}

.search-box:focus-within {
    background: #ffffff;

    border-color: var(--rp-primary);

    box-shadow: 0 0 0 3px rgba(23, 63, 53, 0.08);
}

.search-box input {
    width: 100%;
    height: 100%;

    border: 0;
    outline: 0;

    background: transparent;

    padding: 0 16px;

    color: var(--rp-dark);

    font-size: 13px;
}

.search-box input::placeholder {
    color: #9aa39f;
}

.search-box button {
    width: 52px;
    height: 100%;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;

    color: var(--rp-primary);

    cursor: pointer;

    font-size: 17px;
}

/* =========================================================
   HEADER ACTIONS
========================================================= */

.header-actions {
    display: flex;
    align-items: center;

    gap: 20px;

    flex-shrink: 0;
}

.header-action {
    position: relative;

    display: flex;
    align-items: center;

    gap: 9px;

    color: var(--rp-dark);

    transition: var(--rp-transition);
}

.header-action:hover {
    color: var(--rp-primary);
}

.header-action-icon {
    position: relative;

    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
}

.header-action-text {
    display: flex;
    flex-direction: column;

    font-size: 12px;

    line-height: 1.2;

    font-weight: 600;
}

.header-action-text small {
    color: var(--rp-muted);

    font-size: 9px;
    font-weight: 400;

    margin-bottom: 2px;
}

/* =========================================================
   CART COUNT
========================================================= */

.cart-icon-wrapper {
    position: relative;
}

.cart-count {
    position: absolute;

    top: -4px;
    right: -5px;

    min-width: 16px;
    height: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 4px;

    border-radius: 50px;

    color: #ffffff;

    background: var(--rp-accent);

    font-size: 8px;
    font-weight: 700;
}

/* =========================================================
   MOBILE MENU BUTTON
========================================================= */

.mobile-menu-btn {
    display: none;

    width: 40px;
    height: 40px;

    align-items: center;
    justify-content: center;

    background: transparent;

    color: var(--rp-dark);

    font-size: 24px;

    cursor: pointer;
}

/* =========================================================
   MAIN NAVIGATION
========================================================= */

.main-navigation {
    position: relative;

    background: #ffffff;

    border-bottom: 1px solid var(--rp-border);

    z-index: 1000;
}

.navigation-inner {
    min-height: 54px;

    display: flex;
    align-items: center;

    gap: 4px;
}

.nav-link-item {
    position: relative;

    min-height: 54px;

    display: inline-flex;
    align-items: center;

    gap: 6px;

    padding: 0 14px;

    color: var(--rp-text);

    background: transparent;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

    transition: var(--rp-transition);
}

.nav-link-item:hover {
    color: var(--rp-primary);
}

.nav-link-item i {
    font-size: 10px;

    transition: transform 0.2s ease;
}

.nav-link-item.active i {
    transform: rotate(180deg);
}

.nav-link-item::after {
    content: "";

    position: absolute;

    left: 14px;
    right: 14px;
    bottom: 0;

    height: 2px;

    background: var(--rp-primary);

    transform: scaleX(0);

    transform-origin: center;

    transition: transform 0.2s ease;
}

.nav-link-item:hover::after,
.nav-link-item.active::after {
    transform: scaleX(1);
}

/* =========================================================
   OFFER
========================================================= */

.nav-offer {
    color: #a35c36;
}

.nav-offer:hover {
    color: #8c4928;
}

/* =========================================================
   QUOTE BUTTON
========================================================= */

.nav-quote-button {
    margin-left: auto;

    display: inline-flex;
    align-items: center;

    gap: 8px;

    padding: 10px 17px;

    border-radius: 6px;

    color: #ffffff;

    background: var(--rp-primary);

    font-size: 12px;

    font-weight: 600;

    transition: var(--rp-transition);
}

.nav-quote-button:hover {
    color: #ffffff;

    background: var(--rp-primary-dark);

    transform: translateY(-1px);
}

.nav-quote-button i {
    font-size: 12px;
}

/* =========================================================
   MEGA MENU
========================================================= */

.mega-menu {
    position: absolute;

    /*
       IMPORTANT:
       Mega menu must start directly below
       the main navigation.
    */
    /* top: 100%; */

    left: 0;
    right: 0;

    display: none;

    background: #ffffff;

    border-top: 1px solid var(--rp-border);

    border-bottom: 1px solid var(--rp-border);

    box-shadow: 0 20px 45px rgba(20, 40, 34, 0.12);

    z-index: 9999;
}

.mega-menu.active {
    display: block;

    animation: megaMenuIn 0.2s ease;
}

@keyframes megaMenuIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   MEGA MENU INNER
========================================================= */

.mega-menu-inner {
    padding: 35px 0 40px;
}

.mega-menu-heading {
    max-width: 390px;

    margin-bottom: 28px;
}

.mega-menu-eyebrow {
    display: block;

    margin-bottom: 7px;

    color: var(--rp-accent);

    font-size: 12px;

    font-weight: 700;

    letter-spacing: 1.8px;
}

.mega-menu-heading h3 {
    margin-bottom: 6px;

    color: var(--rp-dark);

    font-size: 24px;

    line-height: 1.2;
}

.mega-menu-heading p {
    margin: 0;

    color: var(--rp-muted);

    font-size: 15px;
}

/* =========================================================
   PRODUCT MEGA MENU GRID
========================================================= */

.mega-menu-grid {
    display: grid;

    grid-template-columns: repeat(5, minmax(0, 1fr));

    gap: 35px;
}

.mega-menu-column {
    min-width: 0;
}

.mega-menu-column h4 {
    margin-bottom: 12px;

    color: var(--rp-dark);

    font-size: 15px;

    font-weight: 700;
}

.mega-menu-column h4 a {
    color: var(--rp-dark);
}

.mega-menu-column h4 a:hover {
    color: var(--rp-primary);
}

.mega-menu-column a {
    display: block;

    margin-bottom: 8px;

    color: var(--rp-muted);

    font-size: 13px;

    line-height: 1.4;

    transition: var(--rp-transition);
}

.mega-menu-column a:hover {
    padding-left: 3px;

    color: var(--rp-primary);
}

.mega-second-heading {
    margin-top: 25px !important;
}

/* =========================================================
   PURPOSE MEGA MENU
========================================================= */

.purpose-mega-menu .mega-menu-heading {
    margin-bottom: 25px;
}

.purpose-menu-grid {
    display: grid;

    grid-template-columns: repeat(5, minmax(0, 1fr));

    gap: 12px;
}

.purpose-menu-card {
    min-height: 105px;

    display: flex;
    align-items: center;

    gap: 12px;

    padding: 16px;

    border: 1px solid var(--rp-border);

    border-radius: 10px;

    background: #ffffff;

    transition: var(--rp-transition);
}

.purpose-menu-card:hover {
    border-color: var(--rp-primary);

    box-shadow: var(--rp-shadow-sm);

    transform: translateY(-2px);
}

.purpose-icon {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: var(--rp-primary-light);

    color: var(--rp-primary);

    font-size: 16px;
}

.purpose-menu-card > span:nth-child(2) {
    min-width: 0;

    flex: 1;

    display: flex;
    flex-direction: column;
}

.purpose-menu-card strong {
    color: var(--rp-dark);

    font-size: 13px;

    line-height: 1.3;
}

.purpose-menu-card small {
    margin-top: 4px;

    color: var(--rp-muted);

    font-size: 12px;

    line-height: 1.3;
}

.purpose-menu-card > i {
    flex-shrink: 0;

    color: #9aa39f;

    font-size: 11px;

    transition: var(--rp-transition);
}

.purpose-menu-card:hover > i {
    color: var(--rp-primary);

    transform: translate(2px, -2px);
}

/* =========================================================
   MOBILE NAVIGATION
========================================================= */

.mobile-navigation {
    position: fixed;

    top: 0;
    left: 0;

    width: min(88%, 380px);
    height: 100vh;

    overflow-y: auto;

    background: #ffffff;

    transform: translateX(-100%);

    transition: transform 0.3s ease;

    z-index: 1001;
}

.mobile-navigation.active {
    transform: translateX(0);
}

.mobile-navigation-header {
    height: 70px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 20px;

    border-bottom: 1px solid var(--rp-border);
}

.mobile-navigation-title {
    color: var(--rp-dark);

    font-size: 18px;

    font-weight: 700;
}

.mobile-menu-close {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--rp-light);

    color: var(--rp-dark);

    cursor: pointer;
}

.mobile-navigation-content {
    padding: 10px 15px 35px;
}

.mobile-nav-link,
.mobile-nav-toggle {
    width: 100%;

    min-height: 50px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 8px;

    color: var(--rp-dark);

    background: transparent;

    border-bottom: 1px solid var(--rp-border);

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;
}

.mobile-nav-link span,
.mobile-nav-toggle span {
    display: flex;
    align-items: center;

    gap: 12px;
}

.mobile-nav-link i,
.mobile-nav-toggle i {
    color: var(--rp-primary);
}

.mobile-nav-toggle > i {
    transition: transform 0.2s ease;
}

.mobile-nav-toggle.active > i {
    transform: rotate(180deg);
}

.mobile-submenu {
    display: none;

    padding: 5px 0 8px 40px;

    background: var(--rp-light);
}

.mobile-submenu.active {
    display: block;
}

.mobile-submenu a {
    display: block;

    padding: 9px 8px;

    color: var(--rp-muted);

    font-size: 12px;
}

.mobile-submenu a:hover {
    color: var(--rp-primary);
}

.mobile-nav-divider {
    height: 20px;
}

.mobile-cart-count {
    min-width: 20px;
    height: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50px;

    color: #ffffff;

    background: var(--rp-accent);

    font-size: 9px;
}

.mobile-navigation-overlay {
    position: fixed;

    inset: 0;

    display: none;

    background: rgba(10, 20, 17, 0.45);

    z-index: 1000;
}

.mobile-navigation-overlay.active {
    display: block;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1199px) {
    .main-header-inner {
        gap: 20px;
    }

    .brand-logo {
        width: 150px;
    }

    .brand-logo-main {
        font-size: 24px;
    }

    .header-actions {
        gap: 10px;
    }

    .header-action-text {
        display: none;
    }

    .header-action-icon {
        width: 36px;
        height: 36px;
    }

    .navigation-inner {
        overflow-x: auto;

        scrollbar-width: none;
    }

    .navigation-inner::-webkit-scrollbar {
        display: none;
    }

    .nav-link-item {
        white-space: nowrap;
    }

    .mega-menu-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));

        row-gap: 30px;
    }

    .purpose-menu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {
    .top-bar {
        display: none;
    }

    .main-header-inner {
        min-height: 68px;

        gap: 10px;
    }

    .mobile-menu-btn {
        display: flex;

        flex-shrink: 0;
    }

    .brand-logo {
        width: auto;

        flex: 1;
    }

    .brand-logo-main {
        font-size: 21px;
    }

    .brand-logo-sub {
        font-size: 7px;

        letter-spacing: 3px;
    }

    .header-search {
        display: none;
    }

    .header-actions {
        gap: 4px;
    }

    .header-action {
        display: none;
    }

    .header-action.cart-action {
        display: flex;
    }

    .header-action-icon {
        width: 38px;
        height: 38px;

        font-size: 19px;
    }

    .main-navigation {
        display: none;
    }

    .mega-menu {
        display: none !important;
    }

    .mobile-navigation {
        display: block;
    }
}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 380px) {
    .mobile-menu-btn {
        width: 35px;
        height: 35px;

        font-size: 22px;
    }

    .brand-logo-main {
        font-size: 19px;
    }

    .header-action-icon {
        width: 34px;
        height: 34px;
    }
}
