/* Styling for the client-side cart/checkout, layered on top of the existing theme. */

#simple-cart-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%) translateY(20px);
	background: #2c3e50;
	color: #fff;
	padding: 12px 20px;
	border-radius: 6px;
	font-size: 14px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.25s ease;
	z-index: 9999;
	max-width: 90vw;
}

#simple-cart-toast.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.simple-cart-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 2em;
}

.simple-cart-table th,
.simple-cart-table td {
	padding: 12px 10px;
	border-bottom: 1px solid #eee;
	text-align: left;
	vertical-align: middle;
}

.simple-cart-table .thumb img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 4px;
}

.simple-cart-table .simple-qty-input {
	width: 60px;
	padding: 6px;
}

.simple-remove-btn {
	background: none;
	border: none;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: #c0392b;
}

#simple-clear-cart-btn {
	background: none;
	border: 1px solid #c0392b;
	color: #c0392b;
	padding: 8px 16px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
}

.simple-cart-totals {
	max-width: 420px;
	margin-left: auto;
	border: 1px solid #eee;
	border-radius: 6px;
	padding: 20px;
}

.simple-cart-totals table {
	width: 100%;
	margin-bottom: 16px;
}

.simple-cart-totals th,
.simple-cart-totals td {
	padding: 8px 0;
	text-align: left;
}

.simple-cart-totals td {
	text-align: right;
}

/* ---------- Checkout redesign ---------- */

.wc-page-title {
	font-size: 40px;
	font-weight: 700;
	color: #14141f;
	margin: 0 0 40px;
}

.wc-checkout-layout {
	display: grid;
	grid-template-columns: 1fr 380px;
	gap: 64px;
	align-items: start;
}

.wc-section h2 {
	font-size: 24px;
	font-weight: 700;
	color: #14141f;
	margin: 0 0 16px;
}

.wc-section {
	margin-bottom: 32px;
}

.wc-input {
	display: block;
	width: 100%;
	padding: 16px;
	border: 1px solid #d3d3da;
	border-radius: 8px;
	font-size: 16px;
	font-family: inherit;
	color: #14141f;
	background: #fff;
	margin-bottom: 16px;
	box-sizing: border-box;
}

.wc-input::placeholder {
	color: #8b8b95;
}

.wc-input:focus {
	outline: none;
	border-color: #14141f;
}

.wc-hint {
	font-size: 14px;
	color: #6b6b76;
	margin: -8px 0 0;
}

.wc-row-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.wc-select-field {
	position: relative;
	border: 1px solid #d3d3da;
	border-radius: 8px;
	padding: 8px 16px 8px;
	margin-bottom: 16px;
}

.wc-select-field label {
	display: block;
	font-size: 12px;
	color: #6b6b76;
	margin-bottom: 2px;
}

.wc-select-field select {
	width: 100%;
	border: none;
	padding: 0;
	font-size: 16px;
	color: #14141f;
	background: transparent;
	appearance: none;
	font-family: inherit;
}

.wc-select-field:after {
	content: '\25BE';
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: #6b6b76;
	pointer-events: none;
}

.wc-link-btn {
	background: none;
	border: none;
	color: #333;
	font-size: 15px;
	cursor: pointer;
	padding: 0;
	margin-bottom: 16px;
	display: inline-block;
	font-family: inherit;
}

.wc-link-btn:hover {
	text-decoration: underline;
}

.wc-payment-notice {
	display: flex;
	align-items: center;
	gap: 12px;
	background: #fdecea;
	border: 1px solid #f3b4ae;
	border-radius: 8px;
	padding: 16px 18px;
	color: #611a15;
	font-size: 15px;
}

.wc-payment-notice-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #c0392b;
	color: #fff;
	font-size: 13px;
	flex-shrink: 0;
}

.wc-payment-options {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.wc-payment-option {
	display: flex;
	align-items: center;
	gap: 10px;
	border: 1px solid #d3d3da;
	border-radius: 8px;
	padding: 14px 16px;
	font-size: 15px;
	cursor: pointer;
}

.wc-note-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	color: #14141f;
	margin: 8px 0 20px;
	cursor: pointer;
}

.wc-order-note {
	margin-top: -8px;
}

.wc-terms {
	font-size: 13px;
	color: #6b6b76;
	line-height: 1.6;
	margin-bottom: 24px;
}

.wc-terms a {
	color: #14141f;
}

.wc-checkout-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
}

.wc-return-link {
	color: #555;
	font-size: 15px;
	text-decoration: underline;
}

.wc-place-order-btn {
	background: #eec17a;
	border: none;
	border-radius: 999px;
	padding: 16px 48px;
	font-size: 17px;
	font-weight: 700;
	color: #14141f;
	cursor: pointer;
	font-family: inherit;
	transition: background 0.2s ease;
}

.wc-place-order-btn:hover {
	background: #e5b567;
}

