/*
Theme Name: Pimi Salon
Author: Pimi Studio
Description: Shared parent theme for Pimi Studio salon websites: data model, three switchable designs, booking and shop modules.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: pimi-salon
*/

/* Base. Colours, typefaces and radii are tokens on :root, printed inline from the salon's design definition (functions.php: pimi_salon_design_css()). */
*, ::before, ::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.65 var(--font-body); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0 0 .5em; font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-tracking); line-height: 1.12; text-wrap: balance; }
::selection { background: var(--accent); color: var(--on-accent); }
p { margin: 0 0 1em; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
main [id] { scroll-margin-top: 6rem; } /* clear a sticky header */
.pimi-wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.pimi-skip { position: absolute; left: 8px; top: -100px; z-index: 100; padding: .75rem 1rem; background: #fff; color: #000; }
.pimi-skip:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Header logo (pimi_salon_logo()): each design sets the height, the width follows and never leaves its place */
.pimi-logo { display: block; width: auto; height: 44px; max-width: 100%; object-fit: contain; object-position: left center; }
.pimi-logo-plate { box-sizing: content-box; max-width: calc(100% - 20px); padding: 6px 10px; border-radius: 8px; } /* a logo fixed onto a design of the other brightness keeps its own background */
.pimi-purchased { position: relative; z-index: 50; padding: .9rem 16px; background: #0b6b3a; color: #fff; text-align: center; font: 600 1rem/1.4 system-ui, sans-serif; }
.pimi-btn, .a-btn, .b-btn, .c-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .7rem 1.4rem; border: 2px solid var(--accent); border-radius: var(--radius); background: var(--accent); color: var(--on-accent); font: 600 1rem/1.3 var(--font-body); text-decoration: none; cursor: pointer; }
.pimi-btn, .a-btn, .b-btn, .c-btn, .pimi-demo a { touch-action: manipulation; }
.pimi-btn:active, .a-btn:active, .b-btn:active, .c-btn:active { transform: scale(.97); } /* the press answers at once, on every input type */
@media (prefers-reduced-motion: no-preference) { .pimi-btn, .a-btn, .b-btn, .c-btn { transition: transform .14s cubic-bezier(.23, 1, .32, 1), filter .16s ease-out, background-color .16s ease-out; } }
@media (hover: hover) and (pointer: fine) { .pimi-btn:hover, .a-btn:hover, .b-btn:hover, .c-btn:hover { filter: brightness(1.1); } }
button, .pimi-btn, .a-btn, .b-btn, .c-btn, summary { -webkit-user-select: none; user-select: none; }
@media (prefers-reduced-motion: reduce) { .pimi-btn:active, .a-btn:active, .b-btn:active, .c-btn:active { transform: none; } }
.pimi-booking iframe { display: block; width: 100%; height: 720px; border: 0; background: #fff; }
.pimi-booking p { max-width: 60ch; }
.pimi-booking > a { display: inline-block; padding: .6rem 0; white-space: nowrap; }

/* Demo notes (pimi_salon_note(), demo sites only): what the owner can change, as a handwritten slip. Never printed on a live site. */
@font-face { font-family: "Patrick Hand"; font-style: normal; font-weight: 400; font-display: swap; src: url(assets/fonts/patrick-hand-latin-400-normal.woff2) format("woff2"); }
.pimi-note { display: block; width: fit-content; max-width: min(100%, 34rem); margin: .9rem 0 0; padding: .3rem .7rem .35rem; border: 1.5px dashed var(--accent); border-radius: 4px 14px 6px 12px; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.25 "Patrick Hand", "Comic Sans MS", cursive; letter-spacing: .01em; text-align: left; text-wrap: pretty; transform: rotate(-.6deg); }
.pimi-note:nth-of-type(even) { transform: rotate(.5deg); }
@media print { .pimi-note { display: none; } }

/* Price list (template-parts/services.php): a category opens and closes; the row is name, price, then duration and description */
.pimi-cat summary { display: flex; align-items: baseline; gap: 1rem; min-height: 48px; cursor: pointer; list-style: none; touch-action: manipulation; }
.pimi-cat summary::-webkit-details-marker { display: none; }
.pimi-cat summary h3 { flex: 1; min-width: 0; margin: 0; }
.pimi-cat-n { flex: none; color: var(--muted); font-size: .875rem; }
.pimi-cat summary::after { content: ""; flex: none; align-self: center; width: 12px; height: 12px; background: linear-gradient(currentColor, currentColor) 50% / 100% 1.5px no-repeat, linear-gradient(currentColor, currentColor) 50% / 1.5px 100% no-repeat; }
.pimi-cat[open] summary::after { background: linear-gradient(currentColor, currentColor) 50% / 100% 1.5px no-repeat; }
.pimi-rows { margin: 0; padding: 0; list-style: none; }
.pimi-rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem 1.25rem; align-items: baseline; padding: .7rem 0; border-top: 1px solid var(--line); break-inside: avoid; }
.pimi-row-price { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; white-space: nowrap; }
.pimi-row-more { grid-column: 1 / -1; color: var(--muted); font-size: .9rem; line-height: 1.4; }

/* Gallery compositions (definition: "gallery"): mosaic = one large and the rest; grid = even squares; strip = one row that scrolls sideways */
.pimi-gallery { display: grid; gap: var(--gallery-gap, 12px); margin: 0; padding: 0; list-style: none; }
.pimi-gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-photo); }
.pimi-gallery-mosaic .pimi-gallery, .pimi-gallery-grid .pimi-gallery { grid-template-columns: repeat(2, 1fr); }
.pimi-gallery-mosaic .pimi-gallery li, .pimi-gallery-grid .pimi-gallery li { aspect-ratio: 1; }
.pimi-gallery-mosaic .pimi-gallery li:first-child { grid-column: span 2; aspect-ratio: 4 / 3; }
@media (min-width: 800px) {
	.pimi-gallery-mosaic .pimi-gallery { grid-template-columns: repeat(6, 1fr); }
	.pimi-gallery-mosaic .pimi-gallery { grid-auto-rows: clamp(170px, 19vw, 260px); }
	.pimi-gallery-mosaic .pimi-gallery li { position: relative; grid-column: span 2; aspect-ratio: auto; }
	.pimi-gallery-mosaic .pimi-gallery img { position: absolute; inset: 0; }
	.pimi-gallery-mosaic .pimi-gallery li:first-child { grid-column: span 4; grid-row: span 2; aspect-ratio: auto; }
	.pimi-gallery-grid .pimi-gallery { grid-template-columns: repeat(3, 1fr); }
}
.pimi-gallery-strip .pimi-gallery { grid-auto-flow: column; grid-auto-columns: min(74vw, 340px); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding-bottom: 14px; scrollbar-color: var(--accent) transparent; scrollbar-width: thin; }
.pimi-gallery-strip .pimi-gallery li { aspect-ratio: 4 / 5; scroll-snap-align: start; }

