/* Base Style */
.checkout-section {
	background-color: #f4f7fa;
	padding: 120px 20px;
	font-family: "Inter", sans-serif;
	color: #0b1b3f;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
}

.checkout-header {
	margin-bottom: 50px;
	text-align: center;
}
.checkout-title {
	font-size: 2.8rem;
	font-weight: 800;
	color: #023061;
	margin-bottom: 10px;
}
.checkout-header p {
	color: #64748b;
	font-size: 1.1rem;
}

/* Grid Layout */
.checkout-grid {
	display: grid;
	grid-template-columns: 1.2fr 0.8fr;
	gap: 40px;
	align-items: start;
}

/* Left Side: Product Card */
.product-card {
	background: #fff;
	border-radius: 24px;
	overflow: hidden;
	box-shadow: 0 20px 40px rgba(2, 48, 97, 0.05);
	border: 1px solid #e2e8f0;
}
.product-img {
	position: relative;
	height: 300px;
	overflow: hidden;
}
.product-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: 0.5s;
}
.product-card:hover .product-img img {
	transform: scale(1.05);
}
.badge-premium {
	position: absolute;
	top: 20px;
	left: 20px;
	background: rgba(2, 48, 97, 0.9);
	color: #fff;
	padding: 8px 16px;
	border-radius: 50px;
	font-size: 0.8rem;
	font-weight: 700;
	backdrop-filter: blur(5px);
}

.product-details {
	padding: 40px;
}
.product-details h2 {
	font-size: 1.8rem;
	color: #023061;
	margin-bottom: 15px;
	line-height: 1.3;
}
.vendor-info {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #64748b;
	margin-bottom: 25px;
}
.vendor-info ion-icon {
	color: #014a8f;
	font-size: 1.2rem;
}
.course-brief {
	padding: 20px;
	background: #f0f7ff;
	border-radius: 16px;
	margin-bottom: 30px;
	border-left: 4px solid #014a8f;
}
.course-brief p {
	font-size: 0.95rem;
	color: #334155;
	line-height: 1.6;
	margin: 0;
}

.course-features {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
	list-style: none;
	padding: 0;
}
.course-features li {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.9rem;
	color: #475569;
	font-weight: 500;
}
.course-features li ion-icon {
	color: #014a8f;
	font-size: 1.3rem;
}

/* Right Side: Payment Card */
.payment-card {
	background: #fff;
	border-radius: 24px;
	padding: 40px;
	border: 1px solid #e2e8f0;
	box-shadow: 0 20px 40px rgba(2, 48, 97, 0.05);
	position: sticky;
	top: 120px;
}
.payment-card h3 {
	font-size: 1.4rem;
	color: #023061;
	margin-bottom: 30px;
	font-weight: 700;
	border-bottom: 1px solid #f1f5f9;
	padding-bottom: 15px;
}

.billing-details {
	margin-bottom: 30px;
}
.billing-item {
	display: flex;
	justify-content: space-between;
	margin-bottom: 15px;
	color: #64748b;
	font-size: 0.95rem;
}
.billing-total {
	display: flex;
	justify-content: space-between;
	margin-top: 20px;
	font-weight: 800;
	color: #023061;
	font-size: 1.3rem;
}
.total-amount {
	color: #014a8f;
}

