/**
 * Cart + Enquiry checkout layout (matches Aflex reference).
 *
 * @package Aflex
 */

/* -------------------------------------------------------------------------
   Cart page
   ------------------------------------------------------------------------- */

.aflex-cart-page {
	padding: 2rem 0 4rem;
	background: #fff;
}

.aflex-cart-page__title {
	font-size: clamp(1.75rem, 4vw, 2.25rem);
	font-weight: 600;
	color: #143475;
	margin: 0 0 1.5rem;
}

.aflex-cart-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 1px solid #e8e8e8;
}

.aflex-cart-table thead th {
	background: #f3f4f6;
	padding: 0.85rem 1rem;
	text-align: left;
	font-size: 0.95rem;
	font-weight: 600;
	color: #333;
	border-bottom: 1px solid #e8e8e8;
}

.aflex-cart-table tbody td {
	padding: 1rem;
	vertical-align: middle;
	border-bottom: 1px solid #eee;
}

.aflex-cart-product {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
}

.aflex-cart-product__thumb img {
	width: 72px;
	height: 72px;
	object-fit: contain;
	display: block;
	background: #f8f8f8;
}

.aflex-cart-product__info {
	font-size: 1rem;
	font-weight: 600;
	color: #1e3155;
}

.aflex-cart-qty-row {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 1rem;
	flex-wrap: wrap;
}

.aflex-cart-table .quantity {
	display: inline-flex;
	align-items: center;
	border: 1px solid #ccc;
	background: #fff;
}

.aflex-cart-table .quantity .qty {
	width: 3rem;
	text-align: center;
	border: 0;
	padding: 0.4rem;
}

.aflex-cart-remove {
	font-size: 1.5rem;
	line-height: 1;
	text-decoration: none;
	color: #666;
	padding: 0.25rem 0.5rem;
}

.aflex-cart-table .actions {
	padding: 1rem;
	background: #fafafa;
}

.aflex-cart-table .actions .coupon {
	margin-bottom: 0.75rem;
}

.aflex-cart-page__footer {
	display: flex;
	justify-content: flex-end;
	gap: 1rem;
	margin-top: 2rem;
	flex-wrap: wrap;
}

.aflex-cart-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 180px;
	padding: 0.75rem 1.5rem;
	font-size: 1rem;
	font-weight: 500;
	text-decoration: none;
	transition: background 0.2s, color 0.2s, border 0.2s;
}

.aflex-cart-btn--outline {
	border: 1px solid #143475;
	color: #143475;
	background: #fff;
}

.aflex-cart-btn--outline:hover {
	background: #f0f4fb;
}

.aflex-cart-btn--primary {
	border: 1px solid #143475;
	background: #143475;
	color: #fff;
}

.aflex-cart-btn--primary:hover {
	background: #0f2d5c;
	border-color: #0f2d5c;
}

.aflex-cart-collaterals-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* -------------------------------------------------------------------------
   Checkout — two columns
   ------------------------------------------------------------------------- */

.aflex-checkout-form {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem 1rem 4rem;
}

.aflex-enquiry-checkout {
	display: grid;
	grid-template-columns: 1fr 380px;
	gap: 2.5rem;
	align-items: start;
}

@media (max-width: 991px) {
	.aflex-enquiry-checkout {
		grid-template-columns: 1fr;
	}
}

.aflex-enquiry-checkout__title {
	font-size: clamp(1.75rem, 4vw, 2.25rem);
	font-weight: 600;
	color: #143475;
	margin: 0 0 1.5rem;
}

.aflex-enquiry-checkout__fields .woocommerce-billing-fields__field-wrapper,
.aflex-enquiry-checkout__fields .woocommerce-shipping-fields__field-wrapper {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem 1.25rem;
}

.aflex-enquiry-checkout__fields .form-row-wide,
.aflex-enquiry-checkout__fields #order_comments_field {
	grid-column: 1 / -1;
}

.aflex-enquiry-checkout__fields .form-row label {
	font-size: 0.9rem;
	color: #333;
	margin-bottom: 0.35rem;
}

.aflex-enquiry-checkout__fields .input-text,
.aflex-enquiry-checkout__fields textarea,
.aflex-enquiry-checkout__fields select {
	width: 100%;
	border: 1px solid #ccc;
	padding: 0.65rem 0.75rem;
	font-size: 0.95rem;
}

.aflex-enquiry-checkout__sidebar {
	background: #f3f4f6;
	padding: 1.5rem;
	border: 1px solid #e5e7eb;
	position: sticky;
	top: 1rem;
}

