/* Decorative carving lives outside the editable/exported design layers. */
.carving-scene { position: absolute; z-index: 90; pointer-events: none; }
.carving-tool { position: absolute; width: clamp(78px, 13vw, 125px); transform: translate(-25%, -12%); transition: left .22s cubic-bezier(.4,0,.2,1), top .22s cubic-bezier(.4,0,.2,1); }
.carving-tool svg { display: block; width: 100%; overflow: visible; filter: drop-shadow(2px 5px 3px rgba(45,31,20,.2)); }
.carving-swing { transform-origin: 95px 95px; }
.carving-chip { position: absolute; width: 7px; height: 6px; background: #dfceb5; border: 1px solid #c2ac90; clip-path: polygon(10% 0,100% 25%,70% 100%,0 70%); }
@media (prefers-reduced-motion: reduce) { .carving-scene { display: none; } }

/* ===== Design tokens ===== */
:root {
  --surface: #f7f0e4;
  --surface-muted: #eadcc7;
  --accent: #211d19;
  --accent-hover: #4a3b2e;
  --bronze: #89673e;
  --stone-50: var(--surface);
  --stone-100: var(--surface-muted);
  --stone-200: #dfceb3;
  --stone-400: #ad9472;
  --gold: var(--accent);
  --gold-dark: var(--accent-hover);
  --ink: #241f1a;
  --ink-soft: #675b4d;
  --line: #d8c4a7;
  --white: #ffffff;
  --shadow: 0 4px 18px rgba(41, 40, 36, 0.04);
  --radius: 3px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gold-text {
  background: linear-gradient(100deg, #c79a52, #8a6530 55%, #c79a52);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--stone-50);
  color: var(--ink);
  font-family: "Assistant", "Segoe UI", sans-serif;
  line-height: 1.65;
}

h1,
h2,
h3 {
  font-family: "David Libre", "Frank Ruhl Libre", serif;
  color: var(--ink);
  margin: 0 0 0.5em;
  font-weight: 600;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 84px 0;
}

.section-alt {
  background: var(--stone-100);
}

.eyebrow {
  display: inline-block;
  color: var(--gold-dark);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.section-head p {
  color: var(--ink-soft);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--gold);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--gold-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--white);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-outline-dark {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold-dark);
}

.btn-outline-dark:hover {
  background: var(--gold);
  color: var(--white);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 246, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-decoration: none;
  line-height: 1.2;
}

.brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
}

.brand-signature {
  display: block;
  width: clamp(158px, 15vw, 215px);
  height: 50px;
  object-fit: contain;
  object-position: center;
}

.brand-slogan {
  color: var(--ink);
  font-family: "David Libre", serif;
  font-size: 1.15rem;
  font-weight: 700;
  white-space: nowrap;
  margin-inline-start: -5px;
}

.brand-name {
  font-family: "David Libre", serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
}

.brand-tagline {
  font-family: "Assistant", sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.055em;
  color: var(--ink-soft);
  line-height: 1;
  margin-top: -4px;
  text-align: center;
  white-space: nowrap;
  width: 100%;
}

.site-footer .brand span {
  background: none;
  -webkit-text-fill-color: unset;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-weight: 600;
  color: var(--ink-soft);
}

.nav-links a:hover {
  color: var(--gold-dark);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
}

.header-phone svg {
  width: 18px;
  height: 18px;
  color: var(--gold-dark);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle svg {
  width: 26px;
  height: 26px;
}

/* ===== Hero ===== */
.hero {
  background: var(--surface);
  color: var(--ink);
  padding: clamp(38px, 6vw, 88px) 0 0;
}
.hero-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(32px, 6vw, 88px); }
.hero-copy { min-width: 0; padding: 12px 0; }
.hero-catalog-title { width: min(100%, 540px); height: auto; object-fit: contain; object-position: right center; mix-blend-mode: multiply; }
.hero-kicker { color: var(--ink); font-family: "David Libre", serif; font-size: clamp(1.45rem, 2.2vw, 2rem); font-weight: 700; margin: 0 0 4px; }
.hero h1 { color: var(--bronze); font-size: clamp(3.1rem, 5.8vw, 5.4rem); line-height: 1; font-weight: 600; margin: 0 0 28px; }
.hero h1 span { color: #806344; }
.hero-description { max-width: 470px; font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.75; color: var(--ink); margin: 0; }
.hero-contact-details { display: grid; justify-items: start; gap: 3px; margin-top: 22px; color: var(--ink); font-style: normal; line-height: 1.45; }
.hero-contact-details strong { color: var(--bronze); font-size: 1.05rem; }
.hero-contact-details a { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); text-decoration: none; }
.hero-contact-details svg { width: 15px; height: 15px; color: var(--bronze); flex: none; }
.hero-contact-details a:hover { color: var(--bronze); text-decoration: underline; text-underline-offset: 4px; }
.hero-artwork { margin: 0; min-width: 0; }
.hero-photo-wrap { background: #e8ddcc; padding: clamp(12px, 1.8vw, 24px); }
.hero-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}
.hero-artwork figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 16px; font-size: 0.8rem; color: #625e56; }
.hero-artwork figcaption > span:first-child { color: #292824; font-weight: 600; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 32px;
}
.hero-primary { background: var(--accent); color: #fff; border-radius: 3px; padding: 14px 24px; gap: 24px; }
.hero-primary:hover { background: var(--accent-hover); }
.hero-secondary { color: var(--accent); border-color: var(--accent); background: transparent; }
.hero-secondary:hover { color: var(--surface); background: var(--accent); }
.hero-contact { color: #454139; font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.hero-signature { display: flex; align-items: center; gap: 14px; margin-top: 42px; }
.hero-signature-line { width: 34px; height: 1px; background: #b49b7e; flex-shrink: 0; }
.hero-signature p { margin: 0; font-size: 0.8rem; color: #625e56; }
.hero-signature strong { display: block; color: #292824; font-size: 0.95rem; font-weight: 600; }
.hero-signature p > span { display: block; }
.hero-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: clamp(36px, 5vw, 64px); padding-top: 22px; padding-bottom: 22px; border-top: 1px solid #e2ddd4; font-size: 0.85rem; color: #625e56; }
.hero-bottom a { text-decoration: none; }
.hero-bottom a span { margin-inline-start: 16px; }
.hero a:focus-visible { outline: 2px solid #806344; outline-offset: 5px; }
#gallery, #about, #contact, #catalog { scroll-margin-top: 100px; }
@media (max-width: 760px) {
  .hero-layout { grid-template-columns: 1fr; gap: 32px; }
  .hero-copy { padding: 0; }
  .hero h1 { font-size: clamp(2.5rem, 8.4vw, 3.8rem); }
  .hero-kicker { margin-bottom: 18px; }
  .hero-description { max-width: 440px; font-size: 1.05rem; }
  .hero-signature { margin-top: 28px; }
  .hero-artwork { width: 100%; max-width: 520px; justify-self: center; }
  .hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
  .hero-actions .btn { width: 100%; min-height: 54px; justify-content: center; padding: 13px 12px; white-space: nowrap; }
}
@media (max-width: 380px) {
  .hero-actions { gap: 8px; }
  .hero-actions .btn { font-size: .9rem; padding-inline: 8px; }
}

/* ===== About ===== */
.about-section { background: var(--surface-muted); padding: clamp(56px, 8vw, 112px) 0; }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.about-text { min-width: 0; }
.about-text .eyebrow { color: var(--bronze); font-size: 0.85rem; margin-bottom: 20px; }
.about-text h2 { font-size: clamp(2rem, 3.4vw, 3.25rem); font-weight: 500; line-height: 1.2; margin-bottom: 28px; }
.about-text h2 > span { color: var(--accent); }

.about-text p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.9;
}

.about-facts {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.about-facts li {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  font-weight: 600;
  padding: 18px 0;
  border-top: 1px solid #d8c4a7;
}
.about-fact-number { color: var(--bronze); font-size: 0.8rem; padding-top: 4px; }
.about-fact-detail { display: block; font-size: 0.9rem; font-weight: 400; color: var(--ink-soft); margin-top: 3px; }
.about-link { display: inline-flex; gap: 24px; align-items: center; min-height: 44px; margin-top: 12px; font-weight: 600; color: var(--accent); text-underline-offset: 6px; }
.about-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }

.about-facts svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--gold-dark);
  margin-top: 2px;
}

.about-media {
  margin: 0;
  min-width: 0;
}
.about-media img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 12% center; }
.about-media figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid #d8c4a7; margin-top: 18px; padding-top: 14px; font-size: 0.8rem; color: var(--ink-soft); }
.about-media figcaption > span:first-child { color: var(--accent); font-weight: 600; }
@media (max-width: 860px) {
  .about-media img { aspect-ratio: 4 / 3; }
}

/* ===== Gallery ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: zoom-in;
  background: var(--white);
  border: 1px solid var(--line);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 14px 16px 12px;
  background: linear-gradient(0deg, rgba(20, 16, 10, 0.75), transparent);
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
}

/* Lightbox */
.featured-gallery { background: var(--surface); padding: clamp(56px, 8vw, 112px) 0; }
.featured-gallery .section-head { text-align: center; max-width: none; margin-bottom: 40px; }
.featured-gallery .eyebrow { color: var(--bronze); font-size: 0.85rem; }
.featured-gallery h2 { font-size: clamp(2rem, 3.4vw, 3.25rem); font-weight: 500; line-height: 1.2; }
.featured-gallery .section-head p { font-size: 1.05rem; }
.featured-gallery .gallery-item { margin: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; overflow: visible; min-width: 0; }
.featured-gallery .gallery-item img { object-fit: contain; background: var(--surface-muted); }
.featured-gallery .gallery-item:hover img { transform: none; }
.featured-gallery .gallery-caption { position: static; background: none; color: var(--ink); padding: 18px 0 0; font-size: 1.15rem; font-weight: 500; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.featured-gallery .gallery-caption > span { font-family: "David Libre", serif; font-size: 1.45rem; }
.featured-gallery .gallery-caption button { border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--accent); font: inherit; font-size: 0.9rem; min-height: 44px; padding: 6px 0; cursor: pointer; }
.featured-gallery .gallery-caption button span { margin-inline-start: 18px; }
.featured-gallery button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 10, 0.92);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-stage {
  width: 100%;
  max-width: 1100px;
  height: 80vh;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-stage.is-dragging {
  cursor: grabbing;
}

.lightbox-stage img {
  max-width: 90vw;
  max-height: 78vh;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  user-select: none;
  will-change: transform;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--white);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  z-index: 2;
}

.lightbox-zoom-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.lightbox-zoom-controls button {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--white);
  min-width: 44px;
  height: 44px;
  border-radius: 22px;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0 12px;
}

.lightbox-zoom-controls button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.lightbox-nav svg {
  display: block;
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev { right: 16px; }
.lightbox-next { left: 16px; }

@media (max-width: 640px) {
  .lightbox-nav { width: 42px; height: 42px; font-size: 1.6rem; }
  .lightbox-prev { right: 6px; }
  .lightbox-next { left: 6px; }
}

.lightbox-hint {
  color: var(--stone-200);
  font-size: 0.85rem;
  margin: 14px 0 0;
}

/* ===== Free-canvas designer ===== */
#customize {
  background:
    radial-gradient(circle at 1px 1px, rgba(166, 124, 61, 0.16) 1px, transparent 0) 0 0/22px 22px,
    linear-gradient(180deg, #efe4cc, #e6d7b3);
}

#customize .section-head p {
  color: #5c5240;
}

.designer {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: start;
}

.designer-canvas-wrap {
  position: sticky;
  top: 100px;
}

.designer-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(45deg, rgba(166, 124, 61, 0.05) 0 10px, transparent 10px 20px),
    var(--white);
  border: 2px dashed var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  touch-action: none;
}

