/* =============================================================
 * /assets/css/hfstyle.css
 * Bom Vendedor Brasil — Header e Footer
 * Versão: V2.0 BRAND BRASIL — Verde Esmeralda
 * Atualizado: 07/05/2026
 * ============================================================= */

/* =========================================================
   HEADER
========================================================= */
.bv-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--bv-border-soft);
    box-shadow: 0 1px 0 rgba(13, 59, 54, .03);
}

.bv-header__bar {
    height: 3px;
    background: var(--bv-gradient);
}

.bv-header__container {
    padding-block: 16px 14px;
}

/* Topo do header — grid responsivo */
.bv-header__top {
    display: grid;
    grid-template-columns: auto minmax(280px, 1fr) auto;
    align-items: center;
    gap: 24px;
}

/* Logo / Brand */
.bv-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--bv-green);
    transition: opacity var(--bv-tr);
}
.bv-brand:hover { opacity: .85; color: var(--bv-green); }
.bv-brand__logo {
    height: 48px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    object-position: left center;
}

.bv-brand__mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bv-gradient);
    color: #fff;
    font-weight: 800;
    font-size: 18px;
}

.bv-brand__text { display: grid; line-height: 1; margin-left: 10px; }
.bv-brand__text strong {
    font-family: var(--bv-font-title);
    font-size: 20px;
    font-weight: 800;
    color: var(--bv-green);
}
.bv-brand__text small {
    margin-top: 4px;
    color: var(--bv-emerald);
    font-weight: 700;
    font-size: 13px;
}

/* Busca no header */
.bv-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0;
    align-items: stretch;
}
.bv-search__box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid var(--bv-border);
    border-right: 0;
    border-radius: var(--bv-radius-pill) 0 0 var(--bv-radius-pill);
    background: #fff;
    transition: border-color var(--bv-tr), box-shadow var(--bv-tr);
}
.bv-search__box:focus-within {
    border-color: var(--bv-emerald);
    box-shadow: 0 0 0 3px rgba(15, 166, 122, .12);
}
.bv-search__icon {
    display: grid;
    place-items: center;
    color: var(--bv-muted);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.bv-search input {
    width: 100%;
    border: 0;
    background: transparent;
    outline: 0;
    color: var(--bv-text);
    font: 500 15px/1 var(--bv-font);
}
.bv-search input::placeholder { color: var(--bv-muted); }
.bv-search__button {
    min-height: 48px;
    padding: 0 28px;
    border: 0;
    border-radius: 0 var(--bv-radius-pill) var(--bv-radius-pill) 0;
    background: var(--bv-gradient);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: filter var(--bv-tr);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.bv-search__button:hover { filter: brightness(1.05); }
.bv-search__button svg { width: 18px; height: 18px; }
.bv-search__button-text { display: inline; }

/* Ações do header (favoritos, login, conta) */
.bv-header__actions {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    justify-content: flex-end;
}
.bv-action-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 12px;
    color: var(--bv-gray-700);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    border-radius: var(--bv-radius-sm);
    transition: color var(--bv-tr), background var(--bv-tr);
}
.bv-action-link:hover {
    color: var(--bv-emerald);
    background: var(--bv-mint);
}
.bv-action-link svg { width: 22px; height: 22px; flex-shrink: 0; }
.bv-action-link__label { display: grid; line-height: 1.1; text-align: left; }
.bv-action-link__label small { font-size: 11px; font-weight: 500; color: var(--bv-muted); }
.bv-action-link__label strong { font-size: 14px; font-weight: 600; }

.bv-action-link--favorite { color: var(--bv-gray-700); }
.bv-action-link--ghost { color: var(--bv-green); }
.bv-action-link--primary {
    background: var(--bv-gradient);
    color: #fff !important;
    padding: 0 18px;
}
.bv-action-link--primary:hover {
    background: var(--bv-gradient);
    filter: brightness(1.05);
    color: #fff !important;
}

/* Conta logada */
.bv-account {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 4px 14px 4px 4px;
    border-radius: var(--bv-radius-pill);
    background: var(--bv-gray-100);
    border: 1px solid var(--bv-border-soft);
    text-decoration: none;
    color: var(--bv-text);
    transition: background var(--bv-tr), border-color var(--bv-tr);
}
.bv-account:hover {
    background: var(--bv-mint);
    border-color: var(--bv-mint-2);
    color: var(--bv-text);
}
.bv-account__avatar-wrap {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bv-emerald);
    flex-shrink: 0;
}
.bv-account__avatar { width: 100%; height: 100%; object-fit: cover; }
.bv-account__content { display: grid; line-height: 1.15; }
.bv-account__content strong {
    font-size: 13px;
    font-weight: 700;
    max-width: 130px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.bv-account__content small { font-size: 11px; color: var(--bv-muted); font-weight: 500; }

/* Mobile toggle */
.bv-mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--bv-border);
    border-radius: var(--bv-radius-sm);
    background: #fff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0;
}
.bv-mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--bv-green);
    transition: var(--bv-tr);
}
.bv-mobile-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.bv-mobile-toggle.is-active span:nth-child(2) { opacity: 0; }
.bv-mobile-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Navegação principal */
.bv-header__bottom {
    margin-top: 14px;
}
.bv-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.bv-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: var(--bv-radius-sm);
    text-decoration: none;
    color: var(--bv-gray-700);
    font-weight: 600;
    font-size: 14px;
    position: relative;
    transition: color var(--bv-tr), background var(--bv-tr);
}
.bv-nav a:hover {
    color: var(--bv-emerald);
}
.bv-nav a.is-active {
    color: var(--bv-emerald);
}
.bv-nav a.is-active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -6px;
    height: 3px;
    border-radius: 3px;
    background: var(--bv-emerald);
}
.bv-nav__account { color: var(--bv-info) !important; }
.bv-nav__logout { color: var(--bv-danger) !important; }

