/*
 * Tiger Juices global header/footer
 * Blocksy child implementation.
 */

:root {
    --tj-global-primary: #dd3333;
    --tj-global-yellow: #eeee22;
    --tj-global-dark: #0a0a0a;
    --tj-global-text: #767676;
    --tj-global-shell: 1200px;
}


/* ---------------------------------------------------------
   Shared shell
   --------------------------------------------------------- */

.tj-shell {
    width: min(100% - 30px, var(--tj-global-shell));
    margin-inline: auto;
}


/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */

.tj-site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    color: #fff;
    background: var(--tj-global-dark);
}

.tj-site-header.is-overlap {
    position: absolute;
    inset: 0 0 auto;
    background: transparent;
}

.tj-site-header.is-overlap.is-scrolled {
    position: fixed;
}

.admin-bar .tj-site-header.is-overlap.is-scrolled,
.admin-bar .tj-site-header:not(.is-overlap) {
    top: 32px;
}

.tj-header-topbar {
    height: 45px;
    border-bottom: 1px solid rgb(255 255 255 / 25%);
    transition:
        opacity 180ms ease,
        height 180ms ease;
}

.tj-header-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.tj-header-contact {
    display: flex;
    align-items: center;
    gap: 24px;
}

.tj-header-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-family: "Jost", sans-serif;
    font-size: 12px;
    line-height: 1;
    text-decoration: none;
}

.tj-header-contact-link:hover,
.tj-header-contact-link:focus-visible {
    color: var(--tj-global-yellow);
}

.tj-header-contact-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
}

.tj-header-contact-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.tj-header-main {
    height: 90px;
    transition:
        height 180ms ease,
        background-color 180ms ease,
        box-shadow 180ms ease;
}

.tj-site-header:not(.is-overlap) .tj-header-main {
    background: var(--tj-global-dark);
}

.tj-header-main-inner {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) auto;
    align-items: center;
    gap: 30px;
    height: 100%;
}

.tj-header-logo {
    display: flex;
    align-items: center;
    width: 180px;
    max-width: 100%;
}

.tj-header-logo-image {
    display: block;
    width: 100%;
    max-height: 72px;
    object-fit: contain;
    object-position: left center;
}

.tj-header-navigation {
    min-width: 0;
}

.tj-header-menu,
.tj-header-menu ul,
.tj-mobile-menu,
.tj-footer-menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tj-header-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.tj-header-menu > li {
    position: relative;
}

.tj-header-menu a {
    display: block;
    padding: 34px 0;
    color: #fff;
    font-family: "Jost", sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.15;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 160ms ease;
}

.tj-header-menu a:hover,
.tj-header-menu a:focus-visible,
.tj-header-menu .current-menu-item > a,
.tj-header-menu .current-menu-ancestor > a {
    color: var(--tj-global-yellow);
}

.tj-header-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: -20px;
    min-width: 220px;
    padding: 10px 0;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 14px 35px rgb(0 0 0 / 18%);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition:
        opacity 160ms ease,
        visibility 160ms ease,
        transform 160ms ease;
}

.tj-header-menu li:hover > .sub-menu,
.tj-header-menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tj-header-menu .sub-menu a {
    padding: 10px 20px;
    color: #242424;
    text-transform: none;
}

.tj-header-menu .sub-menu a:hover,
.tj-header-menu .sub-menu a:focus-visible {
    color: var(--tj-global-primary);
}

.tj-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 17px;
}

.tj-header-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #fff;
    font-family: "Jost", sans-serif;
    font-size: 12px;
    line-height: 1.2;
    text-decoration: none;
}

.tj-header-action:hover,
.tj-header-action:focus-visible {
    color: var(--tj-global-yellow);
}

.tj-header-action-icon {
    display: inline-flex;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
}

.tj-header-action-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.tj-header-account-label {
    white-space: nowrap;
}

.tj-header-cart-copy {
    display: flex;
    flex-direction: column;
    min-width: 62px;
}

