/* ============================================================
   TEASTA CUSTOM HEADER PRO — header.css (Frontend)
   ============================================================ */

:root {
    --tch-green:       #0B6B3A;
    --tch-green-dark:  #09582F;
    --tch-green-light: #f0f7f3;
    --tch-text:        #1a1a1a;
    --tch-bg:          #ffffff;
    --tch-border:      #e8e8e3;
    --tch-cta-bg:      #0B6B3A;
    --tch-cta-text:    #ffffff;
    --tch-btn-bg:      #0B6B3A;
    --tch-btn-text:    #ffffff;
    --tch-btn-radius:  40px;
    --tch-height:      80px;
    --tch-nav-px:      48px;
    --tch-nav-fs:      14px;
    --tch-nav-fw:      600;
    --tch-mega-pt:     40px;
    --tch-mega-pb:     44px;
    --tch-mega-px:     48px;
    --tch-mega-gap:    48px;
    --tch-mega-cols:   5;
    --tch-mega-offset: 0px;
    --tch-img-height:  200px;
    --tch-img-width:   100%;
    --tch-logo-h:      52px;
    --tch-icon-size:    22px;
    --tch-hburger-size: 18px;
    --tch-font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --tch-shadow:      0 20px 60px rgba(0,0,0,0.10);
    --tch-radius:      12px;
}

/* Reset */
.tch-header *, .tch-header *::before, .tch-header *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ============================================================
   HEADER
   ============================================================ */
.tch-header {
    width: 100%;
    background: var(--tch-bg);
    border-bottom: 1px solid var(--tch-border);
    font-family: var(--tch-font);
    z-index: 999999;
}
.tch-header.tch-sticky {
    position: fixed;
    top: 0;
    left: 0;
}
.tch-header.tch-scrolled {
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* ============================================================
   NAV WRAP + NAV
   ============================================================ */
.tch-nav-wrap {
    position: relative;
    /* Must be above the mega panel (999998) so logo, nav links, and buttons
       stay visible and clickable even when mega overlaps the header via
       a negative --tch-mega-offset value */
    z-index: 1000000;
    background: var(--tch-bg);
    border-bottom: 1px solid var(--tch-border);
}
.tch-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--tch-height);
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--tch-nav-px);
    gap: 20px;
}

/* ============================================================
   LOGO
   ============================================================ */
.tch-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}
.tch-logo-img {
    /* Use !important to prevent any theme stylesheet (which often sets
       img { width:100%; } or img { max-width:100%; height:auto; })
       from overriding these values and making the logo huge on inner pages */
    height: var(--tch-logo-h) !important;
    max-height: var(--tch-logo-h) !important;
    width: auto !important;
    max-width: none !important;
    display: block !important;
    object-fit: contain !important;
    flex-shrink: 0;
}
.tch-logo-icon {
    width: 46px;
    height: 46px;
    background: var(--tch-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    font-style: italic;
    flex-shrink: 0;
}
.tch-logo-words { display: flex; flex-direction: column; }
.tch-logo-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--tch-green);
    font-style: italic;
    line-height: 1;
}
.tch-logo-sub {
    font-size: 10px;
    color: #999;
    letter-spacing: 0.05em;
    margin-top: 3px;
}

/* ============================================================
   DESKTOP MENU
   ============================================================ */
.tch-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    flex: 1;
    justify-content: center;
}
.tch-menu-item { position: static; }
.tch-menu-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 18px;
    font-size: var(--tch-nav-fs);
    font-weight: var(--tch-nav-fw);
    color: var(--tch-text);
    text-decoration: none;
    border-radius: 8px;
    transition: color .2s, background .2s;
    letter-spacing: .01em;
    white-space: nowrap;
    cursor: pointer;
    font-family: var(--tch-font);
}
.tch-menu-link:hover,
.tch-menu-item.tch-open > .tch-menu-link,
.tch-menu-item.tch-active > .tch-menu-link {
    color: var(--tch-green);
    background: var(--tch-green-light);
}
.tch-chevron {
    width: 14px;
    height: 14px;
    transition: transform .25s ease;
    flex-shrink: 0;
}
.tch-menu-item.tch-open > .tch-menu-link .tch-chevron {
    transform: rotate(180deg);
}

/* ============================================================
   RIGHT SIDE
   ============================================================ */
