/* ====================
   HEADER CSS - Universal Header Styles
   Includes: Announcement Bar, Header, Mega Menu, Off-Canvas Drawer
   ==================== */

/* ---- reset / base ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0d3a38;
    --secondary: #0f5a42;
    --text: #1e2a2a;
    --text-light: #4a5a5a;

    /* Fallbacks until header.js measures the real rendered heights */
    --offcanvas-top-offset: 40px;
    --site-header-height: 64px;
}

/* ====================
   ANNOUNCEMENT BAR - ISOLATED
   ==================== */

.announcement-bar {
    background-color: var(--brand-teal-light);
    color: var(--primary);
    padding: 3px 0;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(13, 58, 56, 0.08);
    /* position:relative WITHOUT a z-index does not create a stacking context,
       so the drawer/overlay nested below (z-index 2000/2001) still escape to
       render above the sticky header (1000) - but this bar's own box stays
       at the normal stacking level, so it never sits above the off-canvas
       mobile menu (also nested in header) when that opens. */
    position: relative;
}

.announcement-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.announcement-left {
    flex: 1;
    cursor: pointer;
}

@media (min-width: 1400px) {
    .announcement-container {
        max-width: 1320px;
        padding: 0 25px;
    }
}

@media (min-width: 1600px) {
    .announcement-container {
        max-width: 1520px;
        padding: 0 30px;
    }
}

@media (min-width: 1800px) {
    .announcement-container {
        max-width: 1720px;
        padding: 0 35px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .announcement-container {
        padding: 0 15px;
    }
}

@media (max-width: 767px) {
    .announcement-container {
        padding: 0 12px;
    }
}

.announcement-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 0;
}

.announcement-toggle .icon-svg {
    font-size: 1.05rem;
    color: var(--primary);
    transition: transform 0.25s ease;
}

.announcement-text {
    display: inline-block;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.announcement-text.is-swapping {
    opacity: 0;
    transform: translateY(-6px);
}

.announcement-toggle[aria-expanded="true"] .icon-svg {
    transform: rotate(180deg);
}

.announcement-right {
    display: flex;
    align-items: center;
}

.announcement-right>*:not(:first-child) {
    position: relative;
    margin-left: 18px;
    padding-left: 18px;
}

.announcement-right>*:not(:first-child)::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 14px;
    background: rgba(13, 58, 56, 0.18);
}

.announcement-link {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.announcement-link .icon-svg {
    font-size: 0.8rem;
    color: var(--primary);
    transition: color 0.3s ease;
}

.announcement-link:hover,
.announcement-link:hover .icon-svg {
    color: var(--brand-teal);
}

.announcement-lang {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.announcement-lang .icon-svg {
    font-size: 0.85rem;
    color: var(--primary);
}

.announcement-panel-overlay {
    /* Starts below the bar (top: 100%) so it never dims the bar itself -
       only the header and page content beneath it. */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.announcement-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.announcement-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 85vh;
    overflow-y: auto;
    background-color: #ffffff;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.announcement-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.announcement-panel-close {
    position: absolute;
    top: 4px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: none;
    border: none;
    color: #000;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s ease, background-color 0.3s ease;
    z-index: 1;
}

.announcement-panel-close:hover {
    color: var(--brand-teal);
    background-color: #f4f5f4;
}

.announcement-panel-inner {
    padding: 48px 20px 24px;
}

.announcement-panel-grid {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 14px;
    scrollbar-width: thin;
    scrollbar-color: var(--brand-teal) transparent;
}

.announcement-panel-grid::-webkit-scrollbar {
    height: 6px;
}

.announcement-panel-grid::-webkit-scrollbar-thumb {
    background: var(--brand-teal);
    border-radius: 4px;
}

.announcement-offer {
    flex: 0 0 300px;
    scroll-snap-align: start;
}

.announcement-offer-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 10px;
}

.announcement-offer p {
    font-size: 0.88rem;
    color: var(--text-light, #667085);
    line-height: 1.5;
    margin: 0 0 14px;
}

.announcement-offer-link {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--primary);
    text-decoration: none;
    border-bottom: 2px solid var(--brand-teal);
    padding-bottom: 3px;
}

.announcement-offer-link:hover {
    color: var(--brand-teal);
}

.announcement-panel-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e9edf0;
    color: var(--primary);
    font-size: 0.85rem;
}

