/*
 * OSTADEEZ — WooCommerce baseline.
 *
 * WooCommerce's own stylesheets (general / layout / smallscreen / blocks) are dequeued in
 * inc/ostadeez-assets.php. While they loaded, this theme only repainted the surfaces it explicitly
 * targeted and everything else kept the stock WooCommerce look underneath — a page that measured
 * correct and looked like a default store.
 *
 * This file replaces what those sheets provided. It is a BASELINE, not decoration: a surface
 * missing here renders as unstyled HTML. It loads BEFORE ostadeez-shop.css, which is free to
 * override anything in it.
 *
 * Two parts are load-bearing and must not be dropped:
 *   • the generic `.button` rules — WooCommerce puts that class on a dozen unrelated controls;
 *   • the narrow-screen table stacking at the end — smallscreen.css used to do it, and without a
 *     replacement the cart and order tables force horizontal PAGE scroll on a phone, which is a
 *     locked acceptance criterion (PRD §10).
 */

/* ---------------------------------------------------------------- buttons (the generic ones) */

.ostz .woocommerce a.button,
.ostz .woocommerce button.button,
.ostz .woocommerce input.button,
.ostz a.button,
.ostz button.button,
.ostz .woocommerce-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--ostz-space-2);
	padding: 12px 22px;
	border: 1px solid var(--ostz-line-strong);
	border-radius: var(--ostz-radius-sm);
	background: var(--ostz-bg-raised-2);
	color: var(--ostz-text);
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.ostz .woocommerce a.button:hover,
.ostz .woocommerce button.button:hover,
.ostz .woocommerce input.button:hover,
.ostz a.button:hover,
.ostz button.button:hover,
.ostz .woocommerce-button:hover {
	border-color: var(--ostz-accent);
	color: var(--ostz-accent);
}

.ostz .woocommerce button.button:disabled,
.ostz .woocommerce button.button.disabled,
.ostz .woocommerce input.button:disabled {
	opacity: .5;
	cursor: not-allowed;
}

/* The one action per screen that must dominate carries the brand gradient. */
.ostz .woocommerce button.button.alt,
.ostz .woocommerce a.button.alt,
.ostz .woocommerce input.button.alt {
	background: var(--ostz-gradient);
	border-color: transparent;
	color: var(--ostz-accent-ink);
}

.ostz .woocommerce button.button.alt:hover,
.ostz .woocommerce a.button.alt:hover {
	color: var(--ostz-accent-ink);
	filter: brightness(1.08);
}

/* ---------------------------------------------------------------- notices */

.ostz .woocommerce-notices-wrapper:empty {
	display: none;
}

.ostz .woocommerce-message,
.ostz .woocommerce-info,
.ostz .woocommerce-error {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ostz-space-3);
	margin-block: 0 var(--ostz-space-6);
	padding: 14px 18px;
	border: 1px solid var(--ostz-line-strong);
	border-inline-start-width: 3px;
	border-radius: var(--ostz-radius-sm);
	background: var(--ostz-bg-raised);
	list-style: none;
	font-size: 14px;
}

.ostz .woocommerce-message {
	border-inline-start-color: var(--ostz-accent);
}

.ostz .woocommerce-error {
	border-inline-start-color: #ff5d6e;
	color: #ffd7db;
}

.ostz .woocommerce-message .button,
.ostz .woocommerce-info .button {
	margin-inline-start: auto;
	padding: 8px 16px;
}

.ostz .woocommerce-error li {
	margin: 0;
}

/* ---------------------------------------------------------------- form fields */

.ostz .woocommerce form .form-row input.input-text,
.ostz .woocommerce form .form-row textarea,
.ostz .woocommerce form .form-row select,
.ostz .woocommerce-Input,
.ostz .woocommerce input.input-text {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--ostz-line);
	border-radius: var(--ostz-radius-sm);
	background: var(--ostz-bg-sunken);
	color: var(--ostz-text);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.6;
}

.ostz .woocommerce form .form-row input.input-text:focus,
.ostz .woocommerce form .form-row textarea:focus,
.ostz .woocommerce form .form-row select:focus,
.ostz .woocommerce-Input:focus {
	outline: none;
	border-color: var(--ostz-accent);
	box-shadow: 0 0 0 3px rgba(0, 224, 213, .16);
}

.ostz .woocommerce form .form-row input::placeholder,
.ostz .woocommerce form .form-row textarea::placeholder {
	color: var(--ostz-text-faint);
}

