/* Silverin's ink / cream / warm gold system; visual polish only. */
:root {
	--silverin-ink: #13110e;
	--silverin-cream: #f3ede2;
	--silverin-paper: #fdfbf5;
	--silverin-line: #e4ddd1;
	--silverin-muted: #6f6960;
	--silverin-gold: #a98251;
	--silverin-ease: cubic-bezier(.2, .7, .2, 1);
}

body.woocommerce-checkout .wp-block-woocommerce-checkout.alignwide {
	box-sizing: border-box;
	width: min(1200px, calc(100% - 48px));
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: 0;
}

body.woocommerce-checkout .wc-block-checkout .wc-block-components-sidebar-layout {
	column-gap: clamp(24px, 3vw, 40px);
	row-gap: 24px;
}

body.woocommerce-checkout .wc-block-checkout .wc-block-components-main,
body.woocommerce-checkout .wc-block-checkout .wc-block-components-sidebar {
	min-width: 0;
}

body.woocommerce-checkout .wc-block-checkout__main > form > .wc-block-components-checkout-step {
	box-sizing: border-box;
	margin: 0 0 16px;
	padding: 22px 24px;
	border: 1px solid var(--silverin-line);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 5px 20px rgba(31, 24, 16, .035);
}

body.woocommerce-checkout .wc-block-checkout__main .wc-block-components-checkout-step__title {
	font-size: 18px;
	font-weight: 600;
	line-height: 1.5;
	color: var(--silverin-ink);
}

body.woocommerce-checkout .wc-block-checkout__main .wc-block-components-checkout-step__description {
	margin-block: 4px 14px;
	color: var(--silverin-muted);
	font-size: 13px;
	line-height: 1.7;
}

body.woocommerce-checkout .wc-block-checkout :is(input:not([type=checkbox]):not([type=radio]), select, textarea, .wc-block-components-combobox .components-combobox-control__input) {
	box-sizing: border-box;
	min-height: 48px;
	border: 1px solid #d9d1c4;
	border-radius: 7px;
	background-color: #fff;
	color: var(--silverin-ink);
	box-shadow: none;
	font-size: 16px;
}

body.woocommerce-checkout .wc-block-checkout :is(input:not([type=checkbox]):not([type=radio]), select, textarea):focus {
	border-color: var(--silverin-gold);
	box-shadow: 0 0 0 3px rgba(169, 130, 81, .13);
	outline: none;
}

body.woocommerce-checkout .wc-block-checkout .wc-block-components-text-input label,
body.woocommerce-checkout .wc-block-checkout .wc-block-components-combobox label {
	color: var(--silverin-muted);
}

body.woocommerce-checkout .wc-block-checkout .wc-block-checkout__sidebar {
	position: sticky;
	top: 22px;
	box-sizing: border-box;
	padding: 22px;
	border: 1px solid var(--silverin-line);
	border-radius: 12px;
	background: var(--silverin-cream);
	box-shadow: 0 8px 24px rgba(31, 24, 16, .055);
}

body.woocommerce-checkout .wc-block-checkout .wc-block-components-checkout-order-summary__title {
	min-height: 56px;
	margin: 0;
	padding: 2px 0 14px;
	border-bottom: 1px solid rgba(19, 17, 14, .12);
	color: var(--silverin-ink);
	font-size: 18px;
	font-weight: 600;
}

body.woocommerce-checkout .wc-block-checkout .wc-block-components-checkout-order-summary__content {
	padding-top: 14px;
}

body.woocommerce-checkout .wc-block-checkout .wc-block-components-order-summary-item {
	align-items: center;
	gap: 12px;
}

body.woocommerce-checkout .wc-block-checkout .wc-block-components-order-summary-item__image {
	width: 58px;
	height: 68px;
	border-radius: 6px;
	background: var(--silverin-paper);
	object-fit: contain;
}

body.woocommerce-checkout .wc-block-checkout .wc-block-components-order-summary-item__description {
	min-width: 0;
	line-height: 1.65;
}

body.woocommerce-checkout .wc-block-checkout .wc-block-components-totals-wrapper {
	border-color: rgba(19, 17, 14, .12);
}

body.woocommerce-checkout .wc-block-checkout .wc-block-components-radio-control .wc-block-components-radio-control__option {
	min-height: 52px;
	margin-block: 8px;
	padding: 13px 14px;
	border: 1px solid var(--silverin-line);
	border-radius: 8px;
	background: #fff;
	transition: border-color 160ms var(--silverin-ease), background-color 160ms var(--silverin-ease), box-shadow 160ms var(--silverin-ease);
}

body.woocommerce-checkout .wc-block-checkout .wc-block-components-radio-control .wc-block-components-radio-control__option-checked {
	border-color: var(--silverin-gold);
	background: rgba(255, 255, 255, .75);
	box-shadow: inset 0 0 0 1px rgba(169, 130, 81, .22);
}