.announcement-panel-footer .icon-svg {
    color: var(--icon-teal);
    font-size: 1.2rem;
}

.announcement-panel-footer strong {
    font-weight: 700;
}

@media (max-width: 1024px) {
    /* Mobile view: only the left-side announcement is shown */
    .announcement-right {
        display: none;
    }
}

@media (max-width: 767px) {
    .announcement-toggle {
        font-size: 0.8rem;
    }

    .announcement-panel-grid {
        gap: 18px;
    }

    .announcement-offer {
        flex: 0 0 240px;
    }
}

@media (max-width: 480px) {
    .announcement-bar {
        padding: 4px 0;
    }
}

/* ====================
   HEADER STYLES - COMPACT SINGLE LINE
   ==================== */

header {
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 12px;
    flex-wrap: nowrap;
}

@media (min-width: 1400px) {
    .header-container {
        max-width: 1320px;
        padding: 0 25px;
        gap: 16px;
    }
}

@media (min-width: 1600px) {
    .header-container {
        max-width: 1520px;
        padding: 0 30px;
        gap: 20px;
    }
}

@media (min-width: 1800px) {
    .header-container {
        max-width: 1720px;
        padding: 0 35px;
        gap: 24px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .header-container {
        padding: 0 15px;
        gap: 10px;
    }
}

@media (max-width: 767px) {
    .header-container {
        padding: 0 12px;
        gap: 8px;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
    color: var(--primary);
}

.logo .logo-mark {
    display: block;
    height: auto;
    max-height: 32px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    color: #0d3a38;
    flex-shrink: 0;
}

.logo .logo-divider {
    width: 1px;
    height: 18px;
    background-color: #d9dcda;
    flex-shrink: 0;
}

.logo .tag {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-light, #6b7670);
    text-transform: uppercase;
    flex-shrink: 0;
}

@media (min-width: 1400px) {
    .logo .logo-mark {
        max-height: 38px;
        max-width: 140px;
    }

    .logo .tag {
        font-size: 0.65rem;
    }

    .logo .logo-divider {
        height: 20px;
    }
}

@media (min-width: 1600px) {
    .logo .logo-mark {
        max-height: 42px;
        max-width: 160px;
    }

    .logo .tag {
        font-size: 0.7rem;
    }
}

@media (min-width: 1800px) {
    .logo .logo-mark {
        max-height: 46px;
        max-width: 180px;
    }
}

.nav-links {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
}

.nav-links ul {
    display: flex;
    margin: 0;
    padding: 0;
    gap: 16px;
    flex-wrap: nowrap;
}

.nav-links li {
    margin: 0;
    list-style: none;
    white-space: nowrap;
}

.nav-links a,
.nav-links .mega-menu-trigger {
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    padding: 4px 0;
}

.mega-menu-trigger {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.nav-links ul a:hover,
.nav-links ul .mega-menu-trigger:hover {
    color: var(--brand-teal);
}

@media (min-width: 1400px) {
    .nav-links ul {
        gap: 22px;
    }

    .nav-links a,
    .nav-links .mega-menu-trigger {
        font-size: 0.92rem;
    }
}

@media (min-width: 1600px) {
    .nav-links ul {
        gap: 28px;
    }

    .nav-links a,
    .nav-links .mega-menu-trigger {
        font-size: 0.98rem;
    }
}

@media (min-width: 1800px) {
    .nav-links ul {
        gap: 34px;
    }
}

.header-utils {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-search {
    display: flex;
    align-items: center;
    background-color: #f4f5f4;
    border: 1px solid #e6e8e6;
    border-radius: 999px;
    padding: 2px 2px 2px 12px;
    width: 180px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 1;
    min-width: 100px;
}

.header-search:focus-within {
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 3px rgba(14, 148, 136, 0.12);
}

.header-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.8rem;
    color: var(--primary);
    padding: 6px 0;
    min-width: 0;
    width: 60px;
}

.header-search-input::placeholder {
    color: #9aa39d;
    font-size: 0.75rem;
}

.header-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background-color: var(--brand-teal);
    color: white;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
    font-size: 0.8rem;
}

.header-search-btn .icon-svg {
    color: #fff;
}

.header-search-btn:hover {
    background-color: var(--brand-teal-hover);
}

@media (min-width: 1400px) {
    .header-search {
        width: 210px;
        padding: 2px 2px 2px 14px;
    }

    .header-search-input {
        font-size: 0.85rem;
    }

    .header-search-input::placeholder {
        font-size: 0.8rem;
    }

    .header-utils {
        gap: 10px;
    }
}

@media (min-width: 1600px) {
    .header-search {
        width: 240px;
    }

    .header-utils {
        gap: 12px;
    }
}

@media (min-width: 1800px) {
    .header-search {
        width: 270px;
    }
}

@media (min-width: 1025px) and (max-width: 1199px) {
    .nav-links ul {
        gap: 10px;
    }

    .nav-links a {
        font-size: 0.78rem;
    }

    .header-search {
        width: 140px;
    }

    .header-search-input {
        font-size: 0.7rem;
    }

    .header-search-input::placeholder {
        font-size: 0.65rem;
    }

    .header-utils {
        gap: 4px;
    }

    .logo .logo-mark {
        max-height: 28px;
        max-width: 100px;
    }

    .logo .tag {
        font-size: 0.55rem;
    }

    .logo .logo-divider {
        height: 16px;
    }
}

@media (min-width: 1025px) and (max-width: 1099px) {
    .nav-links ul {
        gap: 6px;
    }

    .nav-links a {
        font-size: 0.72rem;
    }

    .header-search {
        width: 110px;
        padding: 2px 2px 2px 8px;
    }

    .header-search-input {
        font-size: 0.65rem;
    }

    .header-search-input::placeholder {
        font-size: 0.6rem;
    }

    .header-search-btn {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }

    .header-utils {
        gap: 2px;
    }

    .logo .logo-mark {
        max-height: 24px;
        max-width: 85px;
    }

    .logo .tag {
        font-size: 0.5rem;
    }

    .logo .logo-divider {
        height: 14px;
    }

    .logo {
        gap: 4px;
    }
}

.mobile-menu-btn {
    display: none;
    position: relative;
    width: 24px;
    height: 24px;
    --hb-h: 24px;
    --hb-t: 3px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    flex-shrink: 0;
    /* Stays above the off-canvas drawer (z-index 2001), which now opens at
       the same height/position as this button, so the morphed cross stays
       visible - and clickable to close - instead of being covered by it. */
    z-index: 2002;
}

/* Staggered pill bars: medium top flush left, full-width middle, short
   bottom flush right - same thickness, solid black. */
.hamburger-line {
    position: absolute;
    left: 0;
    top: 0;
    height: var(--hb-t);
    border-radius: 999px;
    background-color: #000;
    transition: transform 0.3s ease, opacity 0.25s ease, top 0.3s ease, width 0.3s ease, left 0.3s ease;
}

.hamburger-line-1 {
    top: 0;
    left: 0;
    width: 65%;
}

.hamburger-line-2 {
    top: calc((var(--hb-h) - var(--hb-t)) / 2);
    left: 0;
    width: 100%;
}

.hamburger-line-3 {
    top: calc(var(--hb-h) - var(--hb-t));
    left: 55%;
    width: 45%;
}

/* Morphs into a cross when the menu is open */
.mobile-menu-btn.is-active .hamburger-line-1 {
    top: calc((var(--hb-h) - var(--hb-t)) / 2);
    left: 0;
    width: 100%;
    transform: rotate(45deg);
}

.mobile-menu-btn.is-active .hamburger-line-2 {
    opacity: 0;
}

.mobile-menu-btn.is-active .hamburger-line-3 {
    top: calc((var(--hb-h) - var(--hb-t)) / 2);
    left: 0;
    width: 100%;
    transform: rotate(-45deg);
}

.mobile-header-icons {
    display: flex;
    align-items: center;
    gap: 28px;
    /* Never let this get squeezed by the logo (body has overflow-x:hidden,
       so a shrunk/overlapping icon group would silently clip off-screen
       instead of visibly wrapping) - if it doesn't fit next to the logo,
       header-container's flex-wrap sends it to its own line instead. */
    flex-shrink: 0;
}

.mobile-search-icon {
    display: none;
    font-size: 24px;
    color: #000;
    background: none;
    border: none;
    padding: 5px 4px;
    cursor: pointer;
    transition: color 0.2s;
}

.mobile-search-icon .icon-svg {
    color: #000;
}

.mobile-search-icon:hover .icon-svg {
    color: var(--brand-teal);
}

@media (max-width: 1024px) {
    .header-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 0;
    }

    .mobile-search-icon {
        display: inline-block;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        order: 3;
        width: 100%;
        display: none;
        margin-top: 16px;
        flex-direction: column;
        justify-content: center;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links ul {
        flex-direction: column;
        width: 100%;
        gap: 12px;
        margin-bottom: 20px;
    }

    .nav-links li {
        margin: 0;
        width: 100%;
        text-align: center;
    }

    .header-utils {
        display: none;
    }

    .logo .logo-mark {
        max-height: 32px;
        max-width: 120px;
    }

    .logo .tag {
        font-size: 0.6rem;
    }

    .logo .logo-divider {
        height: 18px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 13px 0;
    }

    .logo .logo-mark {
        max-height: 28px;
        max-width: 100px;
    }

    .logo .tag {
        font-size: 0.5rem;
    }

    .logo .logo-divider {
        height: 14px;
    }

    .logo {
        gap: 6px;
    }

    .mobile-header-icons {
        gap: 24px;
    }

    .mobile-menu-btn {
        width: 21px;
        height: 21px;
        --hb-h: 21px;
        --hb-t: 2.6px;
    }

    .mobile-search-icon {
        font-size: 21px;
        padding: 5px 2px;
    }

    .nav-links ul {
        gap: 10px;
        margin-bottom: 16px;
    }

    .nav-links li a {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 11px 0;
    }

    .logo .logo-mark {
        max-height: 24px;
        max-width: 80px;
    }

    .logo .tag {
        font-size: 0.45rem;
    }

    .logo .logo-divider {
        height: 12px;
    }

    .logo {
        gap: 4px;
    }

    .mobile-header-icons {
        gap: 20px;
    }

    .mobile-menu-btn {
        width: 18px;
        height: 18px;
        --hb-h: 18px;
        --hb-t: 2.25px;
    }

    .mobile-search-icon {
        font-size: 18px;
        padding: 4px 2px;
    }

    .nav-links li a {
        font-size: 0.8rem;
        padding: 8px 0;
    }
}

/* ====================
   MEGA MENU - DESKTOP ONLY
   ==================== */

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 999;
    border-top: 1px solid #e9ecef;
    max-height: 80vh;
    overflow-y: auto;
}

.mega-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.mega-menu-column {
    text-align: center;
}

.mega-menu-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
}

