/* ===============================================
   ESTILOS GERAIS E LAYOUT MODERNO
   =============================================== */

/* Garante que todo elemento use border-box para facilitar o layout */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #374151;
    margin: 0;
    min-height: 100vh;
    line-height: 1.6;
}

/* ===============================================
   LAYOUT GRID PRINCIPAL DA VITRINE
   =============================================== */
.vitrine-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
    min-height: 100vh;
}

/* Sidebar lateral da vitrine */
.sidebar-vitrine {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Conteúdo principal da vitrine */
.main-content-vitrine {
    width: 100%;
    padding-bottom: 20px;
    margin: 0 auto;
    position: relative; /* Para facilitar posicionamento do header mobile */
}

/* Áreas de conteúdo das abas */
.menu-content { 
    display: none; 
    animation: fadeIn 0.3s ease-in-out;
}
.menu-content.ativo { 
    display: block; 
}

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

/* ===============================================
   CABEÇALHO E MENU LATERAL DA VITRINE
   =============================================== */
.header-vitrine {
    text-align: center;
    padding-bottom: 25px;
    margin-bottom: 25px;
    border-bottom: 2px solid rgba(79, 70, 229, 0.1);
}

#logo-publico {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid rgba(79, 70, 229, 0.2);
    transition: transform 0.3s ease;
}
#logo-publico:hover {
    transform: scale(1.05);
}

#nome-negocio-publico {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1F2937;
    margin: 0;
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Header mobile: aparece só no mobile */
.header-vitrine-mobile {
    display: none; /* Só mostra no mobile */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    margin-top: 16px;
    width: 100%;
    position: relative;
    z-index: 10;
}
#logo-publico-mobile {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 6px;
    border: 3px solid rgba(79, 70, 229, 0.16);
}
#nome-negocio-publico-mobile {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 12px 0;
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    word-break: break-word;
    max-width: 95vw;
}

/* ===============================================
   CARDS E CONTEÚDO PRINCIPAL
   =============================================== */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}
.card h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(79, 70, 229, 0.1);
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.form-group {
    margin-bottom: 30px;
}
.form-group label {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 15px;
}
input[type="date"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}
input[type="date"]:focus {
    outline: none;
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ===============================================
   SELEÇÃO DE PROFISSIONAIS E SERVIÇOS
   =============================================== */
.profissionais-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
}
.card-profissional {
    border: 2px solid rgba(229, 231, 235, 0.5);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}
.card-profissional:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.2);
    border-color: #A5B4FC;
}
.card-profissional.selecionado {
    border-color: #4F46E5;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.1));
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
    transform: translateY(-5px);
}
.card-profissional img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid rgba(79, 70, 229, 0.2);
    transition: transform 0.3s ease;
}
.card-profissional:hover img {
    transform: scale(1.1);
}
.card-profissional span {
    font-size: 1rem;
    font-weight: 600;
    color: #1F2937;
}
#agendamento-form-container {
    margin-top: 2rem;
    border-top: 2px solid rgba(79, 70, 229, 0.1);
    padding-top: 2rem;
}
.servicos-container-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.card-servico {
    background: rgba(249, 250, 251, 0.9);
    border: 2px solid rgba(229, 231, 235, 0.5);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-servico:hover {
    border-color: #C7D2FE;
    background: rgba(238, 242, 255, 0.9);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.1);
}
.card-servico.selecionado {
    border-color: #4F46E5;
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    color: white;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
}
.servico-nome { 
    font-weight: 700; 
    font-size: 1.1rem;
}
.servico-detalhes { 
    font-size: 0.9rem; 
    opacity: 0.8;
}
.card-servico.selecionado .servico-detalhes { 
    color: rgba(255, 255, 255, 0.9); 
}
.horarios-container-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
}
.btn-horario {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #D1D5DB;
    color: #4B5563;
    padding: 15px 10px;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1rem;
}
.btn-horario:hover {
    color: white;
    border-color: #4F46E5;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
}
.btn-horario.selecionado {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    border-color: #4F46E5;
    color: white;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
    transform: translateY(-3px);
}
.aviso-horarios {
    color: #6B7280;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* ===============================================
   BOTÕES E AGENDAMENTOS
   =============================================== */
#btn-confirmar-agendamento {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    border: none;
    padding: 18px 25px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    width: 100%;
    transition: all 0.3s ease;
    margin-top: 1rem;
}
#btn-confirmar-agendamento:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}
#btn-confirmar-agendamento:disabled {
    background: #E5E7EB;
    color: #9CA3AF;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.botoes-agendamento {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}
