/* =========================================================
   style.css — v5
   Sistema de Agendamento - D'Freitas Stylus
   Tema: preto + dourado (identidade da marca), visual moderno
   ========================================================= */

:root {
    --preto: #000000;
    --fundo: #070707;
    --superficie: #111111;
    --superficie-alt: #181818;
    --superficie-hover: #1f1c14;
    --dourado: #c9a227;
    --dourado-claro: #e6c45a;
    --dourado-escuro: #8f7118;
    --gradiente-dourado: linear-gradient(135deg, #f0d47a 0%, #c9a227 45%, #8f7118 100%);
    --texto: #f4efe4;
    --texto-suave: #a39a8a;
    --borda: rgba(255, 255, 255, 0.08);
    --borda-forte: rgba(255, 255, 255, 0.14);
    --sucesso: #3fa34d;
    --erro: #e2574c;
    --sombra: 0 10px 40px rgba(0, 0, 0, 0.55);
    --sombra-dourada: 0 8px 28px rgba(201, 162, 39, 0.22);
    --raio: 18px;
    --raio-sm: 12px;
    --fonte-titulo: 'Playfair Display', Georgia, serif;
    --fonte: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    min-height: 100%;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: var(--fonte);
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201, 162, 39, 0.14), transparent 70%),
        var(--fundo);
    background-attachment: fixed;
    color: var(--texto);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    width: 100%;
}

/* ===================== TOPO ===================== */
.topo {
    position: relative;
    color: var(--texto);
    padding: 40px 20px 56px;
    text-align: center;
}

.topo::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 34px;
    width: 120px;
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, var(--dourado), transparent);
    opacity: 0.6;
}

.topo-conteudo {
    max-width: 760px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.logo-imagem {
    width: 96px;
    height: 96px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 6px 24px rgba(201, 162, 39, 0.25));
}

.topo-selo {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--dourado);
    margin-bottom: 6px;
}

.topo-subtitulo {
    color: var(--texto-suave);
    font-size: 15px;
    font-weight: 500;
    font-family: var(--fonte-titulo);
    font-style: italic;
    letter-spacing: 0.3px;
}

/* ===================== CONTAINER ===================== */
.container {
    max-width: 760px;
    margin: -20px auto 40px;
    padding: 0 16px;
}

/* ===================== STEPPER ===================== */
.stepper {
    display: flex;
    justify-content: space-between;
    background: rgba(17, 17, 17, 0.8);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--borda);
    border-radius: var(--raio);
    box-shadow: var(--sombra);
    padding: 18px 8px 16px;
    margin-bottom: 18px;
}

.step-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: var(--texto-suave);
    font-weight: 500;
    position: relative;
    text-align: center;
}

/* linha que liga as etapas */
.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    left: calc(50% + 22px);
    right: calc(-50% + 22px);
    height: 2px;
    border-radius: 2px;
    background: var(--borda-forte);
    transition: background 0.3s ease;
}

.step-item.concluido:not(:last-child)::after {
    background: var(--dourado);
}

.step-numero {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--superficie-alt);
    border: 1px solid var(--borda-forte);
    color: var(--texto-suave);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.step-item.active .step-numero {
    background: var(--gradiente-dourado);
    border-color: transparent;
    color: #000;
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.18);
}

.step-item.concluido .step-numero {
    background: rgba(201, 162, 39, 0.12);
    border-color: var(--dourado);
    color: var(--dourado);
}

.step-item.active .step-nome,
.step-item.concluido .step-nome {
    color: var(--texto);
}

/* ===================== PAINÉIS DE ETAPA ===================== */
.step-panel {
    display: none;
    background: linear-gradient(180deg, #141414 0%, #0e0e0e 100%);
    border: 1px solid var(--borda);
    border-radius: var(--raio);
    box-shadow: var(--sombra);
    padding: 26px 20px;
    animation: fadeIn 0.4s ease;
}

.step-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-titulo {
    font-family: var(--fonte-titulo);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--texto);
    letter-spacing: 0.2px;
}

.step-titulo::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    margin-top: 10px;
    border-radius: 2px;
    background: var(--gradiente-dourado);
}

