/*
Theme Name: Treat
Theme URI: https://treatbeauty.co.uk/
Description: A lightweight block theme for Treat Hair & Beauty, Battle. The header, footer and styling live in the theme; each page's text and images live in the page, edited under Pages like a document. Content > Set up the pages copies the starter content into the pages (reversibly). Activating the theme changes no site data.
Author: Treat Hair & Beauty
Version: 1.2.23
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: treat
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { font-variant-numeric: lining-nums; }
img { height: auto; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
.screen-reader-text:focus { clip: auto !important; }
:focus-visible { outline: 2px solid var(--wp--preset--color--taupe); outline-offset: 3px; }

/* Small uppercase label above headings */
.treat-eyebrow {
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--taupe);
	margin-bottom: 0.5rem !important;
}

/* ---------- Header ---------- */
.treat-site-header {
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .treat-site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .treat-site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .treat-site-header { top: 0; } }

.treat-topbar p { margin: 0; letter-spacing: 0.04em; }
.treat-topbar a { color: inherit; text-decoration: none; }
.treat-topbar a:hover { text-decoration: underline; color: inherit; }

.treat-header {
	border-bottom: 1px solid var(--wp--preset--color--sand);
	transition: box-shadow 0.2s ease;
}
.treat-logo { margin: 0; flex-shrink: 0; }
.treat-logo img { display: block; max-width: 46vw; }

.treat-nav .wp-block-navigation-item__content { padding: 0.35rem 0; }
.treat-nav .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--taupe); }
.treat-nav .current-menu-item > .wp-block-navigation-item__content,
.treat-nav .wp-block-navigation-item__content[aria-current="page"] {
	box-shadow: inset 0 -1px 0 currentColor;
}
.treat-nav .treat-nav-book > .wp-block-navigation-item__content {
	background: var(--wp--preset--color--charcoal);
	color: var(--wp--preset--color--base);
	padding: 0.7rem 1.3rem;
}
.treat-nav .treat-nav-book > .wp-block-navigation-item__content:hover {
	background: var(--wp--preset--color--taupe);
	color: var(--wp--preset--color--base);
}
.treat-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .treat-nav-book > .wp-block-navigation-item__content {
	margin-top: 0.75rem;
	padding: 0.7rem 1.3rem; /* WordPress removes link padding in the open menu */
}
.treat-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 2rem;
}
.treat-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 1.25rem;
	font-size: 1rem;
}
/* The full menu needs about 1,020px beside the logo. WordPress only switches to the
   menu button below 600px, so between 600px and 1,079px the menu ran off the right
   edge and made the page wider than the screen. Use the menu button there too. */
@media (min-width: 600px) and (max-width: 1079px) {
	.treat-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.treat-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}

