:root {
    --lpg-green: #064C3A;
    --lpg-pill: #1FA55A;
    --lpg-white: #fff;
    --lpg-muted: rgba(255, 255, 255, .75);
    --lpg-border: rgba(255, 255, 255, .12);
    --lpg-active: #1FA55A;
    --lpg-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

.container {
    width: min(1200px, calc(100% - 48px));
    margin-inline: auto;
}

/* ===== Header base ===== */
.lpg-header {
    background: var(--lpg-green);
    color: var(--lpg-white);
    position: sticky;
    top: 0;
    z-index: 2000;
}

.lpg-header__inner {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 12px 0;
}

.lpg-header__logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    align-self: center;
}

.lpg-header__brand {
    display: flex;
    align-items: center;
}

.lpg-header__brand .custom-logo-link,
.lpg-drawer-logo .custom-logo-link {
    display: flex;
    align-items: center;
    height: 48px;
}

.lpg-header__brand .lpg-logo-img,
.lpg-header__brand .custom-logo,
.lpg-drawer-logo .lpg-logo-img,
.lpg-drawer-logo .custom-logo {
    display: block;
    height: 48px;
    width: auto;
}

/* ===== Desktop nav ===== */
.lpg-nav {
    flex: 1 1 auto;
    display: flex;
    /* ✅ make nav a flex row */
    justify-content: center;
    /* ✅ center the menu between logo and actions */
}

.lpg-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 28px;
}

.lpg-menu a {
    color: var(--lpg-white);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: .04em;
    padding: 10px 0;
    display: inline-flex;
    align-items: center;
    position: relative;
}

.lpg-menu .menu-item-has-children>a::after {
    content: " +";
    font-weight: 900;
    margin-left: 2px;
}

/* Active indicator (desktop) */
.lpg-menu .current-menu-item>a::before,
.lpg-menu .current-menu-ancestor>a::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -7px;
    width: 34px;
    height: 4px;
    background: var(--lpg-active);
    transform: translateX(-50%);
    border-radius: 999px;
    clip-path: polygon(0 0, 86% 0, 100% 50%, 86% 100%, 0 100%);
}

.lpg-menu a:hover {
    opacity: .92;
}

/* ===== Desktop dropdown ===== */
.lpg-menu .menu-item {
    position: relative;
}

.lpg-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--lpg-green);
    border: 1px solid var(--lpg-border);
    border-radius: 12px;
    padding: 10px;
    margin: 0;
    list-style: none;
    display: none;
    z-index: 50;
}

.lpg-menu .sub-menu a {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 10px;
    width: 100%;
}

/* ✅ Desktop hover/focus works */
.lpg-menu .menu-item:hover>.sub-menu,
.lpg-menu .menu-item:focus-within>.sub-menu {
    display: block;
}

/* ===== IMPORTANT: hide mobile drawer UI on desktop ===== */
@media (min-width: 981px) {

    /* The nav contains mobile drawer markup; hide it on desktop */
    .lpg-drawer-top,
    .lpg-drawer-extras,
    .lpg-drawer-footer {
        display: none !important;
    }

    /* Keep only the menu visible */
    .lpg-drawer,
    .lpg-drawer-body {
        display: block;
        height: auto;
        overflow: visible;
        padding: 0;
        margin: 0;
    }
}

/* ===== Header actions (desktop) ===== */
.lpg-header__actions {
    display: flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
}

.lpg-cart-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--lpg-white);
    font-weight: 800;
    font-size: 12px;
}

.lpg-cart-icon {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    display: grid;
    place-items: center;
    color: var(--lpg-white);
}

.lpg-cart-count-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--lpg-active);
    color: #fff;
    font-size: 10px;
    display: grid;
    place-items: center;
}

.lpg-cart-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.lpg-cart-total {
    font-weight: 900;
}

.lpg-cart-count {
    font-size: 10px;
    color: var(--lpg-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lpg-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--lpg-pill);
    color: var(--lpg-white);
    text-decoration: none;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-size: 13px;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.lpg-btn__icon {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    display: grid;
    place-items: center;
}

.lpg-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--lpg-shadow);
    filter: brightness(1.02);
}