/* =========================================================
   FOOTER
========================================================= */
.bv-footer {
    margin-top: 80px;
    padding: 64px 0 24px;
    background: linear-gradient(180deg, var(--bv-green) 0%, var(--bv-green-2) 100%);
    color: rgba(255, 255, 255, .85);
    position: relative;
    overflow: hidden;
}
.bv-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 0%, rgba(15, 166, 122, .25), transparent 45%),
                radial-gradient(circle at 90% 100%, rgba(255, 106, 0, .10), transparent 40%);
    pointer-events: none;
}
.bv-footer > * { position: relative; }
.bv-footer a { text-decoration: none; transition: color var(--bv-tr); }
.bv-footer a:hover { color: var(--bv-emerald); }

.bv-footer__cta {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 36px 40px;
    border: 1.5px solid rgba(15, 166, 122, .45);
    border-radius: var(--bv-radius-2xl);
    background:
        linear-gradient(135deg, rgba(15, 166, 122, .18) 0%, rgba(15, 166, 122, .04) 100%);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .15);
    margin-bottom: 56px;
    position: relative;
    overflow: hidden;
}
.bv-footer__cta::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(15, 166, 122, .30), transparent 70%);
    pointer-events: none;
}
.bv-footer__eyebrow {
    color: var(--bv-emerald);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-weight: 700;
    font-size: 12px;
    font-family: var(--bv-font);
}
.bv-footer__cta h2 {
    margin: 8px 0 6px;
    color: #fff;
    font-family: var(--bv-font-title);
    font-size: clamp(1.5rem, 2vw + 1rem, 2.25rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
}
.bv-footer__cta p { margin: 0; color: rgba(255, 255, 255, .7); line-height: 1.6; }
.bv-footer__cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 50px;
    padding: 0 26px;
    border-radius: var(--bv-radius-pill);
    background: var(--bv-gradient-orange);
    color: #fff !important;
    font-weight: 700;
    box-shadow: var(--bv-shadow-orange);
    transition: transform var(--bv-tr);
}
.bv-footer__cta-button:hover {
    transform: translateY(-2px);
    color: #fff !important;
}

.bv-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr .8fr 1.2fr;
    gap: 48px;
    margin-bottom: 40px;
}
.bv-footer h3 {
    margin: 0 0 16px;
    font-family: var(--bv-font-title);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0;
}
.bv-footer p { color: rgba(255, 255, 255, .7); line-height: 1.65; }
.bv-footer__cnpj { font-size: 12px; opacity: .65; }
.bv-footer__brand h3 {
    font-family: var(--bv-font-title);
    font-size: 18px;
}

/* Logo no footer */
.bv-footer__brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.bv-footer__brand-logo img { height: 40px; width: auto; }

