/* ==========================================================================
   Template preview tool + template site styles (.tp scope)
   ========================================================================== */

/* ---------- Preview tool layout ---------- */
.pv { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; padding: 20px; max-width: 1600px; margin: 0 auto; }
@media (max-width: 980px) { .pv { grid-template-columns: 1fr; padding: 12px; } }
.pv-panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; align-self: start; position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow-y: auto; }
@media (max-width: 980px) { .pv-panel { position: static; max-height: none; } }
.pv-panel h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.02em; }
.pv-panel > p { color: var(--muted); margin: 0 0 16px; font-size: 15px; }
.pv-group { border-top: 1px solid var(--line); padding: 16px 0; }
.pv-group h2 { font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 500; margin: 0 0 10px; }
.pv-group label { display: block; font-size: 14px; font-weight: 600; margin: 10px 0 0; }
.pv-group input[type="text"], .pv-group input[type="tel"], .pv-group select {
  display: block; width: 100%; margin-top: 6px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 10px 12px; background: var(--surface-2); font-weight: 400; font-size: 15px;
}
.pv-group input:focus, .pv-group select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

.tpl-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tpl-pick button { text-align: left; border: 1px solid var(--line-strong); background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px; cursor: pointer; }
.tpl-pick button b { display: block; font-size: 15px; }
.tpl-pick button span { display: block; font-size: 12.5px; color: var(--muted); }
.tpl-pick button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; padding: 0; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.swatch-custom { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin-left: 4px; }
.swatch-custom input { width: 38px; height: 34px; border: 1px solid var(--line-strong); border-radius: 8px; background: none; padding: 2px; cursor: pointer; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; padding: 8px 6px; border-radius: 7px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.checks label { display: flex !important; align-items: center; gap: 8px; font-weight: 500 !important; margin: 0 !important; font-size: 14.5px !important; }
.checks input { accent-color: var(--accent); width: 17px; height: 17px; }
.pv-actions { display: grid; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.pv-note { color: var(--muted); font-size: 13.5px; margin: 8px 0 0; }

.pv-stage { min-width: 0; }
.pv-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.pv-toolbar .seg { width: auto; }
.pv-toolbar .seg button { padding: 8px 14px; }
.pv-label { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.pv-device { margin: 0 auto; transition: max-width .35s var(--ease); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow), 0 30px 70px -40px rgba(0,0,0,.6); background: var(--surface); }
.pv-device.desktop { max-width: 100%; }
.pv-device.tablet { max-width: 800px; }
.pv-device.phone { max-width: 390px; }
.pv-chrome { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.pv-chrome i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.pv-chrome i:first-child { background: var(--accent); }
.pv-chrome span { margin-left: 10px; font-family: var(--mono); font-size: 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pv-frame { container-type: inline-size; max-height: 78vh; overflow-y: auto; }
@media (max-width: 980px) { .pv-frame { max-height: none; } }
.pv-banner { text-align: center; font-size: 13px; padding: 6px; background: var(--accent-soft); color: var(--ink-2); border-bottom: 1px solid var(--line); }

/* ==========================================================================
   Template site (.tp) — completely independent of the SALAS site theme
   ========================================================================== */
.tp {
  --tp: #2b2621;
  --tp-bg: #ffffff; --tp-bg2: #f6f5f3; --tp-ink: #16161a; --tp-muted: #5d5d66; --tp-line: rgba(0,0,0,.09); --tp-card: #ffffff;
  --tp-head: var(--font); --tp-body: var(--font);
  background: var(--tp-bg); color: var(--tp-ink); font-family: var(--tp-body); font-size: 16px; line-height: 1.55;
}
.tp.tp-theme-dark { --tp-bg: #0f1013; --tp-bg2: #16171b; --tp-ink: #f2f2f4; --tp-muted: #a7a7b1; --tp-line: rgba(255,255,255,.09); --tp-card: #1b1c21; }
.tp.tp-font-classic { --tp-head: Georgia, "Times New Roman", serif; }
.tp.tp-font-bold h1, .tp.tp-font-bold h2 { text-transform: uppercase; letter-spacing: -.01em; font-weight: 900; }
.tp h1, .tp h2 { font-family: var(--tp-head); color: var(--tp-ink); line-height: 1.08; margin: 0; }
.tp.tp-font-classic h1, .tp.tp-font-classic h2 { font-weight: 600; letter-spacing: -.01em; }
.tp h1 { font-size: clamp(34px, 6cqi, 60px); letter-spacing: -.03em; }
.tp h2 { font-size: clamp(26px, 3.6cqi, 38px); letter-spacing: -.02em; }
.tp svg { width: 1em; height: 1em; flex-shrink: 0; }
.tp-wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }
.tp-eyebrow { color: var(--tp); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 10px; }
.tp-lede { font-size: 19px; color: var(--tp-muted); margin: 16px 0 0; max-width: 560px; }
.tp-p { color: var(--tp-muted); font-size: 17px; }
.tp-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--tp); color: #fff; padding: 13px 22px; border-radius: 8px; font-weight: 700; font-size: 15.5px; white-space: nowrap; }
.tp-btn-sm { padding: 9px 16px; font-size: 14px; }
.tp-btn-ghost { background: transparent; color: var(--tp-ink); box-shadow: inset 0 0 0 1.5px var(--tp-line); }
.tp-btn-light { background: #fff; color: #111; }
.tp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.tp-nav { border-bottom: 1px solid var(--tp-line); background: var(--tp-bg); }
.tp-nav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.tp-logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--tp-head); font-weight: 800; font-size: 19px; }
.tp-logo svg { color: var(--tp); width: 24px; height: 24px; }
.tp-links { display: flex; gap: 24px; color: var(--tp-muted); font-size: 15px; font-weight: 500; }

.tp-hero { position: relative; }
.tp-hero-split { padding: 72px 0; }
.tp-split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.tp-hero-centered { padding: 110px 0; text-align: center; background: radial-gradient(80% 120% at 50% 0%, color-mix(in srgb, var(--tp) 22%, transparent), transparent 70%), var(--tp-bg); }
.tp-hero-centered .tp-lede { margin-left: auto; margin-right: auto; }
.tp-hero-centered .tp-actions { justify-content: center; }
.tp-hero-banner { min-height: 520px; display: grid; }
.tp-hero-banner > * { grid-area: 1 / 1; }
.tp-banner-img { border-radius: 0 !important; min-height: 520px !important; }
.tp-banner-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.72), rgba(0,0,0,.2)); }
.tp-banner-img span { display: none; }
.tp-banner-text { position: relative; z-index: 1; align-self: center; width: 100%; padding-top: 40px; padding-bottom: 40px; }
.tp-banner-text h1, .tp-banner-text .tp-lede { color: #fff; }
.tp-banner-text .tp-lede { color: rgba(255,255,255,.85); }
.tp-banner-text .tp-eyebrow { color: #fff; opacity: .85; }
.tp-banner-text .tp-btn-ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.5); }