.tch-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.tch-cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--tch-text);
    text-decoration: none;
    transition: background .2s, color .2s;
}
.tch-cart-btn:hover { background: var(--tch-green-light); color: var(--tch-green); }
.tch-cart-btn svg {
    width: var(--tch-icon-size, 22px);
    height: var(--tch-icon-size, 22px);
    flex-shrink: 0;
}
.tch-cart-count {
    position: absolute;
    top: 2px; right: 2px;
    background: var(--tch-badge-bg, var(--tch-green));
    color: var(--tch-badge-text, #fff);
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    transition: background .2s;
}
.tch-cart-count.tch-hidden { display: none; }
/* Cart amount label shown next to the icon */
.tch-cart-amount {
    font-size: 12px;
    font-weight: 700;
    color: var(--tch-text);
    margin-left: 2px;
    white-space: nowrap;
}
.tch-cart-amount.tch-hidden { display: none; }
.tch-shop-btn {
    background: var(--tch-btn-bg);
    color: var(--tch-btn-text);
    border: none;
    border-radius: var(--tch-btn-radius);
    padding: 11px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-family: var(--tch-font);
    letter-spacing: .01em;
    white-space: nowrap;
}
.tch-shop-btn:hover { opacity: .88; transform: translateY(-1px); color: var(--tch-btn-text); }

/* ============================================================
   MEGA MENU PANEL
   ============================================================ */
.tch-mega {
    display: none;
    position: fixed;
    /* --tch-mega-offset can be negative to slide mega up behind/over the header */
    top: calc(var(--tch-height) + var(--tch-mega-offset));
    left: 0;
    width: 100vw;
    background: var(--tch-bg);
    border-top: 3px solid var(--tch-green);
    box-shadow: var(--tch-shadow);
    /* Keep mega BELOW the header (999998) so header nav stays clickable even when mega is open */
    z-index: 999998;
    animation: tchFadeIn .18s ease;
    overflow-y: auto;
    max-height: calc(100vh - var(--tch-height) - var(--tch-mega-offset));
}
.tch-menu-item.tch-open .tch-mega,
.tch-mega.tch-open {
    display: block;
}
.tch-mega-inner {
    display: grid;
    grid-template-columns: repeat(var(--tch-mega-cols), 1fr);
    gap: var(--tch-mega-gap);
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--tch-mega-pt) var(--tch-mega-px) var(--tch-mega-pb);
}

/* Mega col */
.tch-mega-col {
    overflow: visible;
    min-width: 0;
}
.tch-mega-col-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #aaa;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tch-border);
    margin-bottom: 14px;
}
.tch-mega-body {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 16px;
}
.tch-mega-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tch-mega-links a {
    font-size: 13px;
    color: var(--tch-green);
    font-weight: 600;
    text-decoration: none;
    padding: 5px 0;
    display: block;
    transition: padding-left .18s, color .18s;
    letter-spacing: .02em;
}
.tch-mega-links a:hover { padding-left: 7px; color: var(--tch-green-dark); }
.tch-mega-cta {
    display: inline-block;
    background: var(--tch-cta-bg);
    color: var(--tch-cta-text);
    padding: 11px 26px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 700;
    margin-top: 20px;
    text-decoration: none;
    transition: opacity .2s, transform .15s;
    font-family: var(--tch-font);
}
.tch-mega-cta:hover { opacity: .88; transform: translateY(-1px); color: var(--tch-cta-text); }
.tch-mega-img {
    /* Width and height are controlled by admin sliders via CSS vars.
       min-width ensures image never shrinks when many columns are added.
       object-fit: cover always fills the box without distortion. */
    width: var(--tch-img-width);
    min-width: var(--tch-img-width);
    height: var(--tch-img-height);
    min-height: var(--tch-img-height);
    object-fit: cover;
    object-position: center;
    border-radius: var(--tch-radius);
    display: block;
    margin-bottom: 10px;
    /* Prevent parent grid cell from squishing the image */
    align-self: start;
    flex-shrink: 0;
}
.tch-mega-img-placeholder {
    width: var(--tch-img-width);
    min-width: var(--tch-img-width);
    height: var(--tch-img-height);
    min-height: var(--tch-img-height);
    background: var(--tch-green-light);
    border-radius: var(--tch-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 10px;
    border: 2px dashed var(--tch-border);
    flex-shrink: 0;
}
.tch-mega-img-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--tch-text);
}

/* ============================================================
   HAMBURGER
   ============================================================ */
/* ============================================================
   MOBILE MENU BUTTON — pill shape, becomes round close button
   ============================================================ */
