
/* --- VARIÁVEIS --- */
:root {
    --wpmb-primary-color: #222222;
    --wpmb-accent-color: #22c55e;
    --wpmb-bg-color: #ffffff;
    --wpmb-font-family: 'Inter', sans-serif;
}

.wpmb-modern-wrapper {
    font-family: var(--wpmb-font-family);
    color: var(--wpmb-primary-color);
    line-height: 1.5;
    box-sizing: border-box;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 40px auto;
    position: relative; /* Necessário para cálculos de offset */
}

.wpmb-modern-wrapper *, .wpmb-modern-wrapper *::before, .wpmb-modern-wrapper *::after {
    box-sizing: border-box;
}

.wpmb-grid-layout { display: flex; flex-direction: column; gap: 30px; }
@media(min-width: 768px) {
    .wpmb-grid-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: start; }
}

.wpmb-header h2 { font-size: 2rem; font-weight: 700; margin: 0 0 10px 0; color: var(--wpmb-primary-color); }
.wpmb-description { color: #666; margin: 0 0 20px 0; }
.wpmb-h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 15px; color: var(--wpmb-primary-color); }

/* --- GALERIA (Ajuste de Preenchimento) --- */
.wpmb-mobile-gallery-top { display: none; margin-bottom: 20px; }
.wpmb-desktop-gallery-sidebar { display: block; }
.wpmb-mobile-spacer { display: none; }

.wpmb-main-img {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Aspect Ratio 1:1 forçado via padding */
    overflow: hidden;
    border-radius: 8px;
    background: #eee;
}
.wpmb-main-img img { 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%; 
    object-fit: cover; /* Garante preenchimento total */
    display: block;
}

@media (max-width: 767px) {
    .wpmb-mobile-gallery-top { display: block; }
    .wpmb-desktop-gallery-sidebar { display: none !important; }
    
    /* Spacer maior para acomodar botão + resumo */
    .wpmb-mobile-spacer { display: block; height: 110px; }
    
    /* Ajuste dos botões de ação no mobile */
    .wpmb-actions {
        padding: 15px 0;
        background: #fff;
        transition: transform 0.2s ease;
        display: flex;
        flex-wrap: wrap; /* Permite que o resumo fique acima */
        gap: 10px;
        justify-content: space-between;
    }

    /* Linha de Resumo (Oculta por padrão, aparece no Sticky) */
    .wpmb-sticky-summary-line {
        display: none;
        width: 100%;
        text-align: center;
        padding-bottom: 10px;
        border-bottom: 1px solid #eee;
        font-size: 0.9rem;
        color: #666;
        margin-bottom: 5px;
    }
    .wpmb-sticky-summary-line strong {
        color: var(--wpmb-primary-color);
        font-size: 1.1rem;
    }
    
    /* Quando entra no modo Sticky via JS */
    .wpmb-actions.wpmb-is-sticky {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 99999;
        padding: 10px 15px 15px 15px;
        box-shadow: 0 -4px 15px rgba(0,0,0,0.15);
        border-top: 1px solid #eee;
        margin: 0 !important;
        animation: slideUp 0.3s ease;
        background: #fff;
        flex-direction: column; /* Empilha resumo e botões */
        gap: 0;
    }

    .wpmb-actions.wpmb-is-sticky .wpmb-sticky-summary-line {
        display: block; /* Mostra o resumo */
    }

    .wpmb-actions.wpmb-is-sticky .wpmb-buttons-row {
        display: flex;
        gap: 10px;
        width: 100%;
    }
    
    .wpmb-actions.wpmb-is-sticky button {
        flex: 1; 
        padding: 12px 20px;
    }
}

@media (min-width: 768px) {
    .wpmb-sticky-summary-line { display: none !important; }
    .wpmb-buttons-row { display: flex; gap: 10px; width: 100%; justify-content: flex-end; }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}


/* --- BENEFÍCIOS --- */
.wpmb-benefits-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
.wpmb-benefit-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4b5563;
}
.wpmb-benefit-tag .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: var(--wpmb-accent-color);
}
.wpmb-benefit-tag img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* --- STEPS CIRCULARES --- */
.wpmb-steps-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
    gap: 20px;
}
/* Linha conectora */
.wpmb-steps-nav::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}

