/* Sprint 7.2C — Header premium + WhatsApp smart
   Brand: #003845 / #FF6B00 — load after landing-petclinicas.css */

[x-cloak] { display: none !important; }

.pc-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

.pc-sr-anchor {
    position: relative;
    top: -120px;
    height: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

/* —— Topbar —— */
.pc-topbar {
    background: var(--pc-primary);
    color: #d7eef2;
    font-size: 13px;
    min-height: 36px;
}
.pc-topbar__inner {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.pc-topbar__promo { font-weight: 500; }
.pc-topbar__links {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.pc-topbar__links a {
    color: #fff;
    font-weight: 600;
    opacity: .92;
}
.pc-topbar__links a:hover { opacity: 1; color: var(--pc-warm); }

/* —— Header shell / glass —— */
.pc-header-shell { position: relative; z-index: 100; }
.pc-header--premium {
    position: relative;
    z-index: 100;
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid rgba(221, 235, 237, .85);
    transition: min-height .25s ease, background .25s ease, box-shadow .25s ease, backdrop-filter .25s ease;
}
.pc-header--sticky { position: sticky; top: 0; }
.pc-header--glass {
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
}
.pc-header--premium .pc-header__inner {
    min-height: 88px;
    transition: min-height .25s ease;
}
.pc-header--premium.pc-header--compact .pc-header__inner {
    min-height: 72px;
}
.pc-header-shell.is-scrolled .pc-header--premium {
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 10px 28px rgba(0, 56, 69, .08);
}
.pc-header-shell.is-scrolled .pc-logo__image {
    width: clamp(150px, 16vw, 210px);
}

.pc-logo { display: inline-flex; align-items: center; min-width: 0; flex: 0 0 auto; }
.pc-logo__image {
    display: block;
    width: clamp(170px, 19vw, 252px);
    height: auto;
    object-fit: contain;
    transition: width .25s ease;
}

/* —— Nav —— */
.pc-nav--premium {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 14px;
    font-weight: 600;
}
.pc-nav--premium > a,
.pc-nav-dd__trigger {
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--pc-primary);
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.pc-nav--premium > a:hover,
.pc-nav-dd__trigger:hover,
.pc-nav-dd__trigger[aria-expanded="true"] {
    background: var(--pc-alt);
    color: var(--pc-orange);
}
.pc-nav-dd { position: relative; }
.pc-nav-dd__chevron { transition: transform .18s ease; }
.pc-nav-dd__trigger[aria-expanded="true"] .pc-nav-dd__chevron {
    transform: rotate(180deg);
}
.pc-nav-dd__panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 120;
    background: #fff;
    border: 1px solid var(--pc-border);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 56, 69, .16);
}

.pc-nav-dd--simple .pc-nav-dd__panel {
    min-width: 280px;
    padding: 10px;
}

.pc-nav-dd--mega .pc-nav-dd__panel {
    left: 50%;
    transform: translateX(-42%);
    width: min(980px, calc(100vw - 48px));
    padding: 0;
}

/* —— Mega menu —— */
.pc-mega__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(200px, .95fr);
    gap: 0;
}
.pc-mega__col {
    padding: 20px 16px 18px;
    border-right: 1px solid var(--pc-border);
}
.pc-mega__col-title {
    margin: 0 0 12px;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--pc-support);
    font-weight: 700;
}
.pc-mega__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pc-mega__item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px;
    border-radius: 10px;
    color: var(--pc-primary);
}
.pc-mega__item:hover { background: var(--pc-alt); }
.pc-mega__item strong { display: block; font-size: 14px; line-height: 1.25; }
.pc-mega__item small {
    display: block;
    margin-top: 2px;
    color: var(--pc-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}
.pc-mega__icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--pc-alt);
    color: var(--pc-secondary);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}
.pc-mega__item:hover .pc-mega__icon { background: rgba(255, 107, 0, .12); color: var(--pc-orange); }

.pc-mega__aside {
    padding: 22px 18px;
    background: linear-gradient(165deg, var(--pc-alt) 0%, #fff 55%, rgba(255, 204, 153, .28) 100%);
    border-radius: 0 16px 16px 0;
}
.pc-mega__mock {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--pc-border);
    margin-bottom: 14px;
    box-shadow: 0 10px 24px rgba(0, 56, 69, .06);
}
.pc-mega__mock-bar {
    height: 8px;
    width: 42%;
    border-radius: 999px;
    background: var(--pc-primary);
}
.pc-mega__mock-row {
    height: 6px;
    border-radius: 999px;
    background: var(--pc-border);
}
.pc-mega__mock-row--short { width: 62%; }
.pc-mega__mock-chip {
    height: 22px;
    width: 48%;
    border-radius: 8px;
    background: rgba(255, 107, 0, .18);
}
.pc-mega__aside-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: var(--pc-primary);
}
.pc-mega__aside-text {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--pc-muted);
    line-height: 1.5;
}
.pc-mega__aside-cta { width: 100%; min-height: 42px; }
.pc-mega__aside-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--pc-secondary);
}

/* —— Segmentos dropdown —— */
.pc-seg-menu { display: grid; gap: 2px; }
.pc-seg-menu__item {
    display: grid;
    gap: 2px;
    padding: 12px 12px 10px;
    border-radius: 10px;
}
.pc-seg-menu__item:hover { background: var(--pc-alt); }
.pc-seg-menu__item strong { font-size: 14px; color: var(--pc-primary); }
.pc-seg-menu__item small {
    color: var(--pc-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}
.pc-seg-menu__more {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--pc-orange);
}

