/* =============================================================
   BOBA'S PLANTS - ULTIMATE PRIORITY RESTORATION
   ============================================================= */



/* 1. THE PLUM LEAF BUTTON FIX (Targeting the Link itself) */
html body #page a[href*="about-us"],
html body #page .lc-tt-cta a,
html body #page .bobas-tt-cta a,
html body #page .bobas-ti-cta a,
html body #page .page_hero__cta a, page_hero__cta a,
html body #page .wpcf7-submit,
html body #page .btn-primary,
html body #page .btn {
    background-color: #8B3F5D !important;
    border: 2px solid #8B3F5D !important;
    color: #ffffff !important;
    border-radius: 0 20px 0 20px !important; /* Boba leaf shape */
    padding: 14px 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    line-height: 1 !important;
    height: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 2. BREADCRUMBS (Restored) */
#breadcrumbs, .breadcrumbs, .woocommerce-breadcrumb {
    font-size: 0.875rem !important;
    margin-bottom: 2rem !important;
    display: block !important;
    visibility: visible !important;
    color: #888 !important;
}

/* --- Boba's Illustration Engine - Desktop Optimized --- */

/* 1. Ensure the Section is the Anchor, not just the container */
.beyond_showcase, 
.bobas-title-text-block {
    position: relative !important;
    overflow: hidden; /* Prevents horizontal scroll on desktop */
}

/* 2. Universal Illustration Base */
[class*="illustration-bg-"]::before {
    content: "";
    position: absolute;
    width: 350px;  /* Increased for desktop visibility */
    height: 350px;
    background-repeat: no-repeat;
    background-size: contain;
    z-index: 0; /* Sit between background and content */
    pointer-events: none;
    opacity: 0.12;
    transition: all 0.3s ease;
}

/* 3. Position Logic - Using percentages to stay visible on wide screens */
.illustration-left::before {
    left: -5%; /* Pulls slightly off-screen but stays visible */
    top: 50%;
    transform: translateY(-50%);
}

.illustration-right::before {
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
}

/* 4. Direct Tag Method Fallback (If using the <img> tag in PHP) */
.bg-illustration {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    opacity: 0.12;
    width: 350px;
    height: auto;
}

.bg-illustration.side-left { left: -100px; top: 50%; transform: translateY(-50%); }
.bg-illustration.side-right { right: -100px; top: 50%; transform: translateY(-50%); }

/* Specific Assets - Updated Paths */
.illustration-bg-1::before {
    background-image: url('img/bg-1.svg');
}

.illustration-bg-2::before {
    background-image: url('img/bg-2.svg');
}

.illustration-bg-3::before {
    background-image: url('img/bg-3.svg');
}

/* Universal Background Illustrations */
.bg-illustration {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 300px; /* Adjust size as needed */
    height: auto;
    opacity: 0.15; /* Subtle look */
    pointer-events: none; /* Don't block clicks */
    z-index: 1;
}

.bg-illustration.side-left {
    left: -50px;
}

.bg-illustration.side-right {
    right: -50px;
}

/* Ensure the section is the 'anchor' */
.position-relative {
    position: relative !important;
}

/* Showcase Styling */
.showcase-img-card {
    position: relative;
    background: #f8f9fa;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.showcase-img-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0,0,0,0.1) !important;
}

.showcase-zoom {
    transition: transform 0.5s ease;
}

.showcase-img-card:hover .showcase-zoom {
    transform: scale(1.08);
}

.brand-item {
    transition: all 0.3s ease;
}

.brand-item:hover {
    border-color: var(--wp--preset--color--green-600) !important;
    background-color: #f0fdf4 !important; /* Very light green hint */
}

/* --- Showcase Layout Fixes --- */
.beyond_showcase {
    background-color: #fafafa; /* Light subtle contrast like your other sections */
}

.brand-card {
    min-height: 180px; /* Better vertical breathing room */
    border: 1px solid #eee !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.brand-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08) !important;
    border-color: #d1d1d1 !important;
}