.designer-empty-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: var(--ink-soft);
  font-weight: 600;
  pointer-events: none;
}

.designer-hint {
  color: var(--ink-soft);
  font-size: 0.82rem;
  margin: 12px 2px 0;
}

.designer-draft-notice {
  background: rgba(166, 124, 61, 0.1);
  border: 1px solid rgba(166, 124, 61, 0.3);
  color: var(--gold-dark);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 8px;
  margin: 12px 0 0;
}

.designer-draft-notice button {
  background: none;
  border: none;
  color: var(--gold-dark);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0;
}

/* generic draggable layer */
.layer {
  position: absolute;
  cursor: grab;
  user-select: none;
  outline: 1px dashed transparent;
}

.layer:hover,
.layer.is-active {
  outline-color: rgba(166, 124, 61, 0.5);
}

.layer.is-dragging {
  cursor: grabbing;
  z-index: 999 !important;
}

.layer-del,
.layer-edit {
  position: absolute;
  top: -12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #3a332a;
  color: #fff;
  border: 2px solid var(--white);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 6;
}

.layer-del { right: -12px; }
.layer-edit { right: 18px; background: var(--gold-dark); }

.layer:hover .layer-del,
.layer.is-active .layer-del,
.layer:hover .layer-edit,
.layer.is-active .layer-edit {
  display: flex;
}

.layer-resize {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--white);
  display: none;
  z-index: 5;
}

.layer-resize.nw { top: -8px; left: -8px; cursor: nwse-resize; }
.layer-resize.ne { top: -8px; right: -8px; cursor: nesw-resize; }
.layer-resize.sw { bottom: -8px; left: -8px; cursor: nesw-resize; }
.layer-resize.se { bottom: -8px; right: -8px; cursor: nwse-resize; }

.layer:hover .layer-resize,
.layer.is-active .layer-resize {
  display: block;
}

@media (max-width: 640px), (pointer: coarse) {
  .layer-del,
  .layer-edit {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
  }
  .layer-edit { right: 30px; }
  .layer-resize {
    width: 30px;
    height: 30px;
  }
  .layer-resize.nw { top: -14px; left: -14px; }
  .layer-resize.ne { top: -14px; right: -14px; }
  .layer-resize.sw { bottom: -14px; left: -14px; }
  .layer-resize.se { bottom: -14px; right: -14px; }
  /* on touch devices there's no hover, so controls stay visible once a layer is active */
  .layer .layer-del,
  .layer .layer-edit,
  .layer .layer-resize {
    display: none;
  }
  .layer.is-active .layer-del,
  .layer.is-active .layer-edit {
    display: flex;
  }
  .layer.is-active .layer-resize {
    display: block;
  }
}

.layer-shape {
  width: 100%;
  height: 100%;
  background: #9c968a;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15), inset 0 2px 8px rgba(0, 0, 0, 0.12);
  border-radius: 3px;
}

.layer-text {
  width: 100%;
  height: 100%;
  background: transparent;
  color: #4a3c26;
  font-family: "David Libre", "Frank Ruhl Libre", serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  overflow: visible;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 1.6rem;
  padding: 2px;
}

.layer-text:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--gold);
}

.layer-text:empty:before {
  content: "הקלידו כאן…";
  opacity: 0.5;
}

.layer-text.style-carve {
  color: #9c968a;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3), -0.5px -0.5px 0 rgba(255, 255, 255, 0.4);
}

.layer-text.style-raised {
  color: #ffffff;
  text-shadow: 1px 2px 2px rgba(0, 0, 0, 0.55), 0 0 1px rgba(0, 0, 0, 0.4);
}

.layer-painting {
  width: 100%;
  height: 100%;
}

.layer-painting img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

/* Frames: a fully connected 4-side outline. Border-width stays constant when the
   layer is resized, since CSS border thickness is independent of element size. */
.layer-frame {
  width: 100%;
  height: 100%;
  background: transparent;
  box-sizing: border-box;
  border-radius: 2px;
}

.layer-frame.frame-carve {
  border: 4px solid #9c968a;
}

.layer-frame.frame-led {
  border: 3px solid #f6dfa0;
  box-shadow: 0 0 12px 3px rgba(255, 214, 140, 0.85), inset 0 0 10px 2px rgba(255, 214, 140, 0.5);
}

