/* --------------------------------------------------------------------------
 * GRZ Gaming — numbered compact mobile purchase sequence (v1.7.4)
 *
 * Presentation only. The package selector, account-validator controls,
 * WooCommerce quantity input and both native submit buttons keep their real
 * DOM nodes, names, values, hooks and event handlers.
 * ----------------------------------------------------------------------- */

.single-product .grz-tp-add-cart-secondary__icon {
	display: inline-grid;
	place-items: center;
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
}

.single-product .grz-tp-add-cart-secondary__icon svg {
	display: block;
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
}

@media (max-width: 620px) {
	/* Native/theme-owned account layouts already have separate numbered cards.
	 * Their summary only needs the denser total/actions grid. */
	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) > .grz-tp-card__body {
		display: grid;
		grid-template-columns: 72px 108px minmax(0, 1fr);
		grid-auto-flow: row dense;
		align-items: center;
		column-gap: 8px;
		row-gap: 0;
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)):not(:has(.grz-tp-qty--action)) > .grz-tp-card__body {
		grid-template-columns: 72px minmax(0, 1fr);
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .single_variation_wrap,
	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .woocommerce-variation-add-to-cart,
	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .grz-tp-cart-actions,
	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .grz-tp-action-row,
	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .grz-tp-total {
		display: contents !important;
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .grz-tp-summary-list {
		grid-column: 1 / -1;
		order: 1;
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .grz-tp-total__label,
	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .grz-tp-qty--action,
	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .grz-tp-total__prices {
		align-self: stretch;
		order: 2;
		margin: 0;
		padding-block: 9px;
		border-top: 1px solid rgba(124, 147, 177, 0.22);
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .grz-tp-total__label {
		grid-column: 1;
		display: flex;
		align-items: center;
		font-weight: 650;
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .grz-tp-qty--action {
		grid-column: 2;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .grz-tp-total__prices {
		grid-column: 3;
		justify-content: center;
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)):not(:has(.grz-tp-qty--action)) .grz-tp-total__prices {
		grid-column: 2;
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) button.grz-tp-add-cart-secondary,
	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .single_add_to_cart_button {
		align-self: stretch;
		order: 3;
		margin-top: 0;
		border-radius: var(--grz-product-control-radius, 6px);
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) button.grz-tp-add-cart-secondary {
		grid-column: 1;
		width: auto;
		min-width: 0;
		min-height: 48px;
		padding: 0;
		border-color: #e18a00;
		background: #ff9f0a;
		color: #172033;
		box-shadow: 0 6px 14px rgba(225, 138, 0, 0.16);
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) button.grz-tp-add-cart-secondary:hover:not(:disabled),
	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) button.grz-tp-add-cart-secondary:focus-visible {
		border-color: #c97800;
		background: #f29400;
		color: #172033;
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .grz-tp-add-cart-secondary__label {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .grz-tp-add-cart-secondary__icon {
		width: 19px;
		height: 19px;
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .single_add_to_cart_button {
		grid-column: 2 / -1;
		width: 100%;
		min-width: 0;
		min-height: 48px;
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .grz-tp-express-slot,
	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .grz-tp-secure {
		grid-column: 1 / -1;
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .grz-tp-express-slot {
		order: 4;
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .grz-tp-secure {
		order: 5;
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .grz-tp-qty--action .quantity {
		width: 100px;
		height: 44px;
		grid-template-columns: 30px 40px 30px;
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .grz-tp-qty--action .grz-tp-qty__btn {
		width: 30px;
		height: 42px;
		min-height: 42px;
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .grz-tp-qty--action .quantity .qty {
		height: 42px;
		min-height: 42px;
		line-height: 42px;
	}

	/* :has() gates this compatibility treatment to the external validator.
	 * Products without it keep their normal two-step or theme-owned three-step
	 * presentation. */
	.single-product .grz-tp-card--summary:has(.grz-caller-box) {
		display: grid;
		grid-template-columns: 72px 108px minmax(0, 1fr);
		grid-auto-flow: row dense;
		align-items: center;
		column-gap: 8px;
		row-gap: 0;
		height: auto;
		overflow: visible;
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box):not(:has(.grz-tp-qty--action)) {
		grid-template-columns: 72px minmax(0, 1fr);
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) > .grz-tp-card__body,
	.single-product .grz-tp-card--summary:has(.grz-caller-box) .single_variation_wrap,
	.single-product .grz-tp-card--summary:has(.grz-caller-box) .woocommerce-variation-add-to-cart,
	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-tp-cart-actions,
	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-tp-action-row,
	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-tp-total {
		display: contents !important;
	}

	/* Step 2 — the validator stays exactly where its plugin hooked it. */
	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-caller-box.grz-caller-box {
		grid-column: 1 / -1;
		order: 1;
		width: 100%;
		margin: 0 0 10px;
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-caller-box.grz-caller-box .grz-caller-box-inner {
		padding: 10px 12px 12px;
		border-color: color-mix(in srgb, var(--grz-tp-page-color, #0762e6) 16%, #ced8e6);
		border-radius: var(--grz-product-card-radius, 8px);
		box-shadow: 0 5px 16px rgba(23, 47, 82, 0.055);
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-caller-box.grz-caller-box .grz-caller-head.grz-caller-sr-only {
		position: static !important;
		display: flex !important;
		align-items: center;
		justify-content: flex-start;
		width: auto !important;
		height: auto !important;
		margin: 0 0 9px !important;
		padding: 0 !important;
		overflow: visible !important;
		clip: auto !important;
		white-space: normal !important;
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-caller-head::before {
		display: grid;
		place-items: center;
		flex: 0 0 24px;
		width: 24px;
		height: 24px;
		margin-inline-end: 8px;
		border-radius: 50%;
		background: var(--grz-tp-accent, #0868f2);
		color: #fff;
		font: 800 11px/1 var(--grz-font, Inter, sans-serif);
		content: "2";
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-caller-eyebrow {
		display: none;
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-caller-title {
		font-family: "Manrope", var(--grz-font, Inter, sans-serif);
		font-size: 13px;
		font-weight: 750;
		letter-spacing: -0.012em;
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-caller-user-label {
		margin-bottom: 4px;
		font-size: 11.5px;
	}

	/* Step 3 — summary pieces are painted as one continuous card while the
	 * quantity control remains its unchanged WooCommerce node. */
	.single-product .grz-tp-card--summary:has(.grz-caller-box) > .grz-tp-card__head {
		grid-column: 1 / -1;
		order: 2;
		margin: 0;
		padding: 11px 12px 8px;
		border: 1px solid color-mix(in srgb, var(--grz-tp-page-color, #0762e6) 16%, #ced8e6);
		border-bottom: 0;
		border-radius: var(--grz-product-card-radius, 8px) var(--grz-product-card-radius, 8px) 0 0;
		background: #fff;
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) > .grz-tp-card__head .grz-tp-step {
		font-size: 0;
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) > .grz-tp-card__head .grz-tp-step::before {
		font-size: 11px;
		content: "3";
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-tp-summary-list {
		grid-column: 1 / -1;
		order: 3;
		margin: 0;
		padding: 0 12px 8px;
		border-inline: 1px solid color-mix(in srgb, var(--grz-tp-page-color, #0762e6) 16%, #ced8e6);
		background: #fff;
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-tp-total__label,
	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-tp-qty--action,
	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-tp-total__prices {
		align-self: stretch;
		order: 4;
		margin: 0;
		padding-block: 9px;
		border-top: 1px solid rgba(124, 147, 177, 0.22);
		background: #fff;
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box):not(:has(.grz-tp-qty--action)) .grz-tp-total__prices {
		grid-column: 2;
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-tp-total__label {
		grid-column: 1;
		display: flex;
		align-items: center;
		padding-inline-start: 12px;
		border-inline-start: 1px solid color-mix(in srgb, var(--grz-tp-page-color, #0762e6) 16%, #ced8e6);
		color: #53627a;
		font-weight: 650;
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-tp-qty--action {
		grid-column: 2;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-tp-total__prices {
		grid-column: 3;
		justify-content: center;
		padding-inline-end: 12px;
		border-inline-end: 1px solid color-mix(in srgb, var(--grz-tp-page-color, #0762e6) 16%, #ced8e6);
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-tp-qty--action .quantity {
		width: 100px;
		height: 44px;
		grid-template-columns: 30px 40px 30px;
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-tp-qty--action .grz-tp-qty__btn {
		width: 30px;
		height: 42px;
		min-height: 42px;
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-tp-qty--action .quantity .qty {
		height: 42px;
		min-height: 42px;
		line-height: 42px;
	}

	/* Compact cart + dominant Buy Now. Amber distinguishes "save for later"
	 * from the primary GRZ-blue conversion action without competing with it. */
	.single-product .grz-tp-card--summary:has(.grz-caller-box) button.grz-tp-add-cart-secondary,
	.single-product .grz-tp-card--summary:has(.grz-caller-box) .single_add_to_cart_button {
		align-self: stretch;
		order: 5;
		margin-top: 0;
		border-radius: var(--grz-product-control-radius, 6px);
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) button.grz-tp-add-cart-secondary {
		grid-column: 1;
		justify-self: stretch;
		width: auto;
		min-width: 0;
		min-height: 48px;
		margin-inline-start: 1px;
		padding: 0;
		border-color: #e18a00;
		background: #ff9f0a;
		color: #172033;
		box-shadow: 0 6px 14px rgba(225, 138, 0, 0.16);
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) button.grz-tp-add-cart-secondary:hover:not(:disabled),
	.single-product .grz-tp-card--summary:has(.grz-caller-box) button.grz-tp-add-cart-secondary:focus-visible {
		border-color: #c97800;
		background: #f29400;
		color: #172033;
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-tp-add-cart-secondary__label {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-tp-add-cart-secondary__icon {
		width: 19px;
		height: 19px;
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .single_add_to_cart_button {
		grid-column: 2 / -1;
		width: 100%;
		min-width: 0;
		min-height: 48px;
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-tp-express-slot,
	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-tp-secure {
		grid-column: 1 / -1;
		background: #fff;
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-tp-express-slot {
		order: 6;
		margin: 0;
		padding: 8px 12px 0;
		border-inline: 1px solid color-mix(in srgb, var(--grz-tp-page-color, #0762e6) 16%, #ced8e6);
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-tp-express-slot:empty {
		display: none;
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-tp-secure {
		order: 7;
		margin: 0;
		padding: 9px 12px 10px;
		border: 1px solid color-mix(in srgb, var(--grz-tp-page-color, #0762e6) 16%, #ced8e6);
		border-top: 0;
		border-radius: 0 0 var(--grz-product-card-radius, 8px) var(--grz-product-card-radius, 8px);
	}
}

@media (max-width: 350px) {
	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) > .grz-tp-card__body,
	.single-product .grz-tp-card--summary:has(.grz-caller-box) {
		grid-template-columns: 62px 100px minmax(0, 1fr);
		column-gap: 6px;
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)):not(:has(.grz-tp-qty--action)) > .grz-tp-card__body,
	.single-product .grz-tp-card--summary:has(.grz-caller-box):not(:has(.grz-tp-qty--action)) {
		grid-template-columns: 62px minmax(0, 1fr);
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-tp-qty--action .quantity {
		width: 94px;
		grid-template-columns: 27px 40px 27px;
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .grz-tp-qty--action .quantity {
		width: 94px;
		grid-template-columns: 27px 40px 27px;
	}

	.single-product .grz-tp-card--summary:has(.grz-caller-box) .grz-tp-qty--action .grz-tp-qty__btn {
		width: 27px;
	}

	.single-product .grz-tp-card--summary:not(:has(.grz-caller-box)) .grz-tp-qty--action .grz-tp-qty__btn {
		width: 27px;
	}
}