.tj-header-cart-count,
.tj-header-cart-total {
    white-space: nowrap;
}

.tj-header-cart-total {
    font-weight: 600;
}

.tj-mobile-toggle {
    display: none;
    width: 38px;
    height: 38px;
    padding: 7px;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.tj-mobile-toggle svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}


/* Sticky desktop state */

.tj-site-header.is-scrolled .tj-header-topbar {
    height: 0;
    overflow: hidden;
    border: 0;
    opacity: 0;
}

.tj-site-header.is-scrolled .tj-header-main {
    height: 60px;
    background: rgb(10 10 10 / 97%);
    box-shadow: 0 5px 22px rgb(0 0 0 / 18%);
}

.tj-site-header.is-scrolled .tj-header-logo {
    width: 245px;
}

.tj-site-header.is-scrolled .tj-header-logo-image {
    max-height: 52px;
}

.tj-site-header.is-scrolled .tj-header-menu a {
    padding-block: 21px;
}


/* Homepage overlap compensation */

.home .tj-home-hero-inner {
    padding-top: 135px;
}


/* ---------------------------------------------------------
   Mobile drawer
   --------------------------------------------------------- */

.tj-mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 1100;
    visibility: hidden;
    pointer-events: none;
}

.tj-mobile-drawer.is-open {
    visibility: visible;
    pointer-events: auto;
}

.tj-mobile-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgb(0 0 0 / 62%);
    opacity: 0;
    cursor: pointer;
    transition: opacity 200ms ease;
}

.tj-mobile-drawer.is-open .tj-mobile-backdrop {
    opacity: 1;
}

.tj-mobile-panel {
    position: absolute;
    inset: 0 auto 0 0;
    width: min(88vw, 390px);
    padding: 20px;
    overflow-y: auto;
    background: #fff;
    color: #242424;
    box-shadow: 12px 0 35px rgb(0 0 0 / 18%);
    transform: translateX(-100%);
    transition: transform 220ms ease;
}

.tj-mobile-drawer.is-open .tj-mobile-panel {
    transform: translateX(0);
}

.tj-mobile-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.tj-mobile-logo {
    display: block;
    width: 160px;
}

.tj-mobile-logo-image {
    display: block;
    width: 100%;
    height: auto;
}

.tj-mobile-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 8px;
    border: 0;
    border-radius: 50%;
    background: #f5f5f5;
    color: #242424;
    cursor: pointer;
}

.tj-mobile-close svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.tj-mobile-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-bottom: 22px;
}

