/* Checkout page — matches Peptech Pharma WC Blocks checkout */

.site-content--checkout,
body.woocommerce-checkout #site-content,
body:has(.wc-block-checkout) #site-content {
	max-width: 1120px;
	margin: 0 auto;
	padding: 40px 50px 80px;
	font-family: var(--pt-font);
	color: #1a1916;
}

.checkout-page-title {
	margin: 0 0 28px;
	font-family: var(--pt-font);
	font-size: clamp(36px, 5vw, 48px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: #000;
}

/* Two-column layout */
.wp-block-woocommerce-checkout.wc-block-checkout,
.wc-block-checkout {
	width: 100%;
}

.wc-block-components-sidebar-layout,
.wp-block-woocommerce-checkout .wc-block-components-sidebar-layout {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 48px;
	margin: 0;
}

.wc-block-components-main,
.wp-block-woocommerce-checkout-fields-block,
.wc-block-checkout__main {
	flex: 1 1 0;
	min-width: min(100%, 520px);
	width: auto !important;
	padding-right: 0 !important;
}

.wc-block-components-sidebar,
.wp-block-woocommerce-checkout-totals-block,
.wc-block-checkout__sidebar {
	flex: 0 1 380px;
	width: 380px !important;
	max-width: 100%;
	margin: 0 !important;
	padding-left: 0 !important;
}

/* Express checkout */
.wc-block-components-express-payment,
.wp-block-woocommerce-checkout-express-payment-block {
	margin: 0 0 28px;
}

.wc-block-components-express-payment__title-container {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
}

.wc-block-components-express-payment__title-container::before,
.wc-block-components-express-payment__title-container::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #d8d5cf;
}

.wc-block-components-express-payment__title {
	margin: 0;
	font-family: var(--pt-font);
	font-size: 14px;
	font-weight: 500;
	color: #1a1916;
	white-space: nowrap;
}

.wc-block-components-express-payment__event-buttons {
	display: flex;
	justify-content: center;
}

.wc-block-components-express-payment .wc-block-components-express-payment__event-buttons > * {
	width: 100%;
	max-width: 100%;
}

/* Or continue below */
.wc-block-components-express-payment-continue-rule,
.wc-block-checkout__actions-left {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 8px 0 32px;
	font-family: var(--pt-font);
	font-size: 14px;
	color: #7a7770;
}

.wc-block-components-express-payment-continue-rule::before,
.wc-block-components-express-payment-continue-rule::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #d8d5cf;
}

/* Step headings */
.wc-block-components-checkout-step__heading,
.wc-block-components-checkout-step__title,
.wc-block-components-title {
	font-family: var(--pt-font) !important;
	font-size: 22px !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	color: #000 !important;
	margin: 0 0 16px !important;
}

.wc-block-components-checkout-step {
	margin: 0 0 36px !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
}

.wc-block-components-checkout-step__container {
	padding: 0 !important;
}

.wc-block-components-checkout-step__description {
	display: none;
}

/* Form fields */
.wc-block-components-text-input input,
.wc-block-components-textarea textarea,
.wc-blocks-components-select .components-input-control__input,
.wc-blocks-components-select select,
.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input,
.wc-block-components-text-input .wc-block-components-text-input__input {
	font-family: var(--pt-font) !important;
	font-size: 15px !important;
	color: #1a1916 !important;
	border-color: #c8c4bc !important;
	border-radius: 6px !important;
	min-height: 48px;
	background: #fff !important;
	box-shadow: none !important;
}

.wc-block-components-text-input label,
.wc-blocks-components-select label,
.wc-block-components-combobox label {
	font-family: var(--pt-font) !important;
	color: #7a7770 !important;
}

.wc-block-components-text-input.is-active input,
.wc-block-components-text-input input:focus,
.wc-blocks-components-select .components-input-control__container:focus-within {
	border-color: #1a1916 !important;
	outline: none !important;
	box-shadow: none !important;
}

.wc-block-components-checkbox {
	margin-top: 12px !important;
}

.wc-block-components-checkbox label {
	font-family: var(--pt-font);
	font-size: 14px;
	line-height: 1.45;
	color: #4a4740;
}

.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"] {
	border-radius: 3px;
	border-color: #c8c4bc;
}

/* Address form grid */
.wc-block-components-address-form {
	gap: 12px !important;
}

.wc-block-components-address-form .wc-block-components-text-input,
.wc-block-components-address-form .wc-block-components-state-input,
.wc-block-components-address-form .wc-block-components-country-input,
.wc-block-components-address-form .wc-blocks-components-select {
	margin: 0 !important;
}

a.wc-block-components-address-card__edit,
.wc-block-components-address-form__address_2-toggle,
button.wc-block-components-address-form__address_2-toggle {
	font-family: var(--pt-font);
	font-size: 13px;
	color: #6ec1e4 !important;
	text-decoration: none;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

/* Order summary panel */
.wp-block-woocommerce-checkout-order-summary-block,
.wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-block {
	border: 1px solid #ddd9d1 !important;
	border-radius: 8px !important;
	background: #fafafa !important;
	padding: 20px 20px 16px !important;
	box-sizing: border-box;
}

.wc-block-components-checkout-order-summary__title,
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title {
	margin: 0 0 16px !important;
	padding: 0 !important;
	font-family: var(--pt-font) !important;
	font-size: 18px !important;
	font-weight: 600 !important;
	color: #000 !important;
	border: 0 !important;
}

.wc-block-components-order-summary {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}

.wc-block-components-order-summary-item {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 14px 0 !important;
	border-bottom: 1px solid #e8e4dc !important;
	border-top: 0 !important;
}

.wc-block-components-order-summary-item:first-child {
	padding-top: 4px !important;
}

.wc-block-components-order-summary-item__image {
	position: relative;
	width: 56px;
	flex: 0 0 56px;
}

.wc-block-components-order-summary-item__image img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 4px;
	display: block;
}

