﻿/* =====================================================================
   Praca Cliente - facelift (layout app-like)

   Ordem de carga: bootstrap + estilo.css (bundle) -> ESTE ARQUIVO -> CssCliente (banco).

   Regras de convivencia com o CssCliente de cada praca:
   - Marca (cores, fundo do #banner, fundo do body, cor dos botoes) usa seletor
     simples aqui, para o CssCliente continuar sobrescrevendo.
   - Layout (margens, raios, tamanhos) usa "body.pf ..." para ganhar de overrides
     antigos do CssCliente que quebrariam o layout novo (ex.: body margin -50px,
     #inputBuscar sem raio, #irAvancada branco).
   - NUNCA definir "display" em .itensLista/.pf-card: praca usa .itensLista{display:none}
     para esconder a lista de lojas.
   ===================================================================== */

:root {
    --corbotao: #b20b00;
    --corbotaobuscar: #b20b00;
    --pf-texto: #17171a;
    --pf-texto-2: #6b6b72;
    --pf-borda: #e6e6ea;
    --pf-superficie: #ffffff;
    --pf-suave: #f4f4f6;
}

/* ---------- Marca (CssCliente pode sobrescrever) ---------- */

body {
    background-color: #f5f5f7;
}

#banner {
    background-color: #1f1f1f;
}

.btnBuscar, #btnBuscaPadrao {
    background-color: var(--corbotaobuscar);
    color: #fff;
}

    .btnBuscar:hover, #btnBuscaPadrao:hover,
    .btnBuscar:focus, #btnBuscaPadrao:focus {
        background-color: var(--corbotao);
        color: #fff;
    }

/* Aberto: verde por padrao (contraste garantido mesmo com --corbotao claro, ex. amarelo). */
.btnIrSiteAberto {
    background-color: #1f9d4c;
    color: #fff;
}

    .btnIrSiteAberto:hover {
        background-color: #1f9d4c;
        color: #fff;
    }

.btnIrSiteFechado {
    background-color: var(--corbotao);
    color: #fff;
}

    .btnIrSiteFechado:hover {
        background-color: var(--corbotao);
        color: #fff;
    }

/* ---------- Base ---------- */

body.pf {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--pf-texto);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- Hero ---------- */

body.pf .pf-hero {
    position: relative;
    overflow: hidden;
    padding: 44px 0 96px;
    text-align: center;
}

    body.pf .pf-hero::before {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        background: linear-gradient(180deg, rgba(0, 0, 0, .10) 0%, rgba(0, 0, 0, .45) 100%);
        pointer-events: none;
    }

body.pf .header {
    position: relative;
    z-index: 1;
    margin: 0;
}

body.pf .logoCenter {
    text-align: center;
}

    body.pf .logoCenter img {
        display: inline-block;
        width: auto;
        height: auto;
        max-width: 240px;
        max-height: 170px;
        margin: 0;
        background-color: #fff;
        box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
    }

/* raio com seletor simples: pracas com logo redonda (border-radius:100px no CssCliente) mantem */
.logoCenter img {
    border-radius: 22px;
}

body.pf .pf-hero .description {
    max-width: 640px;
    margin: 18px auto 0;
    color: #fff;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.4;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .45);
}

/* ---------- Buscador ---------- */

body.pf .pf-busca {
    position: relative;
    z-index: 2;
    margin-top: -64px;
}

body.pf .divBuscador {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 24px 24px 26px;
    background-color: var(--pf-superficie);
    border-radius: 20px;
    box-shadow: 0 14px 40px rgba(17, 17, 26, .14);
}

body.pf .pf-busca-titulo {
    margin: 0 0 4px;
    font-size: 21px;
    font-weight: 700;
    color: var(--pf-texto);
    text-align: center;
}

body.pf .pf-busca-sub {
    margin: 0 0 18px;
    font-size: 14px;
    color: var(--pf-texto-2);
    text-align: center;
}

body.pf .pf-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background-color: var(--pf-suave);
    border-radius: 12px;
}

body.pf .pf-tab {
    flex: 1 1 0;
    padding: 9px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--pf-texto-2);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s, color .15s, box-shadow .15s;
}

    body.pf .pf-tab:hover {
        color: var(--pf-texto);
    }

    body.pf .pf-tab.ativo {
        background-color: #fff;
        color: var(--corbotaobuscar);
        box-shadow: 0 1px 4px rgba(0, 0, 0, .10);
    }

    body.pf .pf-tab:focus {
        outline: none;
    }

    body.pf .pf-tab:focus-visible {
        outline: 2px solid var(--corbotaobuscar);
        outline-offset: 2px;
    }

body.pf #buscaPadrao,
body.pf #buscaAvancada {
    margin-top: 16px;
    padding: 0;
}

/* CEP */

body.pf .pf-cep {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px 6px 14px;
    background-color: #fff;
    border: 1.5px solid var(--pf-borda);
    border-radius: 14px;
    transition: border-color .15s, box-shadow .15s;
}

    body.pf .pf-cep:focus-within {
        border-color: var(--corbotaobuscar);
        box-shadow: 0 0 0 4px rgba(0, 0, 0, .06);
    }

body.pf .pf-cep-icone {
    flex: 0 0 auto;
    color: var(--pf-texto-2);
}

body.pf #inputBuscar {
    flex: 1 1 auto;
    min-width: 0;
    height: auto;
    margin: 0;
    padding: 8px 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 18px;
    letter-spacing: .3px;
    color: var(--pf-texto);
}

    body.pf #inputBuscar:focus {
        outline: none;
        box-shadow: none;
    }