.tp-img {
  position: relative; overflow: hidden; border-radius: 14px; min-height: 340px; display: grid; place-items: center; align-content: center; gap: 8px;
  color: rgba(255,255,255,.9); font-size: 13px; font-weight: 600; letter-spacing: .04em;
  background: linear-gradient(135deg, var(--tp), color-mix(in srgb, var(--tp) 45%, #000));
}
.tp-img.v2 { background: linear-gradient(200deg, color-mix(in srgb, var(--tp) 70%, #fff), color-mix(in srgb, var(--tp) 60%, #000)); }
.tp-img.v3 { background: linear-gradient(45deg, color-mix(in srgb, var(--tp) 35%, #000), color-mix(in srgb, var(--tp) 85%, #fff)); }
.tp-img::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.18) 1.5px, transparent 1.5px); background-size: 18px 18px; }
.tp-img-icon { width: 64px !important; height: 64px !important; opacity: .85; position: relative; }
.tp-img span { position: relative; opacity: .8; }

.tp-sec { padding: 84px 0; background: var(--tp-bg); }
.tp-alt { background: var(--tp-bg2); }
.tp-head { text-align: center; margin-bottom: 40px; }
.tp-grid { display: grid; gap: 18px; }
.tp-grid-3 { grid-template-columns: repeat(3, 1fr); }
.tp-grid-2 { grid-template-columns: repeat(2, 1fr); }
.tp-card { background: var(--tp-card); border: 1px solid var(--tp-line); border-radius: 14px; padding: 26px; display: grid; gap: 8px; align-content: start; }
.tp-card b { font-size: 18px; }
.tp-card span { color: var(--tp-muted); }
.tp-ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--tp) 14%, transparent); color: var(--tp); margin-bottom: 6px; }
.tp-ico svg { width: 24px; height: 24px; }

.tp-menu { max-width: 760px; margin: 0 auto; display: grid; gap: 4px; }
.tp-menu-row { display: flex; align-items: baseline; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--tp-line); }
.tp-menu-row b { display: block; font-family: var(--tp-head); font-size: 19px; }
.tp-menu-row span { color: var(--tp-muted); font-size: 15px; }
.tp-menu-row i { flex: 1; border-bottom: 2px dotted var(--tp-line); transform: translateY(-6px); }
.tp-menu-row em { font-style: normal; font-weight: 800; color: var(--tp); font-size: 18px; white-space: nowrap; }

.tp-product { display: grid; gap: 4px; }
.tp-product .tp-img { min-height: 220px; margin-bottom: 10px; }
.tp-product b { font-size: 17px; }
.tp-product span { color: var(--tp-muted); font-size: 15px; }
.tp-product em { font-style: normal; font-weight: 800; color: var(--tp); font-size: 17px; }

.tp-plan { text-align: center; justify-items: center; padding: 34px 26px; }
.tp-plan-price { font-size: 38px; font-weight: 900; color: var(--tp-ink); font-family: var(--tp-head); }
.tp-plan .tp-btn { margin-top: 14px; }
.tp-featured { border: 2px solid var(--tp); box-shadow: 0 24px 50px -28px var(--tp); }

.tp-ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.tp-ticks li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.tp-ticks svg { color: var(--tp); width: 20px; height: 20px; }

.tp-gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 200px; gap: 12px; }
.tp-gallery .tp-img { min-height: 0; }
.tp-gallery .tp-tall { grid-row: span 2; }
.tp-gallery .tp-img-icon { width: 40px !important; height: 40px !important; }