.wc-block-components-order-summary-item__quantity {
	position: absolute !important;
	top: -8px !important;
	right: -8px !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px !important;
	background: #000 !important;
	color: #fff !important;
	font-family: var(--pt-font) !important;
	font-size: 11px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	border: 2px solid #fafafa !important;
	box-shadow: none !important;
}

.wc-block-components-order-summary-item__description {
	flex: 1;
	min-width: 0;
}

.wc-block-components-product-name,
.wc-block-components-order-summary-item__description h3,
.wc-block-checkout__sidebar .wc-block-components-product-name {
	font-family: var(--pt-font) !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	color: #000 !important;
	margin: 0 0 4px !important;
	line-height: 1.3 !important;
}

.wc-block-components-product-metadata,
.wc-block-components-product-details {
	font-family: var(--pt-font);
	font-size: 13px;
	color: #7a7770;
	line-height: 1.4;
}

.wc-block-components-order-summary-item__total-price,
.wc-block-components-order-summary-item__individual-prices {
	font-family: var(--pt-font);
	font-size: 15px;
	font-weight: 600;
	color: #000;
	white-space: nowrap;
}

/* Coupons */
.wc-block-components-totals-coupon {
	border-top: 1px solid #e8e4dc !important;
	border-bottom: 0 !important;
	padding: 14px 0 !important;
	margin: 0 !important;
}

.wc-block-components-panel__button,
.wc-block-components-totals-coupon .wc-block-components-panel__button {
	font-family: var(--pt-font) !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	color: #1a1916 !important;
	padding: 0 !important;
}

/* Totals */
.wc-block-components-totals-wrapper {
	border-top: 1px solid #e8e4dc !important;
	padding: 12px 0 !important;
	margin: 0 !important;
}

.wc-block-components-totals-item {
	font-family: var(--pt-font);
	font-size: 14px;
	color: #1a1916;
	padding: 6px 0 !important;
}

.wc-block-components-totals-item__label {
	font-weight: 400;
}

.wc-block-components-totals-item__value {
	font-weight: 500;
}

.wc-block-components-totals-shipping .wc-block-components-totals-item__description,
.wc-block-components-totals-shipping .wc-block-components-totals-item__value {
	color: #9a968e;
	font-weight: 400;
	font-size: 13px;
}

.wc-block-components-totals-footer-item {
	border-top: 1px solid #d8d5cf !important;
	margin-top: 8px !important;
	padding-top: 14px !important;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value .wc-block-formatted-money-amount {
	font-family: var(--pt-font) !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	color: #000 !important;
}

/* Place order */
.wc-block-components-checkout-place-order-button,
.wc-block-checkout__actions .wc-block-components-checkout-place-order-button {
	background: #000 !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 0 !important;
	font-family: var(--pt-font) !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	min-height: 48px;
	padding: 12px 24px !important;
}

.wc-block-components-checkout-place-order-button:hover {
	opacity: 0.88;
	color: #fff !important;
}

/* Hide cart button on checkout (matches reference header) */
body.woocommerce-checkout .site-header__cart,
body:has(.wc-block-checkout) .site-header__cart {
	display: none;
}

/* Classic shortcode checkout fallback */
form.woocommerce-checkout {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
	gap: 48px;
	align-items: start;
	max-width: 1120px;
	margin: 0 auto;
}

form.woocommerce-checkout #customer_details {
	width: 100%;
	float: none;
}

form.woocommerce-checkout #order_review_heading,
form.woocommerce-checkout #order_review {
	width: 100%;
	float: none;
}

form.woocommerce-checkout #order_review {
	border: 1px solid #ddd9d1;
	border-radius: 8px;
	background: #fafafa;
	padding: 20px;
}

@media (max-width: 900px) {
	.site-content--checkout,
	body.woocommerce-checkout #site-content,
	body:has(.wc-block-checkout) #site-content {
		padding: 28px 20px 60px;
	}

	.wc-block-components-sidebar-layout,
	.wp-block-woocommerce-checkout .wc-block-components-sidebar-layout {
		flex-direction: column;
		gap: 32px;
	}

	.wc-block-components-sidebar,
	.wp-block-woocommerce-checkout-totals-block,
	.wc-block-checkout__sidebar {
		flex-basis: auto;
		width: 100% !important;
	}

	form.woocommerce-checkout {
		grid-template-columns: 1fr;
		gap: 28px;
		padding: 0 20px 60px;
	}
}

@media (max-width: 480px) {
	.site-content--checkout,
	body.woocommerce-checkout #site-content,
	body:has(.wc-block-checkout) #site-content {
		padding: 16px 12px 40px;
	}

	.wc-block-components-text-input input,
	.wc-block-components-textarea textarea,
	.woocommerce form .form-row input.input-text,
	.woocommerce form .form-row textarea {
		font-size: 16px; /* prevents iOS zoom */
	}
}
