/* DetoxVitta Checkout - Premium Green Theme */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #bbf7d0 100%);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1a2e22;
    -webkit-font-smoothing: antialiased;
}

/* Logo */
.logo-container {
    text-align: center;
    padding: 20px 0 16px;
}

.logo-container img {
    height: 48px;
}

/* Order Summary */
.order-summary {
    max-width: 600px;
    margin: 0 auto 20px;
    padding: 18px 24px;
    background: white;
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.1);
    animation: slideInUp 0.5s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-preview {
    display: flex;
    align-items: center;
    gap: 14px;
}

.product-thumb {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.product-info h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1a2e22;
    margin-bottom: 2px;
}

.product-info p {
    font-size: 0.8rem;
    color: #16a34a;
}

.price-info {
    text-align: right;
}

.original-price {
    display: block;
    font-size: 0.85rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.current-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: #16a34a;
}

/* Checkout Container */
.checkout-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px 100px;
}

/* Step Section */
.step-section {
    background: white;
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 24px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.08);
    animation: slideInUp 0.5s ease both;
}

.step-section:nth-child(1) {
    animation-delay: 0.1s;
}

.step-section:nth-child(2) {
    animation-delay: 0.2s;
}

.step-section:nth-child(3) {
    animation-delay: 0.3s;
}

.step-section.collapsed {
    opacity: 0.6;
    transform: scale(0.98);
}

.step-section.completed {
    border-color: rgba(16, 185, 129, 0.4);
    opacity: 1;
}

.step-section.active {
    border-color: rgba(34, 197, 94, 0.5);
    opacity: 1;
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.15);
}

/* Step Header */
.step-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(34, 197, 94, 0.1);
}

.step-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #9ca3af;
    background: transparent;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.step-dot.active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-color: #22c55e;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
}

.step-dot.completed {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
}

.step-header h2 {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    color: #1a2e22;
}

.edit-btn {
    background: none;
    border: none;
    color: #16a34a;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.edit-btn:hover {
    text-decoration: underline;
}

/* Step Content */
.step-content {
    padding: 24px;
}

.step-content.hidden {
    display: none;
}

/* Step Summary */
.step-summary {
    padding: 16px 24px;
    font-size: 0.9rem;
    color: #16a34a;
    background: rgba(34, 197, 94, 0.05);
}

.step-summary.hidden {
    display: none;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1a2e22;
}

.info-icon {
    color: #94a3b8;
    cursor: help;
}

.optional {
    color: #94a3b8;
    font-weight: 400;
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 18px;
    font-size: 16px;
    font-family: inherit;
    border: 2px solid rgba(34, 197, 94, 0.2);
    border-radius: 14px;
    background: white;
    color: #1a2e22;
    outline: none;
    transition: all 0.3s ease;
}

.input-wrapper input:focus,
.form-group input:focus,
.form-group textarea:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

.input-wrapper input.valid {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

/* Check Icon */
.check-icon {
    position: absolute;
    right: 16px;
    color: #10b981;
    font-weight: bold;
    font-size: 1.2rem;
}

.check-icon.hidden {
    display: none;
}

.loading-icon {
    position: absolute;
    right: 16px;
    animation: spin 1s linear infinite;
}

.loading-icon.hidden {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Phone Input */
.phone-input {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid rgba(34, 197, 94, 0.2);
    border-radius: 14px;
    overflow: hidden;
}

.phone-input:focus-within {
    border-color: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

.phone-prefix {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 12px;
    font-size: 0.9rem;
    color: #16a34a;
    background: transparent;
    border-right: 1px solid rgba(34, 197, 94, 0.2);
}

.phone-input input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 14px 16px;
}

.phone-input input:focus {
    border: none;
    box-shadow: none;
}

/* Form Row */
.form-row {
    display: flex;
    gap: 14px;
}

.form-group.small {
    flex: 0 0 110px;
}

.form-group.large {
    flex: 1;
}

/* Textarea */
.form-group textarea {
    min-height: 90px;
    resize: vertical;
}

.char-count {
    display: block;
    text-align: right;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 6px;
}

/* CEP Link */
.cep-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #16a34a;
    text-decoration: underline;
    font-weight: 500;
}

/* Address Preview */
.address-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 14px;
    margin-bottom: 18px;
}

.address-preview.hidden {
    display: none;
}

.location-icon {
    font-size: 1.5rem;
}

.address-text strong {
    display: block;
    color: #065f46;
    font-size: 0.9rem;
}

.address-text span {
    font-size: 0.8rem;
    color: #059669;
}

/* Buttons */
.btn-continue {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
    border-radius: 16px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

.btn-continue:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(34, 197, 94, 0.4);
}

.btn-continue:active {
    transform: scale(0.98);
}

