/* ==========================================================================
   Shop Flow Wizard — shop-specific overrides.
   Base styles (grey bg, cards, checkout, payment, coupon, skeleton, spinner)
   inherited from booking-flow/wizard.css via CSS dependency.
   ========================================================================== */

/* --- Layout --- */

/* sbf__layout handles max-width + centering + 2-column grid with sidebar. */

/* Headings inherit from booking-flow wizard.css (.sbf__heading) */

/* --- Product list --- */

.sbf__product-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.sbf__product-row {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem 1.25rem;
}

.sbf__product-image {
	flex: 0 0 72px;
}

.sbf__product-image img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: var(--sbf-radius-sm);
}

.sbf__product-info {
	flex: 1;
	min-width: 0;
}

.sbf__product-name {
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.3;
}

.sbf__product-desc {
	font-size: 0.875rem;
	color: var(--sbf-text-muted);
	margin-top: 0.15rem;
	line-height: 1.4;
}

.sbf__product-price {
	font-size: 0.9rem;
	margin-top: 0.25rem;
	font-weight: 600;
}

/* --- Quantity picker --- */

.sbf__product-qty {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
}

.sbf__qty-btn {
	width: 36px;
	height: 36px;
	border: 1px solid var(--sbf-border);
	background: var(--wp--preset--color--surface-strong);
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color var(--sbf-transition);
	color: var(--sbf-text);
	padding: 0;
}

.sbf__qty-btn:hover:not(:disabled) {
	background: var(--wp--preset--color--hairline);
}

.sbf__qty-btn:disabled {
	opacity: 0.3;
	cursor: default;
}

.sbf__qty-btn--minus {
	border-radius: var(--sbf-radius-sm) 0 0 var(--sbf-radius-sm);
}

.sbf__qty-btn--plus {
	border-radius: 0 var(--sbf-radius-sm) var(--sbf-radius-sm) 0;
}

.sbf__qty-value {
	width: 40px;
	text-align: center;
	font-size: 1rem;
	font-weight: 600;
	border-top: 1px solid var(--sbf-border);
	border-bottom: 1px solid var(--sbf-border);
	height: 36px;
	line-height: 36px;
	background: var(--wp--preset--color--surface);
}

/* --- Syncing state --- */

.sbf__product-row.is-syncing {
	opacity: 0.7;
	transition: opacity 0.2s;
}

.sbf__qty-spinner {
	display: inline-flex;
	align-items: center;
	margin-left: 0.5rem;
}

.sbf__btn-spinner--dark {
	border-color: rgba(0, 0, 0, 0.1);
	border-top-color: var(--sbf-primary);
	width: 16px;
	height: 16px;
}

/* --- Unavailable / out of stock --- */

.sbf__product-row.is-unavailable {
	opacity: 0.5;
}

.sbf__product-unavailable {
	flex: 0 0 auto;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--sbf-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* --- Proceed button --- */

.sbf__proceed {
	margin-top: 1.5rem;
	text-align: center;
}

.sbf--shop .sbf__btn--primary {
	display: inline-block;
	max-width: 400px;
	padding: 0.85rem 2.5rem;
	font-size: 1rem;
	font-weight: 600;
	border: none;
	border-radius: var(--sbf-radius-sm);
	cursor: pointer;
	background: var(--sbf-primary);
	color: var(--wp--preset--color--surface);
	letter-spacing: 0.03em;
	transition: background var(--sbf-transition);
}

.sbf--shop .sbf__btn--primary:hover {
	background: var(--sbf-primary-dark);
}

.sbf--shop .sbf__btn--primary:disabled {
	opacity: 0.6;
	cursor: default;
}

/* --- Back button --- */

.sbf__checkout-back {
	margin-bottom: 1rem;
}

.sbf__btn--link {
	background: none;
	border: none;
	color: var(--sbf-primary);
	cursor: pointer;
	font-size: 0.9rem;
	padding: 0;
	text-decoration: underline;
}

.sbf__btn--link:hover {
	text-decoration: none;
}

/* --- Checkout spacing --- */

.sbf--shop .sbf__checkout-sections {
	margin-top: 1.5rem;
}

/* --- Mobile --- */

@media (max-width: 600px) {
	.sbf__product-row {
		flex-wrap: wrap;
		gap: 0.75rem;
	}

	.sbf__product-image {
		flex: 0 0 56px;
	}

	.sbf__product-image img {
		width: 56px;
		height: 56px;
	}

	.sbf__product-info {
		flex: 1 1 calc(100% - 56px - 0.75rem);
	}

	.sbf__product-qty {
		width: 100%;
		justify-content: center;
	}
}