.btn-voltar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--superficie-alt);
    border: 1px solid var(--borda);
    border-radius: 999px;
    color: var(--texto-suave);
    font-family: var(--fonte);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 18px;
    padding: 7px 14px;
    transition: all 0.2s ease;
}

.btn-voltar:hover {
    color: var(--dourado);
    border-color: rgba(201, 162, 39, 0.5);
}

/* ===================== CARDS DE SELEÇÃO ===================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.card-select {
    position: relative;
    border: 1px solid var(--borda);
    border-radius: var(--raio-sm);
    padding: 22px 14px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    background: var(--superficie-alt);
}

.card-select:hover {
    border-color: rgba(201, 162, 39, 0.55);
    transform: translateY(-3px);
    box-shadow: var(--sombra-dourada);
}

.card-select.selecionado {
    border-color: var(--dourado);
    background: var(--superficie-hover);
    box-shadow: 0 0 0 1px var(--dourado), var(--sombra-dourada);
}

.card-select.selecionado::before {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gradiente-dourado);
    color: #000;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icone {
    font-size: 28px;
    margin-bottom: 10px;
}

/* ----- Cards de barbeiro (foto maior) ----- */
#lista-barbeiros {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.card-select-barbeiro {
    flex: 0 1 calc(33.333% - 11px);
    min-width: 170px;
    padding: 26px 16px 22px;
    background:
        radial-gradient(circle at 50% 0%, rgba(201, 162, 39, 0.10), transparent 65%),
        var(--superficie-alt);
}

.card-foto-barbeiro {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    display: block;
    margin: 0 auto 14px;
    background: #000;
    border: 3px solid #0e0e0e;
    box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.45), 0 10px 26px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-select-barbeiro:hover .card-foto-barbeiro {
    transform: scale(1.04);
    box-shadow: 0 0 0 2px var(--dourado-claro), 0 12px 30px rgba(201, 162, 39, 0.25);
}

.card-select-barbeiro.selecionado .card-foto-barbeiro {
    box-shadow: 0 0 0 3px var(--dourado), 0 12px 30px rgba(201, 162, 39, 0.3);
}

.card-icone-barbeiro {
    width: 128px;
    height: 128px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.45);
}

.card-select-barbeiro h3 {
    font-size: 16.5px;
}

.card-select-barbeiro .card-detalhe {
    display: inline-block;
    margin-top: 4px;
    padding: 3px 12px;
    border-radius: 999px;
    border: 1px solid rgba(201, 162, 39, 0.35);
    color: var(--dourado);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.card-select h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--texto);
    margin-bottom: 4px;
}

.card-detalhe {
    font-size: 12.5px;
    color: var(--texto-suave);
}

.aviso {
    color: var(--texto-suave);
    font-size: 14px;
    text-align: center;
    padding: 16px 0;
}

/* ===================== DATA E HORÁRIOS ===================== */
.label-campo {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--texto-suave);
    margin-bottom: 8px;
}

.input-data,
.input-texto {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 14px 14px;
    border: 1px solid var(--borda-forte);
    border-radius: var(--raio-sm);
    font-family: var(--fonte);
    font-size: 16px;
    color: var(--texto);
    background: var(--superficie-alt);
    margin-bottom: 18px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    color-scheme: dark;
    -webkit-appearance: none;
    appearance: none;
}

.input-data {
    display: block;
}

.input-texto::placeholder {
    color: #6d665a;
}

.input-data:focus,
.input-texto:focus {
    outline: none;
    border-color: var(--dourado);
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.15);
}

.horarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.horario-item {
    padding: 12px 6px;
    border: 1px solid var(--borda-forte);
    border-radius: 999px;
    background: var(--superficie-alt);
    font-family: var(--fonte);
    font-size: 14px;
    font-weight: 500;
    color: var(--texto);
    cursor: pointer;
    transition: all 0.2s ease;
}

.horario-item:hover {
    border-color: var(--dourado);
    color: var(--dourado-claro);
}

.horario-item.selecionado {
    background: var(--gradiente-dourado);
    border-color: transparent;
    color: #000;
    font-weight: 600;
    box-shadow: var(--sombra-dourada);
}

/* ===================== RESUMO ===================== */
.resumo-box {
    background: var(--superficie-alt);
    border: 1px solid var(--borda);
    border-left: 3px solid var(--dourado);
    border-radius: var(--raio-sm);
    padding: 14px 18px;
    margin-bottom: 22px;
}