/* —— Actions / buttons —— */
.pc-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}
.pc-btn--outline {
    background: transparent;
    color: var(--pc-primary);
    border-color: var(--pc-primary);
}
.pc-btn--outline:hover {
    background: var(--pc-alt);
    color: var(--pc-orange);
    border-color: var(--pc-orange);
}
.pc-btn--ghost {
    background: transparent;
    color: var(--pc-primary);
    border-color: transparent;
}
.pc-btn--ghost:hover { background: var(--pc-alt); color: var(--pc-orange); }

/* —— Mobile toggle —— */
.pc-mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--pc-border);
    border-radius: 10px;
    background: #fff;
    color: var(--pc-primary);
    place-items: center;
    cursor: pointer;
}
.pc-mobile-toggle__bars {
    display: grid;
    gap: 5px;
    width: 18px;
}
.pc-mobile-toggle__bars span {
    display: block;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .18s ease, opacity .18s ease;
}
.pc-header-shell.is-mobile-open .pc-mobile-toggle__bars span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.pc-header-shell.is-mobile-open .pc-mobile-toggle__bars span:nth-child(2) { opacity: 0; }
.pc-header-shell.is-mobile-open .pc-mobile-toggle__bars span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* —— Drawer —— */
.pc-drawer {
    position: fixed;
    inset: 0;
    z-index: 10040;
    pointer-events: none;
}
.pc-drawer[style*="display: none"] { pointer-events: none; }
.pc-header-shell.is-mobile-open .pc-drawer,
.pc-drawer:not([style*="display: none"]) { pointer-events: auto; }
.pc-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 56, 69, .42);
}
.pc-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(392px, 92vw);
    height: 100%;
    background: #fff;
    box-shadow: -18px 0 48px rgba(0, 56, 69, .18);
    display: flex;
    flex-direction: column;
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
    overflow: auto;
    transform: translateX(0);
}
.pc-drawer-enter { transition: transform .25s ease; }
.pc-drawer-enter-start { transform: translateX(100%); }
.pc-drawer-enter-end { transform: translateX(0); }
.pc-drawer-leave { transition: transform .18s ease; }
.pc-drawer-leave-start { transform: translateX(0); }
.pc-drawer-leave-end { transform: translateX(100%); }

.pc-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}
.pc-drawer__close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: var(--pc-alt);
    color: var(--pc-primary);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.pc-drawer__nav {
    display: grid;
    gap: 2px;
}
.pc-drawer__nav a {
    padding: 12px 10px;
    border-radius: 10px;
    font-weight: 600;
    color: var(--pc-primary);
}
.pc-drawer__nav a:hover { background: var(--pc-alt); color: var(--pc-orange); }
.pc-drawer__actions {
    margin-top: 16px;
    display: grid;
    gap: 8px;
}
.pc-drawer__actions .pc-header-actions {
    display: grid;
    gap: 8px;
}
.pc-drawer__actions .pc-btn { width: 100%; min-height: 44px; }
.pc-drawer__whatsapp {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 12px;
    background: #25D366;
    color: #fff;
    font-weight: 700;
}
.pc-drawer__footer {
    margin-top: auto;
    padding-top: 22px;
    border-top: 1px solid var(--pc-border);
}
.pc-drawer__botral {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--botral-purple, #6C3CE9);
}
body.pc-drawer-open { overflow: hidden; }

/* —— WhatsApp float (above cookie banner) —— */
.pc-wa-float {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 10050;
    pointer-events: auto;
}
.pc-wa-float__link {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    min-height: 64px;
    padding: 0;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 18px 40px rgba(37, 211, 102, .35);
    transition: transform .18s ease, box-shadow .18s ease;
}
.pc-wa-float__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 46px rgba(37, 211, 102, .42);
}
.pc-wa-float__icon {
    width: 64px;
    height: 64px;
    background: transparent;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}
/* Cookie banner open — lift float clear of banner */
body.pc-cookie-open .pc-wa-float {
    bottom: max(150px, calc(env(safe-area-inset-bottom) + 130px));
}

/* Keep Botral chat (if present) from colliding: float sits bottom-right; Botral often bottom-left */
.botral-chat-widget,
[data-botral-chat],
#botral-widget {
    z-index: 10020;
}

.pc-wa-float--hide-desktop { display: none; }
.pc-wa-float--hide-mobile { display: flex; }

@media (max-width: 1100px) {
    .pc-nav--premium,
    .pc-header-actions--desktop { display: none; }
    .pc-mobile-toggle { display: inline-grid; }
    .pc-topbar { display: none; }
    .pc-header--premium .pc-header__inner { min-height: 72px; }
    .pc-nav-dd--mega .pc-nav-dd__panel {
        left: 0;
        transform: none;
        width: min(920px, calc(100vw - 24px));
    }
}

@media (max-width: 900px) {
    .pc-mega__grid { grid-template-columns: 1fr 1fr; }
    .pc-mega__aside { grid-column: 1 / -1; border-radius: 0 0 16px 16px; }
    .pc-mega__col:nth-child(2n) { border-right: 0; }
}

@media (max-width: 640px) {
    .pc-logo__image { width: 158px; }
    .pc-wa-float {
        right: max(12px, env(safe-area-inset-right));
        bottom: max(16px, env(safe-area-inset-bottom));
    }
    .pc-wa-float__link {
        width: 64px;
        height: 64px;
        min-height: 64px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
    .pc-wa-float__icon {
        width: 64px;
        height: 64px;
        background: transparent;
    }
    body.pc-cookie-open .pc-wa-float {
        bottom: max(180px, calc(env(safe-area-inset-bottom) + 160px));
    }
    .pc-wa-float--hide-mobile { display: none !important; }
    .pc-wa-float--hide-desktop.pc-wa-float--mobile { display: block; }
}

@media (min-width: 641px) {
    .pc-wa-float--hide-desktop { display: none !important; }
}