.ostz .woocommerce-form__label-for-checkbox,
.ostz .woocommerce-form-login__rememberme {
	display: inline-flex;
	align-items: center;
	gap: var(--ostz-space-2);
	font-size: 13px;
	color: var(--ostz-text-dim);
}

.ostz .woocommerce-privacy-policy-text,
.ostz .woocommerce-form-login-toggle,
.ostz .woocommerce-LostPassword {
	font-size: 13px;
	color: var(--ostz-text-dim);
}

.ostz .woocommerce-LostPassword a,
.ostz .woocommerce-privacy-policy-text a {
	color: var(--ostz-accent);
}

/* WooCommerce's own two-column wrappers, which layout.css used to float. */
.ostz .woocommerce .col2-set {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--ostz-space-6);
}

.ostz .woocommerce .col2-set .col-1,
.ostz .woocommerce .col2-set .col-2 {
	min-width: 0;
}

.ostz .woocommerce form.login,
.ostz .woocommerce form.register,
.ostz .woocommerce form.checkout_coupon {
	padding: var(--ostz-space-6);
	border: 1px solid var(--ostz-line);
	border-radius: var(--ostz-radius);
	background: var(--ostz-bg-raised);
}

/* ---------------------------------------------------------------- tables */

.ostz .woocommerce table.shop_table {
	width: 100%;
	border-collapse: collapse;
}

.ostz .woocommerce table.shop_table thead th {
	font-size: 12px;
	font-weight: 700;
	color: var(--ostz-text-dim);
	text-align: start;
}

.ostz .woocommerce table.shop_table tfoot th,
.ostz .woocommerce table.shop_table tfoot td {
	padding: 12px 14px;
	border-block-start: 1px solid var(--ostz-line);
	text-align: start;
}

.ostz .woocommerce table.shop_table tfoot tr:last-child th,
.ostz .woocommerce table.shop_table tfoot tr:last-child td {
	font-size: 17px;
	font-weight: 800;
	color: var(--ostz-text);
}

.ostz .woocommerce table.shop_table .product-remove a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border: 1px solid var(--ostz-line);
	border-radius: 50%;
	color: var(--ostz-text-dim);
	text-decoration: none;
	line-height: 1;
}

.ostz .woocommerce table.shop_table .product-remove a:hover {
	border-color: #ff5d6e;
	color: #ff5d6e;
}

.ostz .woocommerce .cart-collaterals {
	margin-block-start: var(--ostz-space-8);
}

.ostz .woocommerce .cart_totals h2,
.ostz .woocommerce .cross-sells h2 {
	font-size: 18px;
	font-weight: 800;
	margin-block-end: var(--ostz-space-4);
}

.ostz .woocommerce .actions .coupon {
	display: flex;
	gap: var(--ostz-space-2);
	flex-wrap: wrap;
	margin-block-end: var(--ostz-space-4);
}

.ostz .woocommerce .actions .coupon input.input-text {
	max-width: 220px;
}

/* ---------------------------------------------------------------- shipping methods */

.ostz .woocommerce ul#shipping_method,
.ostz .woocommerce ul.woocommerce-shipping-methods {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: var(--ostz-space-2);
}

.ostz .woocommerce ul#shipping_method li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ostz-space-2);
	padding: 12px 14px;
	border: 1px solid var(--ostz-line);
	border-radius: var(--ostz-radius-sm);
	background: var(--ostz-bg-sunken);
}

.ostz .woocommerce ul#shipping_method li label {
	font-size: 14px;
	cursor: pointer;
}

.ostz .woocommerce ul#shipping_method li .amount {
	margin-inline-start: auto;
	font-weight: 700;
}

/* Printed by the shipping plugin under each option: the honest wording, never a price. */
.ostz .dmship-rate-subtitle {
	flex-basis: 100%;
	font-size: 12px;
	line-height: 1.8;
	color: var(--ostz-text-dim);
}

.ostz .woocommerce-shipping-destination {
	font-size: 12px;
	color: var(--ostz-text-dim);
}

/* ---------------------------------------------------------------- payment box */

.ostz #payment ul.payment_methods {
	margin: 0 0 var(--ostz-space-4);
	padding: 0;
	list-style: none;
	display: grid;
	gap: var(--ostz-space-2);
}

.ostz #payment ul.payment_methods li {
	padding: 12px 14px;
	border: 1px solid var(--ostz-line);
	border-radius: var(--ostz-radius-sm);
	background: var(--ostz-bg-sunken);
}