.bv-footer__social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}
.bv-footer__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    transition: background var(--bv-tr), transform var(--bv-tr);
}
.bv-footer__social a:hover {
    background: var(--bv-emerald);
    transform: translateY(-2px);
    color: #fff;
}
.bv-footer__social a svg { width: 18px; height: 18px; }
.bv-footer__social a span:not(:has(svg)) { display: none; }

.bv-footer__links {
    display: grid;
    align-content: start;
    gap: 10px;
}
.bv-footer__links a {
    color: rgba(255, 255, 255, .72);
    font-weight: 500;
    font-size: 14px;
}

.bv-footer-form { display: grid; gap: 12px; }
.bv-footer-form__row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0;
}
.bv-footer-form input[type="email"] {
    min-height: 48px;
    border-radius: var(--bv-radius-pill) 0 0 var(--bv-radius-pill);
    border: 1px solid rgba(255, 255, 255, .18);
    border-right: 0;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    padding: 0 18px;
    outline: 0;
    font-weight: 500;
    font-size: 14px;
    font-family: var(--bv-font);
}
.bv-footer-form input[type="email"]::placeholder { color: rgba(255, 255, 255, .55); }
.bv-footer-form input[type="email"]:focus { border-color: var(--bv-emerald); }
.bv-footer-form button {
    min-height: 48px;
    border-radius: 0 var(--bv-radius-pill) var(--bv-radius-pill) 0;
    border: 0;
    background: var(--bv-gradient-orange);
    color: #fff;
    font-weight: 700;
    padding: 0 22px;
    cursor: pointer;
    transition: filter var(--bv-tr);
}
.bv-footer-form button:hover { filter: brightness(1.05); }
.bv-footer-form__consent {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    color: rgba(255, 255, 255, .6);
    font-size: 12px;
    line-height: 1.4;
}
.bv-footer-form__consent input { margin-top: 2px; accent-color: var(--bv-emerald); }

.bv-footer__stores {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: center;
    margin: 32px 0;
    padding: 24px 0;
    border-top: 1px solid rgba(255, 255, 255, .12);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.bv-footer__stores a {
    display: grid;
    place-items: center;
    width: 110px;
    height: 50px;
    border-radius: var(--bv-radius-md);
    background: rgba(255, 255, 255, .92);
    transition: transform var(--bv-tr), background var(--bv-tr);
}
.bv-footer__stores a:hover {
    transform: translateY(-2px);
    background: #fff;
}
.bv-footer__stores a:focus-visible {
    outline: 3px solid var(--bv-emerald);
    outline-offset: 4px;
}
.bv-footer__stores img {
    display: block;
    width: 84px;
    height: 32px;
    max-width: 84px;
    max-height: 32px;
    object-fit: contain;
}
.bv-footer__store-name {
    padding: 0 8px;
    color: #0d3b36;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    overflow-wrap: anywhere;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.bv-footer__stores img[hidden],
.bv-footer__store-name[hidden] { display: none; }

.bv-footer__trust {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 16px 0 24px;
}
.bv-footer__trust span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255, 255, 255, .8);
    font-weight: 600;
    font-size: 13px;
}
.bv-footer__trust span svg { width: 18px; height: 18px; color: var(--bv-emerald); flex-shrink: 0; }

.bv-footer__legal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .55);
    font-size: 12px;
    flex-wrap: wrap;
}
.bv-footer__legal nav { display: flex; flex-wrap: wrap; gap: 18px; }
.bv-footer__legal a { color: rgba(255, 255, 255, .7); font-weight: 500; }

/* =========================================================
   COOKIE BANNER + NEWSLETTER TOAST
========================================================= */
.bv-cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translate(-50%, 30px);
    width: min(720px, calc(100% - 28px));
    opacity: 0;
    pointer-events: none;
    z-index: 9990;
    transition: var(--bv-tr-slow);
}
.bv-cookie-banner.show {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}
.bv-cookie-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 20px;
    border-radius: var(--bv-radius-xl);
    background: var(--bv-green);
    color: #fff;
    box-shadow: var(--bv-shadow-xl);
}
.bv-cookie-text { font-size: 13px; color: rgba(255, 255, 255, .85); flex: 1; }
.bv-cookie-text a { color: var(--bv-emerald); font-weight: 700; }
.bv-cookie-button {
    min-height: 40px;
    padding: 0 22px;
    border-radius: var(--bv-radius-pill);
    background: var(--bv-emerald);
    color: #fff;
    font-weight: 700;
    border: 0;
    cursor: pointer;
    transition: filter var(--bv-tr);
}
.bv-cookie-button:hover { filter: brightness(1.1); }