/* Pages outside the front page (shop, cart, checkout...) */
.pimi-shell { border-bottom: 1px solid var(--line); background: var(--bg); }
.pimi-shell-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-block: 1rem; }
.pimi-shell-brand { font: var(--head-weight) 1.4rem var(--font-head); text-decoration: none; }
.pimi-shell-brand .pimi-logo { height: 46px; max-width: min(100%, 250px); } /* WooCommerce sets img height to auto on its pages */
.pimi-shell ul { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.pimi-shell ul a { display: inline-block; padding: .6rem 0; text-decoration: none; }
.pimi-page { padding-block: 2.5rem 4rem; }
.pimi-shell-footer { padding-block: 2rem; border-top: 1px solid var(--line); color: var(--muted); }
input, select, textarea { max-width: 100%; padding: .55rem .7rem; border: 1px solid #767676; border-radius: var(--radius); background: var(--bg); color: var(--ink); font: inherit; }

/* WooCommerce, in the active design's colours and type */
.woocommerce, .woocommerce-page { color: var(--ink); }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce a.added_to_cart,
.wc-block-components-button:not(.is-link) { min-height: 44px; border-radius: var(--radius); background: var(--accent); color: var(--on-accent); font-family: var(--font-body); font-weight: 600; }
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover { background: var(--accent); color: var(--on-accent); filter: brightness(1.1); }
.woocommerce ul.products li.product .woocommerce-loop-product__title, .woocommerce div.product .product_title { font-family: var(--font-head); color: var(--ink); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 1.1rem; }
.woocommerce ul.products li.product .price, .woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--accent); font-weight: 600; }
.woocommerce ul.products li.product img { border-radius: min(var(--radius), 16px); }
.woocommerce .woocommerce-breadcrumb, .woocommerce .woocommerce-result-count { color: var(--muted); }
.woocommerce-message, .woocommerce-info, .woocommerce-error { border-top-color: var(--accent); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--accent); }
.woocommerce table.shop_table, .woocommerce table.shop_table td, .woocommerce table.shop_table th { border-color: var(--line); }
.woocommerce-tabs ul.tabs li a, .woocommerce div.product .woocommerce-tabs ul.tabs li a { color: inherit; }
.woocommerce span.onsale { background: var(--accent); color: var(--on-accent); }

/* Demo-store notice: in flow (not fixed over the header), in the design's colours */
.woocommerce-store-notice, p.demo_store { position: static; display: block; margin: 0; padding: .6rem 16px; background: var(--accent); color: var(--on-accent); text-align: center; font: .9rem/1.4 var(--font-body); box-shadow: none; }
.woocommerce-store-notice a, p.demo_store a { color: inherit; }
/* Checkout/cart blocks hard-code white fields; follow the design so dark designs stay readable */
.wc-block-components-text-input input, .wc-block-components-textarea, .wc-blocks-components-select .wc-blocks-components-select__select, .wc-block-components-combobox .components-combobox-control input, .wc-block-components-quantity-selector input { background: var(--bg) !important; color: var(--ink) !important; }
.wc-block-components-text-input label, .wc-blocks-components-select__label, .wc-block-components-combobox .components-form-token-field__label { color: var(--muted) !important; }
.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox] { background: var(--bg); border-color: var(--muted); }
.woocommerce div.product .woocommerce-tabs ul.tabs li { border-color: var(--line); background: var(--soft); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: var(--bg); border-bottom-color: var(--bg); }
.woocommerce div.product .woocommerce-tabs ul.tabs li::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }
.wc-block-components-order-summary-item__quantity { background: var(--accent); border-color: var(--bg); color: var(--on-accent); box-shadow: none; }
/* Order-received summary: wrap cleanly at narrow widths */
.woocommerce ul.order_details { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin: 0 0 2rem; padding: 0; }
.woocommerce ul.order_details li { float: none; margin: 0; padding: 0; border: 0; }
.woocommerce ul.order_details::before, .woocommerce ul.order_details::after { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a, .woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--ink); }