body.pf #btnBuscaPadrao {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    padding: 11px 24px;
    border: 0;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

/* Endereco */

body.pf .pf-selects {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

body.pf .pf-campo {
    display: block;
    margin: 0;
}

    body.pf .pf-campo > span {
        display: block;
        margin-bottom: 6px;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: .4px;
        text-transform: uppercase;
        color: var(--pf-texto-2);
    }

body.pf .selectBusca {
    width: 100%;
    height: 46px;
    padding: 0 12px;
    font-size: 15px;
    color: var(--pf-texto);
    background-color: #fff;
    border: 1.5px solid var(--pf-borda);
    border-radius: 12px;
    box-shadow: none;
}

    body.pf .selectBusca:focus {
        outline: none;
        border-color: var(--corbotaobuscar);
    }

body.pf .btnBuscar {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 12px;
    border: 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
}

/* ---------- Lista de lojas ---------- */

body.pf .pf-lista {
    margin-top: 20px;
}

body.pf .pf-sem-busca {
    position: relative;
    z-index: 2;
    margin-top: -64px;
}

    body.pf .pf-sem-busca .pf-lista {
        margin-top: 0;
    }

/* espacamento no card (e nao na coluna): praca que esconde .itensLista nao fica com colunas vazias ocupando espaco */
body.pf .pf-col {
    display: flex;
}

body.pf .pf-card {
    flex: 1 1 auto;
    min-width: 0;
    margin: 16px 0 0;
    padding: 0;
    background-color: var(--pf-superficie);
    border: 1px solid #ececf0;
    border-radius: 18px;
    box-shadow: 0 2px 10px rgba(17, 17, 26, .05);
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}

    body.pf .pf-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 28px rgba(17, 17, 26, .12);
    }

body.pf .pf-card-link {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    padding: 16px;
    color: inherit;
    text-decoration: none;
}

    body.pf .pf-card-link:focus {
        outline: none;
    }

    body.pf .pf-card-link:focus-visible {
        outline: 2px solid var(--corbotaobuscar);
        outline-offset: -2px;
        border-radius: 18px;
    }

body.pf .pf-card-topo {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1 1 auto;
}

body.pf .pf-logo {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    margin: 0;
    padding: 0;
    object-fit: cover;
    background-color: var(--pf-suave);
    border: 1px solid #eee;
    border-radius: 16px;
}

body.pf .pf-logo-vazio {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    background-color: var(--corbotaobuscar);
    border: 0;
}

body.pf .pf-fechado .pf-logo {
    filter: grayscale(.4);
    opacity: .85;
}

body.pf .pf-card-info {
    flex: 1 1 auto;
    min-width: 0;
}

body.pf .pf-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.3;
}

    body.pf .pf-status::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background-color: currentColor;
    }

body.pf .pf-status-aberto {
    background-color: #e7f6ed;
    color: #13803f;
}

body.pf .pf-status-fechado {
    background-color: #f1f1f3;
    color: #6b6b72;
}

body.pf .pf-nome {
    margin: 0 0 3px;
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--pf-texto);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf .pf-endereco {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.35;
    color: var(--pf-texto-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf .pf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

body.pf .pf-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 8px;
    background-color: var(--pf-suave);
    color: #4a4a52;
    font-size: 12px;
    line-height: 1.4;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf .pf-cta {
    display: block;
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .18);
    transition: filter .15s;
}

body.pf .pf-card:hover .pf-cta {
    filter: brightness(.94);
}

/* ---------- Modais (filial / info) ---------- */

body.pf .modal-content {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}

body.pf .modal-header {
    border-bottom-color: #f0f0f2;
}

body.pf .modal-title {
    font-weight: 700;
}

body.pf #myModalFilial .btn-success {
    border: 0;
    border-radius: 12px;
    background-color: var(--corbotaobuscar);
    font-weight: 600;
}

    body.pf #myModalFilial .btn-success:hover {
        background-color: var(--corbotao);
    }

/* ---------- Responsivo ---------- */

@media (min-width: 768px) {
    body.pf .pf-selects {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    body.pf .pf-hero {
        padding: 56px 0 104px;
    }
}

@media (max-width: 575.98px) {
    body.pf .pf-hero {
        padding: 30px 0 84px;
    }

    body.pf .logoCenter img {
        max-width: 190px;
        max-height: 130px;
    }

    body.pf .pf-hero .description {
        font-size: 15px;
    }

    body.pf .pf-busca,
    body.pf .pf-sem-busca {
        margin-top: -60px;
    }

    body.pf .divBuscador {
        padding: 18px 16px 20px;
        border-radius: 18px;
    }

    body.pf .pf-busca-titulo {
        font-size: 19px;
    }

    body.pf .pf-busca-sub {
        font-size: 13px;
        margin-bottom: 14px;
    }

    body.pf #inputBuscar {
        font-size: 17px;
    }

    body.pf #btnBuscaPadrao {
        padding: 11px 16px;
    }

    body.pf .pf-card {
        margin-top: 12px;
    }

    body.pf .pf-card-link {
        padding: 14px;
    }

    body.pf .pf-logo {
        flex-basis: 64px;
        width: 64px;
        height: 64px;
        border-radius: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.pf .pf-card,
    body.pf .pf-card:hover {
        transition: none;
        transform: none;
    }
}