.tj-mobile-search input[type="search"] {
    min-width: 0;
    height: 43px;
    padding: 0 13px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

.tj-mobile-search button {
    min-height: 43px;
    padding: 0 15px;
    border: 0;
    border-radius: 4px;
    background: var(--tj-global-primary);
    color: #fff;
    font-family: "Jost", sans-serif;
    font-weight: 600;
    cursor: pointer;
}

.tj-mobile-menu > li {
    border-bottom: 1px solid #eee;
}

.tj-mobile-menu a {
    display: block;
    padding: 13px 2px;
    color: #242424;
    font-family: "Jost", sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.tj-mobile-menu .sub-menu {
    padding: 0 0 8px 15px;
}

.tj-mobile-menu .sub-menu a {
    padding-block: 9px;
    font-size: 14px;
    font-weight: 400;
}

.tj-mobile-actions {
    display: grid;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.tj-mobile-account,
.tj-mobile-actions .tj-header-cart-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #242424;
    text-decoration: none;
}

.tj-mobile-account svg,
.tj-mobile-actions .tj-header-action-icon {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

body.tj-mobile-menu-open {
    overflow: hidden;
}


/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */

.tj-site-footer {
    position: relative;
    color: rgb(255 255 255 / 76%);
    background-color: #080808;
    background-image: var(--tj-footer-bg);
    background-repeat: no-repeat;
    background-position: right center;
    background-size: cover;
}

.tj-footer-main {
    padding: 70px 0 52px;
    background: linear-gradient(
        90deg,
        rgb(0 0 0 / 92%) 0%,
        rgb(0 0 0 / 78%) 62%,
        rgb(0 0 0 / 38%) 100%
    );
}

.tj-footer-grid {
    display: grid;
    grid-template-columns: 1.45fr 1fr 1fr .9fr;
    gap: 42px;
}

.tj-footer-column {
    min-width: 0;
    font-family: "Jost", sans-serif;
    font-size: 14px;
    line-height: 1.65;
}

.tj-footer-logo {
    display: inline-block;
    width: min(220px, 100%);
    margin-bottom: 20px;
}

.tj-footer-logo-image {
    display: block;
    width: 100%;
    height: auto;
}

.tj-footer-description {
    margin: 0 0 22px;
}

.tj-footer-heading {
    margin: 3px 0 23px;
    color: #fff;
    font-family: "Playfair Display", serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;
    text-transform: uppercase;
}

.tj-footer-office {
    margin-bottom: 22px;
}

.tj-footer-office p {
    margin: 5px 0;
}

.tj-footer-office-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
    color: #fff;
}

.tj-footer-flag {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.tj-site-footer a {
    color: inherit;
    text-decoration: none;
    transition: color 160ms ease;
}

.tj-site-footer a:hover,
.tj-site-footer a:focus-visible {
    color: var(--tj-global-yellow);
}

.tj-footer-post {
    display: grid;
    grid-template-columns: 75px minmax(0, 1fr);
    gap: 13px;
    align-items: center;
    margin-bottom: 18px;
}

.tj-footer-post-thumb {
    display: block;
    width: 75px;
    height: 60px;
    overflow: hidden;
    border-radius: 2px;
    background: rgb(255 255 255 / 8%);
}

.tj-footer-post-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tj-footer-post-title {
    display: block;
    margin-bottom: 5px;
    color: #fff !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}

.tj-footer-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 11px;
    opacity: .72;
}

.tj-footer-menu li {
    margin: 0 0 10px;
}

.tj-footer-menu a {
    display: inline-block;
}

.tj-footer-copyright {
    padding: 18px 0;
    border-top: 1px solid rgb(255 255 255 / 12%);
    background: rgb(0 0 0 / 58%);
    text-align: center;
    font-family: "Jost", sans-serif;
    font-size: 13px;
}


/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 1024px) {

    .tj-header-topbar {
        display: none;
    }

    .tj-site-header {
        position: sticky;
    }

    .tj-site-header.is-overlap {
        position: absolute;
    }

    .tj-site-header.is-overlap.is-scrolled {
        position: fixed;
    }

    .tj-header-main,
    .tj-site-header.is-scrolled .tj-header-main {
        height: 60px;
    }

    .tj-header-main-inner {
        grid-template-columns: 42px minmax(120px, 1fr) 42px;
        gap: 12px;
    }

    .tj-header-logo {
        grid-column: 2;
        justify-self: center;
        width: 179px;
    }

    .tj-site-header.is-scrolled .tj-header-logo {
        width: 179px;
    }

    .tj-header-logo-image,
    .tj-site-header.is-scrolled .tj-header-logo-image {
        max-height: 52px;
        object-position: center;
    }

    .tj-header-navigation,
    .tj-header-actions {
        display: none;
    }

    .tj-mobile-toggle {
        display: inline-flex;
        grid-column: 1;
        grid-row: 1;
        align-items: center;
        justify-content: center;
    }

    .tj-header-main-inner::after {
        content: "";
        grid-column: 3;
        grid-row: 1;
        width: 24px;
        height: 24px;
        justify-self: center;
        background:
            currentColor;
        opacity: 0;
    }

    .home .tj-home-hero-inner {
        padding-top: 90px;
    }

    .tj-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


@media (max-width: 782px) {

    .admin-bar .tj-site-header.is-overlap.is-scrolled,
    .admin-bar .tj-site-header:not(.is-overlap) {
        top: 46px;
    }
}


@media (max-width: 640px) {

    .tj-shell {
        width: min(100% - 24px, var(--tj-global-shell));
    }

    .tj-header-logo {
        width: 150px;
    }

    .tj-site-header.is-scrolled .tj-header-logo {
        width: 150px;
    }

    .tj-footer-main {
        padding: 52px 0 38px;
    }

    .tj-footer-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .tj-footer-heading {
        margin-bottom: 16px;
    }

    .tj-footer-copyright {
        font-size: 12px;
    }
}


@media (prefers-reduced-motion: reduce) {

    .tj-site-header *,
    .tj-mobile-drawer *,
    .tj-site-footer * {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}



/*
 * Tiger Juices mobile header parity
 *
 * Woodmart source header had:
 * burger | centered logo | cart
 */

.tj-mobile-header-cart {
    display: none;
}


@media (max-width: 1024px) {

    .tj-header-main-inner::after {
        display: none;
    }

    .tj-mobile-header-cart {
        display: flex;
        grid-column: 3;
        grid-row: 1;
        align-items: center;
        justify-self: end;
    }

    .tj-mobile-header-cart .tj-header-cart-link {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        padding: 7px;
        color: #ffffff;
    }

    .tj-mobile-header-cart .tj-header-action-icon {
        width: 24px;
        height: 24px;
    }

    .tj-mobile-header-cart .tj-header-cart-copy {
        display: none;
    }
}


/*
 * Tiger Juices homepage full-bleed hero
 *
 * Target:
 * - hero begins behind top utility bar + navigation
 * - no Blocksy page title above Elementor content
 * - hero background reaches viewport edges
 * - sticky header behaviour remains unchanged
 */


/* Blocksy's native page-title must not appear on the migrated homepage. */

body.home .hero-section,
body.page-id-27592 .hero-section {
    display: none !important;
}


/*
 * Remove theme-level spacing before the Elementor homepage.
 */

body.home main#main,
body.page-id-27592 main#main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.home .site-main,
body.page-id-27592 .site-main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}


/*
 * The original Elementor hero container.
 * This is the preserved parent of the former Woodmart slider.
 */

body.home .elementor-element-217aba3,
body.page-id-27592 .elementor-element-217aba3 {
    position: relative;
    width: 100vw !important;
    max-width: none !important;

    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;

    padding-left: 0 !important;
    padding-right: 0 !important;
}


/*
 * Custom Tiger Juices hero itself.
 */

body.home .tj-home-hero,
body.page-id-27592 .tj-home-hero {
    width: 100%;
    max-width: none;
    margin: 0;
}


/*
 * Desktop:
 *
 * 45px utility bar
 * 90px main navigation
 *
 * Header is absolute on the homepage, therefore the hero starts
 * at viewport top and its internal copy receives the safe spacing.
 */

@media (min-width: 1025px) {

    body.home .tj-home-hero-inner,
    body.page-id-27592 .tj-home-hero-inner {
        padding-top: 165px;
    }
}


/*
 * Tablet/mobile only has the 60px main header.
 */

@media (max-width: 1024px) {

    body.home .tj-home-hero-inner,
    body.page-id-27592 .tj-home-hero-inner {
        padding-top: 90px;
    }
}


@media (max-width: 640px) {

    body.home .tj-home-hero-inner,
    body.page-id-27592 .tj-home-hero-inner {
        padding-top: 80px;
    }
}



/*
 * Tiger Juices true viewport-width hero
 *
 * The Elementor/Blocksy document may remain inside a centered
 * content shell. Break the actual custom hero out to the browser
 * viewport rather than relying on the parent container width.
 */

body.home,
body.page-id-27592 {
    overflow-x: clip;
}


/*
 * Allow the shortcode widget containing the hero to overflow its
 * Elementor container without being clipped.
 */

body.home .elementor-element-217aba3,
body.page-id-27592 .elementor-element-217aba3,
body.home .elementor-element-217aba3 .elementor-widget-shortcode,
body.page-id-27592 .elementor-element-217aba3 .elementor-widget-shortcode,
body.home .elementor-element-217aba3 .elementor-widget-container,
body.page-id-27592 .elementor-element-217aba3 .elementor-widget-container {
    overflow: visible !important;
}


/*
 * Actual viewport breakout.
 *
 * This remains correct whether the parent is:
 * - 1200px centered,
 * - Elementor constrained,
 * - or already 100vw.
 */

body.home .tj-home-hero,
body.page-id-27592 .tj-home-hero {
    position: relative !important;

    left: 50% !important;

    width: 100vw !important;
    max-width: 100vw !important;

    margin-left: -50vw !important;
    margin-right: -50vw !important;
}


/*
 * Hero slides/background must also consume the complete hero width.
 */

body.home .tj-home-hero > *,
body.page-id-27592 .tj-home-hero > * {
    max-width: none;
}


/*
 * Keep only the hero COPY constrained for readability.
 * Do not constrain its background.
 */

body.home .tj-home-hero-inner,
body.page-id-27592 .tj-home-hero-inner {
    width: min(
        calc(100% - 30px),
        1200px
    );

    max-width: 1200px;

    margin-left: auto;
    margin-right: auto;
}



/*
 * Tiger Juices hero under utility bar
 *
 * Desktop Woodmart reference:
 * slider background begins at viewport top and both:
 *
 *   45px utility bar
 *   90px navigation row
 *
 * float over the hero.
 *
 * Move only the hero canvas upward by the utility-bar height.
 * Compensate its inner content and bottom flow so text/next section
 * remain where they currently are.
 */

@media (min-width: 1025px) {

    body.home .tj-home-hero,
    body.page-id-27592 .tj-home-hero {
        margin-top: -45px !important;
        margin-bottom: 45px !important;
    }


    /*
     * Previous desktop safe spacing was 165px.
     * Add back the 45px moved above so hero copy does not move upward.
     */

    body.home .tj-home-hero-inner,
    body.page-id-27592 .tj-home-hero-inner {
        padding-top: 210px !important;
    }
}



/*
 * Tiger Juices Blocksy 50px homepage spacing fix
 *
 * Browser inspection confirmed that Blocksy adds:
 *
 * main#main > .ct-container-full {
 *     padding-top: 50px;
 * }
 *
 * This pushes the entire Elementor homepage down.
 * Remove it only from the migrated homepage.
 */

body.home main#main > .ct-container-full,
body.page-id-27592 main#main > .ct-container-full {
    padding-top: 0 !important;
}


/*
 * Retire the temporary utility-bar compensation now that the
 * actual 50px source has been identified.
 *
 * Horizontal -50vw breakout remains untouched.
 */

@media (min-width: 1025px) {

    body.home .tj-home-hero,
    body.page-id-27592 .tj-home-hero {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }


    /*
     * Final desktop safe area:
     *
     * 45px utility row
     * 90px navigation
     * plus breathing space for hero copy.
     */

    body.home .tj-home-hero-inner,
    body.page-id-27592 .tj-home-hero-inner {
        padding-top: 165px !important;
    }
}



/*
 * Tiger Juices About page title suppression
 *
 * Blocksy injects its own page-title/hero wrapper above Elementor.
 * The migrated About design already contains its own visual heading.
 */

body.page-id-27594 .hero-section,
body.page-id-4400 .hero-section {
    display: none !important;
}



/*
 * Tiger Juices Contact page title suppression
 *
 * Contact design begins with its Elementor map,
 * so Blocksy's automatic page title is not required.
 */

body.page-id-27595 .hero-section,
body.page-id-4439 .hero-section {
    display: none !important;
}



/*
 * Tiger Juices Franchise page title suppression
 *
 * The migrated Franchise design already begins with
 * its own image/content presentation.
 */

body.page-id-27596 .hero-section,
body.page-id-27331 .hero-section {
    display: none !important;
}