.mega-menu-header-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.mega-menu-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--brand-teal);
    display: inline-block;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    justify-items: center;
    align-items: start;
}

.mega-menu-card {
    text-align: center;
    transition: none;
    width: 100%;
}

.mega-menu-card a {
    display: block;
    text-decoration: none;
    color: var(--text);
}

.mega-menu-card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #f8f9fa;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.mega-menu-card-img img {
    width: 60%;
    height: 60%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.mega-menu-card:hover .mega-menu-card-img img {
    transform: scale(1.08);
}

.mega-menu-card span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    display: block;
    transition: color 0.3s ease;
}

.mega-menu-card:hover span {
    color: var(--brand-teal);
}

.mega-menu-footer {
    text-align: center;
    padding: 30px 20px 40px 20px;
    margin-top: 0;
    border-top: 1px solid #e9ecef;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.mega-menu-explore-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--brand-teal);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.mega-menu-explore-btn:hover {
    background-color: var(--brand-teal-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -8px rgba(14, 148, 136, 0.5);
}

.mega-menu-explore-btn .icon-svg {
    color: #fff;
    transition: transform 0.3s ease;
}

.mega-menu-explore-btn:hover .icon-svg {
    transform: translateX(5px);
}

.nav-has-megamenu>a,
.nav-has-megamenu>.mega-menu-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-has-megamenu .mega-menu-chevron {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.nav-has-megamenu:hover .mega-menu-chevron {
    transform: rotate(180deg);
}

.mega-menu-container--single {
    grid-template-columns: 1fr;
    max-width: 700px;
}

@media (max-width: 1200px) {
    .mega-menu-grid {
        gap: 15px;
    }

    .mega-menu-card span {
        font-size: 0.8rem;
    }
}

@media (max-width: 1024px) {
    .mega-menu {
        display: none;
    }

    .nav-has-megamenu .mega-menu-chevron {
        display: none;
    }
}

/* ====================
   OFF-CANVAS NAVIGATION DRAWER (MOBILE ONLY)
   ==================== */

.offcanvas-overlay {
    position: fixed;
    top: var(--offcanvas-top-offset);
    left: 0;
    width: 100%;
    height: calc(100% - var(--offcanvas-top-offset));
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.offcanvas-overlay.active {
    opacity: 1;
    visibility: visible;
}

.offcanvas-drawer {
    position: fixed;
    top: var(--offcanvas-top-offset);
    right: 0;
    width: 85%;
    max-width: 350px;
    height: calc(100% - var(--offcanvas-top-offset));
    background-color: white;
    z-index: 2001;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
    /* A fixed-position box positioned (or transformed) past the viewport
       edge while "closed" still inflates document.documentElement.scrollWidth
       in Chromium even though it's invisible — this showed up as extra
       right-side space on real phones. Fixing that with overflow-x:hidden/clip
       on <html> was tried and reverted: it "fixes" scrollWidth but also turns
       html into a scroll container, which breaks every position:sticky
       element on the site (header, .cat-hero__visual just scroll away
       instead of sticking). visibility:hidden does exclude the drawer from
       scrollWidth without that side effect — paired with the same
       transform+transition timing as .offcanvas-overlay above so the slide
       animation still runs (visibility switches at the START of the
       transition when opening, and the END when closing — see that spec
       behavior on .offcanvas-overlay's own comment/pattern). */
    visibility: hidden;
    transform: translateX(100%);
    transition: transform 0.3s ease, visibility 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

@supports (height: 100dvh) {
    .offcanvas-drawer {
        height: calc(100dvh - var(--offcanvas-top-offset));
    }
}

.offcanvas-drawer.active {
    visibility: visible;
    transform: translateX(0);
}

.offcanvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--site-header-height);
    padding: 0 20px;
    border-bottom: 1px solid #e9ecef;
    background-color: #f2f1ed;
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
}

.offcanvas-logo {
    flex-shrink: 0;
}

.offcanvas-logo-mark {
    max-height: 32px;
    width: auto;
    height: auto;
    display: block;
    color: var(--primary);
}

.offcanvas-body {
    flex: 1 1 auto;
    padding: 20px;
    padding-bottom: 0;
    overflow-y: visible;
}

.offcanvas-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.offcanvas-nav li {
    margin-bottom: 0;
    list-style: none;
}

.offcanvas-nav li a {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    display: block;
    padding: 12px 0;
    transition: color 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.offcanvas-nav li:last-child a {
    border-bottom: none;
}

.offcanvas-nav li a:hover {
    color: var(--brand-teal);
}

.offcanvas-nav-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    margin-right: 0;
    vertical-align: middle;
    flex-shrink: 0;
}

.offcanvas-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
}

.offcanvas-nav-item-has-submenu>a {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
}

.offcanvas-nav-item-has-submenu>a .icon-svg {
    margin-left: auto;
}

.offcanvas-nav-item-has-submenu>[data-submenu-trigger] {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    transition: color 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}

.offcanvas-nav-item-has-submenu>[data-submenu-trigger]:hover {
    color: var(--brand-teal);
}

.offcanvas-nav-item-has-submenu>[data-submenu-trigger] .icon-svg {
    margin-left: auto;
}

.offcanvas-nav li a .icon-svg {
    width: 24px;
    text-align: center;
}

.offcanvas-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f4f5f4;
    border: 1px solid #e6e8e6;
    border-radius: 999px;
    padding: 10px 16px;
    margin-bottom: 14px;
}

