/* =============================================
   Checkout — Design System
   Inspired by modern Brazilian checkout UX
   ============================================= */



*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

:root {
	--font: 'Inter', system-ui, sans-serif;

	/* Cores */
	--bg: #f1f5f9;
	--surface: #ffffff;
	--border: #e2e8f0;
	--border-focus: #6366f1;

	--text-primary: #0f172a;
	--text-secondary: #475569;
	--text-muted: #94a3b8;

	--accent: #6366f1;
	--accent-hover: #4f46e5;

	--success: #16a34a;
	--success-bg: #f0fdf4;
	--success-border: #bbf7d0;

	--error: #dc2626;
	--error-bg: #fef2f2;
	--error-border: #fecaca;

	--warning: #d97706;
	--warning-bg: #fffbeb;

	--btn-pay: linear-gradient(135deg, #16a34a, #15803d);
	--btn-pay-hover: linear-gradient(135deg, #15803d, #166534);
	--shadow-btn: 0 4px 20px rgba(22, 163, 74, 0.35);

	--radius-sm: 6px;
	--radius: 10px;
	--radius-lg: 14px;

	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
	--shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
	--shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
}

body {
	font-family: var(--font);
	background: var(--bg);
	color: var(--text-primary);
	font-size: 15px;
	line-height: 1.6;
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}

/* =============================================
   Timer Banner
   ============================================= */
.timer-banner {
	background: linear-gradient(90deg, #7c3aed, #6366f1);
	color: #fff;
	text-align: center;
	padding: 10px 16px;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.3px;
	position: sticky;
	top: 0;
	z-index: 100;
}

.timer-banner .countdown {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-variant-numeric: tabular-nums;
}

.timer-banner .time {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 4px;
	padding: 1px 7px;
	font-size: 0.9rem;
	font-weight: 800;
}

/* =============================================
   Header
   ============================================= */
.checkout-header {
	background: #0f172a;
	padding: 14px 24px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.checkout-header img {
	height: 34px;
}

/* =============================================
   Layout Principal
   ============================================= */
.checkout-wrapper {
	max-width: 1020px;
	margin: 0 auto;
	padding: 28px 16px 60px;
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: 24px;
	align-items: start;
}

/* =============================================
   Cards / Panels
   ============================================= */
.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	overflow: hidden;
}

.card-header {
	padding: 18px 24px;
	border-bottom: 1px solid var(--border);
	display: flex;
	align-items: center;
	gap: 10px;
}

.card-header .step-badge {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--accent);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.card-header h2 {
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--text-primary);
}

.card-body {
	padding: 24px;
}

/* =============================================
   Form Elements
   ============================================= */
.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.form-row.full {
	grid-template-columns: 1fr;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.form-group label {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--text-secondary);
	letter-spacing: 0.2px;
}

.form-group input,
.form-group select {
	border: 1.5px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 10px 13px;
	font-size: 0.92rem;
	font-family: var(--font);
	color: var(--text-primary);
	background: #fff;
	transition: border-color 0.2s, box-shadow 0.2s;
	width: 100%;
	outline: none;
	appearance: none;
}

.form-group input:focus,
.form-group select:focus {
	border-color: var(--border-focus);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.form-group input.error,
.form-group select.error {
	border-color: var(--error);
}

.form-group .field-error {
	font-size: 0.77rem;
	color: var(--error);
	margin-top: -2px;
}

.form-group input::placeholder {
	color: var(--text-muted);
}

.form-spacer {
	height: 8px;
}

/* =============================================
   Payment Tabs
   ============================================= */
.payment-tabs {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
}

.payment-tab {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	padding: 12px 8px;
	border: 2px solid var(--border);
	border-radius: var(--radius);
	background: #fff;
	cursor: pointer;
	transition: all 0.2s;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--text-secondary);
}

.payment-tab svg {
	width: 24px;
	height: 24px;
}

.payment-tab:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.payment-tab.active {
	border-color: var(--accent);
	background: rgba(99, 102, 241, 0.06);
	color: var(--accent);
}

/* =============================================
   Installments Select
   ============================================= */
.installments-select {
	width: 100%;
	padding: 10px 13px;
	border: 1.5px solid var(--border);
	border-radius: var(--radius-sm);
	font-family: var(--font);
	font-size: 0.92rem;
	color: var(--text-primary);
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 13px center;
	appearance: none;
	cursor: pointer;
	transition: border-color 0.2s, box-shadow 0.2s;
	outline: none;
}

.installments-select:focus {
	border-color: var(--border-focus);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* =============================================
   Card Preview (visual do cartão)
   ============================================= */
.card-preview {
	background: linear-gradient(135deg, #1e293b, #334155);
	border-radius: var(--radius-lg);
	padding: 20px;
	margin-bottom: 20px;
	color: #fff;
	font-size: 0.85rem;
	position: relative;
	overflow: hidden;
	min-height: 90px;
}

.card-preview::before {
	content: '';
	position: absolute;
	top: -30px;
	right: -30px;
	width: 120px;
	height: 120px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.05);
}

.card-preview .card-number-display {
	font-size: 1.1rem;
	font-weight: 600;
	letter-spacing: 3px;
	margin-bottom: 8px;
	font-variant-numeric: tabular-nums;
}

.card-preview .card-info-row {
	display: flex;
	justify-content: space-between;
	font-size: 0.8rem;
	opacity: 0.8;
}

/* =============================================
   Pix Panel
   ============================================= */
.pix-waiting {
	text-align: center;
	padding: 24px;
}

.pix-waiting h3 {
	font-size: 1rem;
	font-weight: 700;
	margin-bottom: 8px;
}

.pix-waiting p {
	font-size: 0.88rem;
	color: var(--text-secondary);
	margin-bottom: 16px;
}

.pix-qr-img {
	width: 180px;
	height: 180px;
	margin: 0 auto 16px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 8px;
}

.pix-copy-box {
	display: flex;
	gap: 8px;
	margin-top: 12px;
}

.pix-copy-input {
	flex: 1;
	padding: 9px 12px;
	border: 1.5px solid var(--border);
	border-radius: var(--radius-sm);
	font-size: 0.78rem;
	color: var(--text-secondary);
	background: var(--bg);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pix-copy-btn {
	padding: 9px 16px;
	background: var(--accent);
	color: #fff;
	border: none;
	border-radius: var(--radius-sm);
	font-size: 0.82rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.2s;
}

.pix-copy-btn:hover {
	background: var(--accent-hover);
}

.pix-status {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
	padding: 10px 14px;
	border-radius: var(--radius-sm);
	font-size: 0.85rem;
	font-weight: 600;
}

.pix-status.pending {
	background: var(--warning-bg);
	color: var(--warning);
}

.pix-status.paid {
	background: var(--success-bg);
	color: var(--success);
}

.pix-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

/* =============================================
   Submit Button
   ============================================= */
.btn-submit {
	width: 100%;
	padding: 16px;
	background: var(--btn-pay);
	color: #fff;
	border: none;
	border-radius: var(--radius);
	font-size: 1rem;
	font-weight: 800;
	font-family: var(--font);
	cursor: pointer;
	transition: all 0.2s;
	box-shadow: var(--shadow-btn);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	margin-top: 20px;
}

.btn-submit:hover:not(:disabled) {
	background: var(--btn-pay-hover);
	transform: translateY(-1px);
	box-shadow: 0 6px 24px rgba(22, 163, 74, 0.4);
}

.btn-submit:active:not(:disabled) {
	transform: translateY(0);
}

.btn-submit:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.btn-submit .btn-spinner {
	width: 18px;
	height: 18px;
	border: 2.5px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

/* =============================================
   Feedback Messages
   ============================================= */
.feedback-box {
	padding: 14px 16px;
	border-radius: var(--radius-sm);
	font-size: 0.88rem;
	font-weight: 500;
	margin-top: 16px;
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.feedback-box.success {
	background: var(--success-bg);
	border: 1px solid var(--success-border);
	color: var(--success);
}

.feedback-box.error {
	background: var(--error-bg);
	border: 1px solid var(--error-border);
	color: var(--error);
}

/* =============================================
   Order Summary (Sidebar)
   ============================================= */
.order-summary {
	position: sticky;
	top: 52px;
}

.product-info {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--border);
}

.product-info img {
	width: 72px;
	border-radius: var(--radius-sm);
	flex-shrink: 0;
}

.product-info .product-details h3 {
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 4px;
}

.product-info .product-details .product-tag {
	font-size: 0.75rem;
	color: var(--text-muted);
}

.price-breakdown {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--border);
}

.price-row {
	display: flex;
	justify-content: space-between;
	font-size: 0.85rem;
	color: var(--text-secondary);
}

.price-row.total {
	font-size: 1rem;
	font-weight: 800;
	color: var(--text-primary);
}

.price-row.discount {
	color: var(--success);
}

.price-original {
	text-decoration: line-through;
	color: var(--text-muted);
	font-size: 0.8rem;
}

/* =============================================
   Trust / Guarantee Badges
   ============================================= */
.trust-section {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.trust-item {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.82rem;
	color: var(--text-secondary);
}

.trust-item svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	color: var(--success);
}

.guarantee-badge {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	background: var(--success-bg);
	border: 1px solid var(--success-border);
	border-radius: var(--radius);
	margin-top: 16px;
}

.guarantee-badge img {
	width: 46px;
}

.guarantee-badge p {
	font-size: 0.8rem;
	color: var(--success);
	font-weight: 600;
	line-height: 1.4;
}

.security-badge {
	margin-top: 14px;
	text-align: center;
}

.security-badge img {
	height: 28px;
	margin: 0 auto;
	opacity: 0.7;
}

/* =============================================
   Bumps Header Banner
   ============================================= */
.bumps-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
	padding: 10px 14px;
	background: linear-gradient(90deg, #7c3aed, #6366f1);
	color: #fff;
	border-radius: var(--radius);
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.3px;
}

/* =============================================
   Order Bump
   ============================================= */
.order-bump {
	border: 2px dashed #f97316;
	border-radius: var(--radius-lg);
	background: #fff7ed;
	margin-top: 10px;
	overflow: hidden;
}

.order-bump-header {
	background: #f97316;
	color: #fff;
	padding: 7px 14px;
	font-size: 0.76rem;
	font-weight: 800;
	text-align: center;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.order-bump-body {
	padding: 14px 14px 14px 16px;
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.order-bump-body input[type='checkbox'] {
	width: 18px;
	height: 18px;
	margin-top: 3px;
	flex-shrink: 0;
	accent-color: #f97316;
	cursor: pointer;
}

.order-bump-body label h4 {
	font-size: 0.85rem;
	font-weight: 800;
	margin-bottom: 5px;
	color: var(--text-primary);
	line-height: 1.3;
}

.order-bump-body label p {
	font-size: 0.8rem;
	color: var(--text-secondary);
	margin-bottom: 7px;
	line-height: 1.5;
}

.order-bump-price {
	display: block;
	font-size: 0.9rem;
	font-weight: 700;
	color: #f97316;
	margin-bottom: 8px;
}

.order-bump-price s {
	font-weight: 400;
	color: var(--text-muted);
	font-size: 0.8rem;
}

.bump-badge {
	display: inline-block;
	padding: 2px 8px;
	background: #7c3aed;
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	border-radius: var(--radius-full, 9999px);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 6px;
}

.bump-checkbox-label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.8rem;
	font-weight: 700;
	color: #f97316;
	border-top: 1px dashed #fed7aa;
	padding-top: 8px;
	margin-top: 4px;
}

/* =============================================
   Success Screen
   ============================================= */
.success-screen {
	max-width: 540px;
	margin: 60px auto;
	text-align: center;
	padding: 0 16px;
}

.success-icon {
	width: 72px;
	height: 72px;
	background: var(--success-bg);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 24px;
}

.success-icon svg {
	width: 36px;
	height: 36px;
	color: var(--success);
}

.success-screen h1 {
	font-size: 1.6rem;
	font-weight: 800;
	margin-bottom: 12px;
}

.success-screen p {
	font-size: 1rem;
	color: var(--text-secondary);
	margin-bottom: 8px;
}

/* =============================================
   Footer
   ============================================= */
.checkout-footer {
	text-align: center;
	padding: 24px 16px;
	font-size: 0.78rem;
	color: var(--text-muted);
	border-top: 1px solid var(--border);
	background: var(--surface);
	margin-top: 40px;
}

/* =============================================
   Mobile Responsive
   ============================================= */
@media (max-width: 768px) {
	.checkout-wrapper {
		grid-template-columns: 1fr;
		padding: 16px 12px 40px;
		gap: 16px;
	}

	.order-summary {
		position: static;
		order: -1;
	}

	.form-row {
		grid-template-columns: 1fr;
	}

	.card-body {
		padding: 16px;
	}

	.payment-tab span {
		display: none;
	}

	.payment-tab {
		padding: 12px;
	}
}