.aflex-enquiry-checkout__sidebar-title {
	font-size: 1.15rem;
	font-weight: 600;
	color: #143475;
	margin: 0 0 1rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid #ddd;
}

.aflex-review-order-table thead {
	display: none;
}

.aflex-review-order-table .aflex-review-line-total {
	display: none;
}

.aflex-review-product__inner {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
}

.aflex-review-thumb img {
	width: 56px;
	height: 56px;
	object-fit: contain;
	background: #fff;
}

.aflex-review-name {
	display: block;
	font-weight: 600;
	color: #143475;
	margin-bottom: 0.25rem;
}

.aflex-review-qty {
	display: block;
	font-size: 0.9rem;
	color: #5f5f5f;
}

/* Totals in sidebar — compact */
.aflex-order-review .shop_table tfoot th,
.aflex-order-review .shop_table tfoot td {
	padding: 0.5rem 0;
	font-size: 0.95rem;
}

.aflex-order-review .order-total th,
.aflex-order-review .order-total td {
	font-size: 1.05rem;
	font-weight: 600;
	padding-top: 0.75rem;
	border-top: 1px solid #ddd;
}

.aflex-order-review #payment {
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid #ddd;
}

.aflex-order-review #place_order {
	width: 100%;
	background: #143475 !important;
	color: #fff !important;
	border: 1px solid #143475 !important;
	padding: 0.85rem 1rem !important;
	font-size: 1rem !important;
	text-transform: none;
	border-radius: 0;
}

.aflex-order-review #place_order:hover {
	background: #0f2d5c !important;
	border-color: #0f2d5c !important;
}

/* Hide duplicate “Your order” heading if present */
.aflex-order-review > h3#order_review_heading {
	display: none;
}

/* Enquiry checkout: no payment — hide price breakdown in sidebar (design reference) */
body.aflex-enquiry-no-payment .aflex-order-review .woocommerce-checkout-review-order-table tfoot {
	display: none;
}

body.aflex-enquiry-no-payment .aflex-order-review .wc_payment_methods {
	display: none !important;
}

/* -------------------------------------------------------------------------
   Thank you / enquiry submitted
   ------------------------------------------------------------------------- */

.aflex-thankyou-wrap {
	padding: 3rem 1rem 5rem;
	max-width: 720px;
	margin: 0 auto;
	text-align: center;
}

.aflex-thankyou__title {
	font-size: clamp(1.75rem, 4vw, 2.25rem);
	font-weight: 600;
	color: #143475;
	margin: 0 0 1rem;
}

.aflex-thankyou__lead {
	font-size: 1.05rem;
	color: #444;
	margin: 0 0 2rem;
}

.aflex-thankyou__box {
	background: #f3f4f6;
	border: 1px solid #e5e7eb;
	padding: 1.5rem 2rem;
	margin: 0 auto 2.5rem;
	max-width: 480px;
	text-align: left;
}

.aflex-thankyou__row {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.5rem 0;
	font-size: 1rem;
	border-bottom: 1px solid #e0e0e0;
}

.aflex-thankyou__row:last-child {
	border-bottom: 0;
}

.aflex-thankyou__label {
	color: #555;
	font-weight: 500;
}

.aflex-thankyou__value {
	color: #143475;
	font-weight: 600;
}

.aflex-thankyou__actions {
	display: flex;
	justify-content: center;
	gap: 1rem;
	flex-wrap: wrap;
}

.aflex-enquiry-checkout {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.aflex-enquiry-checkout__main {
    flex: 1;
    min-width: 300px;
}

.aflex-enquiry-checkout__sidebar {
    width: 380px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    align-self: flex-start;
}

.aflex-cart-summary-box {
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
}

.aflex-cart-item {
    display: flex;
    gap: 15px;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.aflex-cart-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.aflex-cart-item__thumb img {
    width: 70px;
    height: auto;
    object-fit: contain;
}

.aflex-privacy-note {
    font-size: 0.95rem;
    color: #555;
    margin: 20px 0;
    line-height: 1.5;
}

.aflex-privacy-note a {
    color: #0066cc;
    text-decoration: underline;
}

.aflex-enquire-btn {
    width: 100%;
    background: #6f42c1;           /* purple like your screenshot */
    color: #fff;
    padding: 14px;
    border: none;
    border-radius: 4px;
    font-size: 1.05rem;
    cursor: pointer;
}

/* Hide unwanted totals & default button */
.woocommerce-checkout-review-order-table .cart-subtotal,
.woocommerce-checkout-review-order-table .order-total,
.woocommerce-checkout #payment,
.woocommerce-checkout .woocommerce-additional-fields__title {
    display: none !important;
}