.resumo-linha {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    font-size: 14px;
    border-bottom: 1px dashed var(--borda-forte);
}

.resumo-linha:last-child {
    border-bottom: none;
}

.resumo-linha span {
    color: var(--texto-suave);
}

.resumo-linha strong {
    color: var(--texto);
    font-weight: 600;
    text-align: right;
}

/* ===================== FORMULÁRIO ===================== */
#form-agendamento {
    margin-top: 4px;
}

.erro-form {
    display: none;
    color: #ff8079;
    font-size: 13px;
    margin: -8px 0 14px;
    font-weight: 500;
}

.btn-confirmar {
    width: 100%;
    padding: 16px;
    background: var(--gradiente-dourado);
    color: #000;
    border: none;
    border-radius: var(--raio-sm);
    font-family: var(--fonte);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    margin-top: 4px;
    box-shadow: var(--sombra-dourada);
}

.btn-confirmar:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.btn-confirmar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 15px;
    background: #25D366;
    color: #06210f;
    border: none;
    border-radius: var(--raio-sm);
    font-family: var(--fonte);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 16px;
    transition: background 0.2s ease;
}

.btn-whatsapp:hover {
    background: #1ebe5b;
}

/* ===================== CONFIRMAÇÃO FINAL ===================== */
.confirmacao-box {
    text-align: center;
    padding: 10px 0 24px;
}

.check-icone {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--gradiente-dourado);
    color: #000;
    font-size: 30px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    box-shadow: 0 0 0 8px rgba(201, 162, 39, 0.12), var(--sombra-dourada);
}

.confirmacao-box h2 {
    font-family: var(--fonte-titulo);
    font-size: 24px;
    margin-bottom: 6px;
    color: var(--texto);
}

.confirmacao-texto {
    color: var(--texto-suave);
    font-size: 14px;
    margin-bottom: 18px;
}

.confirmacao-box .resumo-box {
    text-align: left;
    margin-bottom: 18px;
}

.confirmacao-aviso {
    font-size: 13px;
    color: var(--texto-suave);
}

/* ===================== BOTÃO FLUTUANTE DO WHATSAPP ===================== */
.whatsapp-flutuante {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 58px;
    height: 58px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35), 0 4px 16px rgba(0, 0, 0, 0.5);
    z-index: 100;
    transition: transform 0.2s ease;
}

.whatsapp-flutuante:hover {
    transform: scale(1.08);
}

/* ===================== RODAPÉ ===================== */
.rodape {
    text-align: center;
    padding: 24px 16px 90px;
    font-size: 12.5px;
    color: var(--texto-suave);
}

/* ===================== RESPONSIVO ===================== */
@media (max-width: 600px) {
    .card-select-barbeiro {
        flex: 0 1 calc(50% - 8px);
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .topo {
        padding: 30px 16px 48px;
    }

    .topo::after {
        bottom: 28px;
    }

    .logo-imagem {
        width: 88px;
        height: 88px;
    }

    .container {
        margin-top: -18px;
        padding: 0 12px;
    }

    .step-panel {
        padding: 22px 16px;
    }

    .step-titulo {
        font-size: 21px;
    }

    .step-item {
        font-size: 10px;
    }

    .step-item:not(:last-child)::after {
        left: calc(50% + 19px);
        right: calc(-50% + 19px);
    }

    .step-numero {
        width: 30px;
        height: 30px;
    }

    #lista-barbeiros {
        gap: 12px;
    }

    .card-select-barbeiro {
        flex: 0 1 calc(50% - 6px);
        padding: 20px 10px 18px;
    }

    .card-foto-barbeiro,
    .card-icone-barbeiro {
        width: 104px;
        height: 104px;
    }

    .card-select-barbeiro h3 {
        font-size: 15px;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }

    .horarios-grid {
        grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    }

    .whatsapp-flutuante {
        right: 14px;
        bottom: 14px;
        width: 52px;
        height: 52px;
    }
}

@media (max-width: 340px) {
    .card-foto-barbeiro,
    .card-icone-barbeiro {
        width: 88px;
        height: 88px;
    }
}

@media (min-width: 600px) {
    .step-panel {
        padding: 34px 38px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
