
/* =================================================
   INJIGAN ORGANICS — PREMIUM RESPONSIVE NAVBAR
   File: assets/css/header-responsive-final.css
   Load AFTER header.css and responsive.css
================================================= */

/* FOUNDATION */

#site-header,
#site-header * {
    box-sizing: border-box;
}

#site-header .nav-brand,
#site-header .nav-actions,
#site-header .nav-links {
    min-width: 0;
}

#site-header .nav-brand .custom-logo,
#site-header .nav-brand .logo {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

#site-header a:focus-visible,
#site-header button:focus-visible {
    outline: 3px solid #dba940;
    outline-offset: 4px;
}

/* COMPACT DESKTOP */

@media (min-width: 1101px) and (max-width: 1320px) {

    #site-header .nav-inner {
        grid-template-columns:
            minmax(165px, 190px)
            minmax(0, 1fr)
            auto;
        column-gap: 18px;
    }

    #site-header .nav-brand .logo,
    #site-header .nav-brand .custom-logo {
        width: 190px;
    }

    #site-header .nav-links > ul,
    #site-header .nav-links .menu {
        gap: clamp(15px, 1.7vw, 24px);
    }

    #site-header .nav-links a {
        font-size: 15px;
    }

    #site-header .nav-contact {
        min-width: 154px;
        padding: 12px 16px;
        font-size: 13px;
    }

    #site-header .nav-actions {
        gap: 12px;
    }
}

/* =============================================
   TABLET AND MOBILE NAVIGATION
============================================= */

@media (max-width: 1100px) {

    #site-header.nav {
        min-height: 78px !important;
        height: auto;
        background: rgba(252, 250, 245, .985);
        border-bottom: 1px solid rgba(20, 65, 46, .12);
    }

    #site-header .nav-inner {
        position: relative;
        display: grid !important;
        grid-template-columns:
            minmax(0, 1fr) auto !important;
        align-items: center;

        gap: 12px !important;
        min-height: 78px;
        padding-block: 8px;
        margin-inline: auto;
    }

    /* LOGO */

    #site-header .nav-brand {
        width: auto;
        min-width: 0;
        justify-self: start;
    }

    #site-header .nav-brand .custom-logo,
    #site-header .nav-brand .logo {
        width: clamp(146px, 20vw, 190px) !important;
        max-height: 62px;
        object-position: left center;
    }

    /* NAVIGATION ACTIONS */

    #site-header .nav-actions {
        display: flex;
        justify-content: flex-end;
        justify-self: end;
        align-items: center;

        gap: 10px;
        margin-left: 0;
        min-width: 0;
    }

    #site-header .nav-contact {
        min-width: 0;
        min-height: 43px;
        padding: 10px 15px;
        font-size: 13px;
    }

    #site-header .nav-contact > span:last-child {
        font-size: 17px;
    }

    #site-header .nav-cart {
        width: 43px;
        min-width: 43px;
        height: 44px;
    }

    #site-header .nav-cart-count {
        top: 0;
        right: 0;
    }

    /* PREMIUM COLLAPSED MENU */

    body.injigan-nav-enhanced
    #site-header .nav-links {
        position: absolute !important;
        top: calc(100% - 1px) !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1100;

        display: block !important;
        width: 100% !important;
        min-width: 0;

        max-height: min(70vh, 600px);
        max-height: min(70dvh, 600px);

        margin: 0 !important;
        padding: 11px 19px 18px !important;

        overflow-y: auto;
        overscroll-behavior: contain;

        background: #fcfaf5;
        border: 1px solid #e5ddcc;
        border-top: 2px solid #d8a847;
        border-radius: 0 0 16px 16px;

        box-shadow:
            0 24px 40px rgba(11, 46, 34, .16);

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transform: translateY(-9px);

        transition:
            opacity .2s ease,
            transform .2s ease,
            visibility .2s ease;
    }

    /* MENU OPEN */

    body.injigan-nav-enhanced
    #site-header .nav-links.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    /* MENU LINKS */

    #site-header .nav-links > ul,
    #site-header .nav-links .menu {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;

        gap: 0 !important;
        width: 100%;

        margin: 0;
        padding: 0;
        list-style: none;
    }

    #site-header .nav-links li {
        width: 100%;
        margin: 0;
    }

    #site-header .nav-links li + li {
        border-top: 1px solid #e8e7db;
    }

    #site-header .nav-links a {
        display: flex;
        justify-content: space-between;
        align-items: center;

        width: 100%;
        min-height: 53px;
        padding: 14px 8px;

        color: #163e2b;
        font-size: 15px;
        font-weight: 600;
        line-height: 1.4;
        white-space: normal;
        text-align: left;
    }

    #site-header .nav-links a::after {
        display: none;
    }

    #site-header .nav-links .current-menu-item > a,
    #site-header .nav-links .current_page_item > a,
    #site-header .nav-links a:hover {
        color: #9a7428;
    }

    /* MOBILE MENU BUTTON */

    #site-header .menu-btn {
        display: none !important;
    }

    body.injigan-nav-enhanced
    #site-header .menu-btn {
        display: inline-flex !important;
        flex: 0 0 auto;

        min-width: 45px;
        min-height: 45px;
        padding: 9px 11px;

        border-radius: 9px;
        border: 1px solid rgba(20, 65, 46, .22);

        background: #f8f5ec;
        color: #14412e;

        gap: 8px;
        cursor: pointer;
    }

    body.injigan-nav-enhanced
    #site-header .menu-btn[aria-expanded="true"] {
        background: #14412e;
        border-color: #14412e;
        color: #ffffff;
    }

    /* HAMBURGER TO CLOSE ANIMATION */

    #site-header .menu-btn svg {
        width: 22px;
        height: 22px;
    }

    #site-header .menu-btn svg path {
        transition:
            transform .22s ease,
            opacity .22s ease;
        transform-origin: center;
    }

    #site-header
    .menu-btn[aria-expanded="true"]
    svg path:nth-child(1) {
        transform: translateY(5px) rotate(45deg);
    }

    #site-header
    .menu-btn[aria-expanded="true"]
    svg path:nth-child(2) {
        opacity: 0;
    }

    #site-header
    .menu-btn[aria-expanded="true"]
    svg path:nth-child(3) {
        transform: translateY(-5px) rotate(-45deg);
    }

    /* FALLBACK IF JAVASCRIPT DOES NOT LOAD */

    body:not(.injigan-nav-enhanced)
    #site-header .nav-inner {
        display: flex !important;
        flex-wrap: wrap;
    }

    body:not(.injigan-nav-enhanced)
    #site-header .nav-actions {
        margin-left: auto;
    }

    body:not(.injigan-nav-enhanced)
    #site-header .nav-links {
        position: static !important;
        display: block !important;
        flex: 0 0 100%;

        width: 100% !important;
        padding: 8px 0 !important;

        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;

        border: 0;
        box-shadow: none;
    }
}

