/*
 * Shared Artwork system pages.
 * Lightweight layer for untouched WordPress and WooCommerce states.
 */

:root {
	--aw-system-ink: #090909;
	--aw-system-muted: #6f6f76;
	--aw-system-line: #e5e5e5;
	--aw-system-soft: #f6f6f6;
	--aw-system-paper: #fff;
}

.aw-system-page,
.woocommerce-checkout .wd-content-area,
.woocommerce-order-received .wd-content-area {
	background: var(--aw-system-paper);
	color: var(--aw-system-ink);
}

.aw-system-page {
	direction: rtl;
}

.aw-system-hero {
	position: relative;
	overflow: hidden;
	max-width: 1240px;
	margin: 0 auto;
	padding: clamp(56px, 8vw, 118px) 24px clamp(44px, 6vw, 86px);
	text-align: right;
	border-bottom: 1px solid var(--aw-system-line);
}

.aw-system-hero::before,
.woocommerce-checkout .wd-content-area::before,
.woocommerce-order-received .wd-content-area::before {
	content: "";
	position: absolute;
	inset: 0 auto auto 0;
	width: min(760px, 72vw);
	height: min(360px, 42vw);
	pointer-events: none;
	background: url("../brand/artwork-pattern-transparent.webp") top left / 520px auto repeat;
	opacity: .34;
	mask-image: linear-gradient(135deg, #000 0%, rgba(0, 0, 0, .58) 36%, rgba(0, 0, 0, 0) 78%);
	-webkit-mask-image: linear-gradient(135deg, #000 0%, rgba(0, 0, 0, .58) 36%, rgba(0, 0, 0, 0) 78%);
}

.aw-system-hero > * {
	position: relative;
	z-index: 1;
}

.aw-system-hero__eyebrow {
	display: inline-block;
	margin: 0 0 18px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--aw-system-ink);
	font-size: 13px;
	font-weight: 700;
	color: var(--aw-system-muted);
}

.aw-system-hero h1 {
	max-width: 820px;
	margin: 0;
	font-size: clamp(36px, 5.6vw, 74px);
	line-height: 1.16;
	letter-spacing: 0;
}

.aw-system-hero p:not(.aw-system-hero__eyebrow) {
	max-width: 680px;
	margin: 22px 0 0;
	color: var(--aw-system-muted);
	font-size: clamp(16px, 1.45vw, 20px);
	line-height: 2;
}

.aw-system-actions,
.aw-system-search {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 30px;
}

.aw-system-button,
.aw-system-search button,
.woocommerce-checkout .button,
.woocommerce-order-received .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	padding: 0 28px;
	border: 1px solid var(--aw-system-ink);
	background: var(--aw-system-paper);
	color: var(--aw-system-ink);
	font-size: 15px;
	font-weight: 800;
	text-decoration: none;
	border-radius: 0;
	transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.aw-system-button--primary,
.aw-system-search button,
.woocommerce-checkout .button,
.woocommerce-order-received .button {
	background: var(--aw-system-ink);
	color: #fff;
}

.aw-system-button:hover,
.aw-system-search button:hover,
.woocommerce-checkout .button:hover,
.woocommerce-order-received .button:hover {
	background: #222;
	border-color: #222;
	color: #fff;
}

.aw-system-search {
	max-width: 720px;
}

.aw-system-search input[type="search"] {
	flex: 1 1 320px;
	min-height: 54px;
	padding: 0 18px;
	border: 1px solid var(--aw-system-line);
	border-radius: 0;
	background: #fff;
	color: var(--aw-system-ink);
	font-size: 16px;
}

.aw-system-results {
	max-width: 1240px;
	margin: 0 auto;
	padding: clamp(36px, 6vw, 78px) 24px clamp(64px, 8vw, 110px);
}

.aw-system-results__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.aw-system-result {
	display: grid;
	grid-template-rows: minmax(220px, auto) 1fr;
	border: 1px solid var(--aw-system-line);
	background: #fff;
}

.aw-system-result__media {
	display: grid;
	min-height: 240px;
	place-items: center;
	border-bottom: 1px solid var(--aw-system-line);
	background: #fff;
}

.aw-system-result__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.aw-system-result__media span {
	width: 64px;
	height: 16px;
	background: var(--aw-system-ink);
}

.aw-system-result__body {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 24px;
	text-align: right;
}

.aw-system-result__body p {
	margin: 0;
	color: var(--aw-system-muted);
	font-size: 13px;
	font-weight: 700;
}

.aw-system-result__body h2 {
	margin: 0;
	font-size: 22px;
	line-height: 1.55;
}

.aw-system-result__body h2 a {
	color: inherit;
	text-decoration: none;
}

.aw-system-result__excerpt {
	color: var(--aw-system-muted);
	font-size: 15px;
	line-height: 1.9;
}

.aw-system-result__link {
	margin-top: auto;
	color: var(--aw-system-ink);
	font-weight: 800;
	text-decoration: none;
}

.aw-system-empty {
	padding: 48px;
	border: 1px solid var(--aw-system-line);
	background: var(--aw-system-soft);
	text-align: right;
}

.aw-system-empty h2 {
	margin: 0 0 12px;
	font-size: clamp(28px, 4vw, 44px);
}

.aw-system-empty p {
	margin: 0;
	color: var(--aw-system-muted);
	font-size: 17px;
	line-height: 2;
}

.aw-system-pagination {
	margin-top: 36px;
	text-align: center;
}

body:not(.home):not(.woocommerce-cart):not(.woocommerce-account):not(.single-product) .aw-page-content {
	max-width: 1240px;
	margin-inline: auto;
	padding-inline: 24px;
}

body:not(.home):not(.woocommerce-cart):not(.woocommerce-account):not(.single-product) .aw-page-body > .woocommerce {
	width: 100%;
}

.woocommerce-checkout .wd-content-area,
.woocommerce-order-received .wd-content-area {
	position: relative;
	overflow: hidden;
	padding: clamp(42px, 6vw, 82px) 24px clamp(64px, 8vw, 110px);
}

.woocommerce-checkout .woocommerce,
.woocommerce-order-received .woocommerce {
	position: relative;
	z-index: 1;
	max-width: 1240px;
	margin-inline: auto;
}

.woocommerce-checkout form.checkout {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(340px, .7fr);
	gap: 28px;
	align-items: start;
	direction: rtl;
}

.woocommerce-checkout #customer_details,
.woocommerce-checkout #order_review,
.woocommerce-order-received .woocommerce-order {
	border: 1px solid var(--aw-system-line);
	background: #fff;
}

.woocommerce-checkout #customer_details {
	padding: clamp(26px, 4vw, 42px);
}