.lpg-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.lpg-header__account {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--lpg-white);
    text-decoration: none;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: .04em;
}

.lpg-account-badge {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    display: grid;
    place-items: center;
    color: var(--lpg-white);
}

.lpg-account-icon {
    width: 18px;
    height: 18px;
}

/* Burger */
.lpg-nav-toggle {
    display: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 10px;
    margin-left: auto;
}

.lpg-nav-toggle__bar {
    display: block;
    width: 28px;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    margin: 5px 0;
}

/* Submenu toggle button injected by JS: never show on desktop */
.lpg-submenu-toggle {
    display: none !important;
}

/* ========= Mobile ========= */
@media (max-width:980px) {
    body.lpg-nav-open {
        overflow: hidden;
        touch-action: none;
    }

    body.lpg-nav-open .lpg-nav,
    body.lpg-nav-open .lpg-drawer,
    body.lpg-nav-open .lpg-drawer-body {
        touch-action: pan-y;
    }

    .lpg-header__inner {
        padding: 10px 0;
    }

    .lpg-header__brand .custom-logo-link,
    .lpg-drawer-logo .custom-logo-link {
        height: 44px;
    }

    .lpg-header__brand .lpg-logo-img,
    .lpg-header__brand .custom-logo,
    .lpg-drawer-logo .lpg-logo-img,
    .lpg-drawer-logo .custom-logo {
        height: 44px;
    }
    .lpg-nav-toggle {
        display: inline-block;
    }

    .lpg-header__actions {
        display: none;
    }

    /* Fullscreen menu panel (off-canvas left) */
    .lpg-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        min-height: 100vh;
        background: #fff;
        color: #063b2f;
        z-index: 2001;
        transform: translateX(-105%);
        transition: transform 260ms ease;
        padding: 0;
        /* ✅ remove padding so it's true full screen */
        overflow: hidden;
        justify-content: flex-start;
        overscroll-behavior: contain;
    }

    .lpg-header.is-nav-open .lpg-nav {
        transform: translateX(0);
    }

    .lpg-nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .45);
        z-index: 1990;
    }

    .lpg-drawer {
        height: 100%;
        display: flex;
        flex-direction: column;
        min-height: 100%;
    }

    .lpg-drawer-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 18px 18px 14px;
        /* ✅ put padding here instead */
        border-bottom: 1px solid rgba(0, 0, 0, .08);
        width: 100%;
        box-sizing: border-box;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }


    /* LOGO side menu size */
    .lpg-drawer-logo img,
    .lpg-drawer-logo .custom-logo {
        max-height: 100px;
        width: auto;
    }

    .lpg-drawer-close {
        border: 0;
        margin-left: auto;
        background: transparent;
        cursor: pointer;
        width: 44px;
        height: 44px;
        border-radius: 12px;
        display: grid;
        place-items: center;
        color: #0a5a41;
    }

    .lpg-drawer-close svg {
        width: 22px;
        height: 22px;
    }

    .lpg-drawer-body {
        flex: 1 1 auto;
        overflow: auto;
        padding: 12px 18px 14px;
        /* ✅ consistent inner padding */
        box-sizing: border-box;
    }


    /* Mobile menu stack */
    .lpg-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 0;
        margin: 0;
    }

    .lpg-menu a {
        width: 100%;
        padding: 14px 10px;
        border-radius: 10px;
        color: #0a5a41;
        text-transform: none;
        font-size: 16px;
        letter-spacing: 0;
        font-weight: 800;

        opacity: 0;
        transform: translateY(-6px);
        transition: opacity 240ms ease, transform 240ms ease;
    }

    .lpg-header.is-nav-open .lpg-menu a {
        opacity: 1;
        transform: translateY(0);
    }

    .lpg-menu a:hover {
        background: rgba(10, 90, 65, .08);
        opacity: 1;
    }

    /* Active indicator (mobile) */
    .lpg-menu .current-menu-item>a::before,
    .lpg-menu .current-menu-ancestor>a::before {
        left: 18px;
        transform: none;
        bottom: 10px;
        width: 26px;
        height: 3px;
        background: var(--lpg-active);
        clip-path: polygon(0 0, 86% 0, 100% 50%, 86% 100%, 0 100%);
    }

    /* stop desktop hover/focus from pinning submenus open on mobile */
    .lpg-menu .menu-item:hover>.sub-menu,
    .lpg-menu .menu-item:focus-within>.sub-menu {
        display: none !important;
    }

    /* Mobile accordion: only open via .is-submenu-open */
    .menu-item-has-children>.sub-menu {
        position: static;
        display: none !important;
        border: 0;
        background: transparent;
        padding: 4px 0 0 16px;
        margin: 0;
    }

    .menu-item-has-children.is-submenu-open>.sub-menu {
        display: block !important;
    }

    .menu-item-has-children>.sub-menu a {
        font-size: 14px;
        font-weight: 700;
        padding: 12px 10px;
    }

    /* Submenu toggle (mobile only) */
    .lpg-submenu-toggle {
        display: flex !important;
        width: 44px;
        height: 44px;
        margin-left: auto;
        margin-top: -52px;
        border: 0;
        background: transparent;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        color: #0a5a41;
    }

    .lpg-submenu-toggle__icon {
        width: 10px;
        height: 10px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
        opacity: .9;
        transition: transform 180ms ease;
    }

    .lpg-submenu-toggle[aria-expanded="true"] .lpg-submenu-toggle__icon {
        transform: rotate(-135deg);
    }

    /* Footer pinned */
    .lpg-drawer-footer {
        flex: 0 0 auto;
        border-top: 1px solid rgba(0, 0, 0, .08);
        padding: 14px 18px 18px;
        /* ✅ padding on footer too */
        box-sizing: border-box;
    }

    .lpg-drawer-footer a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 10px;
        border-radius: 10px;
        color: #0a5a41;
        font-weight: 800;
        text-decoration: none;

        opacity: 0;
        transform: translateY(6px);
        transition: opacity 240ms ease, transform 240ms ease;
    }

    .lpg-header.is-nav-open .lpg-drawer-footer a {
        opacity: 1;
        transform: translateY(0);
    }

    .lpg-drawer-footer .lpg-cart-link {
        color: #0a5a41;
        font-size: 16px;
        font-weight: 800;
        text-transform: none;
    }

    .lpg-drawer-footer .lpg-cart-icon {
        background: rgba(10, 90, 65, 0.12);
        color: #0a5a41;
    }

    .lpg-drawer-footer .lpg-cart-count {
        color: #5c6a60;
        text-transform: none;
        letter-spacing: 0;
        font-size: 12px;
    }

    .lpg-account-icon {
        width: 18px;
        height: 18px;
        display: inline-block;
        flex: 0 0 auto;
    }

    .lpg-drawer-footer .lpg-account-badge {
        background: rgba(10, 90, 65, 0.12);
        color: #0a5a41;
    }

    /* Extras (Order the Gas Crew) look like menu items — MOBILE ONLY */
    .lpg-drawer-extras {
        margin-top: 6px;
    }

    .lpg-drawer-extras a {
        width: 100%;
        padding: 14px 10px;
        border-radius: 10px;
        color: #0a5a41;
        text-transform: none;
        font-size: 16px;
        letter-spacing: 0;
        font-weight: 800;
        text-decoration: none;

        opacity: 0;
        transform: translateY(-6px);
        transition: opacity 240ms ease, transform 240ms ease;
    }

    .lpg-header.is-nav-open .lpg-drawer-extras a {
        opacity: 1;
        transform: translateY(0);
    }

    .lpg-drawer-extras a:hover {
        background: rgba(10, 90, 65, .08);
    }

    /* Force the drawer panel to full viewport width regardless of inherited styles */
    .lpg-nav {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        display: block !important;
        /* kills any flex centering bleeding from desktop */
        box-sizing: border-box !important;
    }

    /* Ensure the internal drawer also spans full width */
    .lpg-drawer {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    /* Make the top bar full width and allow absolute-positioned close button */
    .lpg-drawer-top {
        position: relative !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    /* Pin X to the top-right corner (same area as burger) */
    .lpg-drawer-close {
        position: absolute !important;
        top: 18px !important;
        right: 18px !important;
        margin: 0 !important;
    }

    /* Give the logo some breathing space so it doesn't collide with the X */
    .lpg-drawer-logo {
        padding-right: 64px;
        /* room for the close button */
    }
}

/* =======================
   FOOTER (unchanged)
======================= */
.lpg-footer {
    background: var(--lpg-green);
    color: var(--lpg-white);
    margin-top: 0;
}

.lpg-footer__top {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 48px;
    padding: 48px 0 28px;
}

.lpg-footer__title {
    font-size: 28px;
    margin: 0 0 10px;
    font-weight: 900;
}

.lpg-footer__tagline {
    color: var(--lpg-muted);
    margin: 0 0 16px;
    line-height: 1.55;
}

.lpg-footer__heading {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 900;
}

.lpg-footer-menu,
.lpg-legal-menu,
.lpg-contact,
.lpg-social {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lpg-footer-menu li {
    margin: 10px 0;
}

.lpg-footer-menu a {
    color: var(--lpg-muted);
    text-decoration: none;
}

.lpg-footer-menu a:hover {
    color: var(--lpg-white);
}

.lpg-social {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.lpg-social__link {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--lpg-white);
    display: grid;
    place-items: center;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.lpg-social__link:hover {
    transform: translateY(-1px);
    box-shadow: var(--lpg-shadow);
    filter: brightness(1.02);
}

.lpg-social__link:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.55);
    outline-offset: 3px;
}

.lpg-contact__item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    color: var(--lpg-muted);
}