.btn-finalize {
    width: 100%;
    padding: 20px 24px;
    background: linear-gradient(135deg, #16a34a, #15803d);
    border: none;
    border-radius: 16px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(22, 163, 74, 0.35);
    animation: btnPulse 2s infinite;
}

@keyframes btnPulse {

    0%,
    100% {
        box-shadow: 0 8px 32px rgba(22, 163, 74, 0.35);
    }

    50% {
        box-shadow: 0 8px 48px rgba(22, 163, 74, 0.55);
    }
}

.btn-finalize:active {
    transform: scale(0.98);
}

/* Date Options */
.date-options {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.date-option {
    flex: 1;
    min-width: 90px;
    padding: 14px 10px;
    background: white;
    border: 2px solid rgba(34, 197, 94, 0.2);
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.date-option:hover {
    border-color: #22c55e;
}

.date-option.selected {
    border-color: #16a34a;
    background: rgba(34, 197, 94, 0.1);
}

.date-option .weekday {
    display: block;
    font-size: 0.8rem;
    color: #16a34a;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.date-option .day {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a2e22;
}

.date-option .month {
    display: block;
    font-size: 0.7rem;
    color: #4a5c50;
    text-transform: uppercase;
}

.date-option .radio {
    width: 16px;
    height: 16px;
    border: 2px solid #9ca3af;
    border-radius: 50%;
    margin: 10px auto 0;
    transition: all 0.2s;
}

.date-option.selected .radio {
    border-color: #16a34a;
    background: #16a34a;
}

/* Order Total */
.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    margin-bottom: 18px;
    border-top: 1px solid rgba(34, 197, 94, 0.2);
}

.total-label {
    font-size: 1rem;
    color: #1a2e22;
    font-weight: 600;
}

.total-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #16a34a;
}

/* Payment Methods */
.payment-methods-container {
    margin-bottom: 24px;
}

.payment-methods-container h3 {
    font-size: 1rem;
    color: #1a2e22;
    margin-bottom: 12px;
    font-weight: 600;
}

.payment-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.payment-card {
    position: relative;
    padding: 12px 8px;
    background: white;
    border: 2px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-card input {
    display: none;
}

.payment-card:hover {
    border-color: #22c55e;
}

.payment-card.selected {
    border-color: #16a34a;
    background: rgba(34, 197, 94, 0.1);
}

.payment-card .card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.payment-card .card-icon-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.payment-card .card-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1a2e22;
}

.payment-card .check-circle {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 14px;
    height: 14px;
    border: 2px solid #9ca3af;
    border-radius: 50%;
    transition: all 0.2s;
}

.payment-card.selected .check-circle {
    border-color: #16a34a;
    background: #16a34a;
}

/* Security Note */
.security-note {
    text-align: center;
    font-size: 0.8rem;
    color: #5a6b60;
    margin-top: 18px;
}

/* Guarantee Footer */
.guarantee-footer {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 16px;
    display: flex;
    gap: 12px;
}

.guarantee-item {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    background: white;
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 16px;
}

.guarantee-item span {
    font-size: 1.4rem;
}

.guarantee-item strong {
    display: block;
    font-size: 0.85rem;
    color: #16a34a;
    margin-bottom: 2px;
}

.guarantee-item p {
    font-size: 0.75rem;
    color: #5a6b60;
}

/* Hidden */
.hidden {
    display: none !important;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 90%;
    width: 360px;
    text-align: center;
}

.modal h2 {
    color: #1a2e22;
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.modal p {
    color: #5a6b60;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.modal-close-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(34, 197, 94, 0.2);
    border-top-color: #16a34a;
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

.loading-content p {
    color: #1a2e22;
    font-weight: 600;
}

/* ========== CONFIRMATION SCREEN ========== */
.order-confirmation {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px 16px;
}

.success-header {
    text-align: center;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    margin: -20px -16px 24px;
    padding: 40px 20px;
    border-radius: 0 0 30px 30px;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 12px;
}

.success-header h1 {
    color: white;
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.order-number {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.order-number strong {
    color: white;
}

/* Confirmation Cards */
.confirmation-card {
    background: white;
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    gap: 14px;
    margin-bottom: 12px;
}

.confirmation-card.main-card {
    border-color: #16a34a;
    background: rgba(34, 197, 94, 0.05);
}

.confirmation-card .card-icon {
    font-size: 2rem;
    line-height: 1;
}

.confirmation-card .card-content h2 {
    font-size: 0.9rem;
    color: #1a2e22;
    margin-bottom: 4px;
}

.confirmation-card .card-content p {
    font-size: 0.85rem;
    color: #4a5c50;
    margin: 2px 0;
}

.confirmation-card .full-date {
    font-size: 1.1rem !important;
    color: #16a34a !important;
    font-weight: 700;
}

.confirmation-card .destination {
    font-size: 0.8rem;
    color: #5a6b60;
    background: rgba(34, 197, 94, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 8px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.info-grid .confirmation-card {
    flex-direction: column;
    gap: 8px;
}

.info-grid .card-icon {
    font-size: 1.5rem;
}

.info-grid .card-content label {
    font-size: 0.7rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-grid .card-content strong {
    display: block;
    font-size: 0.9rem;
    color: #1a2e22;
}

.info-grid .card-content span {
    font-size: 0.8rem;
    color: #5a6b60;
}

.info-grid .card-content .price {
    color: #16a34a;
    font-size: 1rem;
}

/* Total Banner */
.total-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #16a34a, #15803d);
    padding: 20px 24px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.total-left span {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.total-left small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
}

.total-right strong {
    color: white;
    font-size: 1.6rem;
    font-weight: 800;
}

/* Support Section */
.support-section {
    text-align: center;
    margin-bottom: 16px;
}

.support-section p {
    color: #5a6b60;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.whatsapp-btn {
    display: inline-block;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.btn-save {
    width: 100%;
    padding: 16px;
    background: white;
    border: 2px solid rgba(34, 197, 94, 0.3);
    border-radius: 14px;
    color: #16a34a;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save:hover {
    background: rgba(34, 197, 94, 0.05);
}

/* Mobile Optimizations */
@media (max-width: 540px) {
    .order-summary {
        margin: 0 8px 16px;
        flex-direction: row;
        gap: 12px;
    }

    .product-thumb {
        width: 44px;
        height: 44px;
    }

    .product-info h3 {
        font-size: 0.9rem;
    }

    .current-price {
        font-size: 1.2rem;
    }

    .checkout-container {
        padding: 0 12px 80px;
    }

    .step-content {
        padding: 20px;
    }

    .guarantee-footer {
        flex-direction: column;
    }

    .payment-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .payment-card {
        padding: 10px 6px;
    }

    .payment-card .card-emoji {
        font-size: 1.3rem;
    }

    .payment-card .card-label {
        font-size: 0.7rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== PRINT STYLES - COMPROVANTE PROFISSIONAL ========== */
@media print {

    /* Reset do fundo */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    html,
    body {
        background: white !important;
        margin: 0;
        padding: 0;
    }

    /* Esconder elementos desnecessários */
    .logo-container,
    .order-summary,
    .guarantee-footer,
    .modal-overlay,
    .loading-overlay,
    .whatsapp-btn,
    .btn-save,
    .support-section,
    .step-section {
        display: none !important;
    }

    /* Mostrar container */
    .checkout-container {
        display: block !important;
        padding: 0 !important;
        max-width: 100% !important;
    }

    /* Mostrar confirmation screen (remover .hidden) */
    #confirmation-screen,
    #confirmation-screen.hidden {
        display: block !important;
        position: relative !important;
    }

    .order-confirmation {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    /* Header do comprovante */
    .success-header {
        background: #16a34a !important;
        margin: 0 !important;
        padding: 30px 20px !important;
        border-radius: 0 !important;
    }

    .success-header::before {
        content: "COMPROVANTE DE PEDIDO";
        display: block;
        font-size: 10px;
        letter-spacing: 2px;
        opacity: 0.8;
        margin-bottom: 10px;
    }

    .success-icon {
        font-size: 3rem;
    }

    .success-header h1 {
        font-size: 1.4rem;
    }

    /* Cards de confirmação */
    .confirmation-card {
        border: 1px solid #e5e7eb !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .confirmation-card.main-card {
        border: 2px solid #16a34a !important;
        background: #f0fdf4 !important;
    }

    /* Info grid */
    .info-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Total banner */
    .total-banner {
        background: #16a34a !important;
        margin-top: 20px;
    }

    /* Adicionar rodapé de impressão */
    .order-confirmation::after {
        content: "Este é um comprovante de pedido. Guarde para sua referência. • DetoxVitta";
        display: block;
        text-align: center;
        font-size: 9px;
        color: #9ca3af;
        margin-top: 30px;
        padding-top: 15px;
        border-top: 1px dashed #e5e7eb;
    }

    /* Ajuste de cores para impressão */
    .confirmation-card .card-content strong {
        color: #1a2e22 !important;
    }

    .confirmation-card .card-content label {
        color: #6b7280 !important;
    }

    .confirmation-card .full-date {
        color: #16a34a !important;
    }

    .info-grid .card-content .price {
        color: #16a34a !important;
        font-weight: 800;
    }

    .total-right strong {
        color: white !important;
    }

    /* Garantir que o ícone apareça */
    .confirmation-card .card-icon {
        font-size: 1.5rem;
    }

    /* Formatação de página */
    @page {
        margin: 10mm;
        size: A4;
    }
}