/* ---------- Hero / banners ---------- */
/* Keep white text readable over busy photos: a soft, lightly blurred panel behind the text */
.wp-block-cover.treat-hero .wp-block-cover__inner-container,
.wp-block-cover.treat-page-hero .wp-block-cover__inner-container {
	width: auto;
	max-width: min(780px, calc(100% - 2rem));
	margin-inline: auto;
	padding: clamp(1.25rem, 3vw, 2.25rem) clamp(1.25rem, 4vw, 3rem);
	background: rgba(24, 22, 20, 0.18);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	border-radius: 4px;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.wp-block-cover.treat-hero .wp-block-cover__inner-container > :first-child,
.wp-block-cover.treat-page-hero .wp-block-cover__inner-container > :first-child { margin-top: 0; }
.wp-block-cover.treat-hero .wp-block-cover__inner-container > :last-child,
.wp-block-cover.treat-page-hero .wp-block-cover__inner-container > :last-child { margin-bottom: 0; }
.treat-hero .wp-block-cover__inner-container .wp-block-button__link,
.treat-page-hero .wp-block-cover__inner-container .wp-block-button__link { text-shadow: none; }
.treat-hero .wp-block-cover__inner-container p,
.treat-page-hero .wp-block-cover__inner-container p { font-weight: 500; }
.treat-hero h1 { font-weight: 400; }
.treat-hero .treat-eyebrow, .treat-page-hero .treat-eyebrow { color: #ffffff !important; }

/* Home hero: grey welcome panel with the brands on the left and a salon photo on the right (like foxhairdesign.com) */
.treat-hero-split { background: linear-gradient(180deg, #5c5c5c 0%, #8a8a8a 58%, #ececec 100%); color: #ffffff; }
/* A little wider than the rest of the page (1200px), to give the photo more room */
.treat-hero-split > .wp-block-columns.alignwide { max-width: 1440px; }
.treat-hero-text > * { margin-block: 0; }
.treat-hero-split .treat-eyebrow { color: #ffffff !important; }
.treat-hero-split h1 {
	margin-top: 0.6rem !important;
	font-size: clamp(1.9rem, 3.1vw, 2.6rem);
	font-weight: 300;
	line-height: 1.25;
	letter-spacing: 0.08em;
	color: #ffffff;
}
.treat-hero-split .treat-hero-rule,
.treat-page-banner .treat-hero-rule {
	width: 100%;
	height: 0;
	margin: 1.4rem auto !important;
	border: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.85);
	background: none;
	opacity: 1;
}
.treat-hero-intro { color: #ffffff; font-weight: 300; line-height: 1.5; }
.wp-block-group.treat-hero-brands { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 2rem !important; }
.treat-hero-brands .treat-brand {
	box-sizing: border-box;
	display: flex !important;
	align-items: center;
	justify-content: center;
	height: 68px;
	margin: 0 !important;
	padding: 10px 12px;
	background: #ffffff;
	border: 1px solid #d9d9d9;
}
.treat-hero-brands .treat-brand-wide { grid-column: 1 / -1; height: 84px; }
.treat-hero-brands .treat-brand img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.treat-hero-brands .treat-brand-wide img { max-height: 58px; }
.treat-hero-brands .treat-brand-text {
	color: var(--wp--preset--color--charcoal) !important;
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	line-height: 1.25;
	text-transform: uppercase;
	overflow-wrap: normal;
	word-break: keep-all;
}
.treat-hero-photo { margin: 0; }
/* The lighter buttons under the photo: white with dark text, readable on the paler grey */
.treat-hero-split .wp-block-button.is-style-outline .wp-block-button__link {
	background: #ffffff;
	border-color: #ffffff !important;
	color: var(--wp--preset--color--charcoal) !important;
}
.treat-hero-split .wp-block-button.is-style-outline .wp-block-button__link:hover,
.treat-hero-split .wp-block-button.is-style-outline .wp-block-button__link:focus-visible {
	background: var(--wp--preset--color--taupe);
	border-color: var(--wp--preset--color--taupe) !important;
	color: #ffffff !important;
}
.treat-hero-photo img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
/* Page banners on Services, Team, Gift Vouchers and Contact: a smaller version of the home hero */
.treat-page-banner { background: linear-gradient(180deg, #555555 0%, #707070 100%); color: #ffffff; }
.treat-page-banner > .wp-block-columns.alignwide { max-width: 1440px; }
.treat-page-banner-text > * { margin-block: 0; }
.treat-page-banner .treat-eyebrow { color: #ffffff !important; }
.treat-page-banner h1 {
	margin-top: 0.5rem !important;
	font-size: clamp(1.75rem, 2.8vw, 2.4rem);
	font-weight: 300;
	line-height: 1.25;
	letter-spacing: 0.08em;
	color: #ffffff;
}
.treat-page-banner .treat-hero-rule { margin: 1.1rem auto !important; }
.treat-page-banner-intro { max-width: 34em; margin-inline: auto !important; color: #ffffff; font-size: var(--wp--preset--font-size--large); font-weight: 300; line-height: 1.5; }
.treat-page-banner-photo { margin: 0; }
.treat-page-banner-photo img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
@media (min-width: 961px) and (max-width: 1180px) {
	/* Narrower side-by-side layout: two brand boxes per row so names fit */
	.wp-block-group.treat-hero-brands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
	/* Photo and buttons first, then the welcome and brands (as Fox does on phones) */
	.treat-hero-split { background: linear-gradient(180deg, #5c5c5c 0%, #777777 72%, #e6e6e6 100%); }
	.treat-hero-split .wp-block-columns { flex-wrap: wrap !important; row-gap: 2.5rem; }
	.treat-hero-split .wp-block-column { flex-basis: 100% !important; }
	.treat-hero-split .treat-hero-media { order: -1; }
	.treat-hero-split .treat-hero-text { max-width: 560px; margin-inline: auto; }
	/* Page banners: a slim photo strip, then the title */
	.treat-page-banner .wp-block-columns { flex-wrap: wrap !important; row-gap: 1.5rem; }
	.treat-page-banner .wp-block-column { flex-basis: 100% !important; }
	.treat-page-banner .treat-page-banner-media { order: -1; }
	.treat-page-banner-photo img { aspect-ratio: 3 / 1; }
	/* Once stacked, line the panel's text and photo up with the page text below */
	.treat-hero-split,
	.treat-page-banner {
		padding-left: var(--wp--style--root--padding-left) !important;
		padding-right: var(--wp--style--root--padding-right) !important;
	}
}
@media (max-width: 480px) {
	.wp-block-group.treat-hero-brands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.treat-page-hero h1 { margin: 0; }

/* Text-only brand strip */
.treat-brands p {
	margin: 0;
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	word-spacing: 0.35em;
}

/* ---------- Cards ---------- */
.treat-card {
	height: 100%;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--sand);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.treat-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(34, 34, 34, 0.08); }
.treat-card .wp-block-image { margin: 0; }
.treat-card .wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.treat-card-body { padding: 1.5rem 1.5rem 1.75rem; }
.treat-card-body h3 { margin-top: 0; }
.treat-card-link a {
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	border-bottom: 1px solid currentColor;
	padding-bottom: 2px;
}

/* Images that fill their column */
.treat-cover-img img { width: 100%; object-fit: cover; }
.treat-cover-img.is-square img { aspect-ratio: 1 / 1; }
.treat-cover-img.is-portrait img { aspect-ratio: 4 / 5; }
.treat-cover-img.is-landscape img { aspect-ratio: 3 / 2; }

/* Team: a card per person, photo on the left and details on the right (like redzhairstylists.co.uk/team) */
.wp-block-group.treat-team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.treat-team-member {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	border: 2px solid var(--wp--preset--color--sand);
	background: var(--wp--preset--color--base);
}
.treat-team-member > * { margin: 0 !important; }
.treat-team-photo { height: 100%; }
.treat-team-photo img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 100%;
	aspect-ratio: 2 / 3;
	object-fit: cover;
}
.treat-team-info {
	padding: clamp(1.25rem, 2.5vw, 2rem);
	justify-content: center;
	gap: 0.6rem;
}
.treat-team-info h3 { font-size: var(--wp--preset--font-size--x-large); margin: 0; }
.treat-team-info p { margin: 0; }
/* "Book with …" button on a card */
.treat-team-book { margin-top: 0.4rem !important; }
.treat-team-book a {
	display: inline-block;
	padding: 0.75em 1.2em;
	background: var(--wp--preset--color--ink);
	border: 1px solid var(--wp--preset--color--ink);
	color: #ffffff;
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.1em;
	line-height: 1.2;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.2s, border-color 0.2s;
}
.treat-team-book a:hover,
.treat-team-book a:focus-visible { background: var(--wp--preset--color--taupe); border-color: var(--wp--preset--color--taupe); }
/* The person's Salon Spy reviews badge (about 200 x 125px), lined up with the button; the space is kept while it loads */
.treat-team-reviews { width: 100%; max-width: 240px; min-height: 125px; margin-top: 0.4rem !important; }
/* Team card description: on the site it sits under the job title; in the editor an empty one is a clearly marked box */
.treat-team-bio { margin: 0.35rem 0 0.25rem !important; font-size: 0.95rem; line-height: 1.6; color: #50575e; }
.treat-team-bio.block-editor-block-list__block { min-height: 3.2em; padding: 0.55rem 0.7rem; border: 1px dashed #8f7a69; border-radius: 4px; background: rgba(143, 122, 105, 0.07); }
.treat-team-bio.block-editor-block-list__block::before { content: "Description"; display: block; margin-bottom: 0.2rem; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #8f7a69; }
.treat-team-reviews salonspy-widget { display: block; width: fit-content; max-width: 100%; margin: 0 !important; }
/* An odd card out on the last row sits in the middle */
.treat-team-grid > .treat-team-member:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - var(--wp--preset--spacing--40) / 2); }
@media (max-width: 960px) {
	.wp-block-group.treat-team-grid { grid-template-columns: minmax(0, 1fr); max-width: 640px; margin-inline: auto !important; }
	.treat-team-grid > .treat-team-member:last-child:nth-child(odd) { width: 100%; }
}
@media (max-width: 600px) {
	/* Phones: photo on top, details underneath */
	.treat-team-member { grid-template-columns: minmax(0, 1fr); }
	.treat-team-photo img { aspect-ratio: 4 / 5; height: auto; }
}

/* Promise list with a small mark */
.treat-ticks { list-style: none; padding-left: 0; }
.treat-ticks li { position: relative; padding-left: 1.75rem; margin-bottom: 0.6rem; }
.treat-ticks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.65em;
	width: 0.85rem;
	height: 1px;
	background: var(--wp--preset--color--taupe);
}

/* ---------- Services page ---------- */
.treat-service-section { scroll-margin-top: 140px; }
.treat-jump-links .wp-block-button__link { padding: 0.65em 1.2em; }
.treat-service-image { position: sticky; top: 140px; }
@media (max-width: 781px) { .treat-service-image { position: static; } }

/* Price list style for the Table block */
.wp-block-table.is-style-price-list table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.wp-block-table.is-style-price-list td,
.wp-block-table.is-style-price-list th {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--sand);
	padding: 0.85rem 0;
	vertical-align: top;
	color: var(--wp--preset--color--muted);
	line-height: 1.55;
}
.wp-block-table.is-style-price-list td strong {
	color: var(--wp--preset--color--ink);
	font-weight: 600;
	font-size: 1.0625rem;
}
.wp-block-table.is-style-price-list td:last-child {
	text-align: right;
	white-space: nowrap;
	padding-left: 1.25rem;
	width: 7.5rem;
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 500;
}
.wp-block-table.is-style-price-list table.has-fixed-layout { table-layout: auto; }
.treat-note {
	font-size: 1rem;
	color: var(--wp--preset--color--muted);
	border-left: 2px solid var(--wp--preset--color--taupe);
	padding-left: 1rem;
}

/* ---------- Gift cards ---------- */
.treat-gift-card {
	aspect-ratio: 1.586 / 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	box-shadow: 0 18px 40px rgba(34, 34, 34, 0.18);
}
.treat-gift-card .wp-block-image { margin: 0; }
.treat-price {
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 300;
	letter-spacing: 0.02em;
	margin: 0.25rem 0 0.75rem !important;
}

/* ---------- Reviews ---------- */
.treat-reviews-widget { min-height: 220px; }

/* "Follow us" section (patterns/social.php): Instagram photos and Follow buttons */
.treat-social .treat-social-feed { margin-top: var(--wp--preset--spacing--40) !important; margin-bottom: var(--wp--preset--spacing--40) !important; }
.treat-social #sb_instagram { padding-bottom: 0 !important; }
.treat-social #sb_instagram .sbi_photo { transition: opacity 0.2s ease; }
.treat-social #sb_instagram .sbi_photo:hover { opacity: 0.88; }
.treat-social-hint { max-width: 640px; margin: 0 auto; padding: 1rem 1.25rem; border: 1px dashed var(--wp--preset--color--taupe); border-radius: 6px; background: rgba(255, 255, 255, 0.7); text-align: center; font-size: 0.9rem; line-height: 1.5; }
.treat-social-hint p { margin: 0.25rem 0; }
.treat-social-hint a { color: inherit; }

/* Links on dark bands */
.treat-dark a:not(.wp-element-button),
.wp-block-cover a:not(.wp-element-button) { color: inherit; }

@media (max-width: 600px) {
	.treat-topbar .wp-block-social-links { display: none; }
	.treat-topbar p { text-align: center; width: 100%; }
	.treat-brands p { letter-spacing: 0.16em; word-spacing: 0.1em; line-height: 2; }
}

/* ---------- Footer ---------- */
.treat-footer a { color: inherit; text-decoration: none; }
.treat-footer a:hover { color: var(--wp--preset--color--base); text-decoration: underline; }
.treat-footer h4 { color: var(--wp--preset--color--base); }
.treat-footer ul { list-style: none; padding-left: 0; }
.treat-footer ul li { margin-bottom: 0.4rem; }
.treat-footer .wp-block-separator { opacity: 0.25; }

/* Floating Book Now button */
.treat-floating-book {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 60;
	margin: 0 !important;
}
.treat-floating-book .wp-block-button__link {
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
}
@media (max-width: 600px) {
	.treat-floating-book { right: 0.75rem; bottom: 0.75rem; }
}
/* The Call Now Button plugin's bar: 60px tall, fixed to the bottom on screens up to 650px.
   Sit the Book now button above it and keep the page's last 60px visible. */
@media (max-width: 650px) {
	body:has(#callnowbutton.cnb-full-bottom) { padding-bottom: 60px; }
	body:has(#callnowbutton.cnb-full-bottom) .treat-floating-book { bottom: calc(60px + 0.75rem); }
}

/* Contact form fallback */
.treat-form-fallback {
	background: var(--wp--preset--color--stone);
	padding: 1.5rem;
}

/* Generic pages (Terms, Privacy) */
.treat-prose { overflow-wrap: anywhere; }
.treat-prose table { width: 100%; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.treat-card, .treat-card:hover { transition: none; transform: none; }
}