.lpg-contact__item a {
    color: var(--lpg-muted);
    text-decoration: none;
}

.lpg-contact__item a:hover {
    color: var(--lpg-white);
}

.lpg-contact__icon {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    color: var(--lpg-muted);
}

.lpg-footer__bottom {
    border-top: 1px solid var(--lpg-border);
    padding: 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.lpg-footer__copyright {
    margin: 0;
    color: var(--lpg-muted);
}

.lpg-footer__credit {
    color: var(--lpg-muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
}

.lpg-footer__credit:hover {
    color: var(--lpg-white);
}

.lpg-legal-menu {
    display: flex;
    gap: 18px;
}

.lpg-legal-menu a {
    color: var(--lpg-muted);
    text-decoration: none;
}

.lpg-legal-menu a:hover {
    color: var(--lpg-white);
}

@media (max-width: 980px) {
    .lpg-footer__top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 620px) {
    .lpg-footer__top {
        grid-template-columns: 1fr;
    }

    .lpg-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================================
   MOBILE SUBMENU: FORCE OPEN/CLOSE (override any conflicting CSS)
   ========================================= */
@media (max-width: 980px) {

    /* Always treat submenus as accordion panels on mobile */
    .lpg-header .lpg-nav .lpg-menu .sub-menu {
        position: static !important;
        display: block !important;
        /* we control visibility via max-height */
        max-height: 0 !important;
        overflow: hidden !important;
        visibility: hidden !important;
        opacity: 0 !important;
        margin: 0 !important;
        padding: 0 0 0 16px !important;
        border: 0 !important;
        background: transparent !important;
        transition: max-height 220ms ease, opacity 180ms ease;
    }

    /* When open */
    .lpg-header .lpg-nav .lpg-menu .menu-item-has-children.is-submenu-open .sub-menu {
        max-height: 1000px !important;
        /* big enough for any submenu */
        visibility: visible !important;
        opacity: 1 !important;
        padding-top: 6px !important;
    }

    /* Submenu links (ensure they remain visible even with global anchor styles) */
    .lpg-header .lpg-nav .lpg-menu .sub-menu a {
        display: block !important;
        width: 100% !important;
    }
}
