/* Hide Kadence default archive hero on brand pages */
.tax-product_brand .entry-hero { display: none !important; }
.tax-product_brand .woocommerce-products-header__title { display: none !important; }
/**
 * TVF Brand Category Page Styles
 * Flavor Lab DNA: Playfair Display + DM Sans
 * Prefix: fl-brand
 */

/* ─── CSS Variables (Flavor Lab DNA) ─── */
:root {
    --fl-cream:         #FDF6EC;
    --fl-espresso:      #2C1810;
    --fl-berry:         #8B2252;
    --fl-berry-light:   #C4547A;
    --fl-sweet:         #E8A87C;
    --fl-cool:          #41B3A3;
    --fl-border:        #E8DFD0;
    --fl-surface:       #FFFFFF;
    --fl-muted:         #9C8E7E;
    --fl-gradient-hero: linear-gradient(135deg, #8B2252 0%, #C4547A 50%, #E8A87C 100%);
    --fl-radius-pill:   999px;
    --fl-radius-card:   12px;
    --fl-container:     1080px;
    --fl-font-heading:  'Playfair Display', Georgia, serif;
    --fl-font-body:     'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ─── Shared heading style ─── */
.fl-heading-serif {
    font-family: var(--fl-font-heading);
    font-weight: 700;
    color: var(--fl-espresso);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid transparent;
    border-image: var(--fl-gradient-hero) 1;
    border-image-slice: 1;
}

/* ═══════════════════════════════════════════
   1. BRAND HERO SECTION
   ═══════════════════════════════════════════ */
.fl-brand-hero {
    background: var(--fl-gradient-hero);
    border-radius: var(--fl-radius-card);
    padding: 2.5rem 2rem;
    margin-bottom: 1.5rem;
    max-width: var(--fl-container);
    color: #fff;
}

.fl-brand-hero__inner {
    max-width: 720px;
}

.fl-brand-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.fl-badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--fl-font-body);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.3em 0.9em;
    border-radius: var(--fl-radius-pill);
}

.fl-badge--retailer {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.fl-badge--count {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

.fl-brand-hero__title {
    font-family: var(--fl-font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.75rem;
    color: #fff;
}

.fl-brand-hero__tagline {
    font-family: var(--fl-font-body);
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.9;
    margin: 0 0 0.75rem;
}

.fl-brand-hero__desc {
    font-family: var(--fl-font-body);
    font-size: 0.95rem;
    line-height: 1.65;
    opacity: 0.88;
}

.fl-brand-hero__desc p:last-child {
    margin-bottom: 0;
}

/* ═══════════════════════════════════════════
   2. FLAVOR FILTER BAR
   ═══════════════════════════════════════════ */
.fl-brand-filter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--fl-border);
    max-width: var(--fl-container);
}

.fl-brand-filter__label {
    font-family: var(--fl-font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fl-espresso);
    white-space: nowrap;
}

.fl-brand-filter__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.fl-pill {
    display: inline-block;
    font-family: var(--fl-font-body);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.4em 1em;
    border-radius: var(--fl-radius-pill);
    background: var(--fl-surface);
    color: var(--fl-espresso);
    border: 1px solid var(--fl-border);
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    cursor: pointer;
}

.fl-pill:hover {
    background: var(--fl-cream);
    border-color: var(--fl-berry-light);
    color: var(--fl-berry);
    text-decoration: none;
}

.fl-pill--active,
.fl-pill--active:hover {
    background: var(--fl-berry);
    color: #fff;
    border-color: var(--fl-berry);
}

/* ═══════════════════════════════════════════
   3. PRODUCT CARD ENHANCEMENTS
   ═══════════════════════════════════════════ */

/* Flavor count badge on product cards */
.fl-card-flavors {
    display: inline-block;
    font-family: var(--fl-font-body);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--fl-cool);
    background: rgba(65, 179, 163, 0.1);
    padding: 0.2em 0.7em;
    border-radius: var(--fl-radius-pill);
    margin-top: 0.4rem;
}

/* View Flavors button */
.fl-btn--view-flavors {
    display: inline-block;
    font-family: var(--fl-font-body);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--fl-berry);
    background: transparent;
    border: 1.5px solid var(--fl-berry);
    border-radius: var(--fl-radius-pill);
    padding: 0.5em 1.4em;
    margin-top: 0.6rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}

.fl-btn--view-flavors:hover {
    background: var(--fl-berry);
    color: #fff;
    text-decoration: none;
}

/* Product card hover lift on brand pages */
.tax-brand ul.products li.product {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border-radius: var(--fl-radius-card);
}

.tax-brand ul.products li.product:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(44, 24, 16, 0.08);
}

/* ═══════════════════════════════════════════
   4. BOTTOM CONTENT WRAPPER
   ═══════════════════════════════════════════ */
.fl-brand-bottom {
    max-width: var(--fl-container);
    margin: 3rem auto 0;
    padding: 0;
}