.woocommerce-checkout #customer_details .col-1,
.woocommerce-checkout #customer_details .col-2 {
	float: none;
	width: 100%;
}

.woocommerce-checkout #customer_details .col-2 {
	margin-top: 36px;
	padding-top: 32px;
	border-top: 1px solid var(--aw-system-line);
}

.woocommerce-checkout h3,
.woocommerce-checkout #order_review_heading,
.woocommerce-order-received h2,
.woocommerce-order-received h3 {
	margin: 0 0 24px;
	font-size: clamp(24px, 3vw, 38px);
	line-height: 1.35;
}

.woocommerce-checkout #order_review_heading {
	padding: 28px 28px 0;
}

.woocommerce-checkout #order_review {
	padding: 0 28px 28px;
}

.woocommerce-checkout .form-row {
	margin: 0 0 20px;
}

.woocommerce-checkout label {
	display: block;
	margin-bottom: 8px;
	color: var(--aw-system-muted);
	font-weight: 700;
}

.woocommerce-checkout input.input-text,
.woocommerce-checkout textarea,
.woocommerce-checkout select,
.woocommerce-checkout .select2-container--default .select2-selection--single {
	width: 100%;
	min-height: 52px;
	border: 1px solid var(--aw-system-line);
	border-radius: 0;
	background: #fff;
	color: var(--aw-system-ink);
	font-size: 15px;
}