.brand-logo {
    max-height: 55px;
    width: auto;
    margin: 0 auto;
    display: block;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.brand-card:hover .brand-logo {
    filter: grayscale(0%);
    opacity: 1;
}

.cta-link {
    color: var(--wp--preset--color--green-600); /* Use your brand green */
    display: inline-block;
    margin-top: 10px;
    position: relative;
}

.letter-spacing-1 {
    letter-spacing: 0.05rem;
}

/* Fix for mobile stacking */
@media (max-width: 991px) {
    .beyond_showcase .pe-lg-5 {
        padding-right: 0 !important;
    }
}

/* Responsive Scaling */
@media (max-width: 768px) {
    [class*="illustration-bg-"]::before {
        width: 180px;
        height: 180px;
        opacity: 0.1;
    }
    .illustration-left::before { left: -30px; }
    .illustration-right::before { right: -30px; }
}

/* --- Showcase Specific Styles --- */
.beyond_showcase .brand-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.beyond_showcase .brand-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05) !important;
}

.beyond_showcase .brand-item img {
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.beyond_showcase .brand-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Matching the lead text from your Text & Image block */
.showcase__intro p {
    margin-bottom: 0;
}

.brand-card-link {
    display: block;
    height: 100%;
}

.brand-card-link:hover .brand-item {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08) !important;
    border-color: var(--wp--preset--color--green-300) !important;
}

.brand-card-link .brand-item span {
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(5px);
}

.brand-card-link:hover .brand-item span {
    opacity: 1;
    transform: translateY(0);
}

.brand-card-link:hover .brand-item img {
    filter: grayscale(0%) !important;
}


/* 3. PLANT GUIDE & A-Z FILTER (Restored) */
.az-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.az-filter a {
    background-color: #3a5a3d;
    color: white;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 10px 0 10px;
    font-weight: bold;
    text-decoration: none;
}

.plant-link {
    display: grid !important;
    grid-template-columns: 80px 1fr !important;
    grid-template-areas: "image common" "image scientific" !important;
    gap: 0 1rem;
    padding: 15px;
    border-bottom: 1px solid #f1f1ec;
    text-decoration: none;
}
.plant-thumb { grid-area: image; width: 80px; height: 80px; object-fit: cover; border-radius: 0 12px 0 12px; }
.plant-name { grid-area: common; font-weight: 700; color: #143223; }
.plant-scientific { grid-area: scientific; font-style: italic; opacity: 0.8; font-size: 0.9rem; color: #4a4a4a; }

/* 4. BLOG GRID (Restored) */
.blog__grid { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important; gap: 2rem; }
.blog__card { background-color: white; padding: 0.75rem; border-radius: 0 2rem 0 2rem; box-shadow: 0 10px 15px rgba(0,0,0,0.05); }

/* 5. NAV SUBMENU (Per Saved Instructions) */
.nav-menu ul li ul { 
    display: none; position: absolute; top: 100%; left: 0; 
    background-color: #fff; padding: 1rem; box-shadow: 0 10px 15px rgba(0,0,0,0.1); 
    z-index: 1000;
}
.nav-menu ul li:hover > ul { display: block; }

/* Target the link inside our specific Title Text block */
.lc-tt-cta a, 
.bobas-cta a, 
.bobas-tt-cta a, 
.bobas-ti-cta a, 
page_hero__cta a,
.page_hero__cta a,
.lc-title-text-cta a,
.bobas-title-text-cta a,
.title-text-block a {
    background-color: #8B3F5D !important;
    color: #ffffff !important;
    border-radius: 0 20px 0 20px !important; /* The Plum Leaf */
    padding: 12px 30px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    border: none !important;
    transition: all 0.3s ease !important;
}

.lc-tt-cta a:hover,
.bobas-cta a:hover,
.bobas-tt-cta a:hover {
    background-color: #712e48 !important;
    transform: translateY(-2px);
    color: #fff !important;
}

/* 1. The Grid: 13 Columns */
.az-filter {
    display: grid !important;
    grid-template-columns: repeat(13, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 900px;
    margin: 0 auto !important; /* Centered container */
    padding: 0 15px !important;
}

/* 2. The Letters */
.az-filter a:not(.show-all) {
    display: flex !important;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background-color: #8B3F5D !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 700;
    border-radius: 0 10px 0 10px !important; 
    font-size: 16px; 
}

/* 3. The "Show All" Button: Fixed Centering & Size */
.az-filter a.show-all {
    /* BREAK OUT OF GRID FLOW */
    grid-column: 1 / -1 !important; 
    justify-self: center !important; 
    
    /* SIZE & STYLE */
    display: inline-flex !important;
    width: 180px !important; /* Fixed desktop size */
    height: 44px !important;
    margin: 30px auto 0 auto !important; /* Forced centering via margin */
    
    background-color: #8B3F5D !important;
    color: #ffffff !important;
    border-radius: 0 20px 0 20px !important;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.9rem;
}
/* The "Show All" Button: Centered with Breathing Room */
.az-filter a.show-all {
    grid-column: 1 / -1 !important; 
    justify-self: center !important; 
    
    display: inline-flex !important;
    width: 180px !important; 
    height: 44px !important;
    
    /* ADDED SPACING: 30px top (from letters) and 50px bottom (from next heading) */
    margin: 30px auto 50px auto !important; 
    
    background-color: #8B3F5D !important;
    color: #ffffff !important;
    border-radius: 0 20px 0 20px !important;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none !important;
}

/* Ensure the next heading doesn't try to float up */
.az-filter + h1, 
.az-filter + h2, 
.az-filter + .section-title {
    margin-top: 20px !important;
    clear: both !important;
}

/* 4. MOBILE POLISH */
@media (max-width: 768px) {
    .az-filter {
        grid-template-columns: repeat(13, auto) !important;
        justify-content: center !important;
        gap: 3px !important;
    }
    .az-filter a:not(.show-all) {
        width: 24px !important;
        height: 24px !important;
        font-size: 11px !important;
        border-radius: 0 6px 0 6px !important;
    }
    .az-filter a.show-all {
        width: 140px !important; /* Slightly smaller for mobile */
        height: 36px !important;
        margin-top: 20px !important;
    }
}

/* 1. Base Setup */
html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* 2. The Wrapper */
#page {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important; /* Minimum height is the screen */
    width: 100%
}

/* 3. The Content - The only part that "stretches" */
#content, 
.site-content {
    flex: 1 0 auto !important; /* This pushes everything below it to the bottom */
}

/* 4. The Footer & Colophon - The parts that stay at the bottom */
footer.footer {
    flex-shrink: 0 !important; /* Prevents them from being squished or hidden */
    width: 100% !important;
    margin-top: auto !important;
}

.colophon {
    flex-shrink: 0 !important; /* Prevents them from being squished or hidden */
    width: 100% !important;
}

/* 5. Special Fix for Admin Bar */
/* If you are logged in, the Admin Bar takes up 32px, which pushes the colophon off. 
   This math fixes it. */
.admin-bar #page {
    min-height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
    .admin-bar #page {
        min-height: calc(100vh - 46px);
    }
}




