/* OSTADEEZ — shop layer. Loaded only on views that render product markup.
   Component sizes come from the approved wireframes, not from taste. */

/* ---------------------------------------------------------------- page head */

.ostz-phead {
	padding-block: var(--ostz-space-8) var(--ostz-space-2);
}

.ostz-crumb {
	margin-block-end: var(--ostz-space-3);
	font-size: 12.5px;
	color: var(--ostz-text-faint, #6f7686);
}

.ostz-crumb-list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ostz-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.ostz-crumb-item + .ostz-crumb-item::before {
	content: '›';
	margin-inline-end: var(--ostz-space-2);
	color: var(--ostz-line-strong, #333846);
}

.ostz-crumb-link {
	color: inherit;
	text-decoration: none;
}

.ostz-crumb-link:hover {
	color: var(--ostz-text-dim, #aab0be);
}

/* ---------------------------------------------------------------- toolbar */

.ostz-toolbar {
	position: sticky;
	top: var(--ostz-header-h);
	z-index: 20;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--ostz-space-3);
	margin-block: var(--ostz-space-6) var(--ostz-space-4);
	padding-block: var(--ostz-space-2);
	background: color-mix(in srgb, var(--ostz-bg, #0b0c10) 85%, transparent);
	backdrop-filter: blur(8px);
}

.ostz-chips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ostz-space-2);
}

.ostz-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 44px;
	padding: 7px 15px;
	border: 1px solid var(--ostz-line-strong, #333846);
	border-radius: 22px;
	background: var(--ostz-bg-raised, #15171e);
	color: var(--ostz-text-dim, #aab0be);
	font-size: 13.5px;
	text-decoration: none;
	transition: .15s;
}

.ostz-chip:hover {
	border-color: var(--ostz-text-faint, #6f7686);
	color: var(--ostz-text, #f2f4f8);
}

.ostz-chip-on {
	border-color: var(--ostz-accent, #00e0d5);
	background: color-mix(in srgb, var(--ostz-accent, #00e0d5) 14%, var(--ostz-bg-raised, #15171e));
	color: var(--ostz-text, #f2f4f8);
	font-weight: 700;
}

.ostz-chip-count {
	padding-inline: 7px;
	border-radius: var(--ostz-radius-sm);
	background: rgba(255, 255, 255, .08);
	font-size: 11px;
	unicode-bidi: isolate;
}

.ostz-toolbar-meta {
	display: flex;
	align-items: center;
	gap: var(--ostz-space-3);
}

/* ---------------------------------------------------------------- archive grid */

.ostz .woocommerce ul.products,
.ostz ul.products {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 18px;
	margin: var(--ostz-space-4) 0 0;
	padding: 0;
	list-style: none;
}

@media (max-width: 900px) {
	.ostz .woocommerce ul.products,
	.ostz ul.products {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 520px) {
	.ostz .woocommerce ul.products,
	.ostz ul.products {
		grid-template-columns: 1fr;
	}
}

.ostz ul.products::before,
.ostz ul.products::after {
	content: none;
}

.ostz ul.products li.product {
	width: auto !important;
	margin: 0 !important;
	float: none !important;
	clear: none !important;
}

/* ---------------------------------------------------------------- product card */

.ostz-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--ostz-line, #262a35);
	border-radius: var(--ostz-radius);
	background: var(--ostz-bg-raised, #15171e);
	transition: border-color .18s, transform .18s, box-shadow .18s;
}

.ostz-card:hover {
	border-color: var(--ostz-line-strong, #333846);
	transform: translateY(-4px);
	box-shadow: 0 14px 34px -18px color-mix(in srgb, var(--ostz-accent, #00e0d5) 40%, transparent);
}

/* 1:1, matching the wireframe — not the 4:5 the first pass guessed. */
.ostz-card-media {
	display: block;
	aspect-ratio: 1;
	border-block-end: 1px solid var(--ostz-line, #262a35);
	background: var(--ostz-bg-sunken, #111318);
}

.ostz-badge {
	position: absolute;
	inset-block-start: 10px;
	inset-inline-start: 10px;
	z-index: 2;
	padding: 3px 10px;
	border: 1px solid var(--ostz-line-strong, #333846);
	border-radius: 16px;
	background: rgba(0, 0, 0, .55);
	font-size: 11px;
}

.ostz-badge-soon {
	border-color: var(--ostz-accent, #00e0d5);
	color: var(--ostz-accent, #00e0d5);
}

.ostz-badge-sold {
	color: var(--ostz-text-faint, #6f7686);
}

.ostz-card-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ostz-card-img-empty {
	display: block;
	width: 100%;
	height: 100%;
}

.ostz-card-body {
	display: flex;
	flex-direction: column;
	gap: 9px;
	padding: 13px 14px;
}

.ostz-card-title {
	margin: 0;
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.6;
}

.ostz-card-link {
	color: var(--ostz-text, #f2f4f8);
	text-decoration: none;
}

.ostz-card-link:hover {
	color: var(--ostz-accent, #00e0d5);
}

/* The card foot puts price and action on one row, as in the wireframe. */
.ostz .ostz-card .price,
.ostz .ostz-card .ostz-card-actions {
	margin: 0;
}

.ostz .ostz-card .button {
	min-height: 34px;
	padding-inline: var(--ostz-space-3);
	border: 1px solid var(--ostz-line-strong, #333846);
	border-radius: 9px;
	background: var(--ostz-bg-raised-2, #1b1e27);
	color: var(--ostz-text, #f2f4f8);
	font-size: 12.5px;
	font-weight: 700;
}

.ostz .ostz-card .button:hover {
	border-color: transparent;
	background: var(--ostz-gradient, linear-gradient(135deg, #00e0d5, #c026ff));
	color: var(--ostz-accent-ink, #08090c);
}

/* ---------------------------------------------------------------- price */

.ostz .price {
	color: var(--ostz-text, #f2f4f8);
	font-size: 14.5px;
	font-weight: 800;
	unicode-bidi: isolate;
}

.ostz .price del {
	color: var(--ostz-text-faint, #6f7686);
	font-weight: 400;
}

.ostz-price-soon {
	display: inline-block;
	color: var(--ostz-accent, #00e0d5);
	font-size: 14px;
	font-weight: 900;
}

/* ---------------------------------------------------------------- buttons */

.ostz .button,
.ostz-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--ostz-space-2);
	min-height: 44px;
	padding-inline: var(--ostz-space-6);
	border: 0;
	border-radius: 12px;
	background: var(--ostz-accent, #00e0d5);
	color: var(--ostz-accent-ink, #08090c);
	font-family: inherit;
	font-size: 15px;
	font-weight: 900;
	text-decoration: none;
	cursor: pointer;
}

.ostz .button:hover,
.ostz-btn:hover {
	filter: brightness(1.08);
}

.ostz-btn-ghost {
	background: transparent;
	border: 1px solid var(--ostz-line-strong, #333846);
	color: var(--ostz-text, #f2f4f8);
}

/* The loud one. Reserved for a page's single most important action. */
.ostz-btn-brand {
	background: var(--ostz-gradient, linear-gradient(135deg, #00e0d5, #c026ff));
	color: var(--ostz-accent-ink, #08090c);
}

/* ---------------------------------------------------------------- single product */

.ostz-pdp {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 34px;
	padding-block-end: var(--ostz-space-6);
	align-items: start;
}

/* Woo's gallery and summary are floated by default; the grid owns placement here. */
.ostz-pdp .woocommerce-product-gallery,
.ostz-pdp .summary {
	width: auto !important;
	float: none !important;
	margin: 0 !important;
}

.ostz-pdp .woocommerce-product-gallery__wrapper {
	border: 1px solid var(--ostz-line-strong, #333846);
	border-radius: var(--ostz-radius);
	overflow: hidden;
	background: var(--ostz-bg-raised, #15171e);
}

.ostz-pdp .woocommerce-product-gallery__image img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
}

.ostz-pdp .flex-control-thumbs {
	display: flex;
	gap: 10px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.ostz-pdp .flex-control-thumbs li {
	width: 66px;
	height: 66px;
}

.ostz-pdp .flex-control-thumbs img {
	width: 100%;
	height: 100%;
	border: 1px solid var(--ostz-line-strong, #333846);
	border-radius: var(--ostz-radius-sm);
	object-fit: cover;
	cursor: pointer;
	opacity: .7;
	transition: .15s;
}

.ostz-pdp .flex-control-thumbs img.flex-active,
.ostz-pdp .flex-control-thumbs img:hover {
	border-color: var(--ostz-accent, #00e0d5);
	opacity: 1;
}

/* ⚠ COMPOUND, not descendant. `ostz` and `single-product` are both classes on <body>, i.e. the
   SAME element — `.ostz .single-product` asks for one inside the other and silently never
   matches. This whole block was dead until measured in a browser. */
.ostz.single-product div.product .product_title {
	margin: 12px 0 8px;
	font-size: clamp(23px, 3.4vw, 32px);
	font-weight: 900;
	line-height: 1.3;
	letter-spacing: -.5px;
}

/* ---------------------------------------------------------------- supply tag */

.ostz-tag-supply {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	padding: 4px 12px;
	border: 1px solid var(--ostz-line-strong, #333846);
	border-radius: 20px;
	background: color-mix(in srgb, var(--ostz-accent-2, #c026ff) 8%, transparent);
	color: var(--ostz-accent-2, #c026ff);
	font-size: 12px;
}

.ostz-tag-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
}

.ostz.single-product div.product .price {
	font-size: 20px;
	font-weight: 800;
	color: var(--ostz-text-dim, #aab0be);
}

.ostz-prep-note {
	margin: var(--ostz-space-3) 0 0;
	padding: var(--ostz-space-3) var(--ostz-space-4);
	border-inline-start: 2px solid var(--ostz-accent, #00e0d5);
	border-radius: var(--ostz-radius-sm);
	background: var(--ostz-bg-raised, #15171e);
	color: var(--ostz-text-dim, #aab0be);
	font-size: 13px;
}

/* ---------------------------------------------------------------- swatches & sizes */

/* The native select stays put until the enhancement layer actually builds the buttons —
   with JS off it is the control, so it must never be hidden by CSS alone. */
.ostz-has-swatches select {
	display: none;
}

.ostz-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

.ostz-swatch {
	width: 34px;
	height: 34px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 50%;
	background: var(--ostz-bg-raised-2, #1b1e27);
	box-shadow: inset 0 0 0 1px var(--ostz-line-strong, #333846);
	cursor: pointer;
	transition: .15s;
}

.ostz-swatch.is-on {
	border-color: var(--ostz-accent, #00e0d5);
}

.ostz-sizes {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ostz-size {
	min-width: 48px;
	height: 42px;
	padding-inline: var(--ostz-space-3);
	border: 1px solid var(--ostz-line-strong, #333846);
	border-radius: var(--ostz-radius-sm);
	background: var(--ostz-bg-raised, #15171e);
	color: var(--ostz-text-dim, #aab0be);
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: .15s;
}

.ostz-size:hover {
	color: var(--ostz-text, #f2f4f8);
	border-color: var(--ostz-text-faint, #6f7686);
}

.ostz-size.is-on {
	border-color: transparent;
	background: var(--ostz-accent, #00e0d5);
	color: var(--ostz-accent-ink, #08090c);
}

/* ---------------------------------------------------------------- quantity stepper */

/* Woo wraps the input in its own .quantity div; the stepper is built inside that, so the
   outer wrapper must not add a second box or its own spacing. */
.ostz .quantity {
	display: contents;
}

.ostz-qty {
	display: flex;
	align-items: center;
	overflow: hidden;
	border: 1px solid var(--ostz-line-strong, #333846);
	border-radius: 12px;
}

.ostz-qty-btn {
	width: 44px;
	height: 48px;
	border: 0;
	background: var(--ostz-bg-raised, #15171e);
	color: var(--ostz-text, #f2f4f8);
	font-family: inherit;
	font-size: 20px;
	cursor: pointer;
}

.ostz-qty-btn:hover {
	background: var(--ostz-bg-raised-2, #1b1e27);
}

.ostz .ostz-qty input.qty {
	width: 52px;
	height: 48px;
	border: 0;
	border-radius: 0;
	background: transparent;
	font-weight: 800;
	text-align: center;
	-moz-appearance: textfield;
}

.ostz .ostz-qty input.qty::-webkit-outer-spin-button,
.ostz .ostz-qty input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* The single most important action on a product page gets the loud treatment, as the wireframe
   has it. The gradient is otherwise reserved for «place order». */
.ostz form.cart .single_add_to_cart_button {
	flex: 1;
	min-height: 48px;
	background: var(--ostz-gradient, linear-gradient(135deg, #00e0d5, #c026ff));
	color: var(--ostz-accent-ink, #08090c);
}

/* ---------------------------------------------------------------- assurance */

.ostz-assure {
	margin: var(--ostz-space-4) 0 0;
	padding: 14px 16px;
	border: 1px solid var(--ostz-line, #262a35);
	border-radius: 12px;
	background: var(--ostz-bg-raised, #15171e);
	list-style: none;
	font-size: 13px;
}

.ostz-assure-item {
	display: flex;
	gap: 9px;
	align-items: center;
	padding-block: 3px;
	color: var(--ostz-text-dim, #aab0be);
}

.ostz-assure-check {
	color: var(--ostz-accent, #00e0d5);
	font-weight: 900;
}

/* ---------------------------------------------------------------- origin strip */

.ostz-origin {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	margin-top: 14px;
	padding: 14px 16px;
	border: 1px solid var(--ostz-line-strong, #333846);
	border-radius: 12px;
	background: var(--ostz-bg-raised, #15171e);
}

.ostz-origin-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 160px;
}

.ostz-origin-kicker {
	color: var(--ostz-accent-2, #c026ff);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 1.5px;
}

.ostz-origin-title {
	margin-top: 2px;
	font-size: 14.5px;
	font-weight: 800;
}

.ostz-origin-go {
	padding: 6px 14px;
	border: 1px solid var(--ostz-line-strong, #333846);
	border-radius: 16px;
	color: var(--ostz-accent, #00e0d5);
	font-size: 13px;
	text-decoration: none;
	white-space: nowrap;
}

.ostz-origin-go:hover {
	border-color: var(--ostz-accent, #00e0d5);
}

/* ---------------------------------------------------------------- sections */

.ostz.single-product .related,
.ostz.single-product .upsells,
.ostz .woocommerce-tabs {
	padding-block: 30px;
	border-block-start: 1px solid var(--ostz-line, #262a35);
}

.ostz.single-product .related > h2,
.ostz .woocommerce-tabs h2 {
	margin-block-end: 12px;
	font-size: 21px;
	font-weight: 900;
}

/*
 * Product tabs. WooCommerce ships them as a plain <ul>, and with its stylesheet dequeued they
 * rendered as a bulleted list of underlined links. This is the whole widget, ours.
 */
.ostz .woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 var(--ostz-space-6);
	padding: 0;
	border-block-end: 1px solid var(--ostz-line, #262a35);
	list-style: none;
}

.ostz .woocommerce-tabs ul.tabs li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ostz .woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 10px 16px;
	border-block-end: 2px solid transparent;
	color: var(--ostz-text-dim, #aab0be);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}

.ostz .woocommerce-tabs ul.tabs li.active a {
	border-block-end-color: var(--ostz-accent, #00e0d5);
	color: var(--ostz-text, #f2f4f8);
}

/*
 * The product meta line reads «شناسه محصول: نامعلوم» on every fixture and on any product whose
 * SKU is not filled — a field that mostly renders the word «unknown» is noise on a buyer's page.
 * The category is already in the breadcrumb above.
 */
.ostz.single-product .product_meta {
	display: none;
}

/* ---------------------------------------------------------------- notices, results, sorting */

.ostz .woocommerce-result-count,
.ostz .woocommerce-ordering {
	display: inline-block;
	color: var(--ostz-text-dim, #9a9aa6);
	font-size: .85rem;
}

.ostz .woocommerce-ordering {
	margin-inline-start: var(--ostz-space-4);
}

.ostz .woocommerce-ordering select,
.ostz select,
.ostz input[type='text'],
.ostz input[type='tel'],
.ostz input[type='email'],
.ostz input[type='number'],
.ostz input[type='password'],
.ostz textarea {
	width: 100%;
	min-height: 46px;
	padding: 11px 13px;
	border: 1px solid var(--ostz-line-strong, #333846);
	border-radius: var(--ostz-radius-sm);
	/* Sunk inputs read as editable against raised panels — the wireframe's #0c0e13. */
	background: var(--ostz-bg-sunken, #111318);
	color: var(--ostz-text, #f2f4f8);
	font-family: inherit;
	font-size: 14px;
}

.ostz .woocommerce-ordering select {
	width: auto;
	min-height: 40px;
	padding-block: 6px;
}

.ostz input::placeholder,
.ostz textarea::placeholder {
	color: var(--ostz-text-faint, #6f7686);
}

.ostz input:focus,
.ostz select:focus,
.ostz textarea:focus {
	outline: none;
	border-color: var(--ostz-accent, #00e0d5);
}

/* Two-up field rows where WooCommerce marks them, matching the wireframe. */
.ostz .woocommerce form .form-row-first,
.ostz .woocommerce form .form-row-last {
	width: calc(50% - 6px);
	display: inline-flex;
	vertical-align: top;
}

@media (max-width: 520px) {
	.ostz .woocommerce form .form-row-first,
	.ostz .woocommerce form .form-row-last {
		width: 100%;
	}
}

/* Wide tables (cart, order details) scroll inside their own container — never the page. */
.ostz .woocommerce table.shop_table,
.ostz .woocommerce-order-details {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}

/* ---------------------------------------------------------------- variations */

.ostz table.variations {
	width: 100%;
	margin: var(--ostz-space-6) 0 var(--ostz-space-4);
	border-collapse: collapse;
}

.ostz table.variations th,
.ostz table.variations td {
	padding: var(--ostz-space-2) 0;
	text-align: start;
	vertical-align: middle;
}

.ostz table.variations th {
	width: 7rem;
	color: var(--ostz-text-dim, #9a9aa6);
	font-size: .88rem;
	font-weight: 500;
}

.ostz .reset_variations {
	display: inline-block;
	margin-block-start: var(--ostz-space-2);
	color: var(--ostz-text-faint, #6a6a76);
	font-size: .82rem;
}

.ostz-size-guide-trigger {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin-block: 0 var(--ostz-space-2);
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ostz-accent, #2ec88c);
	font-family: inherit;
	font-size: .88rem;
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 4px;
	cursor: pointer;
}

.ostz .quantity input[type='number'] {
	width: 5rem;
	min-height: 44px;
	padding: var(--ostz-space-2);
	border: 1px solid var(--ostz-line, #26262e);
	border-radius: var(--ostz-radius);
	background: var(--ostz-bg-raised, #141419);
	color: var(--ostz-text, #eceef2);
	font-family: inherit;
	text-align: center;
}

/* Simple products: qty + button on one row. Variable products keep the form as a block
   (the variation table lives inside it) and the row is the add-to-cart wrapper instead. */
.ostz form.cart,
.ostz .woocommerce-variation-add-to-cart {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 12px;
	margin-top: 20px;
}

.ostz form.variations_form.cart {
	display: block;
}

.ostz .variations .label label {
	display: block;
	margin-block-end: 9px;
	color: var(--ostz-text-faint, #6f7686);
	font-size: 13px;
	font-weight: 700;
}

/* ---------------------------------------------------------------- sticky buy bar */

.ostz-buybar {
	position: fixed;
	inset-inline: 0;
	inset-block-end: 0;
	z-index: 100;
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: var(--ostz-space-4);
	padding: var(--ostz-space-3) var(--ostz-space-4);
	border-block-start: 1px solid var(--ostz-line-strong, #3a3a46);
	background: color-mix(in srgb, var(--ostz-bg, #0b0b0f) 94%, transparent);
	backdrop-filter: blur(10px);
}

.ostz-buybar-info {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.ostz-buybar-name {
	font-size: .82rem;
	color: var(--ostz-text-dim, #9a9aa6);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ostz-buybar-price {
	font-size: .95rem;
	font-weight: 700;
	unicode-bidi: isolate;
}

.ostz-buybar-cta {
	flex: 0 0 auto;
}

/* ---------------------------------------------------------------- step indicator */

.ostz-steps {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--ostz-space-2);
	margin: 0 0 var(--ostz-space-6);
	padding: var(--ostz-space-6) 0 var(--ostz-space-2);
	list-style: none;
	counter-reset: none;
}

.ostz-step {
	display: flex;
	align-items: center;
	gap: 9px;
	padding-inline-end: var(--ostz-space-4);
	color: var(--ostz-text-faint, #6f7686);
	font-size: 13px;
}

.ostz-step + .ostz-step::before {
	content: '';
	width: 34px;
	height: 1.5px;
	margin-inline-end: var(--ostz-space-4);
	background: var(--ostz-line-strong, #333846);
}

.ostz-step-num {
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border: 1.5px solid var(--ostz-line-strong, #333846);
	border-radius: 50%;
	background: var(--ostz-bg-raised, #15171e);
	font-size: 13px;
	unicode-bidi: isolate;
}

.ostz-step-on {
	color: var(--ostz-text, #f2f4f8);
}

.ostz-step-on .ostz-step-num {
	border-color: transparent;
	background: var(--ostz-gradient, linear-gradient(135deg, #00e0d5, #c026ff));
	color: var(--ostz-accent-ink, #08090c);
	font-weight: 800;
}

.ostz-step-done .ostz-step-num {
	border-color: var(--ostz-accent, #00e0d5);
	color: var(--ostz-accent, #00e0d5);
}

.ostz-trustline {
	margin: 0 0 var(--ostz-space-6);
	color: var(--ostz-text-faint, #6f7686);
	font-size: 12.5px;
	text-align: center;
}

/* ---------------------------------------------------------------- checkout columns */

/*
 * ⚠ MEASURED: this grid has THREE children, not two. WooCommerce puts an <h3> («سفارش شما»)
 * between the customer details and the order review. Auto-placement therefore sent the heading
 * into column 2 on its own and pushed the order summary down into column 1 — so the "two-column
 * checkout" rendered as one narrow column with an orphan heading floating beside it, from the
 * day it was written. Placement is explicit now; auto-placement cannot be trusted on markup
 * whose child list belongs to somebody else.
 */
.ostz .woocommerce-checkout {
	display: grid;
	grid-template-columns: 1.5fr 1fr;
	gap: 20px 20px;
	align-items: start;
	padding-block-end: var(--ostz-space-12);
}

.ostz .woocommerce-checkout > #customer_details {
	grid-column: 1;
	grid-row: 1 / span 2;
}

.ostz .woocommerce-checkout > #order_review_heading {
	grid-column: 2;
	grid-row: 1;
	align-self: end;
	margin: 0;
}

.ostz .woocommerce-checkout > #order_review {
	grid-column: 2;
	grid-row: 2;
	position: sticky;
	top: calc(var(--ostz-header-h, 64px) + var(--ostz-space-4));
}

@media (max-width: 820px) {
	.ostz .woocommerce-checkout {
		grid-template-columns: 1fr;
	}

	.ostz .woocommerce-checkout > #customer_details,
	.ostz .woocommerce-checkout > #order_review_heading,
	.ostz .woocommerce-checkout > #order_review {
		grid-column: 1;
		grid-row: auto;
	}

	.ostz .woocommerce-checkout > #order_review {
		position: static;
	}
}

/*
 * The billing column was itself split in two at 310px each, which is not a usable form width.
 * Shipping is behind a toggle and the notes field is a single textarea, so one column with the
 * fields laid out inside it is both wider and simpler.
 */
.ostz #customer_details.col2-set {
	display: block;
}

.ostz #customer_details .col-1,
.ostz #customer_details .col-2 {
	width: auto;
	float: none;
}

.ostz #customer_details,
.ostz .woocommerce-checkout-payment {
	padding: 18px 20px;
	border: 1px solid var(--ostz-line, #262a35);
	border-radius: var(--ostz-radius-lg);
	background: var(--ostz-bg-raised, #15171e);
}

.ostz #customer_details .col-1,
.ostz #customer_details .col-2 {
	width: auto;
	float: none;
}

.ostz #order_review_heading {
	grid-column: 2;
	margin: 0;
}

/* The summary follows the shopper down a long form. */
.ostz #order_review {
	position: sticky;
	top: calc(var(--ostz-header-h) + var(--ostz-space-4));
	overflow: hidden;
	border: 1px solid var(--ostz-line-strong, #333846);
	border-radius: var(--ostz-radius-lg);
	background:
		radial-gradient(90% 60% at 90% 0, color-mix(in srgb, var(--ostz-accent, #00e0d5) 8%, transparent), transparent 60%),
		var(--ostz-bg-raised, #15171e);
}

@media (max-width: 820px) {
	.ostz #order_review_heading,
	.ostz #order_review {
		grid-column: 1;
		position: static;
	}
}

/* The one place a gradient button is right: the single most important action on the site. */
.ostz #place_order,
.ostz .checkout-button {
	width: 100%;
	min-height: 52px;
	border-radius: 12px;
	background: var(--ostz-gradient, linear-gradient(135deg, #00e0d5, #c026ff));
	color: var(--ostz-accent-ink, #08090c);
	font-size: 16px;
	font-weight: 900;
}

/* ---------------------------------------------------------------- empty cart & next steps */

.ostz-empty-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ostz-space-3);
	margin-top: var(--ostz-space-6);
}

.ostz-empty-lead {
	color: var(--ostz-text-dim, #aab0be);
	font-size: 13.5px;
}

.ostz-empty-links .ostz-chips {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ostz-nextsteps {
	margin: var(--ostz-space-6) 0;
	padding: 0;
	list-style: none;
	counter-reset: ostz-next;
}

.ostz-nextstep {
	display: flex;
	gap: var(--ostz-space-3);
	align-items: flex-start;
	padding: var(--ostz-space-3) 0;
	border-block-end: 1px solid var(--ostz-line, #262a35);
	color: var(--ostz-text-dim, #aab0be);
	font-size: 13.5px;
	counter-increment: ostz-next;
}

.ostz-nextstep::before {
	content: counter(ostz-next);
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	border: 1px solid var(--ostz-line-strong, #333846);
	border-radius: 50%;
	color: var(--ostz-accent, #00e0d5);
	font-size: 12px;
	font-weight: 800;
}

.ostz-nextstep:last-child {
	border-block-end: 0;
}

/* ---------------------------------------------------------------- cart & checkout */

.ostz .woocommerce table.shop_table {
	width: 100%;
	border: 1px solid var(--ostz-line, #26262e);
	border-radius: var(--ostz-radius-lg);
	border-collapse: collapse;
	background: var(--ostz-bg-raised, #141419);
}

.ostz .woocommerce table.shop_table th,
.ostz .woocommerce table.shop_table td {
	padding: var(--ostz-space-3) var(--ostz-space-4);
	border-block-end: 1px solid var(--ostz-line, #26262e);
	text-align: start;
	vertical-align: middle;
}

.ostz .woocommerce table.shop_table th {
	color: var(--ostz-text-dim, #9a9aa6);
	font-size: .85rem;
	font-weight: 500;
}

.ostz .woocommerce table.shop_table img {
	width: 64px;
	height: auto;
	border-radius: var(--ostz-radius);
}

.ostz .cart_totals,
.ostz #order_review,
.ostz .woocommerce-checkout-review-order {
	padding: var(--ostz-space-6);
	border: 1px solid var(--ostz-line, #26262e);
	border-radius: var(--ostz-radius-lg);
	background: var(--ostz-bg-raised, #141419);
}

.ostz .woocommerce-billing-fields h3,
.ostz .cart_totals h2,
.ostz #order_review_heading {
	margin: 0 0 var(--ostz-space-4);
	font-size: 1.05rem;
	font-weight: 700;
}

.ostz .woocommerce form .form-row {
	display: flex;
	flex-direction: column;
	gap: var(--ostz-space-2);
	margin-block-end: var(--ostz-space-4);
	padding: 0;
}

/* Every input needs a real, visible label — a placeholder is not a label. */
.ostz .woocommerce form .form-row label {
	color: var(--ostz-text-dim, #9a9aa6);
	font-size: .85rem;
	font-weight: 500;
}

.ostz .woocommerce form .form-row .required {
	color: var(--ostz-danger, #e2564a);
	text-decoration: none;
}

.ostz .woocommerce-error,
.ostz .woocommerce-message,
.ostz .woocommerce-info {
	margin: 0 0 var(--ostz-space-6);
	padding: var(--ostz-space-3) var(--ostz-space-4);
	border-inline-start: 3px solid var(--ostz-accent, #2ec88c);
	border-radius: var(--ostz-radius);
	background: var(--ostz-bg-raised, #141419);
	list-style: none;
	font-size: .9rem;
}

.ostz .woocommerce-error {
	border-inline-start-color: var(--ostz-danger, #e2564a);
}

/* ---------------------------------------------------------------- my account */

/* ⚠ COMPOUND, not descendant — see the note on the product title. This rule never matched, so
   the account panel had been rendering as a full-width list with the content stacked under it. */
.ostz.woocommerce-account .woocommerce {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 20px;
	align-items: start;
}

@media (max-width: 820px) {
	.ostz.woocommerce-account .woocommerce {
		grid-template-columns: 1fr;
	}
}

.ostz .woocommerce-MyAccount-navigation {
	width: auto;
	float: none;
	padding: var(--ostz-space-3);
	border: 1px solid var(--ostz-line, #262a35);
	border-radius: var(--ostz-radius-lg);
	background: var(--ostz-bg-raised, #15171e);
}

.ostz .woocommerce-MyAccount-navigation ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ostz .woocommerce-MyAccount-navigation li a {
	display: block;
	min-height: 44px;
	padding: var(--ostz-space-2) var(--ostz-space-3);
	border-radius: var(--ostz-radius-sm);
	color: var(--ostz-text-dim, #aab0be);
	font-size: 13.5px;
	line-height: 28px;
	text-decoration: none;
}

.ostz .woocommerce-MyAccount-navigation li a:hover {
	background: var(--ostz-bg-raised-2, #1b1e27);
	color: var(--ostz-text, #f2f4f8);
}

.ostz .woocommerce-MyAccount-navigation li.is-active a {
	background: var(--ostz-bg-raised-2, #1b1e27);
	color: var(--ostz-text, #f2f4f8);
	font-weight: 700;
	box-shadow: inset 2px 0 0 var(--ostz-accent, #00e0d5);
}

.ostz .woocommerce-MyAccount-content {
	width: auto;
	float: none;
	padding: var(--ostz-space-6);
	border: 1px solid var(--ostz-line, #262a35);
	border-radius: var(--ostz-radius-lg);
	background: var(--ostz-bg-raised, #15171e);
}

.ostz-account-subtitle {
	margin: 0 0 var(--ostz-space-2);
	font-size: 15px;
	font-weight: 800;
}

.ostz-account-order-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: var(--ostz-space-3);
	margin: 0 0 var(--ostz-space-6);
	font-size: 13.5px;
}

.ostz-account-order-link {
	color: var(--ostz-accent, #00e0d5);
	font-weight: 700;
	text-decoration: none;
}

.ostz-muted {
	color: var(--ostz-text-faint, #6f7686);
}

/* ---------------------------------------------------------------- fulfilment tracker */

.ostz-track {
	display: flex;
	align-items: flex-start;
	margin: 0 0 var(--ostz-space-4);
	padding: 0;
	list-style: none;
	counter-reset: none;
}

.ostz-track-step {
	position: relative;
	flex: 1;
	text-align: center;
	font-size: 11.5px;
	color: var(--ostz-text-dim, #aab0be);
}

/* The connector sits BEHIND the dots and starts at the second step. */
.ostz-track-step::before {
	content: '';
	position: absolute;
	top: 12px;
	inset-inline-end: 50%;
	z-index: 1;
	width: 100%;
	height: 2px;
	background: var(--ostz-line-strong, #333846);
}

.ostz-track-step:first-child::before {
	display: none;
}

.ostz-track-dot {
	position: relative;
	z-index: 2;
	display: block;
	width: 26px;
	height: 26px;
	margin: 0 auto var(--ostz-space-2);
	border: 2px solid var(--ostz-line-strong, #333846);
	border-radius: 50%;
	background: var(--ostz-bg-raised-2, #1b1e27);
}

.ostz-track-step.is-done::before,
.ostz-track-step.is-now::before {
	background: var(--ostz-accent, #00e0d5);
}

.ostz-track-step.is-done .ostz-track-dot {
	border-color: var(--ostz-accent, #00e0d5);
	background: var(--ostz-accent, #00e0d5);
}

.ostz-track-step.is-now .ostz-track-dot {
	border-color: var(--ostz-accent, #00e0d5);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--ostz-accent, #00e0d5) 14%, transparent);
}

.ostz-track-step.is-now .ostz-track-label {
	color: var(--ostz-text, #f2f4f8);
	font-weight: 700;
}

/* Off-track states get a plain honest line, never a progress bar. */
.ostz-track-flat {
	margin: 0 0 var(--ostz-space-4);
	padding: var(--ostz-space-3) var(--ostz-space-4);
	border-inline-start: 2px solid var(--ostz-line-strong, #333846);
	border-radius: var(--ostz-radius-sm);
	background: var(--ostz-bg-raised-2, #1b1e27);
	font-size: 13px;
}

.ostz-track-cancelled,
.ostz-track-failed {
	border-inline-start-color: var(--ostz-danger, #e2564a);
	color: var(--ostz-danger, #e2564a);
}

.ostz-track-on-hold,
.ostz-track-pending {
	border-inline-start-color: var(--ostz-amber, #ffb020);
	color: var(--ostz-amber, #ffb020);
}

.ostz-track-code {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ostz-space-2);
	align-items: baseline;
	margin: 0;
	font-size: 13px;
}

.ostz-track-code-label {
	color: var(--ostz-text-dim, #aab0be);
}

.ostz-track-code-value {
	font-weight: 800;
	letter-spacing: .04em;
	unicode-bidi: isolate;
}

/* ---------------------------------------------------------------- order received */

.ostz .woocommerce-order .woocommerce-thankyou-order-received {
	margin: 0 0 var(--ostz-space-6);
	font-size: 1.15rem;
	font-weight: 700;
}

.ostz .woocommerce-order-overview {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ostz-space-6);
	margin: 0 0 var(--ostz-space-8);
	padding: var(--ostz-space-6);
	border: 1px solid var(--ostz-line, #26262e);
	border-radius: var(--ostz-radius-lg);
	background: var(--ostz-bg-raised, #141419);
	list-style: none;
}

.ostz .woocommerce-order-overview li {
	display: flex;
	flex-direction: column;
	gap: var(--ostz-space-1);
	color: var(--ostz-text-dim, #9a9aa6);
	font-size: .82rem;
}

.ostz .woocommerce-order-overview strong {
	color: var(--ostz-text, #eceef2);
	font-size: .95rem;
	unicode-bidi: isolate;
}

/* ---------------------------------------------------------------- narrow screens */

@media (max-width: 820px) {
	.ostz-pdp {
		grid-template-columns: 1fr;
		gap: var(--ostz-space-6);
	}
}

@media (max-width: 800px) {

	.ostz-buybar {
		display: flex;
	}

	/* Room for the fixed bar so it never covers the end of the page. */
	.ostz.single-product .ostz-main {
		padding-block-end: calc(var(--ostz-space-16) + 72px);
	}
}