.woocommerce-checkout .shop_table,
.woocommerce-order-received .shop_table {
	width: 100%;
	border-collapse: collapse;
	border: 0;
}

.woocommerce-checkout .shop_table th,
.woocommerce-checkout .shop_table td,
.woocommerce-order-received .shop_table th,
.woocommerce-order-received .shop_table td {
	padding: 16px 0;
	border: 0;
	border-bottom: 1px solid var(--aw-system-line);
	text-align: right;
}

.woocommerce-checkout .woocommerce-checkout-payment {
	margin-top: 24px;
	border: 1px solid var(--aw-system-line);
	background: var(--aw-system-soft);
}

.woocommerce-checkout .wc_payment_methods,
.woocommerce-checkout .place-order {
	padding: 22px;
}

.woocommerce-checkout #place_order {
	width: 100%;
	min-height: 58px;
	margin-top: 12px;
}

.woocommerce-order-received .woocommerce-order {
	padding: clamp(28px, 5vw, 56px);
	text-align: right;
}

.woocommerce-order-received .woocommerce-thankyou-order-received {
	margin: 0 0 28px;
	padding: 22px 24px;
	border: 1px solid var(--aw-system-line);
	background: var(--aw-system-soft);
	font-size: 20px;
	font-weight: 800;
}

.woocommerce-order-received .woocommerce-order-overview {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1px;
	margin: 0 0 32px;
	padding: 0;
	background: var(--aw-system-line);
	list-style: none;
}

.woocommerce-order-received .woocommerce-order-overview li {
	margin: 0;
	padding: 18px;
	background: #fff;
	text-align: right;
}

body.woocommerce-account.logged-in .woocommerce-MyAccount-content > p:first-child {
	margin-top: 0;
	padding: 24px 0;
	border-bottom: 1px solid var(--aw-system-line);
	color: var(--aw-system-muted);
	font-size: 17px;
	line-height: 2;
}

body.woocommerce-account.logged-in .woocommerce-MyAccount-content a {
	color: var(--aw-system-ink);
	font-weight: 800;
	text-underline-offset: 5px;
}

body.woocommerce-account.logged-in .woocommerce-MyAccount-content table {
	width: 100%;
	border: 1px solid var(--aw-system-line);
	border-collapse: collapse;
}

body.woocommerce-account.logged-in .woocommerce-MyAccount-content th,
body.woocommerce-account.logged-in .woocommerce-MyAccount-content td {
	padding: 18px;
	border-bottom: 1px solid var(--aw-system-line);
	text-align: right;
}

body.woocommerce-account.logged-in .woocommerce-MyAccount-content input,
body.woocommerce-account.logged-in .woocommerce-MyAccount-content select,
body.woocommerce-account.logged-in .woocommerce-MyAccount-content textarea {
	width: 100%;
	min-height: 52px;
	border: 1px solid var(--aw-system-line);
	border-radius: 0;
	background: #fff;
}

body.woocommerce-account.logged-in .woocommerce-MyAccount-content button.button {
	min-height: 54px;
	padding: 0 28px;
	border: 1px solid var(--aw-system-ink);
	background: var(--aw-system-ink);
	color: #fff;
	border-radius: 0;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	max-width: 1240px;
	margin: 24px auto;
	padding: 18px 22px;
	border: 1px solid var(--aw-system-line);
	border-radius: 0;
	background: #fff;
	color: var(--aw-system-ink);
	text-align: right;
}

