/*
Theme Name: Tiger Juices
Description: Tiger Juices custom child theme for Blocksy.
Author: Kiswa Solutions
Template: blocksy
Version: 1.0.0
Text Domain: tigerjuices
*/


/*
 * Tiger Juices design tokens
 *
 * Original Woodmart visual identity mapped for the
 * Blocksy replacement.
 */

:root {
    --tj-primary: #dd3333;
    --tj-secondary: #eeee22;

    --tj-text: #767676;
    --tj-heading: #242424;
    --tj-heading-alt: #333333;

    --tj-link: #1e73be;
    --tj-link-hover: #242424;

    --tj-footer-bg: #000000;

    --tj-product-gap: 20px;

    --tj-radius-button: 999px;
}


/*
 * Typography foundation
 *
 * Font loading will be configured through Blocksy.
 */

body {
    font-family: "Jost", sans-serif;
    font-size: 16px;
    color: var(--tj-text);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Playfair Display", serif;
    font-weight: 400;
    color: var(--tj-heading);
}

a {
    color: var(--tj-link);
}

a:hover {
    color: var(--tj-link-hover);
}


/*
 * Main navigation target
 */

header nav,
.ct-header-menu {
    font-family: "Jost", sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}


/*
 * WooCommerce button identity
 */

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.single_add_to_cart_button {
    border-radius: var(--tj-radius-button);
}


/*
 * Product/shop buttons
 */

.woocommerce ul.products .button {
    background-color: var(--tj-secondary);
    color: #242424;
}

.woocommerce ul.products .button:hover {
    background-color: var(--tj-primary);
    color: #242424;
}


/*
 * Homepage article cards
 *
 * Lightweight Woodmart-independent replacement for the previous
 * homepage blog carousel. Desktop shows three cards; tablet two;
 * mobile one. Horizontal overflow provides touch/trackpad navigation
 * without another JavaScript carousel dependency.
 */

.tj-home-blog {
    width: 100%;
}

.tj-home-blog-track {
    display: flex;
    gap: 20px;
    width: 100%;
    overflow-x: auto;
    padding: 4px 2px 16px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
}

.tj-home-blog-track::-webkit-scrollbar {
    display: none;
}

.tj-home-blog-track:focus-visible {
    outline: 2px solid var(--tj-primary);
    outline-offset: 4px;
}

.tj-home-blog-card {
    flex: 0 0 calc((100% - 40px) / 3);
    min-width: 0;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 8px 24px rgb(0 0 0 / 8%);
    scroll-snap-align: start;
}

.tj-home-blog-media {
    position: relative;
    overflow: hidden;
}

.tj-home-blog-image-link {
    display: block;
    aspect-ratio: 700 / 737;
    overflow: hidden;
}

.tj-home-blog-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 300ms ease;
}

.tj-home-blog-card:hover .tj-home-blog-image {
    transform: scale(1.025);
}

.tj-home-blog-image-placeholder {
    background: #f2f2f2;
}

.tj-home-blog-date {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    min-width: 52px;
    padding: 8px 10px;
    background: #ffffff;
    color: var(--tj-heading);
    text-align: center;
    line-height: 1;
    box-shadow: 0 4px 14px rgb(0 0 0 / 10%);
}

.tj-home-blog-date-day {
    font-family: "Playfair Display", serif;
    font-size: 22px;
    font-weight: 400;
}