/* =============================================
   MOBILE PHONES
============================================= */

@media (max-width: 720px) {

    /* ANNOUNCEMENT BAR */

    .topbar-inner {
        min-height: 31px;
        justify-content: center !important;
        padding-block: 6px;
    }

    .topbar-message {
        font-size: 9px;
        letter-spacing: .9px;
        text-align: center;
        line-height: 1.5;
    }

    .topbar-secondary {
        display: none !important;
    }

    /* COMPACT MOBILE HEADER */

    #site-header.nav {
        min-height: 68px !important;
    }

    #site-header .nav-inner {
        min-height: 68px;
        width: calc(100% - 32px);

        gap: 9px !important;
        padding-block: 7px;
    }

    #site-header .nav-brand .logo,
    #site-header .nav-brand .custom-logo {
        width: clamp(132px, 42vw, 171px) !important;
        max-height: 56px;
    }

    #site-header .nav-actions {
        gap: 7px;
    }

    /* Hide duplicate Shop CTA on small screens.
       Shop remains available inside the menu. */

    #site-header .nav-contact {
        display: none !important;
    }

    #site-header .nav-cart {
        width: 40px;
        min-width: 40px;
        height: 42px;
    }

    #site-header .nav-cart svg {
        width: 22px;
        height: 22px;
    }

    body.injigan-nav-enhanced
    #site-header .menu-btn {
        width: 43px;
        min-width: 43px;
        height: 43px;
        min-height: 43px;
        padding: 8px;
    }

    #site-header .menu-btn-label {
        display: none;
    }

    body.injigan-nav-enhanced
    #site-header .nav-links {
        padding: 10px 15px 17px !important;
    }

    #site-header .nav-links a {
        min-height: 52px;
        font-size: 15px;
    }
}

/* WORDPRESS ADMIN BAR */

@media (max-width: 782px) {
    body.admin-bar #site-header.nav {
        top: 46px;
    }
}

@media (min-width: 783px) {
    body.admin-bar #site-header.nav {
        top: 32px;
    }
}

/* EXTRA SMALL PHONES */

@media (max-width: 360px) {

    #site-header .nav-inner {
        width: calc(100% - 24px);
    }

    #site-header .nav-brand .logo,
    #site-header .nav-brand .custom-logo {
        width: clamp(122px, 40vw, 145px) !important;
    }

    #site-header .nav-actions {
        gap: 4px;
    }

    body.injigan-nav-enhanced
    #site-header .nav-links {
        padding-inline: 12px !important;
    }
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {

    #site-header .nav-links,
    #site-header .menu-btn svg path,
    #site-header .nav-contact {
        transition: none !important;
    }
}

/* END — PREMIUM RESPONSIVE NAVBAR */



/* ==========================================
   INJIGAN MOBILE NAVBAR DROPDOWN FIX
========================================== */

@media (max-width: 1100px) {

  /* Closed menu */

  body.injigan-nav-enhanced
  #site-header .nav-links:not(.open) {
    display: none !important;
  }

  /* Open menu */

  body.injigan-nav-enhanced
  #site-header .nav-links.open {
    position: absolute !important;

    top: calc(100% - 1px) !important;
    left: 0 !important;
    right: 0 !important;

    z-index: 1100 !important;

    display: block !important;
    width: 100% !important;

    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;

    transform: none !important;
  }

  /* Hamburger button */

  body.injigan-nav-enhanced
  #site-header #menu-btn {
    display: inline-flex !important;
  }
}