@media (max-width: 1024px) {
	.aw-system-results__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

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

	.woocommerce-order-received .woocommerce-order-overview {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.aw-system-hero {
		padding: 46px 20px 38px;
	}

	.aw-system-results {
		padding: 34px 20px 64px;
	}

	.aw-system-results__grid,
	.woocommerce-order-received .woocommerce-order-overview {
		grid-template-columns: 1fr;
	}

	.aw-system-button,
	.aw-system-search button {
		width: 100%;
	}

	.woocommerce-checkout .wd-content-area,
	.woocommerce-order-received .wd-content-area {
		padding-inline: 20px;
	}

	.woocommerce-checkout #customer_details,
	.woocommerce-checkout #order_review,
	.woocommerce-order-received .woocommerce-order {
		padding: 22px;
	}
}

/* Checkout final layout pass: override parent theme floats and keep the order review usable. */
body.woocommerce-checkout .wd-content-area {
	overflow: visible !important;
}

body.woocommerce-checkout .aw-page-content {
	max-width: 1320px !important;
}

body.woocommerce-checkout .aw-page-article {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
}

body.woocommerce-checkout .aw-page-body {
	width: 100% !important;
	max-width: none !important;
}

body.woocommerce-checkout .woocommerce {
	box-sizing: border-box !important;
	width: min(1240px, calc(100% - 48px)) !important;
	max-width: min(1240px, calc(100% - 48px)) !important;
	margin-right: auto !important;
	margin-left: auto !important;
}

body.woocommerce-checkout .woocommerce-form-coupon-toggle,
body.woocommerce-checkout .woocommerce-form-login-toggle,
body.woocommerce-checkout .woocommerce-form-coupon,
body.woocommerce-checkout .woocommerce-form-login {
	width: min(1240px, calc(100% - 48px)) !important;
	max-width: min(1240px, calc(100% - 48px)) !important;
	margin-right: auto !important;
	margin-left: auto !important;
}

body.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info {
	margin: 0 0 24px !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--aw-system-ink) !important;
}

body.woocommerce-checkout form.checkout {
	box-sizing: border-box !important;
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) minmax(360px, 440px) !important;
	gap: 32px !important;
	align-items: start !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	direction: rtl !important;
}

body.woocommerce-checkout #customer_details,
body.woocommerce-checkout #order_review_heading,
body.woocommerce-checkout #order_review,
body.woocommerce-checkout .checkout-order-review {
	box-sizing: border-box !important;
	float: none !important;
	clear: none !important;
	min-width: 0 !important;
	max-width: 100% !important;
}

body.woocommerce-checkout #customer_details {
	grid-column: 1 !important;
	grid-row: 1 / span 2 !important;
	width: 100% !important;
}

body.woocommerce-checkout #order_review_heading {
	grid-column: 2 !important;
	grid-row: 1 !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 28px 28px 0 !important;
	border: 1px solid var(--aw-system-line) !important;
	border-bottom: 0 !important;
	background: #fff !important;
}

body.woocommerce-checkout #order_review,
body.woocommerce-checkout .checkout-order-review {
	grid-column: 2 !important;
	grid-row: 2 !important;
	width: 100% !important;
	min-width: 0 !important;
	border-top: 0 !important;
}

body.woocommerce-checkout .checkout-order-review {
	grid-row: 1 / span 2 !important;
	padding: 0 !important;
	border: 1px solid var(--aw-system-line) !important;
	background: #fff !important;
}

body.woocommerce-checkout #order_review {
	padding: 0 28px 28px !important;
	border: 0 !important;
}

body.woocommerce-checkout #customer_details .col-1,
body.woocommerce-checkout #customer_details .col-2,
body.woocommerce-checkout .woocommerce-billing-fields,
body.woocommerce-checkout .woocommerce-shipping-fields,
body.woocommerce-checkout .woocommerce-additional-fields {
	box-sizing: border-box !important;
	float: none !important;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
}

body.woocommerce-checkout .form-row-first,
body.woocommerce-checkout .form-row-last {
	box-sizing: border-box !important;
	width: calc(50% - 10px) !important;
	max-width: calc(50% - 10px) !important;
}