.bv-newsletter-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: min(420px, calc(100% - 32px));
    padding: 16px 18px;
    border-radius: var(--bv-radius-lg);
    background: #fff;
    border: 1px solid var(--bv-border);
    box-shadow: var(--bv-shadow-lg);
    z-index: 9991;
    transform: translateY(20px);
    opacity: 0;
    transition: var(--bv-tr-slow);
}
.bv-newsletter-toast.is-visible { transform: translateY(0); opacity: 1; }
.bv-newsletter-toast--success { border-left: 4px solid var(--bv-emerald); }
.bv-newsletter-toast--error { border-left: 4px solid var(--bv-danger); }
.bv-newsletter-toast__icon { font-size: 24px; flex-shrink: 0; }
.bv-newsletter-toast__content { display: grid; gap: 4px; flex: 1; line-height: 1.4; }
.bv-newsletter-toast__content strong { font-weight: 700; color: var(--bv-text); font-size: 14px; }
.bv-newsletter-toast__content span { font-size: 13px; color: var(--bv-muted); }
.bv-newsletter-toast__close {
    background: none;
    border: 0;
    color: var(--bv-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: background var(--bv-tr);
}
.bv-newsletter-toast__close:hover { background: var(--bv-gray-100); color: var(--bv-text); }

/* =========================================================
   RESPONSIVO — TABLET / MOBILE
========================================================= */
@media (max-width: 1024px) {
    .bv-header__top { grid-template-columns: auto 1fr auto; gap: 16px; }
    .bv-action-link__label { display: none; }
    .bv-action-link { padding: 0 8px; }
    .bv-search__button-text { display: none; }
    .bv-search__button { padding: 0 18px; }
    .bv-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .bv-footer__newsletter { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    .bv-header__container { padding-block: 12px 10px; }
    .bv-header__top {
        grid-template-columns: auto 1fr auto;
        gap: 10px;
    }
    .bv-brand__logo { height: 38px; max-width: 150px; }
    .bv-search { grid-column: 1 / -1; order: 3; margin-top: 10px; }
    .bv-mobile-toggle { display: inline-flex; }

    .bv-header__actions { gap: 6px; }
    .bv-action-link { padding: 0 8px; min-height: 40px; }
    .bv-action-link--favorite,
    .bv-action-link--ghost { display: none; }
    .bv-action-link--primary { padding: 0 14px; font-size: 13px; min-height: 40px; }

    .bv-header__bottom {
        max-height: 0;
        overflow: hidden;
        margin-top: 0;
        transition: max-height var(--bv-tr-slow);
    }
    .bv-header__bottom.is-open {
        max-height: 500px;
        margin-top: 14px;
        padding-top: 14px;
        border-top: 1px solid var(--bv-border-soft);
    }
    .bv-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    .bv-nav a {
        padding: 12px 14px;
        border-radius: var(--bv-radius-sm);
        min-height: 44px;
    }
    .bv-nav a.is-active::after { display: none; }
    .bv-nav a.is-active { background: var(--bv-mint); color: var(--bv-green); }

    .bv-footer { margin-top: 48px; padding: 48px 0 20px; }
    .bv-footer__cta { grid-template-columns: 1fr; text-align: center; padding: 24px; margin-bottom: 36px; }
    .bv-footer__cta-button { justify-self: center; }
    .bv-footer__grid { grid-template-columns: 1fr; gap: 32px; }
    .bv-footer__trust { grid-template-columns: 1fr 1fr; gap: 12px; }
    .bv-footer__legal { flex-direction: column; align-items: flex-start; gap: 12px; }
    .bv-footer__stores a { width: 90px; height: 44px; }
    .bv-footer__stores img { max-width: 70px; max-height: 28px; }
}

@media (max-width: 480px) {
    .bv-action-link__label { display: none; }
    .bv-search__box { min-height: 44px; padding: 0 14px; }
    .bv-search__button { min-height: 44px; padding: 0 16px; }
    .bv-search input { font-size: 14px; }
    .bv-account__content { display: none; }
    .bv-account { padding: 4px; }
}