/* Leave the below Alone! */
.page_hero__cta {
    width: 100%;
    display: flex;
}
.align-content-center .page_hero__cta { justify-content: center; }
.align-content-right .page_hero__cta { justify-content: flex-end; }
/* Leave the above Alone! */





/* --- 1. Force the Grid Structure --- */
/*
.page_hero__grid {
    display: grid !important;
    grid-template-columns: 1fr !important; /* Stacked on mobile */
    width: 100% !important;
}
*/

.page_hero__grid {
    display: grid !important;
    min-height: auto !important; /* Allow it to shrink to content size */
    padding-bottom: 2rem;
}


@media (min-width: 992px) {
    .page_hero__grid {
        grid-template-columns: 1fr 1fr !important; /* Side by side on desktop */
        min-height: 500px !important;
        align-items: center;
    }

    .page_hero__shortcode_visual .metaslider {
        margin: 0 !important;
    }

    /* Assign Areas */
    .page_hero__content-wrapper {
        grid-area: text-col !important;
        padding-bottom: 0 !important;
    }
    .page_hero__slider          { grid-area: slide-col !important; }

    /* Layout: Text Left / Slider Right */
    .page_hero__grid.text-left {
        grid-template-areas: "text-col slide-col" !important;
    }

    /* Layout: Slider Left / Text Right */
    .page_hero__grid.text-right {
        grid-template-areas: "slide-col text-col" !important;
    }

    /* Layout: Centered */
    .page_hero__grid.centered {
        grid-template-columns: 1fr !important;
        grid-template-areas: "text-col" "slide-col" !important;
    }
}

/* --- 2. Fix the "Events" Title & Content Center --- */
.align-content-center {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
}

.align-content-center .page_hero__title h1 {
    text-align: center !important;
    width: 100%;
}

.align-content-center .page_hero__cta {
    display: flex;
    justify-content: center;
    width: 100%;
}