.layer-frame.frame-cornice {
  border: 10px solid #f5f2ea;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.08),
    inset 0 2px 3px rgba(255, 255, 255, 0.9),
    inset 0 -2px 4px rgba(0, 0, 0, 0.15),
    0 3px 8px rgba(0, 0, 0, 0.2);
}
.layer-frame.frame-glass {
  border: 2px solid rgba(145, 154, 157, 0.68);
  background:
    radial-gradient(circle at 12px 12px, #f8f8f5 0 2px, #999993 3px 5px, #444440 6px, transparent 7px),
    radial-gradient(circle at calc(100% - 12px) 12px, #f8f8f5 0 2px, #999993 3px 5px, #444440 6px, transparent 7px),
    radial-gradient(circle at 12px calc(100% - 12px), #f8f8f5 0 2px, #999993 3px 5px, #444440 6px, transparent 7px),
    radial-gradient(circle at calc(100% - 12px) calc(100% - 12px), #f8f8f5 0 2px, #999993 3px 5px, #444440 6px, transparent 7px),
    linear-gradient(125deg, rgba(255,255,255,.20), rgba(213,229,232,.06) 45%, rgba(255,255,255,.15));
  box-shadow: 0 5px 12px rgba(45,45,40,.15), inset 0 0 0 1px rgba(255,255,255,.45);
  backdrop-filter: brightness(1.04) contrast(.97);
}

.designer-controls {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.control-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-row-tight {
  margin-bottom: 10px;
}

.chip {
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--white);
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-soft);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.chip:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
}

.chip.is-active {
  border-color: var(--gold);
  color: var(--gold-dark);
  background: rgba(166, 124, 61, 0.08);
}

.chip-labeled {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.25;
  gap: 2px;
}

.chip-sub {
  display: block;
  font-size: 0.72em;
  font-weight: 500;
  opacity: 0.75;
}

.painting-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.painting-opt {
  width: 74px;
  height: 74px;
  padding: 6px;
  border-radius: 8px;
  border: 2px solid var(--line);
  background: var(--stone-100);
  cursor: pointer;
}

.painting-opt:hover {
  border-color: var(--gold);
}

.painting-opt img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.upload-label {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gold-dark);
  cursor: pointer;
}

.upload-label input {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
}

.config-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.config-actions-secondary {
  margin-top: -6px;
  gap: 20px;
}

.btn-clear {
  background: none;
  border: none;
  color: var(--ink-soft);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 8px 4px;
}

.btn-clear:disabled {
  opacity: 0.4;
  cursor: default;
  text-decoration: none;
}

.config-disclaimer {
  color: var(--ink-soft);
  font-size: 0.82rem;
  margin: 0;
}

@media (max-width: 860px) {
  .designer {
    grid-template-columns: 1fr;
  }

  .designer-canvas-wrap {
    position: sticky;
    top: 84px;
    z-index: 5;
    background: #e6d7b3;
    padding-top: 8px;
  }
}

/* ===== How it works ===== */
.how-it-works {
  background: var(--surface-muted);
  padding: clamp(56px, 8vw, 112px) 0;
  scroll-margin-top: 100px;
}
.process-heading { max-width: 680px; margin-bottom: 48px; }
.process-heading .eyebrow { color: var(--bronze); font-size: 0.85rem; }
.process-heading h2 { font-size: clamp(2rem, 3.4vw, 3.25rem); font-weight: 500; line-height: 1.2; }
.process-heading p { color: var(--ink-soft); font-size: 1.05rem; }
.process-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.process-steps li { padding: 0 24px; border-inline-start: 1px solid #d8c4a7; }
.process-steps li:first-child { padding-inline-start: 0; border-inline-start: 0; }
.process-steps li:last-child { padding-inline-end: 0; }
.process-number { display: block; color: var(--bronze); font-family: "Frank Ruhl Libre", serif; font-size: 3.5rem; line-height: 1; margin-bottom: 24px; }
.process-steps h3 { color: var(--accent); font-size: 1.4rem; font-weight: 500; margin-bottom: 12px; }
.process-steps p { color: var(--ink-soft); font-size: 1rem; line-height: 1.85; margin: 0; }
.process-notice { margin-top: 40px; padding: 22px 24px; background: var(--surface); border-inline-start: 2px solid var(--bronze); }
.process-notice h3 { font-size: 1.2rem; color: var(--ink); margin: 0 0 8px; }
.process-notice p { margin: 0; max-width: 850px; font-size: 1rem; line-height: 1.85; color: var(--ink-soft); }
.process-footer { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 48px; padding-top: 28px; border-top: 1px solid #d8c4a7; }
.process-footer p { margin: 0; color: var(--ink-soft); }
.process-cta { background: var(--accent); color: var(--white); gap: 24px; border-radius: var(--radius); }
.process-cta:hover { background: var(--accent-hover); }
.process-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
@media (max-width: 860px) {
  .process-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 0; }
  .process-steps li:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
}
@media (max-width: 540px) {
  .process-heading { margin-bottom: 32px; }
  .process-steps { grid-template-columns: 1fr; gap: 0; }
  .process-steps li { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 18px; border-inline-start: 0; border-top: 1px solid #d8c4a7; padding: 24px 0; }
  .process-number { grid-row: span 2; font-size: 2.6rem; margin: 0; }
  .process-steps h3 { margin-bottom: 8px; }
  .process-footer { margin-top: 8px; }
  .process-cta { width: 100%; justify-content: space-between; padding-inline: 18px; }
}

/* ===== Halacha ===== */
#halacha {
  position: relative;
  background: radial-gradient(ellipse at top, #4a3c26 0%, #2c2418 68%);
  overflow: hidden;
}

#halacha::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 42px);
  pointer-events: none;
}

#halacha .section-head {
  position: relative;
}

#halacha .section-head .eyebrow {
  color: #e7c98c;
}

#halacha .section-head h2 {
  color: var(--white);
}

.halacha-card {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  background: #faf5e9;
  border-radius: 8px;
  padding: 56px 52px 44px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.halacha-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 6px;
  background: linear-gradient(90deg, #c79a52, #8a6530 50%, #c79a52);
}

.halacha-card p {
  color: var(--ink);
  line-height: 1.9;
}

.halacha-quote {
  position: relative;
  font-family: "David Libre", serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  border-right: 3px solid var(--gold);
  padding: 4px 22px 4px 0;
  margin-bottom: 22px;
}

.halacha-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin: 36px 0 30px;
  padding-top: 32px;
  border-top: 1px dashed var(--line);
}

.halacha-spec {
  position: relative;
  padding-top: 46px;
}

.halacha-spec::before {
  content: attr(data-num);
  position: absolute;
  top: 0;
  right: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c79a52, #8a6530);
  color: #fff;
  font-weight: 700;
  font-family: "David Libre", serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

.halacha-spec h3 {
  font-size: 1rem;
  color: var(--gold-dark);
  margin-bottom: 8px;
}

.halacha-spec p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

.halacha-attribution {
  text-align: left;
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0;
}

@media (max-width: 720px) {
  .halacha-card {
    padding: 40px 24px 32px;
  }

  .halacha-specs {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ===== Catalog ===== */
.catalog-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: linear-gradient(120deg, #2c2418, #4a3c26);
  color: var(--white);
  border-radius: 18px;
  padding: 48px;
  box-shadow: var(--shadow);
}

.catalog-card h2 {
  color: var(--white);
}

.catalog-card p {
  color: var(--stone-200);
  margin-bottom: 0;
}

.catalog-note {
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--stone-200);
  display: none;
}

.catalog-note.is-visible {
  display: block;
}

/* ===== Video ===== */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--stone-200), var(--stone-100));
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.video-placeholder {
  text-align: center;
  color: var(--ink-soft);
}

.video-placeholder .play-badge {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: var(--shadow);
}

.video-placeholder .play-badge svg {
  width: 26px;
  height: 26px;
  color: var(--gold-dark);
  margin-right: -3px;
}

.video-placeholder strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
  margin-bottom: 4px;
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  max-width: 640px;
  margin: 0 auto;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}

.contact-card:hover {
  transform: translateY(-3px);
}