body.woocommerce-checkout .form-row-first {
	float: right !important;
}

body.woocommerce-checkout .form-row-last {
	float: left !important;
}

body.woocommerce-checkout .form-row-wide,
body.woocommerce-checkout .form-row.notes {
	clear: both !important;
	width: 100% !important;
	max-width: 100% !important;
}

body.woocommerce-checkout .shop_table {
	display: table !important;
	table-layout: auto !important;
	width: 100% !important;
	min-width: 0 !important;
}

body.woocommerce-checkout #order_review table.shop_table,
body.woocommerce-checkout #order_review .woocommerce-checkout-review-order-table {
	display: table !important;
	box-sizing: border-box !important;
	inline-size: 100% !important;
	width: 100% !important;
	min-width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
}

body.woocommerce-checkout #order_review .wd-table-wrapper {
	box-sizing: border-box !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 0 20px !important;
	padding: 0 !important;
	overflow: visible !important;
}

body.woocommerce-checkout .shop_table thead {
	display: table-header-group !important;
}

body.woocommerce-checkout .shop_table tbody {
	display: table-row-group !important;
}

body.woocommerce-checkout .shop_table tfoot {
	display: table-footer-group !important;
}

body.woocommerce-checkout .shop_table tr {
	display: table-row !important;
}

body.woocommerce-checkout .shop_table th,
body.woocommerce-checkout .shop_table td {
	display: table-cell !important;
	vertical-align: top !important;
	white-space: normal !important;
	word-break: normal !important;
	overflow-wrap: anywhere !important;
}

body.woocommerce-checkout .shop_table .product-name {
	width: 62% !important;
}

body.woocommerce-checkout .shop_table .product-total,
body.woocommerce-checkout .shop_table tfoot td {
	width: 38% !important;
	text-align: left !important;
}

@media (max-width: 1024px) {
	body.woocommerce-checkout .woocommerce,
	body.woocommerce-checkout .woocommerce-form-coupon-toggle,
	body.woocommerce-checkout .woocommerce-form-login-toggle,
	body.woocommerce-checkout .woocommerce-form-coupon,
	body.woocommerce-checkout .woocommerce-form-login {
		width: min(100% - 40px, 760px) !important;
		max-width: min(100% - 40px, 760px) !important;
	}

	body.woocommerce-checkout form.checkout {
		grid-template-columns: 1fr !important;
		gap: 24px !important;
	}

	body.woocommerce-checkout #customer_details,
	body.woocommerce-checkout #order_review_heading,
	body.woocommerce-checkout #order_review,
	body.woocommerce-checkout .checkout-order-review {
		grid-column: 1 !important;
		grid-row: auto !important;
	}
}

@media (max-width: 640px) {
	body.woocommerce-checkout .wd-content-area {
		padding: 34px 0 72px !important;
	}

	body.woocommerce-checkout .woocommerce,
	body.woocommerce-checkout .woocommerce-form-coupon-toggle,
	body.woocommerce-checkout .woocommerce-form-login-toggle,
	body.woocommerce-checkout .woocommerce-form-coupon,
	body.woocommerce-checkout .woocommerce-form-login {
		width: calc(100% - 32px) !important;
		max-width: calc(100% - 32px) !important;
	}

	body.woocommerce-checkout #customer_details,
	body.woocommerce-checkout #order_review {
		padding: 20px !important;
	}

	body.woocommerce-checkout #order_review_heading {
		padding: 22px 20px 0 !important;
	}

	body.woocommerce-checkout .form-row-first,
	body.woocommerce-checkout .form-row-last {
		float: none !important;
		width: 100% !important;
		max-width: 100% !important;
	}

	body.woocommerce-checkout .shop_table th,
	body.woocommerce-checkout .shop_table td {
		padding: 14px 0 !important;
	}
}