/* Coupon Toggle Custom Style */
.coupon-section {
	margin-bottom: 30px;
	padding: 20px;
	background: #f8fafc;
	border-radius: 16px;
	border: 1px dashed #cbd5e1;
}
.coupon-toggle {
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	font-weight: 600;
	color: #475569;
	font-size: 0.9rem;
}
.coupon-toggle input {
	display: none;
}
.checkmark {
	width: 20px;
	height: 20px;
	border: 2px solid #cbd5e1;
	border-radius: 6px;
	position: relative;
	transition: 0.3s;
}
.coupon-toggle input:checked + .checkmark {
	background: #014a8f;
	border-color: #014a8f;
}
.checkmark:after {
	content: "";
	position: absolute;
	display: none;
	left: 6px;
	top: 2px;
	width: 5px;
	height: 10px;
	border: solid white;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
.coupon-toggle input:checked + .checkmark:after {
	display: block;
}

.coupon-input-field {
	margin-top: 20px;
	animation: slideIn 0.3s ease-out;
}
.input-group {
	display: flex;
	gap: 10px;
}
.input-group input {
	flex: 1;
	padding: 12px 18px;
	border-radius: 12px;
	border: 1px solid #e2e8f0;
	outline: none;
	transition: 0.3s;
	font-size: 0.9rem;
}
.input-group input:focus {
	border-color: #014a8f;
	box-shadow: 0 0 0 4px rgba(1, 74, 143, 0.1);
}
.btn-apply {
	padding: 0 20px;
	background: #023061;
	color: #fff;
	border: none;
	border-radius: 12px;
	font-weight: 600;
	cursor: pointer;
}

/* Payment Methods */
.label-small {
	font-size: 0.8rem;
	text-transform: uppercase;
	color: #94a3b8;
	font-weight: 700;
	letter-spacing: 1px;
	display: block;
	margin-bottom: 12px;
}
.custom-select-wrapper {
	position: relative;
	margin-bottom: 20px;
}
.payment-select {
	width: 100%;
	padding: 14px 20px;
	border-radius: 14px;
	border: 1px solid #e2e8f0;
	appearance: none;
	font-weight: 600;
	color: #023061;
	outline: none;
	cursor: pointer;
	transition: 0.3s;
	background: #fff;
}
.payment-select:focus {
	border-color: #014a8f;
}
.select-icon {
	position: absolute;
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	color: #64748b;
}

/* Method Detail Panel */
.method-detail {
	display: none;
	padding: 25px;
	background: #f0f7ff;
	border-radius: 18px;
	border: 1px solid #d0e4ff;
	animation: fadeIn 0.4s ease;
	margin-top: 15px;
}
.method-detail img {
	height: 35px;
	margin-bottom: 15px;
	object-fit: contain;
}
.method-detail h4 {
	font-size: 1rem;
	color: #023061;
	margin-bottom: 10px;
	font-weight: 700;
}
.method-detail p {
	font-size: 0.85rem;
	color: #475569;
	line-height: 1.6;
	margin-bottom: 20px;
}

/* Buttons */
.btn-primary {
	background: linear-gradient(135deg, #023061, #014a8f);
	color: #fff;
	border: none;
	padding: 16px 28px;
	border-radius: 14px;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	transition: 0.3s;
	box-shadow: 0 10px 20px rgba(1, 74, 143, 0.2);
}
.btn-primary:hover {
	transform: translateY(-3px);
	box-shadow: 0 15px 30px rgba(1, 74, 143, 0.3);
}
.btn-full {
	width: 100%;
}
.mt-20 {
	margin-top: 20px;
}

/* Animations */
@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Responsive */
/* --- RESPONSIVE OPTIMIZATION --- */

/* Tablet & Landscape Mobile (max-width: 991px) */
@media (max-width: 991px) {
	.checkout-section {
		padding: 140px 15px;
	}

	.checkout-grid {
		grid-template-columns: 1fr; /* Stack kolom menjadi satu */
		gap: 30px;
	}

	.checkout-header {
		margin-bottom: 40px;
	}

	.checkout-title {
		font-size: 2.2rem;
	}

	/* Hilangkan sticky agar tidak menutupi konten lain saat di-scroll di tablet */
	.payment-card {
		position: static;
		padding: 30px;
	}

	.product-img {
		height: 250px;
	}
}

/* Smartphone / iPhone Pro Max (max-width: 430px) */
@media (max-width: 430px) {
	.checkout-section {
		padding: 140px 10px;
	}

	.checkout-title {
		font-size: 1.8rem;
	}

	.product-details {
		padding: 25px 20px;
	}

	.product-details h2 {
		font-size: 1.4rem;
	}

	.course-features {
		grid-template-columns: 1fr; /* List fitur jadi satu deret kebawah */
		gap: 12px;
	}

	/* Optimasi Payment Card untuk HP */
	.payment-card {
		padding: 25px 15px;
		border-radius: 20px;
	}

	.billing-total {
		font-size: 1.1rem;
	}

	/* Tombol lebih besar untuk jempol */
	.btn-primary {
		padding: 18px 20px;
		font-size: 0.95rem;
	}

	.input-group {
		flex-direction: column; /* Input kupon stack vertical */
	}

	.btn-apply {
		padding: 12px;
		width: 100%;
	}

	/* Detail instruksi pembayaran */
	.method-detail {
		padding: 20px 15px;
	}
}

/* Small Smartphone (max-width: 360px) */
@media (max-width: 360px) {
	.checkout-header p {
		font-size: 0.95rem;
	}

	.checkout-title {
		font-size: 1.6rem;
	}

	.badge-premium {
		font-size: 0.7rem;
		padding: 6px 12px;
		top: 15px;
		left: 15px;
	}

	.vendor-info {
		font-size: 0.85rem;
	}

	.course-brief {
		padding: 15px;
	}

	.course-brief p {
		font-size: 0.85rem;
	}

	.billing-item {
		font-size: 0.85rem;
	}

	.billing-total {
		font-size: 1rem;
	}

	.method-detail h4 {
		font-size: 0.9rem;
	}

	.method-detail p {
		font-size: 0.8rem;
		line-height: 1.5;
	}
}