.botoes-agendamento .btn-toggle {
    background: rgba(243, 244, 246, 0.9);
    border: 2px solid rgba(229, 231, 235, 0.5);
    padding: 15px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #6B7280;
    transition: all 0.3s ease;
    border-radius: 12px;
    flex-grow: 1;
    text-align: center;
}
.botoes-agendamento .btn-toggle.ativo {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    color: white;
    border-color: #4F46E5;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}
.lista-agendamentos-resultado {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.card-agendamento {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(229, 231, 235, 0.5);
    border-left: 5px solid #4F46E5;
    border-radius: 16px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}
.card-agendamento:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.card-agendamento.status-cancelado_pelo_cliente { 
    border-left-color: #EF4444; 
}
.card-agendamento.status-concluido { 
    border-left-color: #10B981; 
}
.agendamento-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.agendamento-info strong {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
}
.agendamento-info span, .agendamento-info small {
    color: #6B7280;
    font-size: 0.9rem;
}
.btn-cancelar {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-cancelar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* ===============================================
   ABA DE INFORMAÇÕES
   =============================================== */
#info-servicos {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.servico-info-item {
    background: rgba(249, 250, 251, 0.9);
    border: 2px solid rgba(229, 231, 235, 0.5);
    border-radius: 16px;
    padding: 20px 25px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.servico-info-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: #A5B4FC;
}
.servico-info-item strong { 
    font-size: 1.1rem; 
    font-weight: 700; 
    color: #1F2937; 
}
.servico-info-item span { 
    color: #4F46E5; 
    font-weight: 700;
    font-size: 1.1rem;
}

/* ===============================================
   NAVEGAÇÃO MOBILE E RESPONSIVIDADE
   =============================================== */
.bottom-nav-vitrine {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(229, 231, 235, 0.3);
    z-index: 1200;
    height: 70px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}
.bottom-nav-vitrine button {
    flex: 1; border: none; background: none;
    color: #6B7280; font-size: 0.9rem; font-weight: 600;
    padding: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    transition: all 0.3s ease; height: 70px;
    cursor: pointer; position: relative; gap: 4px;
}
.bottom-nav-vitrine button.ativo {
    color: #4F46E5;
    background: rgba(79, 70, 229, 0.05);
}
.bottom-nav-vitrine button span {
    font-size: 0.75rem;
    margin-top: 2px;
}

/* DENTRO DE @media (max-width: 900px) */
.main-content-vitrine {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 8px 90px 8px;
    box-sizing: border-box;
    
    /* ✅ CORREÇÃO: Força o conteúdo a se centralizar */
    display: flex;
    flex-direction: column;
    align-items: center; 
    
    min-height: 100vh;
}

    .sidebar-vitrine { display: none !important; }
    .bottom-nav-vitrine { display: flex; }
    .header-vitrine-mobile {
        display: flex !important;
    }
    .main-content-vitrine {
        width: 100%;
        max-width: 430px;
        margin: 0 auto;
        padding: 0 8px 90px 8px;
        box-sizing: border-box;
        display: block;
        min-height: 100vh;
    }
    .card {
        width: 100%;
        max-width: 100%;
        margin: 0 auto 20px auto;
        box-sizing: border-box;
    }
    .profissionais-container {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
        justify-content: center;
    }
    .card-profissional { padding: 10px 4px; border-radius: 12px; }
    .card-profissional img { width: 60px; height: 60px; }
    .horarios-container-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 10px;
    }
    .btn-horario { padding: 12px 8px; font-size: 0.9rem; }
    .card-agendamento {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 20px;
        width: 100%;
    }
    .agendamento-acao { width: 100%; }
    .agendamento-acao .btn-cancelar { width: 100%; padding: 15px; }
    .botoes-agendamento { gap: 10px; }
    .botoes-agendamento .btn-toggle { padding: 12px 15px; font-size: 0.9rem; }
    .form-group label { font-size: 1rem; }
    input[type="date"] { padding: 12px; font-size: 16px; }
    .servicos-container-cards { gap: 10px; }
    .card-servico {
        padding: 10px 8px;
        border-radius: 12px;
        min-height: 40px;
        font-size: 0.96rem;
    }
    .servico-nome {
        font-size: 1rem;
    }
    .servico-detalhes {
        font-size: 0.92rem;
    }
}

