/* aieo/brand-archive-hero — full-bleed hero with logo overlay. */

:root {
    --aieo-bh-pink: #F46767;
    --aieo-bh-text: #1f2937;
    --aieo-bh-bg: #ffffff;
    --aieo-bh-scrim: rgba(0, 0, 0, 0.45);
}

.aieo-brand-hero {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, #fcf0f1 0%, #ffe9eb 50%, #fff 100%);
    color: var(--aieo-bh-text);
    margin: 0 0 24px;
    display: flex;
    align-items: flex-end;
    padding: 32px;
}
.aieo-brand-hero.has-hero-image { color: #fff; }
.aieo-brand-hero.has-hero-image .aieo-brand-hero__title { color: #fff; }
.aieo-brand-hero.has-hero-image .aieo-brand-hero__count,
.aieo-brand-hero.has-hero-image .aieo-brand-hero__headline { color: rgba(255, 255, 255, 0.9); }

.aieo-brand-hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.aieo-brand-hero__bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.aieo-brand-hero__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, var(--aieo-bh-scrim) 100%);
}

.aieo-brand-hero__body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 720px;
}

.aieo-brand-hero__logo {
    width: 96px;
    height: 96px;
    background: #fff;
    border-radius: 12px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}
.aieo-brand-hero__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.aieo-brand-hero__title {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.1;
}

.aieo-brand-hero__headline {
    margin: 0;
    font-size: 1.1rem;
    max-width: 640px;
    line-height: 1.4;
}
.aieo-brand-hero__headline strong { font-weight: 700; color: var(--aieo-bh-pink); }
.aieo-brand-hero__headline em     { font-style: italic; }
.aieo-brand-hero.has-hero-image .aieo-brand-hero__headline strong { color: #fff; }

.aieo-brand-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    font-size: 14px;
}

.aieo-brand-hero__count { font-weight: 500; }

.aieo-brand-hero__rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.aieo-brand-hero__rating-stars {
    color: var(--aieo-bh-pink);
    letter-spacing: 1px;
    font-size: 14px;
}
.aieo-brand-hero__rating-meta { font-weight: 600; }
.aieo-brand-hero__rating-count {
    font-weight: 400;
    margin-left: 4px;
    opacity: 0.85;
}

.aieo-brand-hero__actions {
    margin-top: 4px;
    display: flex;
    gap: 8px;
}
/* ── Follow brand button (dedicated, no shared classes with the
       legacy AIEO_Wishlist heart). Uses local view.js for click. ──── */
.aieo-brand-follow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--aieo-bh-text);
    border: 1.5px solid var(--aieo-bh-pink);
    border-radius: 999px;
    padding: 9px 18px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    transition: background-color 150ms ease, color 150ms ease, transform 120ms ease, box-shadow 150ms ease;
    box-shadow: 0 2px 8px rgba(244, 103, 103, 0.10);
}
.aieo-brand-follow:hover {
    background: var(--aieo-bh-pink);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(244, 103, 103, 0.25);
}
.aieo-brand-follow.is-in-list {
    background: var(--aieo-bh-pink);
    color: #fff;
}
.aieo-brand-follow.is-loading { opacity: .65; cursor: wait; transform: none; }

.aieo-brand-follow__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    /* Reset line-height so the inline-flex span doesn't reserve baseline
     * descender space, which would push the SVG ~1–2px above the
     * uppercase text's visual centerline. */
    line-height: 0;
    color: var(--aieo-bh-pink);
    transition: color 150ms ease;
}
.aieo-brand-follow__icon svg {
    width: 100%;
    height: 100%;
    display: block;
    /* The heart path's bounding box (y≈5→21) sits ~0.5 SVG-units below
     * the viewBox geometric center (12), so its visual mass-center
     * lands below the icon span's flex-centered axis. Counter the
     * imbalance with a sub-pixel translate so the heart visually
     * aligns with the uppercase text's optical centerline. */
    transform: translateY(-0.5px);
}
/* Match label optical centering to the icon: uppercase letters have
 * empty descender space, which throws off `align-items: center` against
 * a glyph-shaped icon. Reset line-height + bump the label down half a
 * pixel so its optical center matches the icon's. */
.aieo-brand-follow__label {
    line-height: 1;
    transform: translateY(0.5px);
}

/* Default state: outline shown, fill hidden. */
.aieo-brand-follow .aieo-brand-follow__icon-fill { opacity: 0; transition: opacity 150ms ease; }

/* Hover state: button paints pink, icon goes white (outline visible on white bg). */
.aieo-brand-follow:hover .aieo-brand-follow__icon { color: #fff; }

/* In-list state: filled heart, white. */
.aieo-brand-follow.is-in-list .aieo-brand-follow__icon { color: #fff; }
.aieo-brand-follow.is-in-list .aieo-brand-follow__icon-fill { opacity: 1; }
.aieo-brand-follow.is-in-list .aieo-brand-follow__icon-outline { stroke: #fff; }

.aieo-brand-follow__label { white-space: nowrap; }

@media (max-width: 768px) {
    .aieo-brand-hero { padding: 24px 16px; min-height: 240px; }
    .aieo-brand-hero__logo { width: 72px; height: 72px; }
}

/* ── Brand archive sidebar + main column layout (used by the
       aieo/brand-archive-page pattern). Lives here so the rules ship
       with the brand-archive-hero block (which is always present on
       the page). ────────────────────────────────────────────────────── */

.aieo-brand-archive-cols {
    align-items: flex-start;
}
.aieo-brand-archive-sidebar {
    position: sticky;
    top: 80px;
    align-self: flex-start;
}
.aieo-brand-archive-main {
    min-width: 0;
}

/* Mobile-only condensed FiboFilters bar (placed above the columns in
   the pattern). Hidden on desktop where the vertical sidebar takes over. */
.aieo-brand-archive-mobile-bar {
    display: none;
}

@media (max-width: 1024px) {
    /* Sidebar drops to full-width and stops being sticky; child blocks
       (vertical filters + From-the-Blog) restack below the products. */
    .aieo-brand-archive-cols { flex-wrap: wrap; flex-direction: column; }
    .aieo-brand-archive-sidebar {
        position: static;
        flex-basis: 100% !important;
        max-width: none !important;
        order: 2;       /* push sidebar below the products on mobile */
    }
    .aieo-brand-archive-main {
        flex-basis: 100% !important;
        order: 1;
    }
    /* Hide the desktop sidebar's fibofilters block; use the mobile one. */
    .aieo-brand-archive-sidebar > .wp-block-fibofilters-filters,
    .aieo-brand-archive-sidebar [class*="fibofilters-vertical-filters-container"] {
        display: none;
    }
    /* Show the mobile bar instead. */
    .aieo-brand-archive-mobile-bar {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 30;
        background: #fff;
        margin: 0 -16px 12px;
        padding: 8px 16px;
        border-bottom: 1px solid #e5e7eb;
    }
}
