/* Storefront templates (public booking page). Classic lives in styles.css (.pf-*); these add
   Bold, Minimal, Split and Editorial. Layouts respond to the storefront's own width (container
   queries), so they also work inside the onboarding preview frame. */
.pf { container: pf / inline-size; }

/* ---------- Bold: photo hero with the name over it, booking card overlapping ---------- */
.pfb-hero { position: relative; display: grid; align-items: end; min-height: 380px; border-radius: var(--radius-lg); overflow: hidden; background: var(--brand-band); color: #fff; }
.pfb-media { position: absolute; inset: 0; }
.pfb-media img { width: 100%; height: 100%; object-fit: cover; }
/* Strong enough under the text for light, busy photos. */
.pfb-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .62) 45%, rgba(0, 0, 0, .25) 80%, rgba(0, 0, 0, .12)); }
.pfb-hero:not(.has-image)::after { background: linear-gradient(to top, rgba(0, 0, 0, .3), rgba(0, 0, 0, 0) 70%); }
.pfb-inner { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 18px; padding: 28px 28px 100px; }
.pfb-inner .pf-logo { margin: 0; width: 84px; height: 84px; border-color: rgba(255, 255, 255, .92); }
.pfb-inner .pf-titles { padding: 0; }
.pfb-inner .pf-name { color: #fff; font-size: clamp(30px, 6cqi, 52px); letter-spacing: -0.035em; line-height: 1.02; text-shadow: 0 2px 16px rgba(0, 0, 0, .3); }
.pfb-inner .pf-tagline { margin-top: 6px; color: rgba(255, 255, 255, .9); font-size: 17px; }
.pfb-body { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; margin-top: -72px; padding: 0 20px; }
.pfb-main { display: grid; gap: 16px; min-width: 0; }
.pf-t-bold .pf-book { padding: 22px; border: 0; border-radius: var(--radius-lg); background: var(--bg); box-shadow: 0 20px 50px rgba(0, 0, 0, .16); }
.pfb-inner .pf-about { max-width: 560px; margin: 10px 0 0; color: rgba(255, 255, 255, .85); font-size: 15px; }
.pf-t-bold .pf-side .pf-card { background: var(--bg); box-shadow: 0 10px 30px rgba(0, 0, 0, .08); border-color: transparent; }
.pf-t-bold .pf-side { padding-top: 0; }
@container pf (max-width: 760px) {
  .pfb-hero { min-height: 300px; }
  .pfb-inner { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px 18px 84px; }
  .pfb-inner .pf-logo { width: 64px; height: 64px; }
  .pfb-body { grid-template-columns: minmax(0, 1fr); margin-top: -60px; padding: 0 8px; }
  .pf-t-bold .pf-book { padding: 16px; }
  .pf-t-bold .pf-side { position: static; }
}

/* ---------- Minimal: quiet, centred, one column ---------- */
.pf-t-minimal { max-width: 660px; gap: 32px; }
.pfm-strip { margin: 0; overflow: hidden; aspect-ratio: 5 / 1; border-radius: var(--radius-lg); }
.pfm-strip img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pfm-strip + .pfm-head { padding-top: 0; margin-top: -54px; }
.pfm-strip + .pfm-head .pf-logo { border: 4px solid var(--bg); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.pfm-head { display: grid; justify-items: center; gap: 6px; padding-top: 28px; text-align: center; }
.pfm-head .pf-logo { margin: 0 0 10px; width: 76px; height: 76px; border: 0; box-shadow: 0 0 0 1px var(--border); }
.pfm-head .pf-name { font-size: clamp(28px, 6cqi, 38px); letter-spacing: -0.03em; }
.pfm-head .pf-tagline { margin: 0; font-size: 16px; }
.pfm-head .pf-about { max-width: 520px; margin-top: 10px; text-align: center; }
.pfm-head::after { content: ""; width: 36px; height: 3px; margin-top: 18px; border-radius: 3px; background: var(--primary); }
.pf-t-minimal .pf-book { padding: 0; border: 0; }
.pfm-info { position: static; display: grid; gap: 0; }
.pfm-info .pf-card { padding: 22px 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; }

/* ---------- Split: brand panel on the left, booking on the right ---------- */
.pf-t-split { max-width: 1240px; }
.pfs { display: grid; grid-template-columns: minmax(300px, 5fr) minmax(0, 7fr); gap: 28px; align-items: start; }
.pfs-panel { position: sticky; top: 16px; display: grid; grid-template-rows: auto 1fr auto; min-height: calc(100dvh - 40px); border-radius: var(--radius-lg); overflow: hidden; background: var(--primary); color: var(--on-primary); }
/* The photo sits at the top of the panel at a sensible crop, fading into the brand colour. */
.pfs-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--primary); }
.pfs-media:empty { display: none; }
.pfs-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pfs-panel.has-image .pfs-media::after { content: ""; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(to top, var(--primary), transparent); }
.pfs-inner { position: relative; z-index: 1; display: grid; align-self: end; gap: 10px; padding: 28px; }
.pfs-panel.has-image .pfs-inner { align-self: start; margin-top: -44px; }
.pfs-inner .pf-logo { margin: 0 0 6px; width: 72px; height: 72px; border-color: color-mix(in srgb, var(--on-primary) 85%, transparent); }
.pfs-inner .pf-name { color: inherit; font-size: clamp(28px, 4cqi, 42px); letter-spacing: -0.03em; line-height: 1.05; }
.pfs-inner .pf-tagline, .pfs-inner .pf-about { margin: 0; color: inherit; opacity: 1; }
.pfs-hours { position: static; margin-top: 10px; padding: 0 28px 28px; }
.pfs-hours .pf-card { border-color: color-mix(in srgb, var(--on-primary) 22%, transparent); background: color-mix(in srgb, var(--on-primary) 8%, transparent); color: inherit; }
.pfs-hours .pf-card h2, .pfs-hours .pf-hours div, .pfs-hours .pf-hours .is-today, .pfs-hours .pf-status, .pfs-hours .pf-status.is-open { color: inherit; }
.pfs-hours .pf-hours div:not(.is-today), .pfs-hours .pf-status { opacity: 1; }
.pfs-main { display: grid; gap: 16px; min-width: 0; padding-top: 6px; }
.pfs-panel.is-portrait { isolation: isolate; grid-template-rows: 1fr auto; }
.pfs-panel.is-portrait .pfs-media { position: absolute; inset: 0; z-index: 0; aspect-ratio: auto; }
.pfs-panel.is-portrait .pfs-media::after { content: ""; position: absolute; inset: 0; height: auto; background: color-mix(in srgb, var(--primary) 82%, transparent); }
.pfs-panel.is-portrait .pfs-inner { align-content: center; align-self: stretch; grid-row: 1; margin-top: 0; color: #fff; }
.pfs-panel.is-portrait .pfs-hours { position: relative; z-index: 2; grid-row: 2; color: #fff; }
@container pf (max-width: 760px) {
  .pfs { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .pfs-panel { position: static; grid-template-rows: auto auto auto; min-height: 0; }
  .pfs-media { aspect-ratio: 16 / 9; }
  .pfs-inner { padding: 22px 20px; }
  .pfs-hours { margin-top: 0; padding: 0 20px 22px; }
  .pfs-panel.is-portrait { position: relative; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto; min-height: max(600px, calc(100dvh - 40px)); }
  .pfs-panel.is-portrait .pfs-media { inset: 0; grid-column: 1; grid-row: 1 / -1; aspect-ratio: auto; }
  .pfs-panel.is-portrait .pfs-media::after { background: color-mix(in srgb, var(--primary) 82%, transparent); }
  .pfs-panel.is-portrait .pfs-inner { grid-column: 1; grid-row: 1; align-content: start; align-self: start; margin-top: 0; padding: 24px 20px; }
  .pfs-panel.is-portrait .pfs-hours { grid-column: 1; grid-row: 2; padding: 0 20px 22px; }
}

/* ---------- Editorial: serif headline, framed photo, warm paper ---------- */
body[data-storefront="editorial"], .pf-t-editorial { background: #f7f2ea; }
.pf-t-editorial { --pfe-ink: #221d19; --pfe-soft: #5e554d; --pfe-line: #e2d8cb; --pfe-card: #fffdf9; gap: 28px; color: var(--pfe-ink); }
.pf-t-editorial .pf-name, .pf-t-editorial .pf-card h2, .pf-t-editorial .bk-h, .pf-t-editorial .pfe-lead { font-family: "Fraunces", Georgia, "Times New Roman", serif; }
.pfe-head { display: grid; justify-items: center; gap: 6px; padding-top: 32px; text-align: center; }
.pfe-head .pf-logo { margin: 0 0 12px; width: 64px; height: 64px; border: 0; box-shadow: 0 0 0 1px var(--pfe-line); }
.pfe-head .pf-name { font-size: clamp(36px, 8cqi, 68px); font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.pfe-head .pf-tagline { margin: 6px 0 0; color: var(--pfe-soft); font-family: "Fraunces", Georgia, serif; font-size: 19px; font-style: italic; }
.pfe-figure { margin: 0; overflow: hidden; aspect-ratio: 3 / 1; border-radius: 3px; box-shadow: 0 1px 2px rgba(34, 29, 25, .08); }
.pfe-figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pfe-rule { justify-self: center; width: 120px; height: 1px; background: var(--pfe-line); }
.pfe-lead { max-width: 680px; margin: 0 auto; text-align: center; }
.pfe-lead .pf-about { max-width: none; color: #3d352f; font-size: clamp(17px, 2.4cqi, 21px); line-height: 1.55; white-space: pre-line; }
.pf-t-editorial .pf-book, .pf-t-editorial .pf-card { border-color: var(--pfe-line); border-radius: 4px; background: var(--pfe-card); }
.pf-t-editorial .pf-card h2 { font-size: 17px; font-weight: 600; }
.pf-t-editorial .pf-tagline, .pf-t-editorial .pf-about { color: var(--pfe-soft); }
@container pf (max-width: 760px) {
  .pf-t-editorial .pf-layout { grid-template-columns: minmax(0, 1fr); }
  .pf-t-editorial .pf-side { position: static; }
  .pf-t-editorial .pf-book { padding: 16px; }
}
.preview-frame > .pf-t-editorial { background: #f7f2ea; }

/* ---------- Template picker (profile editor) ---------- */
.pe-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pe-template { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); text-align: left; transition: border-color .12s, box-shadow .12s; }
.pe-template:hover { border-color: var(--border-strong); }
.pe-template.is-on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.pe-template svg { display: block; width: 100%; height: auto; border-radius: 6px; background: #fff; box-shadow: inset 0 0 0 1px var(--border); }
.pe-template strong { font-size: 14px; font-weight: 600; }
.pe-template span { color: var(--text-2); font-size: 12px; line-height: 1.35; }
.pe-template-preview { margin-top: 2px; }
