/* Checkout Styles */
.checkout-body {
    background: #F5F0E1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.checkout-header {
    background: linear-gradient(180deg, #D946A8 0%, #C84B9A 100%);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkout-logo img {
    height: 28px;
}

.checkout-secure {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-size: 12px;
    font-weight: 500;
}

.checkout-main {
    flex: 1;
    padding: 0;
}

.checkout-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.checkout-step.active {
    display: block;
}

.checkout-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 30px 20px;
}

.checkout-content {
    background: white;
    border-radius: 20px;
    padding: 30px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.back-btn:hover {
    color: #C84B9A;
}

.checkout-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 24px;
}

.checkout-subtitle {
    color: #666;
    font-size: 15px;
    margin-top: -16px;
    margin-bottom: 24px;
}

.checkout-subtitle strong {
    color: #333;
    font-size: 18px;
}

/* Cart Item */
.cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #F9F7F2;
    border-radius: 12px;
    margin-bottom: 24px;
}

.cart-item-image {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    background: white;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h3 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.3;
}

.cart-item-qty {
    font-size: 13px;
    color: #888;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

/* Cart Summary */
.cart-summary {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-bottom: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    color: #666;
}

.summary-row.total {
    border-top: 1px solid #eee;
    margin-top: 10px;
    padding-top: 16px;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.free-shipping {
    color: #7ED957;
    font-weight: 600;
}

/* Form */
.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.form-group input {
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #C84B9A;
    box-shadow: 0 0 0 3px rgba(200, 75, 154, 0.1);
}

.form-group input::placeholder {
    color: #aaa;
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border: 2px solid #eee;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-method:hover {
    border-color: #ddd;
}

.payment-method.selected {
    border-color: #C84B9A;
    background: #FDF5FA;
}

.payment-icon {
    width: 50px;
    height: 34px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 11px;
    flex-shrink: 0;
}

.mbway-icon {
    background: linear-gradient(135deg, #E31937 0%, #C41230 100%);
    color: white;
    font-size: 9px;
}

.mb-icon {
    background: linear-gradient(135deg, #003366 0%, #002244 100%);
    color: white;
}

.payment-info {
    flex: 1;
    text-align: left;
}

.payment-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.payment-desc {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.payment-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s;
}

.payment-method.selected .payment-check {
    background: #C84B9A;
    border-color: #C84B9A;
}

/* Buttons */
.checkout-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    display: block;
    text-decoration: none;
    background: #C84B9A;
    color: white;
}

.checkout-btn:hover:not(:disabled) {
    background: #B8408A;
    transform: translateY(-2px);
}

.checkout-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.checkout-btn.secondary {
    background: transparent;
    border: 2px solid #C84B9A;
    color: #C84B9A;
}

.checkout-btn.secondary:hover {
    background: #FDF5FA;
}

/* Result States */
.result-content {
    text-align: center;
    padding: 50px 24px;
}

.result-state {
    animation: fadeIn 0.4s ease;
}

.result-state h2 {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.result-state p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
}

/* Loader */
.loader {
    width: 50px;
    height: 50px;
    border: 3px solid #eee;
    border-top-color: #C84B9A;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* MB WAY State */
.mbway-animation {
    margin-bottom: 24px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.mbway-timer {
    font-size: 32px;
    font-weight: 700;
    color: #C84B9A;
    margin-bottom: 24px;
    font-variant-numeric: tabular-nums;
}

/* Multibanco State */
.mb-icon-large {
    width: 80px;
    height: 50px;
    background: linear-gradient(135deg, #003366 0%, #002244 100%);
    color: white;
    font-weight: 800;
    font-size: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.reference-box {
    background: #F9F7F2;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.reference-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.reference-row:last-child {
    border-bottom: none;
}

.reference-row span {
    color: #888;
    font-size: 14px;
}

.reference-row strong {
    color: #333;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}

.reference-note {
    font-size: 13px !important;
    color: #888 !important;
}

/* Success/Error Icons */
.success-icon, .error-icon {
    margin-bottom: 20px;
}

.success-icon svg {
    animation: scaleIn 0.4s ease;
}

@keyframes scaleIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Footer */
.checkout-footer {
    padding: 20px;
    text-align: center;
}

.checkout-footer p {
    font-size: 12px;
    color: #888;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Step by Step Form */
.step-progress {
    margin-bottom: 30px;
}

.progress-bar {
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #C84B9A, #D946A8);
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 16.66%;
}

.progress-text {
    font-size: 12px;
    color: #999;
}

.step-form {
    position: relative;
    min-height: 200px;
}

.form-field {
    display: none;
    animation: slideIn 0.3s ease;
}

.form-field.active {
    display: block;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.field-label {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.3;
}

.field-hint {
    font-size: 13px;
    color: #888;
    margin-top: 10px;
    margin-bottom: 0;
}

.form-field input {
    font-size: 18px;
    padding: 18px 20px;
    border: 2px solid #eee;
    border-radius: 14px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.form-field input:focus {
    outline: none;
    border-color: #C84B9A;
}

.next-btn {
    width: 100%;
    padding: 18px;
    margin-top: 24px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    background: #C84B9A;
    color: white;
    transition: all 0.2s;
}

.next-btn:hover {
    background: #B8408A;
    transform: translateY(-2px);
}

.final-btn {
    background: linear-gradient(135deg, #32BCAD 0%, #28a99b 100%);
}

.final-btn:hover {
    background: linear-gradient(135deg, #28a99b 0%, #1f8f83 100%);
}

.address-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.address-fields .form-group {
    margin: 0;
}

.address-fields input {
    font-size: 16px;
    padding: 14px 16px;
}

/* Responsive */
@media (min-width: 481px) {
    .checkout-body {
        max-width: 480px;
        margin: 0 auto;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    }
}


/* PIX Specific Styles */
.pix-icon {
    margin-bottom: 16px;
}

.qr-code-container {
    background: white;
    padding: 16px;
    border-radius: 12px;
    display: inline-block;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.qr-code-container canvas {
    display: block;
}

.pix-copy-paste {
    width: 100%;
    margin: 20px 0;
}

.pix-copy-paste label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.copy-field {
    display: flex;
    gap: 8px;
}

.copy-field input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 12px;
    font-family: monospace;
    background: #f9f9f9;
}

.copy-btn {
    padding: 12px 20px;
    background: #32BCAD;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: #2aa89a;
}

.pix-timer {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.pix-timer span:last-child {
    font-weight: 700;
    color: #C84B9A;
    font-variant-numeric: tabular-nums;
}

.pix-note {
    font-size: 12px !important;
    color: #999 !important;
    margin-top: 12px !important;
}

/* Form Row */
.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    min-width: 0;
}

.form-row .form-group.flex-1 {
    flex: 1;
    max-width: 80px;
}

.form-row .form-group.flex-2 {
    flex: 2;
}

.form-row .form-group.flex-3 {
    flex: 3;
}

.form-row .form-group input {
    width: 100%;
    box-sizing: border-box;
}

/* Ensure all inputs have proper styling */
input[type="text"],
input[type="email"],
input[type="tel"] {
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
    background: white;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
    outline: none;
    border-color: #C84B9A;
    box-shadow: 0 0 0 3px rgba(200, 75, 154, 0.1);
}

input::placeholder {
    color: #aaa;
}


/* Shake animation for validation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.shake {
    animation: shake 0.4s ease;
    border-color: #E74C3C !important;
}