.step-item {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
    cursor: default;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb; /* Cinza inativo */
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s;
    border: 2px solid #fff; /* Borda branca para separar da linha */
}

.step-check { display: none; font-size: 20px; }
.step-label { font-size: 0.9rem; color: #9ca3af; font-weight: 500; }

/* Ativo */
.step-item.active .step-circle {
    background: var(--wpmb-accent-color);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}
.step-item.active .step-label { color: var(--wpmb-primary-color); font-weight: 700; }

/* Completado (usando classe .completed via JS) */
.step-item.completed .step-circle {
    background: var(--wpmb-accent-color);
    color: #fff;
}
.step-item.completed .step-num { display: none; }
.step-item.completed .step-check { display: block; }

/* --- CALENDÁRIO --- */
.wpmb-calendar-locked {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(100%);
    position: relative;
}
/* Mensagem visual de bloqueio (opcional) */
.wpmb-calendar-locked::after {
    content: "Selecione uma opção acima";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
}

.wpmb-calendar-wrapper .ui-datepicker {
    width: 100%;
    border: none;
    background: #fff;
    padding: 0;
}
.wpmb-calendar-wrapper .ui-datepicker-header {
    background: transparent;
    border: none;
    padding: 10px 0;
}
.wpmb-calendar-wrapper .ui-datepicker-title {
    color: var(--wpmb-primary-color);
    font-weight: 700;
}
.wpmb-calendar-wrapper .ui-datepicker-prev, .wpmb-calendar-wrapper .ui-datepicker-next {
    cursor: pointer;
}
.wpmb-calendar-wrapper .ui-datepicker th {
    font-weight: 500;
    color: #9ca3af;
}
.wpmb-calendar-wrapper .ui-datepicker td {
    padding: 5px;
}
.wpmb-calendar-wrapper .ui-state-default {
    background: transparent;
    border: none;
    text-align: center;
    font-weight: 600;
    color: var(--wpmb-primary-color);
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    margin: 0 auto;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wpmb-calendar-wrapper .ui-state-hover {
    background: #f3f4f6;
}

/* Dias Selecionados (Range e Single) - Círculos Escuros */
.wpmb-day-selected .ui-state-default {
    background: #1f2937 !important; /* Escuro quase preto */
    color: #fff !important;
    border-radius: 50%;
}

/* --- STEPS CONTENT --- */
.wpmb-step { display: none; animation: fadeIn 0.3s ease; }
.wpmb-step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* --- BOTOES --- */
.wpmb-actions { display: flex; justify-content: space-between; margin-top: 30px; }
.wpmb-actions.right-align .wpmb-buttons-row { justify-content: flex-end; }

.wpmb-btn-primary, .wpmb-btn-success, .wpmb-btn-ghost {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
    justify-content: center;
}
.wpmb-btn-primary { background: var(--wpmb-primary-color); color: #fff; }
.wpmb-btn-success { background: var(--wpmb-accent-color); color: #fff; width: 100%; }
.wpmb-btn-ghost { background: transparent; color: #666; border: 1px solid #ddd; }
.wpmb-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.wpmb-btn-primary:hover:not(:disabled), .wpmb-btn-success:hover { opacity: 0.9; }

/* --- SUMMARY --- */
.wpmb-summary-card {
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: 20px;
}
.wpmb-summary-title { margin-top:0; }
.wpmb-gallery-widget { margin-bottom: 20px; }

.wpmb-thumbs-row { display: flex; gap: 5px; margin-top: 5px; }
.wpmb-thumb-item { width: 40px; height: 40px; cursor: pointer; opacity: 0.6; }
.wpmb-thumb-item:hover { opacity: 1; }
.wpmb-thumb-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }

.wpmb-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.95rem; border-bottom: 1px dashed #e5e7eb; padding-bottom: 5px;}
.wpmb-summary-total { display: flex; justify-content: space-between; margin-top: 20px; font-size: 1.2rem; font-weight: 700; color: var(--wpmb-accent-color); }

/* --- LISTAS E EXTRAS --- */
.wpmb-cards-compact-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 20px;}
.wpmb-card-compact { cursor: pointer; position: relative; }
.wpmb-card-compact input { position: absolute; opacity: 0; }
.wpmb-card-inner-compact {
    border: 1px solid #e5e7eb; border-radius: 8px; padding: 15px; text-align: center; transition: all 0.2s;
}
.wpmb-card-compact input:checked + .wpmb-card-inner-compact {
    border-color: var(--wpmb-accent-color); background: #f0fdf4;
}
.wpmb-compact-name { display: block; font-weight: 600; }
.wpmb-compact-meta { display: block; font-size: 0.8rem; color: #666; margin: 5px 0; }
.wpmb-compact-price { display: block; font-weight: 700; color: var(--wpmb-accent-color); }

/* EXTRAS ROW */
.wpmb-extra-item-row { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    padding: 15px; 
    border: 2px solid #f0f0f0;
    border-radius: 10px; 
    margin-bottom: 12px; 
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    flex-wrap: nowrap; 
}

.wpmb-extra-item-row:hover {
    border-color: #d1d5db;
}

.wpmb-extra-item-row.active {
    border-color: var(--wpmb-accent-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    background: #fff; 
}

.wpmb-extra-details { 
    flex: 1; 
    min-width: 0; 
}
.wpmb-extra-details .name { display: block; font-weight: 600; color: var(--wpmb-primary-color); font-size: 0.95rem; }
.wpmb-extra-details .desc { font-size: 0.8rem; color: #666; display: block; margin-top: 2px;}
.wpmb-extra-details .price { color: var(--wpmb-accent-color); font-weight: 600; font-size: 0.9rem; display: block; margin-top: 2px;}

.wpmb-fake-checkbox {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.wpmb-extra-item-row.active .wpmb-fake-checkbox {
    background: var(--wpmb-accent-color);
    border-color: var(--wpmb-accent-color);
}

.wpmb-fake-checkbox .dashicons {
    color: #fff;
    font-size: 16px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s;
}

.wpmb-extra-item-row.active .wpmb-fake-checkbox .dashicons {
    opacity: 1;
    transform: scale(1);
}

.wpmb-extra-qty-control {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 100px; 
    justify-content: flex-end;
    flex-shrink: 0;
}

.wpmb-qty-btn {
    width: 32px;
    height: 32px; 
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #374151;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 16px;
}

.wpmb-extra-item-row.active .wpmb-qty-btn {
    border-color: var(--wpmb-accent-color);
    color: var(--wpmb-accent-color);
    background: #fff;
}

.wpmb-extra-item-row.active .wpmb-qty-btn:active,
.wpmb-extra-item-row.active .wpmb-qty-btn:hover {
    background: var(--wpmb-accent-color);
    color: #fff;
}

.wpmb-qty-btn:disabled {
    opacity: 0.3;
    cursor: default;
    border-color: #eee !important;
    color: #ccc !important;
    background: #f9f9f9 !important;
}

.wpmb-extra-qty-input {
    width: 30px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 600;
    color: var(--wpmb-primary-color);
    padding: 0;
    pointer-events: none; 
}
.wpmb-extra-item-row.active .wpmb-extra-qty-input {
    color: var(--wpmb-primary-color);
}

/* GUEST SELECTOR */
.wpmb-guest-selector { border: 1px solid #e5e7eb; border-radius: 8px; padding: 15px; margin-bottom: 20px; }
.wpmb-guest-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.wpmb-guest-row:last-child { margin-bottom: 0; }
.wpmb-counter-control { display: flex; align-items: center; gap: 10px; }

.wpmb-counter-btn { 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    border: 1px solid #ddd; 
    background: #fff; 
    cursor: pointer; 
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}
.wpmb-counter-val { font-weight: 600; min-width: 20px; text-align: center; }

/* Slots */
.wpmb-slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 8px; margin-top: 10px; }
.wpmb-slot-btn { 
    padding: 8px 5px; text-align: center; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; font-size: 0.9rem; 
}
.wpmb-slot-btn.selected { background: var(--wpmb-primary-color); color: #fff; border-color: var(--wpmb-primary-color); }
.wpmb-slot-btn.disabled { opacity: 0.4; cursor: not-allowed; background: #f5f5f5; }

.wpmb-info-box { background: #e0f2fe; padding: 15px; border-radius: 6px; color: #0369a1; margin-bottom: 20px; font-size: 0.95rem; }