.tp-review { gap: 14px; }
.tp-stars { display: flex; gap: 3px; color: var(--tp); }
.tp-stars svg { width: 18px; height: 18px; fill: currentColor; }
.tp-review blockquote { margin: 0; font-size: 19px; font-family: var(--tp-head); line-height: 1.4; }
.tp-review figcaption { color: var(--tp-muted); font-size: 14px; font-style: italic; }

.tp-hours { width: 100%; border-collapse: collapse; margin-top: 22px; font-size: 17px; }
.tp-hours td { padding: 12px 0; border-bottom: 1px solid var(--tp-line); }
.tp-hours td + td { text-align: right; font-weight: 700; }
.tp-contact p { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 16px; }
.tp-contact svg { color: var(--tp); width: 20px; height: 20px; }
.tp-map { margin-top: 10px; height: 180px; border-radius: 10px; display: grid; place-items: center; align-content: center; gap: 4px; color: var(--tp-muted); background: repeating-linear-gradient(45deg, var(--tp-bg2), var(--tp-bg2) 12px, var(--tp-bg) 12px, var(--tp-bg) 24px); border: 1px solid var(--tp-line); }
.tp-map svg { width: 30px; height: 30px; color: var(--tp); }

.tp-cta { border-radius: 20px; padding: 64px 40px; text-align: center; color: #fff; background: linear-gradient(135deg, var(--tp), color-mix(in srgb, var(--tp) 50%, #000)); }
.tp-cta h2 { color: #fff; }
.tp-cta p { color: rgba(255,255,255,.85); font-size: 18px; margin: 12px auto 24px; max-width: 520px; }

.tp-footer { background: var(--tp-bg2); border-top: 1px solid var(--tp-line); padding: 32px 0; color: var(--tp-muted); font-size: 14.5px; }
.tp-foot-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.tp-foot-in .tp-logo { color: var(--tp-ink); }

/* Responsive inside the preview frame (container queries follow the device width) */
@container (max-width: 760px) {
  .tp-split, .tp-grid-3, .tp-grid-2 { grid-template-columns: 1fr; }
  .tp-links { display: none; }
  .tp-nav .tp-btn-sm { display: none; }
  .tp-hero-split { padding: 44px 0; }
  .tp-hero-centered { padding: 72px 0; }
  .tp-hero-banner, .tp-banner-img { min-height: 460px !important; }
  .tp-img { min-height: 240px; }
  .tp-sec { padding: 56px 0; }
  .tp-wrap { padding: 0 20px; }
  .tp-gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 140px; }
  .tp-lede { font-size: 17px; }
  .tp-cta { padding: 44px 22px; }
  .tp-actions .tp-btn { flex: 1 1 auto; justify-content: center; }
}
.tp-banner-img .tp-img-icon { display: none; }