.offcanvas-search .icon-svg {
    color: #9aa39d;
    font-size: 0.9rem;
}

.offcanvas-search input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.9rem;
    color: var(--primary);
    min-width: 0;
}

.offcanvas-search input::placeholder {
    color: #9aa39d;
}

.offcanvas-contact {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
    border-top: 1px solid #e9ecef;
    background-color: white;
    flex-shrink: 0;
    width: 100%;
    margin-top: auto;
}

.offcanvas-contact-primary {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.offcanvas-phone,
.offcanvas-email {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 0;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    background: transparent;
    border: none;
    cursor: pointer;
}

.offcanvas-phone .icon-svg,
.offcanvas-email .icon-svg {
    font-size: 1rem;
}

.offcanvas-phone span,
.offcanvas-email span {
    color: #333;
}

.offcanvas-email {
    font-size: 0.85rem;
}

.offcanvas-btn-row {
    display: flex;
    gap: 10px;
}

.offcanvas-outlet,
.offcanvas-quote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-align: center;
    flex: 1;
}

.offcanvas-outlet {
    background-color: white;
    color: var(--brand-teal);
    border: 2px solid var(--brand-teal);
}

.offcanvas-outlet:hover {
    background-color: var(--brand-teal);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -8px rgba(14, 148, 136, 0.5);
}

