/*
 * SmartCo site extras: plain CSS loaded after the Vite bundle (no build step needed).
 * Floating call / WhatsApp buttons with number chooser, contact page map, header fit.
 */

/* ---------- Header: room for Home, Spare Parts and Accessories ---------- */
.site-nav__link,
.site-header__quote { white-space: nowrap; }

@media (min-width: 1200px) and (max-width: 1599.98px) {
    .site-nav__list { gap: clamp(0.65rem, 1.1vw, 1.25rem); }
    .site-header__inner { gap: 1rem; }
    .site-header__actions { gap: 0.9rem; }
    .site-header__quote { padding-inline: 1rem; }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
    .site-nav__link { font-size: 0.84rem; }
    .site-header__quote { font-size: 0.875rem; padding-inline: 0.85rem; }
}

.mega-panel--compact {
    width: min(520px, 92vw);
    margin-inline-start: calc(min(520px, 92vw) / -2);
}

/* ---------- Floating contact buttons ---------- */
.contact-float {
    position: fixed;
    inset-inline-end: clamp(14px, 2.5vw, 28px);
    inset-block-end: calc(clamp(14px, 2.5vw, 28px) + var(--float-offset, 0px));
    z-index: 45;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

body.has-bottom-bar .contact-float { --float-offset: 68px; }

@media (min-width: 992px) {
    body.has-bottom-bar--mobile .contact-float { --float-offset: 0px; }
}

.contact-float__button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    padding: 0;
    color: #fff;
    border: 0;
    border-radius: 50%;
    box-shadow: 0 6px 18px rgba(10, 20, 28, 0.22);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.contact-float__button:hover,
.contact-float__button:focus-visible {
    color: #fff;
    transform: scale(1.06);
    box-shadow: 0 10px 24px rgba(10, 20, 28, 0.28);
}

.contact-float__button:focus-visible { outline: 3px solid var(--yellow, #f4c430); outline-offset: 3px; }

.contact-float__button .icon { width: 28px; height: 28px; stroke-width: 1.75; }

.contact-float__button--whatsapp { background: var(--whatsapp, #25d366); }

.contact-float__button--whatsapp::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    z-index: -1;
    animation: contact-float-pulse 2.4s ease-out infinite;
}

.contact-float__button--call {
    width: 48px;
    height: 48px;
    color: var(--navy-950, #0a141c);
    background: var(--yellow, #f4c430);
}

.contact-float__button--call:hover,
.contact-float__button--call:focus-visible { color: var(--navy-950, #0a141c); }

.contact-float__button--call .icon { width: 24px; height: 24px; }

@keyframes contact-float-pulse {
    0% { transform: scale(1); opacity: 0.55; }
    70%, 100% { transform: scale(1.55); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .contact-float__button--whatsapp::before { animation: none; }
    .contact-float__button { transition: none; }
}

/* Chooser panel (native popover, sits in the top layer) */
.contact-float__menu {
    position: fixed;
    inset: auto;
    inset-inline-end: clamp(14px, 2.5vw, 28px);
    inset-block-end: calc(clamp(14px, 2.5vw, 28px) + 128px + var(--float-offset, 0px));
    width: min(320px, calc(100vw - 28px));
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: var(--navy-900, #13212d);
    background: #fff;
    border: 1px solid var(--line, #e2e6ea);
    border-radius: 16px;
    box-shadow: 0 24px 56px rgba(10, 20, 28, 0.24);
}

body.has-bottom-bar .contact-float__menu { --float-offset: 68px; }

@media (min-width: 992px) {
    body.has-bottom-bar--mobile .contact-float__menu { --float-offset: 0px; }
}

/* Fallback when the browser has no popover support (site-extras.js toggles .is-open) */
@supports not selector(:popover-open) {
    .contact-float__menu:not(.is-open) { display: none; }
    .contact-float__menu.is-open { display: block; z-index: 70; }
}

.contact-float__menu:popover-open { animation: contact-float-in 0.18s ease-out; }

@keyframes contact-float-in {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

.contact-float__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    color: #fff;
    background: var(--navy-950, #0a141c);
}

.contact-float__menu--whatsapp .contact-float__head { background: #075e54; }

.contact-float__head-icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--navy-950, #0a141c);
    background: var(--yellow, #f4c430);
}

.contact-float__menu--whatsapp .contact-float__head-icon { color: #fff; background: var(--whatsapp, #25d366); }

.contact-float__head-icon .icon { width: 22px; height: 22px; }

.contact-float__head > div { flex: 1; min-width: 0; }

.contact-float__title { margin: 0; font-weight: 700; font-size: 1rem; line-height: 1.25; color: #fff; }

.contact-float__subtitle { margin: 0.1rem 0 0; font-size: 0.8125rem; color: rgba(255, 255, 255, 0.78); }

.contact-float__close {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.contact-float__close:hover { background: rgba(255, 255, 255, 0.22); }

.contact-float__close .icon { width: 18px; height: 18px; }

.contact-float__list { display: grid; gap: 0.5rem; margin: 0; padding: 0.75rem; list-style: none; }

.contact-float__option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.8rem;
    color: var(--navy-900, #13212d);
    text-decoration: none;
    background: var(--grey-50, #f7f8fa);
    border: 1px solid var(--line, #e2e6ea);
    border-radius: 12px;
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.contact-float__option:hover,
.contact-float__option:focus-visible {
    color: var(--navy-950, #0a141c);
    text-decoration: none;
    background: #fff;
    border-color: var(--navy-700, #2c4a63);
    transform: translateY(-1px);
}

.contact-float__menu--whatsapp .contact-float__option:hover,
.contact-float__menu--whatsapp .contact-float__option:focus-visible { border-color: var(--whatsapp, #25d366); }

.contact-float__option-icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--navy-950, #0a141c);
    background: var(--yellow, #f4c430);
}

.contact-float__menu--whatsapp .contact-float__option-icon { color: #fff; background: var(--whatsapp, #25d366); }

.contact-float__option-icon .icon { width: 20px; height: 20px; }

.contact-float__option-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }

.contact-float__option-label { font-size: 0.8125rem; color: var(--steel-500, #5b6b78); }

.contact-float__option-number { font-weight: 700; font-size: 1rem; letter-spacing: 0.01em; }

.contact-float__option-arrow { width: 18px; height: 18px; color: var(--steel-500, #5b6b78); }

/* ---------- Contact page map ---------- */
.location-map {
    display: grid;
    overflow: hidden;
    background: var(--navy-950, #0a141c);
    border-radius: var(--radius-md, 12px);
    box-shadow: 0 18px 44px rgba(10, 20, 28, 0.14);
}

@media (min-width: 992px) {
    .location-map { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); min-height: 440px; }
}

.location-map__info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    color: rgba(255, 255, 255, 0.82);
}

.location-map__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    color: var(--navy-950, #0a141c);
    background: var(--yellow, #f4c430);
    border-radius: 50%;
}

.location-map__badge .icon { width: 26px; height: 26px; }

.location-map__title { margin: 0.25rem 0 0; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); color: #fff; }

.location-map__text { margin: 0; max-width: 42ch; }

.location-map__address { display: flex; gap: 0.6rem; margin: 0.25rem 0 0; }

.location-map__address .icon { flex: none; width: 20px; height: 20px; margin-block-start: 0.15em; color: var(--yellow, #f4c430); }

.location-map__address strong { color: #fff; }

.location-map__contacts { display: grid; gap: 0.35rem; margin: 0.25rem 0 0.5rem; padding: 0; list-style: none; }

.location-map__contacts a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 36px;
    color: #fff;
    text-decoration: none;
}

.location-map__contacts a:hover { color: var(--yellow, #f4c430); }

.location-map__contacts .icon { width: 18px; height: 18px; color: var(--yellow, #f4c430); }

.location-map__button { margin-block-start: auto; gap: 0.5rem; }

.location-map__frame { position: relative; min-height: 320px; background: var(--grey-100, #eef1f4); }

.location-map__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