.wc-order-summary {
	border: 1px solid #e3e3e8;
	border-radius: 16px;
	padding: 28px;
	background: #fff;
}

.wc-order-summary h2 {
	font-size: 22px;
	font-weight: 700;
	color: #14141f;
	margin: 0 0 20px;
}

.wc-summary-items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wc-summary-item {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid #eee;
}

.wc-summary-thumb {
	position: relative;
	width: 56px;
	height: 56px;
	flex-shrink: 0;
}

.wc-summary-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid #eee;
}

.wc-qty-badge {
	position: absolute;
	top: -8px;
	right: -8px;
	background: #333;
	color: #fff;
	font-size: 11px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #fff;
}

.wc-summary-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.wc-summary-info strong {
	font-size: 15px;
	font-weight: 600;
	color: #14141f;
}

.wc-summary-desc {
	font-size: 13px;
	color: #8b8b95;
}

.wc-summary-price {
	font-size: 15px;
	font-weight: 600;
	color: #14141f;
	white-space: nowrap;
}

#wc-coupon-toggle.wc-coupon-toggle {
	width: 100% !important;
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	background: none !important;
	border: none !important;
	border-top: 1px solid #eee !important;
	border-bottom: 1px solid #eee !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	padding: 14px 0 !important;
	margin: 0 !important;
	font-size: 15px !important;
	font-weight: 400 !important;
	line-height: 1.4 !important;
	color: #6b6f80 !important;
	cursor: pointer;
	font-family: inherit;
	text-align: left;
}

.wc-chevron {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease;
	font-size: 12px;
	line-height: 1;
}

.wc-coupon-toggle.is-open .wc-chevron {
	transform: rotate(180deg);
}

.wc-coupon-panel {
	padding: 16px 0;
}

.wc-coupon-row {
	display: flex;
	gap: 8px;
}

.wc-coupon-row .wc-input {
	margin-bottom: 0;
}

.wc-coupon-apply {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	height: 52px !important;
	padding: 0 20px !important;
	margin: 0 !important;
	border-radius: 8px !important;
	border: 1px solid #14141f !important;
	background: #14141f !important;
	color: #fff !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 1 !important;
	cursor: pointer;
	font-family: inherit;
	white-space: nowrap;
}

.wc-coupon-msg {
	font-size: 13px;
	color: #c0392b;
	margin: 8px 0 0;
}

.wc-summary-row {
	display: flex;
	justify-content: space-between;
	padding: 10px 0;
	font-size: 15px;
}

.wc-summary-row span:first-child {
	color: #6b6f80;
}

.wc-summary-row span:last-child {
	color: #14141f;
	font-weight: 500;
}

.wc-summary-total {
	border-top: 1px solid #e3e3e8;
	margin-top: 8px;
	padding-top: 16px;
}

.wc-summary-total span:first-child,
.wc-summary-total span:last-child {
	font-size: 20px;
	font-weight: 700;
	color: #14141f;
}

.wc-order-received {
	max-width: 640px;
}

.wc-order-success {
	background: #eef7ee;
	color: #2f7a2f;
	border: 1px solid #cbe8cb;
	border-radius: 8px;
	padding: 16px 20px;
	font-size: 15px;
}

.wc-order-overview {
	list-style: none;
	padding: 0;
	margin: 24px 0;
	border: 1px solid #e3e3e8;
	border-radius: 8px;
}

.wc-order-overview li {
	display: flex;
	justify-content: space-between;
	padding: 12px 20px;
	border-bottom: 1px solid #eee;
	font-size: 15px;
}

.wc-order-overview li:last-child {
	border-bottom: none;
}

.wc-order-overview li span {
	color: #6b6b76;
}

.order-details-list {
	list-style: none;
	padding: 0;
	margin: 0 0 20px;
}

.order-details-list li {
	padding: 6px 0;
	border-bottom: 1px solid #eee;
}

@media (max-width: 800px) {
	.wc-checkout-layout {
		grid-template-columns: 1fr;
	}
	.wc-row-2 {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 600px) {
	.simple-cart-table thead {
		display: none;
	}
	.simple-cart-table tr {
		display: flex;
		flex-wrap: wrap;
		border-bottom: 1px solid #ddd;
		padding: 10px 0;
	}
	.simple-cart-table td {
		border-bottom: none;
		padding: 4px 10px;
	}
}

/* AXAIPAY payment method */
.woocommerce-checkout-payment ul.wc_payment_methods { list-style: none; margin: 0 0 16px; padding: 0; }
.woocommerce-checkout-payment .wc_payment_method label { font-weight: 600; margin-left: 8px; }
.woocommerce-checkout-payment .payment_box { background: #f7f7f7; border-radius: 8px; padding: 12px 16px; margin-top: 8px; font-size: 0.9em; }
.woocommerce-checkout-payment .payment_box p { margin: 0; }