.offcanvas-outlet:hover .icon-svg {
    color: white;
}

.offcanvas-quote {
    background-color: var(--brand-teal);
    color: white;
    border: 2px solid var(--brand-teal);
}

.offcanvas-quote:hover {
    background-color: var(--brand-teal-hover);
    border-color: var(--brand-teal-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -8px rgba(14, 148, 136, 0.5);
}

.offcanvas-menu-level {
    display: none;
    animation: fadeIn 0.3s ease;
}

.offcanvas-menu-level.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.offcanvas-submenu-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.offcanvas-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-teal);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}

.offcanvas-back-btn .icon-svg {
    font-size: 0.8rem;
}

.offcanvas-submenu-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.offcanvas-explore-btn-container {
    margin-top: 20px;
    padding-top: 15px;
    padding-bottom: 10px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.offcanvas-explore-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: var(--brand-teal);
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    width: 100%;
}

.offcanvas-explore-btn:hover {
    background-color: var(--brand-teal-hover);
    transform: translateY(-2px);
}

.offcanvas-explore-btn .icon-svg {
    color: #fff;
    transition: transform 0.3s ease;
}

.offcanvas-explore-btn:hover .icon-svg {
    transform: translateX(5px);
}

body.drawer-open {
    overflow: hidden;
}