body.woocommerce-checkout .wc-block-checkout .wc-block-components-checkout-place-order-button {
	min-height: 52px;
	border: 1px solid var(--silverin-ink);
	border-radius: 7px;
	background: var(--silverin-ink);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	transition: background-color 160ms var(--silverin-ease), box-shadow 160ms var(--silverin-ease), transform 160ms var(--silverin-ease);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	body.woocommerce-checkout .wc-block-checkout .wc-block-components-checkout-place-order-button:not(:disabled):hover {
		background: #302820;
		box-shadow: 0 6px 16px rgba(19, 17, 14, .16);
		transform: translateY(-1px);
	}
}

body.woocommerce-checkout .wc-block-checkout :is(button, a, input, select, textarea):focus-visible {
	outline: 2px solid var(--silverin-gold);
	outline-offset: 3px;
}

/* Keep WooCommerce's screen-reader-only address autocomplete field accessible
   without letting its far-offscreen position create a huge horizontal canvas. */
body.woocommerce-checkout .wc-block-components-address-form__address_2-hidden-input {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	left: 0 !important;
	top: 0 !important;
	white-space: nowrap !important;
}

.silverin-added-toast {
	position: fixed;
	z-index: 99999;
	inset-inline-start: 50%;
	bottom: max(22px, env(safe-area-inset-bottom));
	display: flex;
	align-items: center;
	gap: 12px;
	width: max-content;
	max-width: min(520px, calc(100vw - 32px));
	box-sizing: border-box;
	padding: 13px 16px;
	border: 1px solid rgba(214, 185, 146, .48);
	border-radius: 9px;
	background: var(--silverin-ink);
	color: #fff;
	box-shadow: 0 12px 34px rgba(19, 17, 14, .2);
	font: inherit;
	opacity: 0;
	transform: translate(-50%, 8px);
	transition: opacity 160ms var(--silverin-ease), transform 160ms var(--silverin-ease);
}

.silverin-added-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.silverin-added-toast__mark { color: #dfc39e; font-size: 17px; line-height: 1; }
.silverin-added-toast__text { min-width: 0; line-height: 1.5; }
.silverin-added-toast a { flex: 0 0 auto; color: #f1d9b8; text-decoration: underline; text-underline-offset: 3px; }
.silverin-added-toast a:focus-visible { outline: 2px solid #f1d9b8; outline-offset: 3px; }

/* A distinct, direct-to-checkout action below the normal cart button. */
body.single-product.woocommerce div.product form.cart { flex-wrap: wrap; }

body.single-product.woocommerce div.product form.cart .silverin-buy-now-row {
	box-sizing: border-box;
	flex: 0 0 100%;
	width: 100%;
	margin-top: 10px;
}

body.single-product.woocommerce div.product form.cart button.silverin-buy-now {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 10px;
	box-sizing: border-box;
	width: 100% !important;
	max-width: 100%;
	min-height: 52px;
	margin: 0 !important;
	padding: 12px 22px;
	border: 1px solid #173c46 !important;
	border-radius: 9px;
	background: #173c46 !important;
	color: #fff !important;
	flex: 0 0 100%;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	transition: background-color 160ms var(--silverin-ease), box-shadow 160ms var(--silverin-ease), transform 160ms var(--silverin-ease);
}

body.single-product.woocommerce div.product form.cart button.silverin-buy-now:hover,
body.single-product.woocommerce div.product form.cart button.silverin-buy-now:focus-visible {
	border-color: #245461 !important;
	background: #245461 !important;
	color: #fff !important;
	box-shadow: 0 6px 16px rgba(23, 60, 70, .16);
}

body.single-product.woocommerce div.product form.cart .silverin-buy-now__arrow {
	font-size: 18px;
	line-height: 1;
}

body.single-product.silverin-ar.woocommerce div.product form.cart .silverin-buy-now__arrow { transform: scaleX(-1); }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	body.single-product.woocommerce div.product form.cart button.silverin-buy-now:hover { transform: translateY(-1px); }
}

@media (max-width: 781px) {
	body.woocommerce-checkout .wp-block-woocommerce-checkout.alignwide {
		width: 100%;
		margin-inline: 0;
	}
	body.woocommerce-checkout .wc-block-checkout .wc-block-components-sidebar-layout {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 18px;
	}
	body.woocommerce-checkout .wc-block-checkout .wc-block-checkout__sidebar {
		position: static;
		padding: 18px;
	}
	body.woocommerce-checkout .wc-block-checkout__main > form > .wc-block-components-checkout-step {
		padding: 18px 16px;
	}
	body.woocommerce-checkout .wc-block-checkout .wc-block-components-checkout-step__title { font-size: 17px; }
	.silverin-added-toast { bottom: max(14px, env(safe-area-inset-bottom)); padding: 12px 14px; }
}

@media (prefers-reduced-motion: reduce) {
	.silverin-added-toast,
	body.single-product.woocommerce div.product form.cart button.silverin-buy-now,
	body.woocommerce-checkout .wc-block-checkout .wc-block-components-radio-control .wc-block-components-radio-control__option,
	body.woocommerce-checkout .wc-block-checkout .wc-block-components-checkout-place-order-button {
		transition: none !important;
	}
	.silverin-added-toast { transform: translate(-50%, 0); }
}
