/*
Theme Name: Spa Booking Theme
Theme URI: https://example.com/spa-ticket-booking
Author: Spa Ticket Booking
Description: Minimal storefront theme with dedicated page templates for spa ticket booking and treatment booking. Pair with the Spa Ticket Booking plugin.
Version: 1.0.16
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.2
Text Domain: stb-booking-theme
*/

:root {
	--stb-theme-ink: #3b3b3b;
	--stb-theme-display: #3b3b3b;
	--stb-theme-muted: #6b6b6b;
	--stb-theme-surface: #f7f1ea;
	--stb-theme-font-display: "Domaine Display", Georgia, "Times New Roman", serif;
	--stb-theme-font-body: "Apercu", "apercu-regular-pro", system-ui, sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body.stb-booking-theme {
	display: flex;
	flex-direction: column;
	margin: 0;
	min-height: 100vh;
	color: var(--stb-theme-ink);
	font-family: var(--stb-theme-font-body);
	font-size: 1rem;
	line-height: 1.5;
	background: var(--stb-theme-surface);
}

body.stb-booking-theme a {
	color: inherit;
}

.stb-theme-shell {
	flex: 1 0 auto;
	width: min(1350px, calc(100% - 2rem));
	margin: 0 auto;
	padding: 1.75rem 0 3rem;
}

body.stb-cart-has-booking .stb-theme-page-title,
body.stb-checkout-has-booking .stb-theme-page-title {
	color: var(--stb-accent, #1f5c4a);
}

body.stb-cart-has-booking .stb-theme-shell,
body.stb-checkout-has-booking .stb-theme-shell,
body.page-template-template-spa-booking .stb-theme-shell,
body.page-template-template-treatment-booking .stb-theme-shell,
body.stb-spa-booking-page .stb-theme-shell,
body.stb-treatment-booking-page .stb-theme-shell,
body.stb-booking-theme:has(.stb-booking-layout) .stb-theme-shell {
	width: min(1350px, calc(100% - 2rem));
	max-width: none;
}

@media (max-width: 900px) {
	.stb-theme-shell {
		width: 100%;
		max-width: none;
		padding: 1.25rem 0 2.5rem;
	}

	.stb-theme-brand {
		padding-left: 15px;
		padding-right: 15px;
	}

	.stb-theme-page-title {
		padding-left: 15px;
		padding-right: 15px;
	}

	/* Booking layout handles its own 15px padding; keep shell flush for full-bleed image. */
	.stb-theme-content--spa-booking,
	.stb-theme-content--treatment-booking {
		padding-left: 0;
		padding-right: 0;
	}

	.stb-theme-content:not(.stb-theme-content--spa-booking):not(.stb-theme-content--treatment-booking) {
		padding-left: 15px;
		padding-right: 15px;
	}
}

.stb-theme-brand {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	text-align: center;
	margin: 0 0 1.5rem;
}

.stb-theme-brand__logo {
	display: block;
	max-width: min(220px, 55vw);
	max-height: 88px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.stb-theme-brand__logo-link {
	display: inline-block;
	line-height: 0;
	text-decoration: none;
	border: 0;
}

.stb-theme-brand__logo-link:hover,
.stb-theme-brand__logo-link:focus-visible {
	opacity: 0.88;
}

.stb-theme-brand__logo-link:focus-visible {
	outline: 2px solid var(--stb-accent, #1f5c4a);
	outline-offset: 4px;
}

.stb-theme-brand__name {
	margin: 0;
	font-family: var(--stb-theme-font-display);
	font-size: clamp(1.15rem, 2.4vw, 1.55rem);
	font-weight: 500;
	letter-spacing: -0.01em;
	line-height: 1.25;
	color: var(--stb-theme-display, var(--stb-display, var(--stb-theme-ink)));
}

body.stb-spa-booking-page .stb-theme-page-title,
body.stb-treatment-booking-page .stb-theme-page-title {
	display: none;
}

.stb-theme-page-title {
	margin: 0 0 1.75rem;
	text-align: center;
	font-family: var(--stb-theme-font-display);
	font-size: clamp(1.65rem, 3.6vw, 2.35rem);
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1.2;
	color: var(--stb-theme-display, var(--stb-display, var(--stb-theme-ink)));
}

.stb-theme-content {
	width: 100%;
}

.stb-theme-content > *:first-child {
	margin-top: 0;
}

.stb-theme-contact-footer {
	flex: 0 0 auto;
	width: 100%;
	margin: 0;
	padding: 1.75rem 1.25rem;
	background: var(--stb-accent, #1f5c4a);
	color: #fff;
	font-family: var(--stb-theme-font-body);
	font-size: 0.98rem;
	line-height: 1.55;
	text-align: center;
}

.stb-theme-contact-footer__inner {
	width: min(42rem, 100%);
	margin: 0 auto;
}

.stb-theme-contact-footer a {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.stb-theme-contact-footer a:hover,
.stb-theme-contact-footer a:focus-visible {
	color: #fff;
	opacity: 0.88;
}

.stb-theme-contact-footer p,
.stb-theme-contact-footer ul,
.stb-theme-contact-footer ol {
	margin: 0 0 0.65rem;
}

.stb-theme-contact-footer > .stb-theme-contact-footer__inner > *:last-child,
.stb-theme-contact-footer__inner > *:last-child {
	margin-bottom: 0;
}

.stb-theme-contact-footer ul,
.stb-theme-contact-footer ol {
	padding-left: 1.15rem;
	text-align: left;
	display: inline-block;
}

@media (max-width: 900px) {
	.stb-theme-contact-footer {
		padding: 1.4rem 15px;
	}
}

body:not(.page-template-template-spa-booking):not(.page-template-template-treatment-booking):not(.stb-cart-has-booking):not(.stb-checkout-has-booking):not(.stb-spa-booking-page):not(.stb-treatment-booking-page):not(.single-product):not(:has(.stb-booking-layout)) .stb-theme-shell {
	max-width: 48rem;
}

body:not(.page-template-template-spa-booking):not(.page-template-template-treatment-booking):not(.stb-cart-has-booking):not(.stb-checkout-has-booking):not(.stb-spa-booking-page):not(.stb-treatment-booking-page):not(:has(.stb-booking-layout)) .stb-theme-content {
	font-size: 1.02rem;
}

a.stb-theme-brand__home {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.65rem;
	color: inherit;
	text-decoration: none;
}

a.stb-theme-brand__home:hover,
a.stb-theme-brand__home:focus-visible {
	opacity: 0.88;
}

a.stb-theme-brand__home:focus-visible {
	outline: 2px solid var(--stb-accent, #1f5c4a);
	outline-offset: 4px;
}

a.stb-theme-brand__home .stb-theme-brand__name {
	display: block;
}

body.single-product.stb-booking-theme .stb-theme-shell {
	width: min(1080px, calc(100% - 48px));
	max-width: 1080px;
}

body.single-product .woocommerce-breadcrumb {
	margin: 0 0 28px;
	color: var(--stb-muted, #8a7368);
	font-size: 13px;
}

body.single-product .woocommerce-breadcrumb a {
	color: inherit;
	text-decoration: none;
}

body.single-product .woocommerce-breadcrumb a:hover {
	text-decoration: underline;
}

body.single-product div.product {
	display: grid;
	grid-template-columns: minmax(260px, 400px) minmax(0, 1fr);
	gap: 48px 56px;
	align-items: start;
}

body.single-product div.product div.images,
body.single-product div.product div.summary {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
}

body.single-product div.product .onsale {
	display: none;
}

body.single-product .stb-product-eyebrow {
	margin: 0 0 8px;
	color: var(--stb-accent, #d8774c);
	font-size: 13px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

body.single-product .product_title {
	margin: 0 0 14px;
	color: var(--stb-theme-display, #3d1c0e);
	font-family: "Domaine Display", Georgia, "Times New Roman", serif;
	font-size: clamp(2rem, 3.4vw, 2.5rem);
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1.05;
}

body.single-product .summary > .price,
body.single-product .summary > .price .amount,
body.single-product .summary > .price .woocommerce-Price-amount {
	color: var(--stb-theme-display, #3d1c0e);
	font-family: "Domaine Display", Georgia, "Times New Roman", serif;
	font-size: 1.75rem;
	font-weight: 500;
	line-height: 1.2;
}

body.single-product .summary > .price {
	margin: 0;
}

body.single-product .summary > .price del,
body.single-product .summary > .price del .amount,
body.single-product .summary > .price del .woocommerce-Price-amount {
	margin-right: 0.55em;
	color: var(--stb-muted, #8a7368);
	font-size: 1.15rem;
}

body.single-product .summary > .price ins {
	text-decoration: none;
}

body.single-product .summary > .price .woocommerce-Price-currencySymbol {
	margin-left: 0.15em;
}

body.single-product .summary > .price .woocommerce-price-suffix {
	display: block;
	margin-top: 4px;
	color: var(--stb-muted, #8a7368);
	font-family: var(--stb-theme-font-body);
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0;
}

body.single-product .summary .woocommerce-product-details__short-description {
	margin: 18px 0 22px;
}

body.single-product form.stb-has-variation-options table.variations {
	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;
	white-space: nowrap !important;
	border: 0 !important;
}

body.single-product form.stb-has-variation-options .quantity,
body.single-product form.stb-has-variation-options .woocommerce-variation-price,
body.single-product form.stb-has-variation-options .reset_variations {
	display: none !important;
}

.stb-variation-options {
	display: flex;
	flex-direction: column;
	margin: 0 0 18px;
	border-top: 1px solid var(--stb-line, #e4d8cc);
}

.stb-variation-option {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	margin: 0;
	padding: 13px 2px;
	border: 0;
	border-bottom: 1px solid var(--stb-line, #e4d8cc);
	background: transparent;
	color: var(--stb-theme-display, #3d1c0e);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.stb-variation-option__price {
	color: var(--stb-muted, #8a7368);
}

.stb-variation-option:hover,
.stb-variation-option.is-selected {
	background: #f3ebe3;
}

.stb-variation-option.is-selected {
	border-left: 3px solid var(--stb-accent, #d8774c);
	padding-left: 12px;
}

.stb-variation-option.is-selected .stb-variation-option__price {
	color: var(--stb-theme-display, #3d1c0e);
}

body.single-product form.cart {
	margin-bottom: 0;
}

body.single-product form.cart .quantity {
	display: inline-flex;
	align-items: stretch;
	float: none !important;
	width: auto;
	margin: 0 0 14px;
	border: 1px solid var(--stb-line, #e4d8cc);
	border-radius: 12px;
	overflow: hidden;
	background: transparent;
}

body.single-product form.cart .quantity .qty {
	width: 2.5rem;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--stb-theme-display, #3d1c0e);
	font-family: inherit;
	font-size: 1rem;
	line-height: 44px;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}

body.single-product form.cart .quantity .qty::-webkit-outer-spin-button,
body.single-product form.cart .quantity .qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.stb-qty__btn {
	width: 2.6rem;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--stb-theme-display, #3d1c0e);
	font-family: inherit;
	font-size: 1.2rem;
	line-height: 1;
	cursor: pointer;
}

.stb-qty__btn:hover,
.stb-qty__btn:focus-visible {
	background: #f3ebe3;
}

body.single-product form.cart .single_add_to_cart_button {
	float: none;
	width: 100%;
}

body.single-product .single_add_to_cart_button.disabled,
body.single-product .single_add_to_cart_button:disabled {
	opacity: 0.45;
}

body.single-product .product_meta {
	display: none;
}

body.single-product .stb-product-description,
body.single-product .related.products,
body.single-product .upsells.products {
	grid-column: 1 / -1;
}

body.single-product .stb-product-description {
	margin-top: 28px;
	padding-top: 28px;
	border-top: 1px solid var(--stb-line, #e4d8cc);
}

body.single-product .stb-product-description h2 {
	margin: 0 0 8px;
	color: var(--stb-theme-display, #3d1c0e);
	font-family: "Domaine Display", Georgia, "Times New Roman", serif;
	font-size: 1.75rem;
	font-weight: 500;
}

body.single-product .stb-product-description ul {
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
	max-width: 40em;
}

body.single-product .stb-product-description li {
	padding: 11px 0;
	border-top: 1px solid var(--stb-line, #e4d8cc);
}

body.stb-booking-theme .woocommerce-message,
body.stb-booking-theme .woocommerce-info {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	position: relative;
	margin: 0 0 1.5rem;
	padding: 14px 16px 14px 48px !important;
	border: 1px solid var(--stb-theme-display, #3d1c0e) !important;
	border-radius: 12px;
	background: #fffcf8 !important;
	color: var(--stb-theme-display, #3d1c0e) !important;
	font-family: var(--stb-theme-font-body, "Apercu", system-ui, sans-serif);
	line-height: 1.45;
	box-shadow: none;
}

body.stb-booking-theme .woocommerce-message::before,
body.stb-booking-theme .woocommerce-info::before {
	top: 50%;
	left: 18px;
	margin: 0;
	transform: translateY(-50%);
	color: var(--stb-accent, #d8774c) !important;
}

body.stb-booking-theme .woocommerce-message a:not(.button),
body.stb-booking-theme .woocommerce-info a:not(.button) {
	color: inherit;
}

body.stb-booking-theme .woocommerce-message .button,
body.stb-booking-theme .woocommerce-info .button {
	float: none;
	order: 2;
	margin: 0 !important;
	flex: 0 0 auto;
}

@media (max-width: 800px) {
	body.single-product.stb-booking-theme .stb-theme-shell {
		width: 100%;
		max-width: none;
	}

	body.single-product div.product {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	body.single-product .woocommerce-breadcrumb,
	body.single-product .woocommerce-notices-wrapper,
	body.single-product div.product div.images,
	body.single-product div.product div.summary,
	body.single-product .stb-product-description {
		padding-left: 15px;
		padding-right: 15px;
	}

	body.stb-booking-theme .woocommerce-message,
	body.stb-booking-theme .woocommerce-info {
		flex-wrap: wrap;
	}

	body.stb-booking-theme .woocommerce-message .button,
	body.stb-booking-theme .woocommerce-info .button {
		width: 100%;
	}
}

body.woocommerce-order-received .woocommerce-thankyou-order-received {
	text-align: center;
}

body.woocommerce-order-received .woocommerce-order-overview__payment-method {
	margin-top: 1.35rem;
}