@media (max-width: 480px) {
    .main-content-vitrine {
        max-width: 100vw;
        padding: 0 4px 90px 4px;
    }
    .card { 
        max-width: 100%;
        width: 100%;
        margin: 0 auto 15px auto;
        padding: 10px;
    }
    .profissionais-container {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }
    .card-profissional { padding: 8px 2px; }
    .card-profissional img { width: 50px; height: 50px; }
    .card-profissional span { font-size: 0.9rem; }
    .horarios-container-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 8px;
    }
    .btn-horario { padding: 10px 6px; font-size: 0.85rem; }
    .servicos-container-cards { gap: 8px; }
    .card-servico {
        padding: 8px 4px;
        font-size: 0.9rem;
        min-height: 35px;
    }
    .servico-nome {
        font-size: 0.95rem;
    }
    .servico-detalhes {
        font-size: 0.88rem;
    }
}

/* ===============================================
   ANIMAÇÕES E ESTADOS DE LOADING
   =============================================== */
.card-profissional.selecionado {
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3); }
    50% { transform: scale(1.03); box-shadow: 0 12px 30px rgba(79, 70, 229, 0.4); }
}
.loading::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 20px; height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #4F46E5;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===============================================
   MODAL DE MENSAGENS "PRONTI" (VERSÃO FINAL)
   =============================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(30, 60, 114, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeInModal 0.3s ease-out;
}
@keyframes fadeInModal { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
    max-width: 400px;
    width: 90%;
    padding: 36px 28px 32px 28px;
    border-radius: 22px;
    box-shadow: 0 8px 32px 0 rgba(31,38,135,0.17), 0 1.5px 6px #0001;
    background: linear-gradient(135deg, #e3ecfa 0%, #f7fafd 100%);
    border: 1.5px solid #e3eafc;
    text-align: center;
    animation: slideInModal 0.4s ease-out;
}
@keyframes slideInModal { from { transform: translateY(20px) scale(0.95); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
.modal-box h3 {
    color: #2563eb;
    font-weight: 700;
    font-size: 1.34rem;
    margin-top: 0;
    margin-bottom: 18px;
    letter-spacing: 0.01em;
}
.modal-box p {
    font-size: 16px;
    color: #374151;
    margin-bottom: 30px;
    line-height: 1.5;
}
.modal-botoes {
    display: flex;
    gap: 15px;
    justify-content: center;
}
.modal-botoes button {
    flex-grow: 1;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 13px 0;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
#modal-btn-confirmar {
    background: linear-gradient(90deg, #2563eb 0%, #5b9eff 100%);
    color: #fff;
    box-shadow: 0 2px 10px #2563eb22;
}
#modal-btn-confirmar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px #2563eb44;
}
#modal-btn-cancelar {
    background-color: #e0e7ff;
    color: #4338ca;
}
#modal-btn-cancelar:hover {
    background-color: #c7d2fe;
}

/* ===============================================
   ESTILOS PARA SELEÇÃO MÚLTIPLA DE SERVIÇOS
   =============================================== */
.card-checkbox {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}
.checkmark {
    width: 24px;
    height: 24px;
    border: 2px solid #D1D5DB;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-checkbox.selecionado .checkmark {
    background-color: #fff;
    border-color: #fff;
}
.card-checkbox.selecionado .checkmark::after {
    content: '✔';
    font-size: 16px;
    color: #4F46E5;
}
.servicos-resumo-container {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}
.servicos-resumo p {
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 15px;
}
.btn-prosseguir {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: #4F46E5;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-prosseguir:hover {
    background: #4338ca;
}
.info-categoria-bloco {
    margin-bottom: 28px;
    text-align: center;
}
.info-categoria-titulo {
    font-size: 1.15rem;
    font-weight: 700;
    color: #4F46E5;
    margin-bottom: 10px;
    letter-spacing: 0.01em;
    padding: 6px 0;
    background: linear-gradient(135deg, #c7d2fe 0%, #f3f4f6 100%);
    border-radius: 10px;
    display: inline-block;
    min-width: 120px;
}
.info-categoria-servicos {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}
.servico-info-item {
    background: rgba(249,250,251,0.95);
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px 22px;
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 2px 10px #e0e7ff44;
}
.servico-info-item strong {
    font-weight: 700;
    color: #22223b;
    font-size: 1rem;
}
.servico-info-item span {
    color: #4F46E5;
    font-weight: 600;
    font-size: 1rem;
}