.tj-home-blog-date-month {
    margin-top: 4px;
    font-family: "Jost", sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.tj-home-blog-body {
    padding: 24px 24px 26px;
}

.tj-home-blog-category {
    margin-bottom: 9px;
    font-family: "Jost", sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.tj-home-blog-category a {
    color: var(--tj-primary);
}

.tj-home-blog-title {
    margin: 0 0 10px;
    font-family: "Playfair Display", serif;
    font-size: 22px;
    line-height: 1.25;
}

.tj-home-blog-title a {
    color: var(--tj-heading);
}

.tj-home-blog-title a:hover {
    color: var(--tj-primary);
}

.tj-home-blog-meta {
    margin-bottom: 14px;
    font-size: 12px;
    color: #999999;
}

.tj-home-blog-excerpt {
    margin: 0 0 18px;
    line-height: 1.7;
}

.tj-home-blog-read-more {
    margin: 0;
}

.tj-home-blog-read-more a {
    display: inline-block;
    color: var(--tj-heading);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.tj-home-blog-read-more a:hover {
    color: var(--tj-primary);
}

@media (max-width: 1024px) {
    .tj-home-blog-card {
        flex-basis: calc((100% - 20px) / 2);
    }
}

@media (max-width: 767px) {
    .tj-home-blog-card {
        flex-basis: 100%;
    }

    .tj-home-blog-body {
        padding: 20px;
    }

    .tj-home-blog-title {
        font-size: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tj-home-blog-track {
        scroll-behavior: auto;
    }

    .tj-home-blog-image {
        transition: none;
    }

    .tj-home-blog-card:hover .tj-home-blog-image {
        transform: none;
    }
}


/*
 * Homepage hero slider
 *
 * Clean Woodmart-independent implementation using the existing
 * Tiger Juices slide artwork and product-object imagery.
 */

.tj-home-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #101d20;
    color: #ffffff;
}

.tj-home-hero-stage {
    position: relative;
    width: 100%;
    height: clamp(540px, 40.625vw, 780px);
}

.tj-home-hero-slide {
    --tj-hero-transition: 700ms;

    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background-color: #fefefe;
    background-image: var(--tj-hero-bg);
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity var(--tj-hero-transition) ease,
        visibility var(--tj-hero-transition) ease;
}

.tj-home-hero-slide.is-active {
    z-index: 1;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.tj-home-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    width: min(100%, 1200px);
    height: 100%;
    margin-inline: auto;
    padding: 90px 15px 0;
}

.tj-home-hero-copy {
    display: flex;
    flex: 0 0 50%;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    margin-bottom: 90px;
}

.tj-home-hero-kicker {
    margin: 0;
    font-family: "Great Vibes", cursive;
    font-size: 34px;
    font-weight: 400;
    line-height: 1.15;
    color: #ffffff;
}

.tj-home-hero-title {
    width: min(100%, 478px);
    margin: 4px 0 20px;
    font-family: "Playfair Display", serif;
    font-size: 56px;
    font-weight: 400;
    line-height: 1.08;
    color: #ffffff;
}

.tj-home-hero-description {
    width: min(100%, 526px);
    margin: 0 0 30px;
    font-family: "Jost", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #ffffff;
}

.tj-home-hero-button-wrap {
    margin: 0;
}

.tj-home-hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 22px;
    border-radius: 999px;
    background: #feff00;
    color: #242424;
    font-family: "Jost", sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    transition:
        background-color 180ms ease,
        color 180ms ease,
        transform 180ms ease;
}

.tj-home-hero-button:hover,
.tj-home-hero-button:focus-visible {
    background: var(--tj-primary);
    color: #ffffff;
    transform: translateY(-1px);
}

.tj-home-hero-visual {
    display: flex;
    flex: 0 0 50%;
    align-self: stretch;
    align-items: flex-end;
    justify-content: center;
    min-width: 0;
}

.tj-home-hero-object {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: calc(100% - 35px);
    object-fit: contain;
    object-position: center bottom;
}

.tj-home-hero-controls {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}

.tj-home-hero-control {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 45%);
    border-radius: 999px;
    background: rgb(0 0 0 / 32%);
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    pointer-events: auto;
    transition:
        opacity 180ms ease,
        background-color 180ms ease;
}

.tj-home-hero:hover .tj-home-hero-control,
.tj-home-hero-control:focus-visible {
    opacity: 1;
}

.tj-home-hero-control:hover,
.tj-home-hero-control:focus-visible {
    background: rgb(0 0 0 / 55%);
}

.tj-home-hero-prev {
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
}

.tj-home-hero-next {
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
}

.tj-home-hero-toggle {
    right: 16px;
    bottom: 16px;
    width: 34px;
    height: 34px;
    font-size: 14px;
}


/*
 * Recreate the old staggered content entrance without depending on
 * Woodmart animation CSS.
 */

.tj-home-hero-slide.is-active .tj-home-hero-kicker,
.tj-home-hero-slide.is-active .tj-home-hero-title,
.tj-home-hero-slide.is-active .tj-home-hero-description,
.tj-home-hero-slide.is-active .tj-home-hero-button-wrap {
    opacity: 0;
    transform: translateY(22px);
    animation: tjHeroRise 520ms ease forwards;
}

.tj-home-hero-slide.is-active .tj-home-hero-kicker {
    animation-delay: 100ms;
}

.tj-home-hero-slide.is-active .tj-home-hero-title {
    animation-delay: 250ms;
}

.tj-home-hero-slide.is-active .tj-home-hero-description {
    animation-delay: 400ms;
}

.tj-home-hero-slide.is-active .tj-home-hero-button-wrap {
    animation-delay: 500ms;
}

.tj-home-hero-slide.is-active .tj-home-hero-object {
    opacity: 0;
    transform: translateX(35px);
    animation: tjHeroFromRight 600ms 400ms ease forwards;
}

@keyframes tjHeroRise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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


@media (max-width: 1024px) {

    .tj-home-hero-stage {
        height: 620px;
    }

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

    .tj-home-hero-copy {
        margin-bottom: 60px;
    }

    .tj-home-hero-kicker {
        font-size: 24px;
    }

    .tj-home-hero-title {
        width: min(100%, 400px);
        font-size: 40px;
    }

    .tj-home-hero-description {
        width: min(100%, 433px);
        font-size: 14px;
    }
}


@media (max-width: 767px) {

    .tj-home-hero-stage {
        height: 760px;
    }

    .tj-home-hero-inner {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        width: min(100%, 505px);
        padding: 90px 15px 0;
    }

    .tj-home-hero-copy {
        flex: 0 0 auto;
        width: 100%;
        margin-bottom: 20px;
    }

    .tj-home-hero-kicker {
        font-size: 22px;
    }

    .tj-home-hero-title {
        width: min(100%, 338px);
        margin-bottom: 30px;
        font-size: 34px;
    }

    .tj-home-hero-description {
        display: none;
    }

    .tj-home-hero-visual {
        flex: 1 1 auto;
        width: 100%;
        min-height: 0;
        padding-inline: 16%;
    }

    .tj-home-hero-object {
        max-height: 445px;
    }

    .tj-home-hero-control {
        opacity: 0.78;
    }

    .tj-home-hero-prev {
        left: 8px;
    }

    .tj-home-hero-next,
    .tj-home-hero-toggle {
        right: 8px;
    }
}


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

    .tj-home-hero-slide {
        transition: none;
    }

    .tj-home-hero-slide.is-active .tj-home-hero-kicker,
    .tj-home-hero-slide.is-active .tj-home-hero-title,
    .tj-home-hero-slide.is-active .tj-home-hero-description,
    .tj-home-hero-slide.is-active .tj-home-hero-button-wrap,
    .tj-home-hero-slide.is-active .tj-home-hero-object {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .tj-home-hero-button,
    .tj-home-hero-control {
        transition: none;
    }
}