.ostz #payment ul.payment_methods li label {
	display: inline-flex;
	align-items: center;
	gap: var(--ostz-space-2);
	font-size: 14px;
	cursor: pointer;
}

.ostz #payment div.payment_box {
	margin-block-start: var(--ostz-space-2);
	padding: 12px 14px;
	border-radius: var(--ostz-radius-sm);
	background: var(--ostz-bg-raised-2);
	font-size: 13px;
	color: var(--ostz-text-dim);
}

.ostz .woocommerce-terms-and-conditions-wrapper {
	font-size: 13px;
	color: var(--ostz-text-dim);
	margin-block-end: var(--ostz-space-4);
}

/* ---------------------------------------------------------------- pagination */

.ostz .woocommerce-pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ostz-space-2);
	justify-content: center;
	margin: var(--ostz-space-8) 0 0;
	padding: 0;
	list-style: none;
	border: 0;
}

.ostz .woocommerce-pagination ul.page-numbers li {
	border: 0;
}

.ostz .woocommerce-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding-inline: 10px;
	border: 1px solid var(--ostz-line);
	border-radius: var(--ostz-radius-sm);
	color: var(--ostz-text-dim);
	text-decoration: none;
	font-size: 14px;
}

.ostz .woocommerce-pagination .page-numbers.current,
.ostz .woocommerce-pagination a.page-numbers:hover {
	border-color: var(--ostz-accent);
	color: var(--ostz-accent);
}

/* ---------------------------------------------------------------- account tables + addresses */

.ostz .woocommerce-orders-table__cell-order-actions .button {
	padding: 7px 14px;
	font-size: 13px;
}

.ostz .woocommerce-Addresses {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--ostz-space-6);
}

.ostz .woocommerce-Address {
	padding: var(--ostz-space-6);
	border: 1px solid var(--ostz-line);
	border-radius: var(--ostz-radius);
	background: var(--ostz-bg-raised);
}

.ostz .woocommerce-Address-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ostz-space-3);
	margin-block-end: var(--ostz-space-3);
}

.ostz .woocommerce-Address-title h2,
.ostz .woocommerce-Address-title h3 {
	font-size: 16px;
	margin: 0;
}

/* The enhanced dropdown now has its own file, ostadeez-woo-select.css, because those rules must
   work on markup printed OUTSIDE our root element and therefore cannot rely on `.ostz`. */

/* ---------------------------------------------------------------- payment gateway rows */

.ostz .wc_payment_method label img {
	max-height: 26px;
	width: auto;
	margin-inline-start: var(--ostz-space-2);
	vertical-align: middle;
}

.ostz .woocommerce-checkout #payment .form-row.place-order {
	margin: 0;
	padding: var(--ostz-space-4) 0 0;
}

/* ---------------------------------------------------------------- narrow screens
   ⚠ WooCommerce's smallscreen.css used to stack these tables on a phone. It is dequeued, so this
   replacement is not cosmetic: without it a six-column cart table forces the whole PAGE to scroll
   sideways. */

@media (max-width: 768px) {

	.ostz .woocommerce .col2-set,
	.ostz .woocommerce-Addresses {
		grid-template-columns: 1fr;
	}

	.ostz .woocommerce table.shop_table_responsive thead,
	.ostz .woocommerce table.shop_table_responsive tbody th {
		display: none;
	}

	.ostz .woocommerce table.shop_table_responsive tr {
		display: block;
		margin-block-end: var(--ostz-space-4);
		border: 1px solid var(--ostz-line);
		border-radius: var(--ostz-radius-sm);
		background: var(--ostz-bg-raised);
	}

	.ostz .woocommerce table.shop_table_responsive tr td {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: var(--ostz-space-3);
		width: auto;
		text-align: start;
	}

	/* Woo prints the column name into data-title; with the head hidden it becomes the row label. */
	.ostz .woocommerce table.shop_table_responsive tr td::before {
		content: attr(data-title) ': ';
		font-size: 12px;
		font-weight: 700;
		color: var(--ostz-text-dim);
	}

	.ostz .woocommerce table.shop_table_responsive tr td.product-remove::before,
	.ostz .woocommerce table.shop_table_responsive tr td.actions::before {
		content: '';
	}

	.ostz .woocommerce .actions .coupon input.input-text {
		max-width: none;
	}
}