.contact-card .icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--stone-100);
  color: var(--gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.contact-card .icon svg {
  width: 24px;
  height: 24px;
}

.contact-card .label {
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.contact-card .value {
  font-weight: 700;
  font-size: 1.1rem;
  direction: ltr;
  display: inline-block;
}

/* ===== Footer ===== */
.site-footer {
  background: #2c2418;
  color: var(--stone-200);
  padding: 36px 0;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer .brand {
  color: var(--white);
}

.site-footer .brand span {
  color: var(--gold);
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .catalog-card {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 60px 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 76px;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--stone-50);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
    display: none;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  .header-phone-text {
    display: none;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Guided designer: the same gallery palette, with advanced tools on demand. */
.designer-section { background: var(--surface); padding: clamp(56px, 8vw, 112px) 0; }
.designer-section .section-head { text-align: right; max-width: none; }
.designer-section .section-head h2 { font-size: clamp(2rem, 3.4vw, 3.25rem); font-weight: 500; }
.designer-section .eyebrow { color: var(--bronze); }
.designer-section .designer { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; }
.designer-section .designer-canvas { background: #f0eeE8; border: 1px solid var(--line); border-radius: 2px; box-shadow: inset 0 0 60px rgba(41,40,36,.035); }
.designer-section .designer-canvas:not(.advanced-open) .layer { pointer-events: none; outline: none; }
.designer-section .designer-canvas:not(.advanced-open) { touch-action: pan-y; }
.designer-section .designer-canvas:not(.advanced-open) .layer-del,
.designer-section .designer-canvas:not(.advanced-open) .layer-resize,
.designer-section .designer-canvas:not(.advanced-open) .layer-edit { display: none; }
.designer-preview-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .8rem; color: var(--ink-soft); padding-top: 10px; }
.designer-section .designer-controls { min-width: 0; gap: 24px; }
.designer-section fieldset { margin: 0; border: 0; padding: 0; min-width: 0; }
.designer-section legend { margin-bottom: 14px; padding: 0; font-weight: 600; }
.designer-section legend > span { color: var(--bronze); margin-inline-end: 10px; font-size: .8rem; }
.model-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.model-option, .frame-option { border: 1px solid var(--line); background: var(--white); color: var(--ink); padding: 10px; cursor: pointer; font: inherit; font-size: .85rem; border-radius: 3px; }
.model-option img { width: 100%; height: 66px; object-fit: contain; margin-bottom: 10px; }
.model-option[aria-pressed="true"], .frame-option[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--surface-muted); }
.frame-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(82px, 1fr)); gap: 8px; }
.frame-swatch { display: block; width: 42px; height: 36px; margin: 2px auto 12px; background: #eeeae2; }
.swatch-none { border: 1px dashed #aaa99f; }
.swatch-carve { border: 3px solid #9c968a; }
.swatch-led { border: 3px solid #e9ce8e; box-shadow: 0 0 6px #e9ce8e; }
.swatch-cornice { border: 5px ridge #dfdcd3; }
.swatch-glass { border: 1px solid #9ba5a7; background: linear-gradient(135deg,rgba(255,255,255,.9),rgba(203,220,224,.35)); box-shadow: 0 2px 4px rgba(0,0,0,.12); }
.guided-text-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.guided-text-row input { width: 100%; min-width: 0; padding: 13px; font: inherit; border: 1px solid var(--line); border-radius: 3px; background: var(--white); }
.designer-advanced { border-block: 1px solid var(--line); padding: 16px 0; }
.designer-advanced summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.designer-advanced .control-group { margin-top: 22px; }
.designer-section .chip { border-radius: 3px; }
.designer-section .config-actions { margin: 0; gap: 14px; }
.designer-section #config-send { width: 100%; justify-content: center; }
.designer-send-note { margin: 0; font-size: .85rem; color: var(--ink-soft); line-height: 1.75; }
.designer-section button:focus-visible, .designer-section input:focus-visible, .designer-section summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 860px) {
  .designer-section .designer { grid-template-columns: 1fr; gap: 28px; }
  .designer-section .designer-canvas-wrap { position: static; }
}
@media (max-width: 540px) and (min-height: 740px) {
  .designer-section .designer-canvas-wrap { position: sticky; top: 76px; z-index: 50; background: var(--surface); padding-top: 8px; }
}
@media (max-width: 380px) {
  .frame-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Personal design studio: warm paper, forest green and bronze. */
.designer-section { background: linear-gradient(125deg, var(--surface) 15%, #e4d2b8 100%); border-block: 1px solid var(--line); }
.designer-section .section-head { padding-inline-start: 22px; border-inline-start: 2px solid var(--bronze); }
.designer-section .designer-controls { background: var(--surface); border: 1px solid #d8c4a7; padding: 24px; gap: 18px; }
.designer-panel-heading { background: var(--accent); color: var(--surface); margin: -24px -24px 0; padding: 24px; }
.designer-panel-heading > span { font-family: "David Libre", serif; font-size: 1.5rem; }
.designer-panel-heading p { font-size: .85rem; color: #e8dccb; margin: 8px 0 0; }
.designer-category { border-bottom: 1px solid var(--line); }
.designer-category summary { display: flex; align-items: center; gap: 14px; padding: 18px 0; list-style: none; cursor: pointer; font-weight: 600; color: var(--accent); }
.designer-category summary::-webkit-details-marker { display: none; }
.designer-category summary small { display: block; font-size: .78rem; color: var(--ink-soft); font-weight: 400; margin-top: 3px; }
.category-number { color: var(--bronze); font-size: .8rem; }
.category-toggle { margin-inline-start: auto; width: 20px; height: 20px; position: relative; flex-shrink: 0; }
.category-toggle::before, .category-toggle::after { content: ''; position: absolute; background: var(--accent); width: 12px; height: 1px; top: 9px; left: 4px; }
.category-toggle::after { transform: rotate(90deg); }
.designer-category[open] .category-toggle::after { display: none; }
.designer-category[open] summary { color: var(--bronze); }
.category-content { padding: 0 0 22px; }
.category-content > label { display: block; font-size: .9rem; margin-bottom: 10px; }
.category-content .upload-label { margin: 20px 0 0; }
.category-content .upload-label input { width: 100%; }
.category-content .designer-hint { margin: 0 0 16px; }
.category-content [data-shape] { flex: 1; min-height: 48px; }
.category-content [data-shape][aria-pressed="true"] { background: var(--surface-muted); border-color: var(--accent); color: var(--accent); }
.designer-section .designer-preview-footer { color: var(--accent); }
@media (max-width: 540px) {
  .designer-section .designer-controls { padding: 18px; }
  .designer-panel-heading { margin: -18px -18px 0; padding: 20px 18px; }
}

/* Meaning and tradition: a quiet forest-green chapter. */
#halacha { background: var(--accent); padding: clamp(60px, 8vw, 112px) 0; color: var(--surface); scroll-margin-top: 100px; }
#halacha::before { display: none; }
#halacha .section-head { text-align: right; max-width: 720px; margin: 0 0 48px; }
#halacha .section-head .eyebrow { color: #d0ad79; font-size: .85rem; }
#halacha .section-head h2 { color: var(--surface); font-size: clamp(2.5rem, 4.6vw, 4rem); font-weight: 500; line-height: 1.15; }
#halacha .halacha-intro { color: #e8dccb; max-width: 560px; font-size: 1.1rem; line-height: 1.9; margin: 24px 0 0; }
#halacha .halacha-card { max-width: none; margin: 0; background: transparent; padding: 0; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
#halacha .halacha-card::before { display: none; }
#halacha .halacha-specs { gap: 0; margin: 0 0 40px; padding-top: 32px; border-top: 1px solid #625345; }
#halacha .halacha-spec { padding: 0 28px; border-inline-start: 1px solid #625345; }
#halacha .halacha-spec:first-child { padding-inline-start: 0; border-inline-start: 0; }
#halacha .halacha-spec:last-child { padding-inline-end: 0; }
#halacha .halacha-spec::before { content: '0' attr(data-num); position: static; display: block; background: none; border-radius: 0; width: auto; height: auto; color: #d0ad79; font-size: 1.1rem; font-weight: 400; margin-bottom: 20px; }
#halacha .halacha-spec h3 { color: var(--surface); font-size: 1.6rem; font-weight: 500; margin-bottom: 16px; }
#halacha .halacha-spec p { color: #e8dccb; font-size: 1rem; line-height: 1.85; margin: 0; }
.halacha-sources { border-block: 1px solid #625345; }
.halacha-sources summary { padding: 22px 0; cursor: pointer; font-weight: 600; color: var(--surface); }
.halacha-sources summary::marker { color: #d0b28a; }
.halacha-sources summary:focus-visible { outline: 2px solid #d0b28a; outline-offset: 5px; }
.halacha-source-text { max-width: 780px; padding: 0 0 24px; }
#halacha .halacha-source-text p { color: #e8dccb; }
#halacha .halacha-quote { border-color: #d0b28a; color: var(--surface); font-size: 1.2rem; font-weight: 500; }
#halacha .halacha-attribution { text-align: right; color: #d0b28a; margin-top: 24px; font-style: normal; font-size: .88rem; }
@media (max-width: 720px) {
  #halacha .section-head { margin-bottom: 32px; }
  #halacha .halacha-specs { padding: 0; margin-bottom: 24px; }
  #halacha .halacha-spec { padding: 24px 0; border-inline-start: 0; border-bottom: 1px solid #625345; }
  #halacha .halacha-spec:last-child { border-bottom: 0; }
  #halacha .halacha-spec::before { margin-bottom: 10px; }
}

/* Closing invitation. */
#catalog[hidden], #video[hidden] { display: none; }
.contact-finale { background: var(--surface); padding: clamp(60px, 8vw, 112px) 0; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: clamp(32px, 6vw, 80px); }
.contact-copy { min-width: 0; }
.contact-finale .section-head { text-align: right; margin: 0 0 32px; max-width: none; }
.contact-finale .eyebrow { color: var(--bronze); }
.contact-finale h2 { font-size: clamp(2.3rem, 4vw, 3.7rem); font-weight: 500; line-height: 1.15; }
.contact-finale h2 span { color: var(--accent); }
.contact-finale .section-head p { max-width: 430px; font-size: 1.1rem; line-height: 1.85; margin-top: 24px; }
.contact-finale .contact-grid { grid-template-columns: 1fr; gap: 12px; margin: 0; }
.contact-finale .contact-card { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 14px; text-align: right; padding: 18px 20px; border: 1px solid var(--line); border-radius: 3px; box-shadow: none; background: transparent; }
.contact-finale .contact-card:first-child { background: var(--accent); color: var(--surface); border-color: var(--accent); }
.contact-finale .contact-card .icon { grid-row: span 2; width: 36px; height: 36px; margin: 0; align-self: center; background: transparent; color: inherit; }
.contact-finale .contact-card .label { color: inherit; font-size: 1rem; font-weight: 600; margin: 0; }
.contact-finale .contact-card .value { font-size: .9rem; font-weight: 400; text-align: right; overflow-wrap: anywhere; }
.contact-finale .contact-card:hover { transform: none; border-color: var(--accent); background: var(--surface-muted); color: var(--accent); }
.contact-finale a:focus-visible { outline: 2px solid var(--bronze); outline-offset: 5px; }
.contact-gallery-link { display: inline-block; margin-top: 24px; font-size: .85rem; color: var(--ink-soft); text-underline-offset: 5px; }
.contact-gallery-link span { margin-inline-start: 12px; }
.contact-photo { margin: 0; min-width: 0; }
.contact-photo img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; object-position: center; }
.contact-photo figcaption { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--bronze); font-size: .85rem; }
.site-footer { background: var(--surface); color: var(--ink-soft); border-top: 1px solid var(--line); padding: 26px 0; }
.site-footer .brand { color: var(--accent); }
@media (max-width: 760px) {
  .contact-layout { grid-template-columns: 1fr; }
  .contact-photo img { aspect-ratio: 3 / 2; }
}

/* Catalogue-aligned art direction: plaster, warm stone, charcoal and aged bronze. */
body { background-color: var(--surface); }
.site-header { background: rgba(247, 240, 228, .95); }
.hero, .featured-gallery, .contact-finale { position: relative; isolation: isolate; }
.hero::before, .featured-gallery::before, .contact-finale::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(rgba(247,240,228,.92), rgba(247,240,228,.92)), url('images/catalog-plaster-texture.jpg') center / 620px auto repeat;
}
.hero-photo-wrap { background: #d8c2a2; padding: clamp(10px, 1.5vw, 20px); }
.hero-kicker, .eyebrow { letter-spacing: .06em; }
.about-section, .how-it-works { background: #eadcc7; }
.about-media img, .featured-gallery .gallery-item img, .contact-photo img { filter: sepia(.1) saturate(.83) contrast(1.03); }
.featured-gallery .gallery-item img { background: #e8d8bf; }
.designer-section .designer-canvas { background: #e9dcc8; border-color: #cdb693; }
#halacha { background: #211d19; }
.site-footer { background: #211d19; color: #cdbfae; border-color: #4d4135; }
.site-footer .brand { color: #f3e9da; }

/* Process layout mirrors the catalogue page. */
.how-it-works { position: relative; isolation: isolate; background: var(--surface); color: var(--ink); }
.how-it-works::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(247,240,228,.88),rgba(247,240,228,.88)),url('images/catalog-plaster-texture.jpg') center/620px auto repeat; }
.process-heading { max-width: none; margin: 0 0 54px; text-align: center; }
.process-heading h2 { color: var(--ink); font-size: clamp(2.8rem,5vw,4.5rem); line-height: 1; font-weight: 600; margin: 0; }
.process-steps { direction: rtl; }
.process-steps li { text-align: center; padding: 4px clamp(18px,2.5vw,34px); border-color: #cbbba5; }
.process-number { display: none; }
.process-steps h3 { color: #b4824d; font-size: clamp(1.8rem,2.5vw,2.5rem); font-weight: 600; margin-bottom: 12px; }
.process-steps p { color: var(--ink); line-height: 1.65; }
.process-steps small { display:block; font-size:.78rem; margin-top:8px; }
.process-notice { max-width: 950px; margin: 58px auto 0; padding: 22px 40px; text-align: center; background: rgba(218,197,169,.48); border: 0; }
.process-notice h3 { color: var(--bronze); font-size: 1.45rem; }
.process-notice p { max-width: 820px; margin-inline: auto; line-height: 1.7; color: var(--ink); }
.process-footer { justify-content: center; border: 0; margin-top: 28px; padding-top: 0; }
.process-footer > p { display:none; }
@media(max-width:860px){.process-steps li:nth-child(3){border-inline-start:0}.process-steps li{text-align:right}.process-notice{text-align:right;padding:22px 24px}}
@media(max-width:540px){.process-steps li{display:block;border-top:1px solid #cbbba5}.process-steps h3{font-size:1.8rem}.process-heading{margin-bottom:30px}}

/* Clean contact ending. */
.contact-finale { padding: clamp(52px,7vw,86px) 0; text-align:center; }
.contact-layout { display:block; max-width:720px; }
.contact-finale .section-head { text-align:center; margin:0 auto 28px; }
.contact-finale h2 { font-size:clamp(2.3rem,4vw,3.4rem); margin-bottom:10px; }
.contact-finale .section-head p { margin:0 auto; font-size:1rem; }
.contact-finale .contact-grid { grid-template-columns:repeat(2,minmax(0,1fr)); max-width:620px; margin:0 auto; gap:12px; }
.contact-finale .contact-card { min-height:86px; }
@media(max-width:560px){.contact-finale .contact-grid{grid-template-columns:1fr}.contact-finale .contact-card{min-height:76px}}

/* Fine positioning for the catalogue title artwork. */
.hero-catalog-title { transform: translateX(32px); }
@media (max-width:760px) { .hero-catalog-title { transform: translateX(10px); } }

/* Halachic chapter — flowing editorial layout rather than a grid. */
#halacha {
  position: relative;
  isolation: isolate;
  background: #f4ecdf;
  color: var(--ink);
}
#halacha::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(rgba(244,236,223,.9), rgba(244,236,223,.9)),
    url('images/catalog-plaster-texture.jpg') center / 620px auto repeat;
}
#halacha .section-head {
  max-width: 820px;
  margin: 0 auto 58px;
  text-align: right;
}
#halacha .section-head .eyebrow {
  display: block;
  color: var(--bronze);
  font-family: "David Libre", serif;
  font-size: clamp(2.3rem, 4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
}
#halacha .section-head h2 { color: var(--ink); }
#halacha .halacha-intro {
  max-width: 720px;
  margin: 24px 0 0;
  padding: 4px 20px 4px 0;
  border-right: 3px solid var(--bronze);
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 500;
}
#halacha .halacha-card {
  max-width: 820px;
  margin: 0 auto;
}
#halacha .halacha-specs {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}
#halacha .halacha-spec {
  position: relative;
  padding: 0 0 34px;
  margin: 0 0 34px;
  border: 0;
}
#halacha .halacha-spec:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 72px;
  height: 2px;
  background: var(--bronze);
  opacity: .55;
}
#halacha .halacha-spec::before { display: none; }
#halacha .halacha-spec h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  margin-bottom: 10px;
}
#halacha .halacha-spec h3::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  background: var(--bronze);
  transform: rotate(45deg);
}
#halacha .halacha-spec p {
  max-width: 700px;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.9;
}
#halacha .halacha-sources {
  margin-top: 18px;
  border-block: 1px solid #c9b89f;
}
#halacha .halacha-sources summary { color: var(--bronze); }
#halacha .halacha-source-text p { color: var(--ink-soft); }
#halacha .halacha-quote { color: var(--ink); border-color: var(--bronze); }
#halacha .halacha-attribution { color: var(--bronze); }
@media (max-width: 720px) {
  #halacha .section-head { text-align: right; margin-bottom: 40px; }
  #halacha .halacha-spec { padding: 0 0 26px; margin-bottom: 26px; }
}

/* The configurator is shown in the context of an entrance wall. */
.designer-wall-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 48% 20%, rgba(255,255,255,.78), transparent 42%),
    linear-gradient(#eee4d5, #e5d7c4);
  border: 1px solid #c9b69b;
  box-shadow: 0 18px 44px rgba(54,43,31,.16);
}
.designer-wall-preview::before {
  content: "";
  position: absolute;
  top: 5%;
  right: -2px;
  bottom: 0;
  width: 16%;
  background: url('images/designer-door-20260915.png') center / 100% 100% no-repeat;
  border: 0;
  box-shadow: -6px 0 16px rgba(64,48,33,.12);
}
.designer-wall-preview::after {
  display: none;
}
.designer-section .designer-wall-preview .designer-canvas {
  position: absolute;
  z-index: 1;
  top: 0;
  right: auto;
  bottom: auto;
  left: 0;
  width: 84%;
  height: 100%;
  aspect-ratio: auto;
  transform: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.designer-section .btn-primary {
  background: var(--bronze);
  border-color: var(--bronze);
}
.designer-section .btn-primary:hover { background: #795432; }
#designer-add-text {
  width: auto;
  min-height: 40px;
  padding: 8px 15px;
  font-size: .9rem;
  line-height: 1.2;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #e3d4c0;
  text-decoration: none;
}
.footer-brand img {
  width: clamp(185px, 20vw, 245px);
  height: auto;
}
.footer-brand span {
  margin-top: -3px;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .05em;
}
.site-footer .container > p { margin: 0; }
@media (max-width: 540px) {
  .designer-wall-preview { aspect-ratio: 4 / 3; }
  .designer-section .designer-wall-preview .designer-canvas {
    top: 0;
    left: 0;
    width: 84%;
    height: 100%;
  }
}

/* Editorial gallery composition. */
.featured-gallery .gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: clamp(12px, 1.6vw, 22px);
}
.featured-gallery .gallery-item {
  position: relative;
  overflow: hidden;
  background: #e7d8c1;
  cursor: zoom-in;
}
.featured-gallery .gallery-item:nth-child(1),
.featured-gallery .gallery-item:nth-child(2),
.featured-gallery .gallery-item:nth-child(3),
.featured-gallery .gallery-item:nth-child(n+4) {
  grid-column: auto;
  grid-row: auto;
  aspect-ratio: 1;
}
.featured-gallery .gallery-item:nth-child(even) { background: #ddc9aa; }
.featured-gallery .gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  transition: transform .45s ease, filter .45s ease;
}
.featured-gallery .gallery-item::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(139,101,62,0);
  pointer-events: none;
  transition: border-color .35s ease, inset .35s ease;
}
.featured-gallery .gallery-item:hover img { transform: scale(1.025); }
.featured-gallery .gallery-item:hover::after {
  inset: 13px;
  border-color: rgba(139,101,62,.48);
}
@media (max-width: 760px) {
  .featured-gallery .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
  }
  .featured-gallery .gallery-item,
  .featured-gallery .gallery-item:nth-child(1),
  .featured-gallery .gallery-item:nth-child(2),
  .featured-gallery .gallery-item:nth-child(3),
  .featured-gallery .gallery-item:nth-child(n+4) {
    grid-column: span 1;
    grid-row: auto;
    aspect-ratio: 1;
  }
  .featured-gallery .gallery-item:first-child { grid-column: auto; aspect-ratio: 1; }
}
@media (max-width: 440px) {
  .featured-gallery .gallery-grid { grid-template-columns: 1fr; }
  .featured-gallery .gallery-item:first-child { grid-column: auto; aspect-ratio: 1; }
}

.gallery-animate-ready .gallery-item {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.22, .61, .36, 1);
  transition-delay: var(--gallery-delay, 0ms);
}
.gallery-animate-ready .gallery-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .gallery-animate-ready .gallery-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Dark charcoal header, visually paired with the footer. */
.site-header {
  background: rgba(33, 29, 25, .97);
  border-bottom-color: rgba(205, 182, 147, .24);
  box-shadow: 0 5px 20px rgba(22, 18, 15, .16);
}
.site-header .brand-tagline { color: #eadfce; }
.site-header .nav-links a { color: #e5d8c6; }
.site-header .nav-links a:hover { color: #c99a63; }
.site-header .header-phone { color: #f3e9da; }
.site-header .header-phone svg { color: #b8834e; }
.site-header .nav-toggle { color: #f3e9da; }
@media (max-width: 640px) {
  .site-header .nav-links {
    background: #211d19;
    border-bottom-color: rgba(205, 182, 147, .24);
  }
  .site-header .nav-links a { border-bottom-color: rgba(205, 182, 147, .18); }
}

/* Catalogue typography on a smooth ivory background. */
.catalog-process { padding: clamp(56px, 7vw, 96px) 24px; background: #f1e9dd; color: var(--ink); }
.catalog-process-text { max-width: var(--max-width); margin: 0 auto; text-align: center; }
.catalog-process-text h2 { font-family: 'David Libre', serif; font-size: clamp(2.8rem, 5vw, 4.4rem); line-height: 1.1; margin: 0 0 clamp(36px, 5vw, 64px); }
.catalog-process-text ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; padding: 0; margin: 0; }
.catalog-process-text li { padding: 8px 24px; }
.catalog-process-text li + li { border-inline-start: 1px solid #d3c3ad; }
.catalog-process-text h3 { font-family: 'David Libre', serif; color: #89673e; font-size: clamp(2.1rem, 3.5vw, 3rem); margin: 0 0 12px; line-height: 1.1; }
.catalog-process-text p { max-width: 245px; margin: 0 auto; font-size: 1.15rem; line-height: 1.55; }
.catalog-process-text small { display: block; margin-top: 10px; color: var(--ink-soft); font-size: .9rem; }
@media (max-width: 760px) {
  .catalog-process-text ol { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .catalog-process-text li:nth-child(3) { border-inline-start: 0; }
}
@media (max-width: 440px) {
  .catalog-process-text ol { grid-template-columns: 1fr; gap: 24px; }
  .catalog-process-text li { padding: 0; }
  .catalog-process-text li + li { border-inline-start: 0; border-top: 1px solid #d3c3ad; padding-top: 24px; }
}
/* Visual rhythm for the four-step process. */
.process-heading h2 {
  font-weight: 700;
  color: var(--ink);
}
.process-steps h3 {
  color: #89673e;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255,255,255,.4);
}
.process-steps {
  position: relative;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: none;
  gap: 0;
}
.process-steps::before {
  display: none;
}
.process-steps li,
.process-steps li:nth-child(3) {
  display: block;
  padding: 4px clamp(18px,2.5vw,34px);
  border: 0;
  border-inline-start: 1px solid #cbbba5;
  text-align: center;
}
.process-steps li:first-child {
  border-inline-start: 0;
}
.process-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  border: 1px solid #b4824d;
  border-radius: 50%;
  background: #eadcc7;
  color: #89673e;
}
.process-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.process-motion-ready .process-steps li {
  opacity: 0;
  transform: translateY(46px);
  transition: opacity .72s ease, transform .78s cubic-bezier(.22,.61,.36,1);
  transition-delay: var(--process-delay, 0ms);
}
.process-motion-ready .process-steps li.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.process-motion-ready .process-icon {
  transform: scale(.78);
  transition: transform .55s cubic-bezier(.2,.8,.2,1);
  transition-delay: calc(var(--process-delay, 0ms) + 180ms);
}
.process-motion-ready .process-steps li.is-visible .process-icon {
  transform: scale(1);
}
@media (max-width: 860px) {
  .process-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-steps li:nth-child(3) { border-inline-start: 0; }
}
@media (max-width: 540px) {
  .process-steps { grid-template-columns: 1fr; gap: 34px; }
  .process-steps li,
  .process-steps li:nth-child(3) {
    padding: 0;
    border: 0;
    text-align: right;
  }
  .process-icon { width: 58px; height: 58px; margin: 0 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .process-motion-ready .process-steps li { opacity: 1; transform: none; transition: none; }
  .process-motion-ready .process-icon { transform: none; transition: none; }
}

/* Calm, coordinated section backgrounds and a clearly visible catalogue link. */
.hero::before, .featured-gallery::before, .contact-finale::before { background: #f7f2e9; }
.designer-section { background: #faf7f1; }
#halacha { background: #f1e9dd; }
#halacha::after { background: none; }
#catalog { background: #f7f2e9; padding: clamp(40px, 6vw, 72px) 0; }
#catalog .catalog-card { background: #e9decd; color: var(--ink); border: 1px solid #d9c8b1; border-radius: 8px; padding: clamp(28px, 4vw, 48px); box-shadow: none; }
#catalog .catalog-card h2 { color: var(--ink); margin: 0; font-size: clamp(2rem, 3.5vw, 2.8rem); }
#catalog-btn { flex-shrink: 0; background: #785735; border: 1px solid #785735; color: #fff; min-height: 50px; padding: 13px 28px; border-radius: 5px; box-shadow: 0 4px 12px rgba(74, 51, 29, .12); }
#catalog-btn:hover { background: #5f4228; border-color: #5f4228; transform: translateY(-2px); }
#catalog-btn:focus-visible { outline: 3px solid #785735; outline-offset: 5px; }
@media (max-width: 600px) {
  #catalog .catalog-card { flex-direction: column; text-align: center; gap: 24px; }
  #catalog-btn { width: 100%; max-width: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  #catalog-btn:hover { transform: none; }
}
/* Preserve the actual catalogue letterforms; soften its pale plaster into ivory. */
.catalog-process { position: relative; padding: 0 0 clamp(24px, 4vw, 56px); background: #f1e9dd; }
.catalog-process-art { display: block; width: 100%; height: auto; filter: brightness(1.12) contrast(1.2); mix-blend-mode: multiply; }
.catalog-process-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#catalog .catalog-card { justify-content: center; }

/* Bronze separators aligned with the original catalogue columns. */
.catalog-process-visual { position: relative; width: calc(100% - 48px); max-width: calc(var(--max-width) - 48px); margin-inline: auto; }
.catalog-process-divider { position: absolute; top: 55%; bottom: 8.5%; width: 2px; background: #a58b6c; pointer-events: none; }
/* A single aligned stack for choosing and adding lettering. */
.designer-section .text-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 8px 0 24px; }
.text-controls-label { color: var(--ink-soft); font-size: .9rem; font-weight: 600; }
.text-controls #text-style-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 5px; background: #eee5d8; border: 1px solid #ded0bc; border-radius: 7px; }
.designer-section .text-controls .chip { min-width: 0; min-height: 44px; padding: 10px 16px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--ink-soft); }
.designer-section .text-controls .chip:hover { background: #f7f2e9; color: var(--ink); }
.designer-section .text-controls .chip.is-active { background: #fffaf3; border-color: #b89a74; color: #694b2c; box-shadow: 0 2px 5px rgba(70, 48, 26, .07); }
.text-controls #designer-add-text { width: 100%; min-height: 48px; margin: 4px 0 0; padding: 12px 20px; border-radius: 5px; font-size: 1rem; gap: 10px; }
.text-controls #designer-add-text span { font-size: 1.3rem; font-weight: 400; line-height: 1; }
.category-content.text-controls .designer-hint { margin: 0; text-align: center; font-size: .9rem; line-height: 1.65; color: var(--ink-soft); }
/* Secondary action, quieter than the quote request. */
.designer-section .text-controls #designer-add-text {
  justify-self: center;
  width: auto;
  min-height: 40px;
  padding: 9px 22px;
  background: #f4ecdf;
  border: 1px solid #c5ac89;
  color: #765535;
  font-size: .95rem;
  box-shadow: none;
}
.designer-section .text-controls #designer-add-text:hover {
  background: #eaddc9;
  border-color: #a88962;
}
/* Trim the thin scan edge on the right of the catalogue artwork. */
.catalog-process-art { clip-path: inset(0 2px 0 0); }
/* Mobile layout keeps the catalogue's original letterforms at a readable size. */
.process-mobile-lettering { display: block; width: 180px; height: 70px; margin: 0 auto; filter: brightness(1.12) contrast(1.2); mix-blend-mode: multiply; }
.catalog-process-text h2 .process-mobile-lettering { width: min(100%, 310px); height: auto; }
@media (max-width: 760px) {
  .catalog-process { padding: 44px 22px; }
  .catalog-process-visual { display: none; }
  .catalog-process-text { position: static; width: auto; height: auto; margin: 0 auto; overflow: visible; clip-path: none; white-space: normal; }
  .catalog-process-text h2 { margin-bottom: 32px; }
  .catalog-process-text h3 { margin-bottom: 10px; }
  .catalog-process-text p { font-size: 1.1rem; }
}
#quote-status { margin: 0; font-size: .9rem; line-height: 1.6; color: var(--ink-soft); }
#quote-status:empty { display: none; }
#config-send:disabled { opacity: .65; cursor: wait; }
#config-save { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
#config-save svg { flex-shrink: 0; }
#how-it-works, #customize { scroll-margin-top: 100px; }

#customize { background: #faf7f1; }

/* Keep the choice panel focused; preview actions stay with the design. */
.designer-section .designer-controls { gap: 0; }
.designer-preview-actions { display: grid; gap: 12px; padding-top: 20px; }
.designer-preview-actions .config-actions { justify-content: center; }
.designer-preview-actions .config-actions-secondary { order: -1; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.designer-preview-actions .designer-send-note,
.designer-preview-actions .config-disclaimer { margin: 0; text-align: center; }
.designer-preview-actions #quote-status:empty { display: none; }
@media (max-width: 760px) {
  .designer-section .designer-canvas-wrap { position: static; }
}

/* A single workspace for the preview, choices and shared actions. */
.designer-section .designer {
  gap: 0;
  padding: clamp(16px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f0e4;
  box-shadow: 0 8px 28px rgba(54,43,31,.05);
}
.designer-section .designer-canvas-wrap { position: static; min-width: 0; padding-inline-end: 28px; }
.designer-section .designer-controls { padding: 0 24px; border: 0; border-inline-start: 1px solid var(--line); background: transparent; }
.designer-section .designer-wall-preview { border-radius: 6px; box-shadow: 0 4px 14px rgba(54,43,31,.08); }
.designer-section .designer-preview-actions { grid-column: 1 / -1; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.designer-section .designer-preview-actions .config-actions-secondary { padding-bottom: 0; border: 0; }
.designer-section .designer-preview-actions #config-send { width: auto; min-width: 240px; }
.designer-preview-actions .designer-send-note,
.designer-preview-actions .config-disclaimer { max-width: 640px; justify-self: center; }
@media (max-width: 860px) {
  .designer-section .designer { grid-template-columns: minmax(0, 1fr); }
  .designer-section .designer-canvas-wrap { padding: 0; }
  .designer-section .designer-controls { margin-top: 20px; padding: 8px 0 0; border-inline-start: 0; border-top: 1px solid var(--line); }
  .designer-section .designer-preview-actions { margin-top: 12px; }
}
@media (max-width: 480px) {
  .designer-section .designer-preview-actions #config-send { width: 100%; min-width: 0; }
}

/* Compact tools leave the working surface as the main focus. */
.designer-section .designer { grid-template-columns: minmax(0, 1fr) minmax(260px, 300px); }
.designer-section .designer-controls { padding-inline: 20px 0; }
.designer-section .designer-category summary { padding-block: 13px; gap: 10px; min-height: 46px; }
.designer-section .category-content { padding-bottom: 14px; }
.designer-section .category-content .designer-hint { font-size: .82rem; margin-bottom: 10px; }
.designer-section .category-content [data-shape] { min-height: 44px; padding: 8px 10px; }
.designer-section .model-options { gap: 6px; }
.designer-section .model-option { padding: 7px 4px; font-size: .8rem; }
.designer-section .model-option img { height: 52px; margin-bottom: 6px; }
.designer-section .frame-options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.designer-section .frame-option { padding: 8px; min-height: 44px; }
.designer-section .category-content .upload-label { margin-top: 12px; }
.designer-section .category-content.text-controls { gap: 10px; padding-bottom: 14px; }
.designer-section .designer-preview-actions { column-gap: 24px; grid-template-columns: minmax(0, 1fr) auto; }
.designer-section .designer-preview-actions .config-actions-secondary { grid-column: 1; grid-row: 1; justify-content: flex-start; }
.designer-section .designer-preview-actions > .config-actions:not(.config-actions-secondary) { grid-column: 2; grid-row: 1; }
.designer-preview-actions .designer-send-note,
.designer-preview-actions .config-disclaimer,
.designer-preview-actions #quote-status { grid-column: 1 / -1; }
@media (max-width: 860px) {
  .designer-section .designer { grid-template-columns: minmax(0, 1fr); }
  .designer-section .designer-controls { padding-inline: 0; }
  .designer-section .designer-preview-actions { grid-template-columns: minmax(0, 1fr); }
  .designer-section .designer-preview-actions .config-actions-secondary { grid-column: 1; grid-row: auto; justify-content: center; }
  .designer-section .designer-preview-actions > .config-actions:not(.config-actions-secondary) { grid-column: 1; grid-row: auto; }
}

/* Put choices above the preview instead of reserving an empty side column. */
.designer-section .designer { grid-template-columns: minmax(0, 1fr); }
.designer-section .designer-controls { grid-row: 1; margin: 0 0 20px; padding: 0; border: 0; }
.designer-section .designer-canvas-wrap { grid-row: 2; padding: 0; }
.designer-section .designer-accordion { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 12px; }
.designer-section .designer-category { display: contents; }
.designer-section .designer-category summary { grid-row: 1; padding: 12px; border-bottom: 2px solid var(--line); }
.designer-section .designer-category[open] summary { border-bottom-color: var(--bronze); background: #efe4d3; border-radius: 4px 4px 0 0; }
.designer-section .designer-category .category-content { grid-column: 1 / -1; grid-row: 2; padding: 16px 0 0; }
.designer-section .designer-category:not([open]) .category-content { display: none; }
.designer-section .category-content .btn-row { max-width: 400px; }
.designer-section .model-options { max-width: 460px; }
.designer-section .frame-options { max-width: 660px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.designer-section .category-content.text-controls { max-width: 460px; width: 100%; }
.designer-section .designer-wall-preview { max-height: 560px; }
@media (max-width: 540px) {
  .designer-section .designer-accordion { column-gap: 4px; }
  .designer-section .designer-category summary { padding: 10px 4px; gap: 4px; justify-content: center; font-size: .9rem; }
  .designer-section .category-number { display: none; }
  .designer-section .frame-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.designer-section .designer-category::details-content { display: contents; }
.designer-section .designer-category:not([open])::details-content { display: none; }

/* Warm, compact category buttons with a clear selected state. */
.designer-section .designer-category summary {
  border: 1px solid #d8c4a7;
  border-radius: 9px;
  background: linear-gradient(180deg, #fffdf8, #f3eadc);
  color: #57432e;
  box-shadow: 0 2px 4px rgba(70,48,26,.05);
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.designer-section .designer-category[open] summary {
  border: 1px solid #ae8960;
  border-radius: 9px;
  background: linear-gradient(180deg, #ead8be, #e2cba9);
  color: #4b3520;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 2px 5px rgba(70,48,26,.08);
}
.designer-section .category-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(137,103,62,.09);
  flex-shrink: 0;
}
.designer-section .category-toggle { border-radius: 50%; background: rgba(137,103,62,.08); }
@media (hover: hover) {
  .designer-section .designer-category summary:hover { border-color: #ae8960; box-shadow: 0 3px 8px rgba(70,48,26,.12); }
}
@media (max-width: 540px) {
  .designer-section .category-number { display: none; }
  .designer-section .designer-category summary { min-height: 46px; border-radius: 7px; }
  .designer-section .category-toggle { width: 16px; height: 20px; }
  .designer-section .category-toggle::before,
  .designer-section .category-toggle::after { width: 10px; left: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  .designer-section .designer-category summary { transition: none; }
}

/* Editing actions sit directly above the working canvas. */
.designer-section .designer-edit-toolbar {
  justify-content: flex-start;
  gap: 10px;
  margin: 0 0 12px;
}
.designer-edit-toolbar .btn-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid #d8c4a7;
  border-radius: 7px;
  background: #fffaf2;
  color: #57432e;
  text-decoration: none;
}
.designer-edit-toolbar .btn-clear:hover:not(:disabled) { background: #eadcc7; border-color: #ae8960; }
@media (max-width: 540px) {
  .designer-edit-toolbar .btn-clear { flex: 1; }
}

/* Desktop choices open beside the preview without moving it down. */
@media (min-width: 861px) {
  .designer-section .designer {
    grid-template-columns: minmax(0, 1fr) 280px;
    column-gap: 24px;
  }
  .designer-section .designer-canvas-wrap { grid-column: 1; grid-row: 1; min-width: 0; }
  .designer-section .designer-controls {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    margin: 0;
    padding: 0;
  }
  .designer-section .designer-accordion { display: flex; flex-direction: column; gap: 10px; }
  .designer-section .designer-category { display: block; border: 0; }
  .designer-section .designer-category::details-content { display: block; }
  .designer-section .designer-category:not([open])::details-content { display: none; }
  .designer-section .designer-category summary { padding: 11px 12px; }
  .designer-section .designer-category .category-content {
    padding: 12px 10px;
    margin-top: 6px;
    border: 1px solid #e2d4bf;
    border-radius: 8px;
    background: #fcf8f1;
  }
  .designer-section .frame-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .designer-section .designer-preview-actions { grid-row: 2; }
}

/* Keep both desktop surfaces within the same compact working height. */
@media (min-width: 861px) {
  .designer-section .designer {
    --preview-height: clamp(280px, 32vw, 380px);
    grid-template-columns: minmax(0, 1fr) 280px;
    max-width: 1000px;
    margin-inline: auto;
    padding: 22px;
    column-gap: 20px;
  }
  .designer-section .designer-wall-preview {
    height: var(--preview-height);
    max-height: none;
    aspect-ratio: auto;
  }
  .designer-section .designer-controls {
    /* Align with the wall below the 44px editing toolbar and its 12px gap. */
    margin-top: 56px;
    max-height: var(--preview-height);
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    scrollbar-color: #b89a74 transparent;
    padding: 2px 4px 2px 2px;
    scroll-padding-block: 8px;
  }
  .designer-section .designer-accordion { gap: 7px; }
  .designer-section .designer-category summary { min-height: 44px; padding: 8px 10px; }
  .designer-section .designer-category .category-content { padding: 10px 8px; }
}

/* Shared actions directly below the canvas. */
.designer-section .designer-canvas-wrap .designer-preview-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
}
.designer-section .designer-canvas-wrap .designer-preview-actions > .config-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.designer-preview-actions #designer-clear,
.designer-preview-actions #config-save {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #d8c4a7;
  border-radius: 7px;
  background: #fffaf2;
  color: #57432e;
  text-decoration: none;
}
.designer-section .designer-preview-actions #config-send { min-width: 0; min-height: 44px; padding: 10px 18px; border-radius: 7px; }
.designer-preview-actions #designer-clear:hover,
.designer-preview-actions #config-save:hover { background: #eadcc7; }
@media (min-width: 861px) {
  .designer-section .designer-controls { margin-top: 0; }
}
@media (max-width: 540px) {
  .designer-preview-actions #designer-clear,
  .designer-preview-actions #config-save { flex: 1; }
  .designer-section .designer-preview-actions #config-send { width: 100%; }
}

/* A consistent action bar and accessible custom file picker. */
.designer-section .designer-canvas-wrap .designer-preview-actions > .config-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 8px;
  align-items: stretch;
}
.designer-section .designer-preview-actions #designer-clear,
.designer-section .designer-preview-actions #config-save,
.designer-section .designer-preview-actions #config-send {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 10px 12px;
  font-size: .9rem;
  line-height: 1.4;
  border-radius: 8px;
  box-shadow: none;
}
.designer-section .designer-preview-actions #designer-clear { background: transparent; border-color: transparent; color: var(--ink-soft); }
.designer-section .designer-preview-actions #config-save { background: #fffaf2; border-color: #cfb999; }
.designer-section .designer-preview-actions #config-send { background: #89673e; color: #fff; }
.designer-section .designer-preview-actions #config-send:hover { background: #735331; }
.designer-section .category-content .designer-upload-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px dashed #b89a74;
  border-radius: 8px;
  background: #f3eadc;
  color: #57432e;
  cursor: pointer;
  font-size: .85rem;
}
.designer-section .designer-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.designer-upload-button svg { flex-shrink: 0; }
.designer-section .designer-upload-button:hover { background: #eadcc7; border-color: #89673e; }
.designer-section .designer-upload-button:focus-within { outline: 2px solid #89673e; outline-offset: 3px; }
@media (max-width: 540px) {
  .designer-section .designer-canvas-wrap .designer-preview-actions > .config-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .designer-section .designer-preview-actions #config-send { grid-column: 1 / -1; }
}

.designer-wall-preview .canvas-clear-button {
  position: absolute; top: 12px; left: 12px; z-index: 10;
  min-height: 44px; padding: 8px 14px;
  border: 1px solid #cdbb9f; border-radius: 8px;
  background: rgba(255,250,242,.94); color: #57432e;
  text-decoration: none; box-shadow: 0 2px 6px rgba(54,43,31,.07);
}
.designer-wall-preview .canvas-clear-button:hover { background: #eadcc7; }
.designer-section .designer-canvas-wrap .designer-preview-actions > .config-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
@media (max-width: 540px) {
  .designer-section .designer-preview-actions #config-send { grid-column: auto; }
  .designer-wall-preview .canvas-clear-button { top: 8px; left: 8px; padding: 8px 10px; font-size: .8rem; }
}

/* Photographic hand: white backdrop blends into the plaster surface. */
.carving-scene { mix-blend-mode: multiply; }
.carving-tool { width: clamp(105px, 15vw, 160px); transform: translate(-9%, -27%); }
.carving-tool .carving-swing { display: block; width: 100%; height: auto; transform-origin: 74% 66%; }

/* Keep the hammer opaque and above the revealed wall area. */
.carving-scene { mix-blend-mode: normal; z-index: 110; }
.carving-tool { width: clamp(72px, 10vw, 105px); }
.carving-tool .carving-swing {
  opacity: 1;
  clip-path: polygon(5% 27%, 13% 20%, 15% 16%, 23% 10%, 29% 9%, 37% 9%, 43% 11%, 32% 13%, 29% 18%, 31% 23%, 41% 37%, 47% 39%, 51% 43%, 68% 49%, 82% 55%, 100% 46%, 100% 77%, 89% 81%, 87% 77%, 76% 82%, 87% 93%, 88% 97%, 81% 99%, 73% 98%, 67% 84%, 60% 86%, 54% 82%, 50% 78%, 47% 72%, 44% 66%, 44% 62%, 40% 58%, 27% 39%, 22% 29%, 18% 27%, 11% 34%, 8% 34%);
}

.shape-dimensions {
  position: absolute;
  right: 50%;
  bottom: -28px;
  transform: translateX(50%);
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255,250,242,.94);
  color: #57432e;
  font-size: .78rem;
  line-height: 1.3;
  box-shadow: 0 1px 4px rgba(54,43,31,.12);
  direction: rtl;
  pointer-events: none;
  z-index: 10;
}
@media (max-width: 540px) { .shape-dimensions { font-size: .7rem; bottom: -25px; } }