/* Order section on demo sites (structure shared; each design adds only its look) */
/* Demo bar: its own fixed colours, so it looks the same on every design. In the page flow: it never covers the site. */
.pimi-demo { position: relative; z-index: 50; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.5rem; padding: .65rem clamp(16px, 3vw, 40px); border-bottom: 1px solid #3b3742; background: #17151b; color: #cfc8c0; font: .8125rem/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.pimi-demo :focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.pimi-demo-text { flex: 999 1 24rem; min-width: 0; margin: 0; text-wrap: pretty; }
.pimi-demo-text strong { display: block; color: #fff; font-size: .9375rem; font-weight: 650; }
.pimi-demo-actions { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.pimi-demo-switch { display: flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid #56505f; border-radius: 999px; }
.pimi-demo-switch span { padding: 0 .35rem 0 .7rem; color: #cfc8c0; letter-spacing: .04em; }
.pimi-demo-switch a { display: grid; place-items: center; min-width: 40px; min-height: 40px; border-radius: 999px; color: #fff; font-weight: 700; font-size: .9375rem; text-decoration: none; }
.pimi-demo-switch a:hover { background: #33303a; }
.pimi-demo-switch a[aria-current] { background: #f6f1ea; color: #17151b; }
.pimi-demo-buy { display: grid; place-items: center; min-height: 44px; padding: .4rem 1.1rem; border-radius: 999px; background: #f2cf85; color: #17151b; font-weight: 700; font-size: .9375rem; text-decoration: none; white-space: nowrap; }
.pimi-demo-buy:hover { background: #f8dda4; }
@media (max-width: 479px) { .pimi-demo-actions { gap: .5rem; } .pimi-demo-switch span { padding: 0 .15rem 0 .55rem; } .pimi-demo-switch a { min-width: 36px; } .pimi-demo-buy { padding-inline: .8rem; font-size: .875rem; } }
@media (prefers-reduced-motion: no-preference) { .pimi-demo-switch a, .pimi-demo-buy { transition: background-color .15s ease-out, color .15s ease-out; } }
/* Archived demo: the word repeated across the screen, above the page and below the bar; it takes no clicks and is not read out */
body.pimi-archived::after { content: ""; position: fixed; inset: 0; z-index: 45; pointer-events: none; background-repeat: repeat; }
@media print { body.pimi-archived::after { position: absolute; } }
.pimi-buy { position: fixed; right: 16px; bottom: 16px; z-index: 60; box-shadow: 0 4px 18px rgba(0, 0, 0, .35); }
.pimi-buy[hidden] { display: none; }
.pimi-order-box { width: min(720px, 100% - 32px); margin-inline: auto; }
.pimi-order-lead { font-size: 1.1rem; }
.pimi-order-form { margin-top: 1.5rem; }
.pimi-order-row { display: flex; align-items: center; gap: .9rem; min-height: 56px; margin: 0 0 .75rem; padding: .75rem 1rem; border: 2px solid var(--line); border-radius: min(var(--radius), 16px); background: var(--bg); cursor: pointer; }
.pimi-order-fixed { cursor: default; }
.pimi-order-row:has(input:checked) { border-color: var(--accent); }
.pimi-order-row input { flex: none; width: 1.5rem; height: 1.5rem; margin: 0; padding: 0; accent-color: var(--accent); }
.pimi-order-text { flex: 1; min-width: 0; }
.pimi-order-text small { display: block; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.pimi-order-price { flex: none; font-weight: 700; white-space: nowrap; }
.pimi-order-support { margin: 1.25rem 0 0; padding: 0; border: 0; min-width: 0; }
.pimi-order-support legend { padding: 0; margin-bottom: .5rem; font: 700 1.1rem var(--font-head); }
.pimi-order-total { margin: 1.25rem 0; padding: 1rem; border-radius: min(var(--radius), 16px); background: var(--soft); font-size: 1.1rem; }
.pimi-order-total strong { display: block; font: 800 1.8rem/1.2 var(--font-head); }
.pimi-order-submit { width: 100%; min-height: 56px; font-size: 1.1rem; }
.pimi-order-note { margin: 1rem 0 0; color: var(--muted); font-size: .9rem; }
@media (min-width: 600px) { .pimi-order-submit { width: auto; } }
