/* G Catering Wizard v2 */
body.gcw-no-scroll { overflow: hidden; }

#gcatering-wizard {
    display: flex;
    gap: 32px;
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 16px;
    font-family: inherit;
}

/* ── Sidebar ─────────────────── */
.gcw-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex: 0 0 90px;
}

.gcw-step-dot {
    width: 80px;
    min-height: 80px;
    border-radius: 50%;
    border: 1.5px solid #ccc;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 8px;
}

.gcw-step-dot .gcw-step-label {
    font-size: 10px;
    text-align: center;
    color: #888;
    line-height: 1.3;
}

.gcw-step-dot.active {
    border-color: #1a1a1a;
    background: #1a1a1a;
}
.gcw-step-dot.active .gcw-step-label { color: #fff; }

.gcw-step-dot.done {
    border-color: #4a4a4a;
    background: #e0e0e0;
}

/* ── Conteudo ────────────────── */
.gcw-content { flex: 1; min-width: 0; }

.gcw-title {
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 24px;
    color: #1a1a1a;
}

/* ── Secoes ──────────────────── */
.gcw-section {
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 14px;
    overflow: hidden;
}
.gcw-section-head {
    background: #ece9e3;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.gcw-section-body { padding: 16px 14px; }

/* ── Layout de campos ────────── */
.gcw-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.gcw-row:last-child { margin-bottom: 0; }

.gcw-field { flex: 1 1 140px; }
.gcw-field-sm { flex: 0 1 160px; }
.gcw-field-lg { flex: 2 1 240px; }

.gcw-field label {
    display: block;
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
}
.gcw-req { color: #cc0000; }

/* ── Inputs ──────────────────── */
.gcw-input {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 13px;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.gcw-input:focus { outline: none; border-color: #1a1a1a; }
.gcw-input[readonly] { background: #f8f8f8; color: #555; }
textarea.gcw-input { resize: vertical; }

/* ── Stepper ─────────────────── */
.gcw-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
}
.gcw-step-btn {
    width: 32px; height: 32px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}
.gcw-step-btn:hover { background: #f0f0f0; }
.gcw-step-input {
    width: 70px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px;
    font-size: 16px;
    font-weight: 600;
}

/* ── Pills ───────────────────── */
.gcw-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.gcw-pill {
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 20px;
    padding: 7px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}
.gcw-pill:hover { border-color: #888; }
.gcw-pill.active { border-color: #1a1a1a; background: #1a1a1a; color: #fff; }
.gcw-pill-op { border-color: #e0a800; }
.gcw-pill-op.active { border-color: #8a4a00; background: #8a4a00; color: #fff; }

/* ── Mensagens ───────────────── */
.gcw-msg { font-size: 13px; padding: 10px 14px; border-radius: 4px; margin-top: 10px; }
.gcw-msg-info { background: #e8f0fe; color: #1a3f8f; border: 1px solid #93b4f5; }
.gcw-msg-warn { background: #fff3e0; color: #8a4a00; border: 1px solid #ffc87a; }
.gcw-msg-error { background: #fce8e8; color: #7a1c1c; border: 1px solid #f5a8a8; }
.gcw-note { font-size: 12px; color: #888; margin-top: 10px; font-style: italic; }

.gcw-errors {
    background: #fce8e8;
    color: #7a1c1c;
    border: 1px solid #f5a8a8;
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 13px;
}
.gcw-errors ul { margin: 4px 0 0 16px; padding: 0; }

/* ── CEP ─────────────────────── */
.gcw-cep-field { max-width: 180px; }

/* ── Botoes ──────────────────── */
.gcw-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}
.gcw-btn {
    padding: 11px 26px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: opacity 0.15s;
}
.gcw-btn:hover { opacity: 0.85; }
.gcw-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.gcw-btn-primary { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.gcw-btn-secondary { background: #fff; color: #333; border-color: #ccc; }
.gcw-btn-full { width: 100%; padding: 14px; font-size: 15px; }
.gcw-link-btn { background: none; border: none; color: #555; font-size: 12px; text-decoration: underline; cursor: pointer; }

/* ── Formato cards ───────────── */
.gcw-format-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}
.gcw-format-card {
    border: 1.5px solid #ddd;
    border-radius: 8px;
    padding: 20px 16px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
    position: relative;
}
.gcw-format-card:hover { border-color: #888; }
.gcw-format-card.active { border-color: #1a1a1a; box-shadow: 0 0 0 2px #1a1a1a; }
.gcw-format-op { border-color: #e0a800; background: #fffbf5; }
.gcw-format-img { font-size: 28px; margin-bottom: 8px; }
.gcw-format-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.gcw-format-desc { font-size: 12px; color: #888; }
.gcw-format-btn {
    display: none;
    margin-top: 10px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    padding: 5px 14px;
    font-size: 12px;
    cursor: pointer;
}
.gcw-orcamento-badge {
    display: inline-block;
    margin-top: 8px;
    font-size: 10px;
    font-weight: 600;
    background: #fff3e0;
    color: #8a4a00;
    border: 1px solid #ffc87a;
    border-radius: 10px;
    padding: 2px 8px;
}

/* ── Resumo itens ────────────── */
.gcw-itens-resumo {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 14px;
    background: #fafafa;
}
.gcw-itens-resumo-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.gcw-resumo-item { display: flex; justify-content: space-between; font-size: 13px; color: #555; padding: 3px 0; }

/* ── Modal ───────────────────── */
.gcw-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}
.gcw-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 860px;
    max-height: 85vh;
    background: #fff;
    border-radius: 8px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.gcw-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    flex: none;
}
.gcw-modal-title { font-size: 16px; font-weight: 600; }
#gcw-modal-grid {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}
.gcw-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-top: 1px solid #eee;
    flex: none;
}
.gcw-modal-total { font-size: 15px; font-weight: 600; }

/* ── Produto cards ───────────── */
.gcw-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.gcw-product-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
.gcw-card-img {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #f0f0f0;
    flex: none;
}
.gcw-card-img img {
    width: 100% !important;
    height: 160px !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}
.gcw-no-img {
    width: 100%;
    height: 160px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #ccc;
}
.gcw-card-attr {
    font-size: 11px;
    font-weight: 400;
    color: #888;
    margin-left: 4px;
}
.gcw-card-body { padding: 10px; }
.gcw-card-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.gcw-card-price { font-size: 12px; color: #555; margin-bottom: 8px; }
.gcw-var-sel { width: 100%; border: 1px solid #ddd; border-radius: 3px; padding: 4px 6px; font-size: 12px; margin-bottom: 6px; }
.gcw-card-qty { display: flex; align-items: center; justify-content: space-between; border: 1px solid #ddd; border-radius: 4px; padding: 4px 8px; }
.gcw-q-btn { border: none; background: none; font-size: 16px; cursor: pointer; color: #333; padding: 0 4px; }
.gcw-q-val { font-size: 14px; font-weight: 600; min-width: 20px; text-align: center; }

/* ── Revisao ─────────────────── */
.gcw-review-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.gcw-review-block { border: 1px solid #ddd; border-radius: 6px; overflow: hidden; margin-bottom: 12px; }
.gcw-review-head { background: #ece9e3; padding: 9px 14px; font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.gcw-edit-btn { font-size: 11px; color: #555; background: none; border: 1px solid #ccc; border-radius: 3px; padding: 2px 8px; cursor: pointer; }
.gcw-review-body { padding: 10px 14px; }
.gcw-rev-row { display: flex; justify-content: space-between; font-size: 13px; color: #444; padding: 4px 0; border-bottom: 1px dashed #eee; }
.gcw-rev-row:last-child { border-bottom: none; }
.gcw-review-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; padding: 14px 0; border-top: 2px solid #1a1a1a; }
.gcw-total-obs { font-size: 12px; font-weight: 400; color: #888; margin-left: 8px; }

/* ── Finalizacao ─────────────── */
.gcw-final-grid { max-width: 480px; margin: 0 auto 20px; }
.gcw-final-box { border: 1.5px solid #ddd; border-radius: 8px; padding: 28px 24px; text-align: center; }
.gcw-final-b { border-color: #ffc87a; background: #fffbf5; }
.gcw-final-icon { font-size: 40px; margin-bottom: 12px; }
.gcw-final-box h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.gcw-final-box p { font-size: 14px; color: #555; margin-bottom: 14px; line-height: 1.6; }
.gcw-checklist { list-style: none; padding: 0; margin: 0 0 20px; text-align: left; display: inline-block; }
.gcw-checklist li { font-size: 13px; color: #444; padding: 4px 0; }
.gcw-checklist li::before { content: '✓ '; color: #1a7a3f; font-weight: 700; }

/* ── Loading ─────────────────── */
.gcw-loading { text-align: center; padding: 32px; color: #888; font-size: 14px; }
.gcw-loading::after {
    content: '';
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: gcw-spin 0.7s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}
@keyframes gcw-spin { to { transform: rotate(360deg); } }

/* ── Responsivo ──────────────── */
@media (max-width: 680px) {
    #gcatering-wizard { flex-direction: column; }
    .gcw-sidebar { flex-direction: row; flex-wrap: wrap; justify-content: center; flex: none; }
    .gcw-step-dot { width: 64px; min-height: 64px; }
    .gcw-format-grid { grid-template-columns: 1fr; }
    .gcw-review-layout { grid-template-columns: 1fr; }
    .gcw-modal { width: 96%; max-height: 90vh; }
}

/* ── Visibilidade por classe (resistente ao tema) ──────────── */
#gcatering-wizard .gcw-hidden,
#gcw-modal:not(.gcw-modal-open),
#gcw-modal-overlay:not(.gcw-modal-open) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#gcw-modal.gcw-modal-open {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

#gcw-modal-overlay.gcw-modal-open {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

#gcatering-wizard .gcw-itens-resumo:not(.gcw-hidden) {
    display: block !important;
}

#gcatering-wizard .gcw-products-grid:not(.gcw-hidden) {
    display: grid !important;
}

/* Grid 3 cards no step 2 */
.gcw-format-grid {
    grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 680px) {
    .gcw-format-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ── Formato lista (step 2) ─────────────────────────────────── */
.gcw-format-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.gcw-format-item {
    border: 1.5px solid #ddd;
    border-radius: 6px;
    padding: 16px 20px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.15s, background 0.15s;
}

.gcw-format-item:hover {
    border-color: #888;
}

.gcw-format-item.active {
    border-color: #1a1a1a;
    background: #f8f8f8;
}

.gcw-format-item.active::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1a1a1a;
    flex: none;
}

.gcw-format-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.gcw-format-item-desc {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

/* ── Descricao do produto no modal ───────────────────────────── */
.gcw-card-desc {
    font-size: 11px;
    color: #777;
    line-height: 1.5;
    margin-bottom: 6px;
}
.gcw-ver-mais,
.gcw-ver-menos {
    color: #1a1a1a;
    font-size: 11px;
    text-decoration: underline;
    cursor: pointer;
    white-space: nowrap;
}
.gcw-ver-mais:hover,
.gcw-ver-menos:hover {
    color: #444;
}
