/* =============================================================================
   Stefan-Farmácia — estilos próprios
   Paleta: verde (primary), azul (accent) e branco · Tipografia: Inter
   ============================================================================= */

:root {
    --sf-primary: #128353;
    --sf-primary-dark: #0f6b46;
    --sf-lima: #dcf24b;
    --sf-accent: #2563eb;
    --sf-accent-dark: #1e40af;
    --sf-gray-50: #f6f7f9;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    background-color: var(--sf-gray-50);
}

/* Foco visível e acessível */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--sf-primary);
    outline-offset: 2px;
}

/* Remover o contorno padrão dos campos de formulário */
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

/* ---------------------------------------------------------------- Rolagem */
* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border: 3px solid transparent;
    border-radius: 9999px;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

.sf-sem-barra {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sf-sem-barra::-webkit-scrollbar {
    display: none;
}

/* ---------------------------------------------------------------- Swiper */
.sf-slider {
    padding: 4px 4px 44px;
    margin: -4px -4px -44px;
}

.sf-slider .swiper-slide {
    height: auto;
    display: flex;
}

.sf-slider .swiper-slide > * {
    width: 100%;
}

.swiper-pagination-bullet {
    background: #d1d5db;
    opacity: 1;
    width: 7px;
    height: 7px;
}

.swiper-pagination-bullet-active {
    background: var(--sf-primary);
    width: 20px;
    border-radius: 9999px;
}

.sf-pagination .swiper-pagination-bullet-active {
    background: #ffffff;
}

[data-sf-hero] .swiper-pagination {
    bottom: 18px !important;
}

/* Setas de navegação (círculos brancos) */
.sf-seta {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #374151;
    box-shadow: 0 8px 20px -12px rgba(15, 23, 42, .25);
    transition: all .2s ease;
    cursor: pointer;
}

.sf-seta:hover {
    background: var(--sf-primary);
    border-color: var(--sf-primary);
    color: #ffffff;
}

.sf-seta::after {
    font-size: 13px;
    font-weight: 700;
}

.sf-setas-ocultas .sf-seta {
    display: none;
}

.sf-slider .swiper-slide[data-sf-produto] {
    display: flex;
}

/* ---------------------------------------------------------------- Animações progressivas */
.js .sf-anim {
    opacity: 0;
}

.js .sf-anim.sf-anim-visivel {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .sf-anim,
    .animate-flutuar,
    .animate-anel-pulso,
    .animate-deslizar-infinito {
        animation: none !important;
        opacity: 1 !important;
    }

    .sf-voz-anel,
    .sf-voz-nucleo,
    .sf-voz-onda span {
        animation: none !important;
    }

    .sf-voz-onda span {
        height: 12px;
        opacity: .7;
    }
}

/* ---------------------------------------------------------------- Conversa da secretaria */
.sf-conversa {
    background-image: radial-gradient(circle at 1px 1px, #e5e7eb 1px, transparent 0);
    background-size: 18px 18px;
    background-color: #f9fafb;
}

.sf-conversa .sf-balao-entrada {
    animation: sf-entrada-balao .32s ease-out both;
}

@keyframes sf-entrada-balao {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sf-a-escrever span {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 3px;
    border-radius: 9999px;
    background-color: #9ca3af;
    animation: sf-pontos 1.1s infinite ease-in-out;
}

.sf-a-escrever span:nth-child(2) {
    animation-delay: .16s;
}

.sf-a-escrever span:nth-child(3) {
    animation-delay: .32s;
}

@keyframes sf-pontos {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: .55;
    }
    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

/* ---------------------------------------------------------------- Modo de voz da secretaria */
.sf-voz {
    display: none;
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(18, 131, 83, .5), transparent 62%),
        radial-gradient(125% 90% at 50% 108%, rgba(37, 99, 235, .55), transparent 68%),
        #0b1524;
}

.sf-voz[data-activo="1"] {
    display: flex;
}

.sf-voz-orb {
    position: relative;
}

.sf-voz-nucleo {
    background: linear-gradient(145deg, #41b880, #128353 46%, #2563eb);
    box-shadow: 0 18px 44px -14px rgba(18, 131, 83, .85), inset 0 0 0 1px rgba(255, 255, 255, .18);
    animation: sf-voz-respira 3.6s ease-in-out infinite;
    transition: box-shadow .25s ease;
}

.sf-voz-anel {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    border: 1.5px solid rgba(173, 229, 201, .5);
    opacity: 0;
    animation: sf-voz-anel 3s ease-out infinite;
}

/* Estados: a ouvir / a pensar / a falar */
.sf-voz[data-estado="a-ouvir"] .sf-voz-nucleo {
    box-shadow: 0 0 0 7px rgba(220, 242, 75, .16), 0 18px 44px -14px rgba(220, 242, 75, .75);
    animation-duration: 1.9s;
}

.sf-voz[data-estado="a-ouvir"] .sf-voz-anel {
    border-color: rgba(220, 242, 75, .55);
}

.sf-voz[data-estado="a-pensar"] .sf-voz-nucleo {
    animation-duration: 1.1s;
}

.sf-voz[data-estado="a-falar"] .sf-voz-nucleo {
    box-shadow: 0 0 0 9px rgba(96, 165, 250, .2), 0 18px 44px -14px rgba(37, 99, 235, .85);
    animation-duration: .95s;
}

.sf-voz[data-estado="a-ouvir"] .sf-voz-mic {
    background-color: var(--sf-lima);
    color: #0a452d;
}

/* Onda sonora */
.sf-voz-onda {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 22px;
}

.sf-voz-onda span {
    width: 3px;
    height: 7px;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, .5);
    animation: sf-voz-onda 1.05s ease-in-out infinite;
    animation-play-state: paused;
}

.sf-voz[data-estado="a-ouvir"] .sf-voz-onda span,
.sf-voz[data-estado="a-falar"] .sf-voz-onda span {
    animation-play-state: running;
}

.sf-voz-onda span:nth-child(2) { animation-delay: .08s; }
.sf-voz-onda span:nth-child(3) { animation-delay: .16s; }
.sf-voz-onda span:nth-child(4) { animation-delay: .24s; }
.sf-voz-onda span:nth-child(5) { animation-delay: .32s; }
.sf-voz-onda span:nth-child(6) { animation-delay: .4s; }
.sf-voz-onda span:nth-child(7) { animation-delay: .48s; }
.sf-voz-onda span:nth-child(8) { animation-delay: .56s; }
.sf-voz-onda span:nth-child(9) { animation-delay: .64s; }

/* Botão "Ouvir" de cada resposta da assistente */
.sf-balao-ouvir {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    background-color: #fff;
    padding: .0625rem .4375rem;
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

.sf-balao-ouvir:hover {
    border-color: #77d3a6;
    background-color: #effaf4;
    color: #0f6b46;
}

@keyframes sf-voz-anel {
    0% {
        transform: scale(.6);
        opacity: .8;
    }
    75%, 100% {
        transform: scale(1.18);
        opacity: 0;
    }
}

@keyframes sf-voz-respira {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.07);
    }
}

@keyframes sf-voz-onda {
    0%, 100% {
        height: 7px;
        opacity: .45;
    }
    50% {
        height: 20px;
        opacity: 1;
    }
}

/* ---------------------------------------------------------------- Loja: vista em lista */
[data-sf-grelha-loja].sf-vista-lista {
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
    [data-sf-grelha-loja].sf-vista-lista [data-sf-produto] {
        display: grid;
        grid-template-columns: 11rem minmax(0, 1fr);
    }

    [data-sf-grelha-loja].sf-vista-lista [data-sf-produto] > a:first-of-type {
        height: auto;
        min-height: 100%;
        border-radius: 1rem 0 0 1rem;
    }
}

/* ---------------------------------------------------------------- Destaque da página inicial */
/* Marca de água tipográfica do hero ("FARMÁCIA") */
.sf-hero-marca {
    position: absolute;
    left: 50%;
    bottom: -0.18em;
    transform: translateX(-50%);
    font-size: clamp(4rem, 16vw, 13rem);
    font-weight: 900;
    line-height: 0.8;
    letter-spacing: 0.02em;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.07);
    pointer-events: none;
    user-select: none;
}

/* Coluna lateral da página inicial */
.sf-rail {
    min-width: 0;
}

/* Rolagem horizontal de atalhos rápidos (mobile) */
.sf-atalhos {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

/* ---------------------------------------------------------------- Cartão de produto */
.sf-cartao-produto .sf-imagem {
    transition: transform 0.5s ease;
}

.sf-cartao-produto:hover .sf-imagem {
    transform: scale(1.05);
}

/* ---------------------------------------------------------------- Impressão */
@media print {
    header,
    footer,
    #sf-secretaria,
    #sf-carrinho,
    #sf-overlay,
    [data-sf-topo] {
        display: none !important;
    }

    body {
        background: #fff;
    }
}