.fl-brand-bottom > section {
    margin-bottom: 2.5rem;
}

/* ── 4a. About Brand ── */
.fl-brand-about__text {
    font-family: var(--fl-font-body);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--fl-espresso);
    max-width: 720px;
}

.fl-brand-about__text p:last-child {
    margin-bottom: 0;
}

.fl-brand-about__text a {
    color: #8B2252;
    text-decoration: none;
    font-weight: 600;
}

.fl-brand-about__text a:hover {
    color: #C4547A;
    text-decoration: underline;
}

/* ── 4b. Popular Flavors ── */
.fl-brand-popular__list {
    list-style: none;
    counter-reset: flavor-rank;
    padding: 0;
    margin: 0;
}

.fl-brand-popular__item {
    counter-increment: flavor-rank;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--fl-border);
    font-family: var(--fl-font-body);
    font-size: 0.95rem;
    transition: background 0.15s;
}

.fl-brand-popular__item:hover {
    background: var(--fl-cream);
}

.fl-brand-popular__item::before {
    content: counter(flavor-rank);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    flex-shrink: 0;
    font-family: var(--fl-font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    background: var(--fl-berry);
    border-radius: 50%;
}

.fl-brand-popular__item a {
    color: var(--fl-espresso);
    text-decoration: none;
    font-weight: 500;
}

.fl-brand-popular__item a:hover {
    color: var(--fl-berry);
}

.fl-brand-popular__price {
    margin-left: auto;
    color: var(--fl-muted);
    font-size: 0.85rem;
}

/* ── 4c. Trust Signals ── */
.fl-brand-trust__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.fl-brand-trust__card {
    background: var(--fl-surface);
    border: 1px solid var(--fl-border);
    border-radius: var(--fl-radius-card);
    padding: 1.5rem 1.25rem;
    text-align: center;
    transition: border-color 0.2s;
}

.fl-brand-trust__card:hover {
    border-color: var(--fl-berry-light);
}

.fl-brand-trust__icon {
    display: block;
    font-size: 1.6rem;
    margin-bottom: 0.6rem;
}

.fl-brand-trust__card h3 {
    font-family: var(--fl-font-body);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--fl-espresso);
    margin: 0 0 0.5rem;
}

.fl-brand-trust__card p {
    font-family: var(--fl-font-body);
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--fl-muted);
    margin: 0;
}

/* ── 4d. FAQ Section ── */
.fl-brand-faq__list {
    max-width: 720px;
}

.fl-faq-item {
    border-bottom: 1px solid var(--fl-border);
}

.fl-faq-item__question {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 0;
    font-family: var(--fl-font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--fl-espresso);
    cursor: pointer;
    list-style: none;
}

.fl-faq-item__question::-webkit-details-marker {
    display: none;
}

.fl-faq-item__question::marker {
    content: '';
}

.fl-faq-item__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--fl-berry);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.fl-faq-item[open] .fl-faq-item__icon {
    transform: rotate(90deg);
}

.fl-faq-item__answer {
    padding: 0 0 1rem 1.7rem;
    font-family: var(--fl-font-body);
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--fl-espresso);
}

.fl-faq-item__answer p {
    margin: 0;
}

/* ── 4e. Related Brands ── */
.fl-brand-related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

.fl-brand-related__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    background: var(--fl-surface);
    border: 1px solid var(--fl-border);
    border-radius: var(--fl-radius-card);
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
}

.fl-brand-related__card:hover {
    border-color: var(--fl-berry);
    transform: translateY(-2px);
    text-decoration: none;
}

.fl-brand-related__name {
    font-family: var(--fl-font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--fl-espresso);
    margin-bottom: 0.25rem;
}

.fl-brand-related__count {
    font-family: var(--fl-font-body);
    font-size: 0.75rem;
    color: var(--fl-muted);
}

/* ═══════════════════════════════════════════
   5. RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .fl-brand-hero {
        padding: 1.5rem 1.25rem;
        border-radius: 8px;
    }

    .fl-brand-hero__title {
        font-size: 1.6rem;
    }

    .fl-brand-filter {
        flex-direction: column;
        align-items: flex-start;
    }

    .fl-brand-filter__pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.25rem;
        max-width: 100%;
    }

    .fl-brand-filter__pills::-webkit-scrollbar {
        display: none;
    }

    .fl-pill {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .fl-brand-trust__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fl-brand-related__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fl-heading-serif {
        font-size: 1.35rem;
    }
}

@media (max-width: 480px) {
    .fl-brand-hero {
        padding: 1.25rem 1rem;
    }

    .fl-brand-hero__title {
        font-size: 1.35rem;
    }

    .fl-brand-trust__grid {
        grid-template-columns: 1fr;
    }

    .fl-brand-related__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fl-brand-popular__item {
        padding: 0.6rem 0.5rem;
    }
}