.tch-hamburger {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--tch-mbtn-bg, var(--tch-green));
    color: var(--tch-mbtn-text, #fff);
    border: none;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    transition: background .2s, border-radius .2s, padding .2s, width .2s;
}
.tch-hamburger:hover { filter: brightness(0.9); }
.tch-hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}
/* "lines" style (default 3-bar icon) wrapper */
.tch-hamburger-lines {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}
.tch-hamburger-lines span {
    display: block;
    width: var(--tch-hburger-size, 18px);
    height: 2px;
    background: var(--tch-mbtn-text, #fff);
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}
/* SVG-based hamburger icon styles (dots / chevron / grid) */
.tch-hamburger-icon svg {
    width: var(--tch-hburger-size, 18px);
    height: var(--tch-hburger-size, 18px);
    color: var(--tch-mbtn-text, #fff);
    display: block;
}
.tch-hamburger-text { line-height: 1; }
/* Hide the text label, showing icon-only button (still expands to circle on open) */
.tch-hamburger.tch-hide-btn-text .tch-hamburger-text { display: none; }
.tch-hamburger.tch-hide-btn-text { padding: 10px; }
.tch-hamburger-close {
    display: none;
    font-size: 22px;
    line-height: 1;
    font-weight: 400;
}
/* Open state: collapse pill into a circle showing only the × */
.tch-hamburger.tch-open {
    padding: 0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
    /* Use independent close-button color vars so the open/close state
       can have a completely different look from the pill button */
    background: var(--tch-mclose-bg, transparent);
    color: var(--tch-mclose-text, var(--tch-mbtn-bg, var(--tch-green)));
    border: 2px solid var(--tch-mclose-border, var(--tch-mbtn-bg, var(--tch-green)));
}
.tch-hamburger.tch-open .tch-hamburger-icon,
.tch-hamburger.tch-open .tch-hamburger-text { display: none; }
.tch-hamburger.tch-open .tch-hamburger-close {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    font-weight: 400;
    color: inherit;
}

/* ============================================================
   MOBILE DRAWER — full-screen accordion overlay
   ============================================================ */
.tch-mobile-drawer {
    display: none;
    position: fixed;
    top: var(--tch-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--tch-height));
    background: var(--tch-mmenu-bg, var(--tch-bg));
    z-index: 999996;
    overflow-y: auto;
    animation: tchFadeIn .2s ease;
    -webkit-overflow-scrolling: touch;
}
.tch-mobile-drawer.tch-open { display: block; }
.tch-mobile-menu { list-style: none; padding: var(--tch-mega-pt,8px) var(--tch-mega-px,24px) 40px; margin: 0; }

.tch-mobile-item { border-bottom: 1px solid var(--tch-mdivider, var(--tch-border)); }
.tch-mobile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: transparent;
}
.tch-mobile-link {
    display: block;
    flex: 1;
    padding: 18px 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--tch-mmenu-text, var(--tch-text));
    text-decoration: none;
    transition: color .2s;
    background: transparent;
}
.tch-mobile-link:hover {
    color: var(--tch-mmenu-hover, var(--tch-green));
    background: transparent;
}
.tch-mobile-item.tch-mobile-expanded .tch-mobile-link { color: var(--tch-mmenu-hover, var(--tch-green)); }

/* Circular +/- toggle button, like Pukka's design */
.tch-mobile-toggle {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--tch-mtoggle-bg, var(--tch-green));
    border: none;
    cursor: pointer;
    position: relative;
    transition: background .2s;
}
.tch-mobile-toggle:hover { filter: brightness(0.9); }
.tch-mobile-toggle-line {
    position: absolute;
    top: 50%;
    left: 50%;
    background: var(--tch-mtoggle-icon, #fff);
    transform: translate(-50%, -50%);
    transition: transform .25s, opacity .25s;
}
.tch-mobile-toggle .tch-line-h { width: 12px; height: 2px; }
.tch-mobile-toggle .tch-line-v { width: 2px;  height: 12px; }
/* When expanded, hide the vertical line so + becomes − */
.tch-mobile-item.tch-mobile-expanded .tch-line-v { opacity: 0; transform: translate(-50%, -50%) rotate(90deg); }

/* Submenu panel — collapsed by default, expands inline below the row */
.tch-mobile-sub {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}
.tch-mobile-item.tch-mobile-expanded .tch-mobile-sub {
    max-height: 2000px; /* large enough to fit any submenu content */
}
.tch-mobile-sub-title {
    margin: 14px 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    color: #9a9a9a;
    text-transform: none;
}
.tch-mobile-sub-links { list-style: none; margin: 0 0 6px; padding: 0; }
.tch-mobile-sub-links li a {
    display: block;
    padding: 9px 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--tch-msublink, var(--tch-green));
    text-decoration: none;
}
.tch-mobile-sub-links li a:hover { text-decoration: underline; }
.tch-mobile-sub-cta {
    display: inline-block;
    margin: 10px 0 18px;
    font-size: 13px;
    font-weight: 700;
    color: var(--tch-msublink, var(--tch-green));
    text-decoration: underline;
}
/* Content-type and image-type mega columns, rendered on mobile too
   (previously only "links" columns showed anything on mobile) */
.tch-mobile-sub-col { margin-bottom: 4px; }
.tch-mobile-sub-body {
    margin: 4px 0 12px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--tch-mmenu-text, var(--tch-text));
}
.tch-mobile-sub-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--tch-radius);
    margin: 6px 0 8px;
    object-fit: cover;
}
.tch-mobile-sub-img-placeholder {
    width: 100%;
    height: 140px;
    background: var(--tch-green-light);
    border-radius: var(--tch-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 6px 0 8px;
    border: 2px dashed var(--tch-border);
}
.tch-mobile-sub-img-label {
    margin: 0 0 12px;
    font-size: 12px;
    color: #888;
}

/* ============================================================
   ANIMATION
   ============================================================ */
@keyframes tchFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .tch-mega-inner { grid-template-columns: repeat(3,1fr) !important; }
}
@media (max-width: 768px) {
    .tch-nav { padding: 0 20px; }
    .tch-menu, .tch-shop-btn { display: none; }
    .tch-hamburger { display: flex; }
}