@media (max-width: 480px) {
    .offcanvas-nav-icon {
        width: 24px;
        height: 24px;
    }

    .offcanvas-nav li a,
    .offcanvas-nav-item-has-submenu>[data-submenu-trigger] {
        gap: 10px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .offcanvas-drawer {
        width: 60%;
        max-width: 350px;
    }

    .offcanvas-header {
        padding: 0 18px;
    }

    .offcanvas-logo-mark {
        max-height: 28px;
    }

    .offcanvas-contact {
        padding: 18px;
        padding-bottom: max(18px, env(safe-area-inset-bottom, 18px));
    }
}

@media (max-width: 767px) {
    .offcanvas-drawer {
        width: 85%;
        max-width: 320px;
    }

    .offcanvas-outlet,
    .offcanvas-quote {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .offcanvas-header {
        padding: 0 15px;
    }

    .offcanvas-logo-mark {
        max-height: 25px;
    }

    .offcanvas-contact {
        padding: 15px;
        padding-bottom: max(15px, env(safe-area-inset-bottom, 15px));
    }
}

@media (max-width: 480px) {
    .offcanvas-drawer {
        width: 85%;
    }

    .offcanvas-nav li a,
    .offcanvas-nav-item-has-submenu>[data-submenu-trigger] {
        font-size: 0.95rem;
        padding: 10px 0;
    }

    .offcanvas-header {
        padding: 0 12px;
    }

    .offcanvas-logo-mark {
        max-height: 22px;
    }

    .offcanvas-contact {
        padding: 12px;
        padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
    }

    .offcanvas-outlet,
    .offcanvas-quote {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

@media (min-width: 1025px) {
    .mobile-menu-btn {
        display: none !important;
    }

    .mobile-search-icon {
        display: none !important;
    }

    .offcanvas-overlay,
    .offcanvas-drawer {
        display: none !important;
    }
}