/* Fonty szablonowe dotyczą wyłącznie pobocznego wariantu tablicy z wycięciem. */
@import url('https://fonts.googleapis.com/css2?family=Allerta+Stencil&family=Big+Shoulders+Stencil+Text:wght@600;700&family=Saira+Stencil+One&family=Stardos+Stencil:wght@400;700&display=swap');

@font-face {
  font-family: 'Black Ops One';
  src: url('fonts/BlackOpsOne-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* Fonty produktu są przechowywane lokalnie. Te same pliki TTF będą mogły
 * zostać wykorzystane przez generator geometrii SVG/DXF. Typografia
 * interfejsu konfiguratora nadal pochodzi z aktywnego motywu. */
@font-face {
  font-family: 'Lobster';
  src: url('fonts/Lobster-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Pacifico';
  src: url('fonts/Pacifico-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Cookie';
  src: url('fonts/Cookie-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Lobster Two';
  src: url('fonts/LobsterTwo-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Norican';
  src: url('fonts/Norican-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

.azs-hero-typography,
.azs-configurator-zenith { box-sizing: border-box; }

.azs-hero-typography {
  position: relative;
  isolation: isolate;
  max-width: 1280px;
  margin: 0 auto 40px;
  padding: 0 24px;
  text-align: center;
}

.azs-kicker {
  display: inline-block;
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
  padding: 0 45px;
  color: #C5832B;
  background: linear-gradient(90deg, #C5832B 0%, #E7B36C 50%, #D9953D 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: var(--global-kb-font-size-xxl, 4rem);
  line-height: 1;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.azs-kicker::before,
.azs-kicker::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30px;
  height: 2px;
  background: #C5832B;
  transform: translateY(-50%);
}

.azs-kicker::before { left: 0; }
.azs-kicker::after { right: 0; }

.azs-main-title {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #242424;
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -1px;
}

.azs-accent-text { color: #C5832B; }

.azs-outline-title {
  display: block;
  position: absolute;
  z-index: 0;
  top: 67%;
  left: 50%;
  width: max-content;
  max-width: none;
  margin: 0;
  color: transparent;
  font-family: inherit;
  font-size: clamp(72px, 10.5vw, 150px);
  line-height: 0.8;
  font-weight: 700;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -50%);
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px rgba(125, 125, 125, 0.25);
}

.azs-configurator-zenith {
  width: min(1560px, calc(100vw - 48px));
  max-width: none;
  margin-right: 0;
  margin-left: 50%;
  padding: 0 24px;
  color: #242424;
  transform: translateX(-50%);
}

.azs-configurator-zenith *,
.azs-configurator-zenith *::before,
.azs-configurator-zenith *::after { box-sizing: border-box; }

.azs-configurator-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 500px;
  gap: 24px;
  align-items: start;
}

.azs-studio-pane {
  position: sticky;
  top: 20px;
  min-width: 0;
}

.azs-preview-scene {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border: 1px solid #EAEAEA;
  border-radius: 12px;
  background: #E7E3DC url('configurator-wall-v2.webp') center center / cover no-repeat;
}

.azs-plaque-wrap {
  position: absolute;
  top: 9%;
  left: 7%;
  width: 49%;
  transform: none;
  transform-origin: left center;
}

.azs-configurator-zenith[data-product="connected"] .azs-plaque-wrap {
  top: 19%;
  left: 5%;
  width: 51%;
}

.azs-configurator-zenith[data-product="number"] .azs-plaque-wrap {
  top: 16%;
  left: 12%;
  width: 38%;
}

.azs-configurator-zenith[data-product="text"] .azs-plaque-wrap {
  top: 19%;
  left: 5%;
  width: 51%;
}

.azs-configurator-zenith[data-product="plaque"] .azs-plaque-wrap {
  top: 9%;
  left: 7%;
  width: 49%;
}

.azs-plaque-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.azs-product-layer { display: none; }

.azs-configurator-zenith[data-product="connected"] .azs-product-connected,
.azs-configurator-zenith[data-product="number"] .azs-product-number,
.azs-configurator-zenith[data-product="text"] .azs-product-text,
.azs-configurator-zenith[data-product="plaque"] .azs-product-plaque {
  display: block;
}

.azs-connected-street {
  font-family: 'Lobster', cursive;
  font-size: 126px;
  font-weight: 400;
}

.azs-connected-number {
  font-family: 'Lobster', cursive;
  font-size: 118px;
  font-weight: 400;
}

.azs-number-only {
  font-family: 'Lobster', cursive;
  font-size: 285px;
  font-weight: 400;
}

.azs-text-only {
  font-family: 'Lobster', cursive;
  font-size: 135px;
  font-weight: 400;
}

.azs-plaque-number {
  font-family: inherit;
  font-size: 220px;
  font-weight: 800;
  letter-spacing: -10px;
}

.azs-plaque-street {
  font-family: inherit;
  font-size: 46px;
  font-weight: 700;
  letter-spacing: 1px;
}

.azs-positive-fill,
.azs-positive-stroke {
  transition: fill 0.25s ease, stroke 0.25s ease;
}

.azs-mounting-caps {
  color: #111111;
  fill: currentColor;
  transition: color 0.25s ease;
}

.azs-mounting-highlight { fill: rgba(255, 255, 255, 0.22); }
.azs-plaque-body { transition: fill 0.25s ease; }

.azs-preview-note {
  position: absolute;
  right: 18px;
  bottom: 16px;
  padding: 7px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.86);
  color: #6B6B6B;
  font-size: 11px;
  backdrop-filter: blur(5px);
}

.azs-sidebar-pane {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.azs-panel-header { padding: 2px 0 4px; }

.azs-panel-header h2 {
  margin: 0 0 5px;
  color: #242424;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 500;
}

.azs-panel-header p {
  margin: 0;
  color: #777B80;
  font-size: 14px;
}

.azs-control-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid #EAEAEA;
  border-radius: 12px;
  background: #FFFFFF;
}

.azs-control-group label {
  color: #242424;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.azs-control-group label span { color: #C5832B; }

.azs-control-group input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid #DFDFDF;
  border-radius: 7px;
  outline: none;
  background: #FFFFFF;
  color: #242424;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 500;
  text-transform: uppercase;
  transition: border-color 0.2s ease;
}

.azs-control-group input:focus { border-color: #C5832B; }

.azs-font-select {
  position: relative;
  width: 100%;
}

.azs-font-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 52px;
  padding: 10px 14px 10px 16px;
  border: 1px solid #DFDFDF;
  border-radius: 7px;
  outline: none;
  background: #FFFFFF;
  color: #242424;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  transition: border-color 0.2s ease;
}

.azs-font-trigger:hover,
.azs-font-trigger:focus-visible,
.azs-font-select.is-open .azs-font-trigger {
  border-color: #C5832B;
}

.azs-selected-font {
  overflow: hidden;
  font-size: 19px;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.azs-font-chevron {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  margin: -4px 3px 0 0;
  border-right: 2px solid #777B80;
  border-bottom: 2px solid #777B80;
  transform: rotate(45deg);
  transition: transform 0.2s ease, margin 0.2s ease;
}

.azs-font-select.is-open .azs-font-chevron {
  margin-top: 4px;
  transform: rotate(225deg);
}

.azs-font-menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  max-height: 286px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #DFDFDF;
  border-radius: 9px;
  background: #FFFFFF;
  box-shadow: 0 12px 30px rgba(36, 36, 36, 0.12);
}

.azs-font-menu[hidden] { display: none !important; }

.azs-font-option[hidden] { display: none !important; }

.azs-font-option {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  outline: none;
  background: transparent;
  color: #242424;
  font-size: 19px;
  line-height: 1.25;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}

.azs-selected-font-preview {
  display: block;
  width: auto;
  max-width: min(260px, calc(100% - 120px));
  max-height: 42px;
  object-fit: contain;
  object-position: left center;
}

.azs-selected-font-preview[hidden] { display: none !important; }

.azs-font-option--preview {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(120px, .65fr);
  align-items: center;
  gap: 18px;
  min-height: 78px;
  font-family: inherit;
}

.azs-font-option--preview > img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 52px;
  object-fit: contain;
  object-position: left center;
}

.azs-font-option--preview > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  text-align: left;
}

.azs-font-option--preview strong {
  color: #20231f;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 650;
}

.azs-font-option--preview small {
  color: #747b71;
  font-family: inherit;
  font-size: 11px;
  line-height: 1.35;
}

.azs-font-size-note {
  min-height: 18px;
  margin: 7px 0 0;
  color: #9a6422;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 560px) {
  .azs-font-option--preview {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .azs-font-option--preview > img { max-height: 46px; }
  .azs-selected-font-preview { max-width: calc(100% - 90px); }
}

.azs-font-option:hover,
.azs-font-option:focus-visible {
  background: #F4F1EC;
}

.azs-font-option.active {
  background: rgba(197, 131, 43, 0.1);
  color: #A96D20;
}

.azs-pill-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.azs-pill {
  flex: 1 1 95px;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #E1E1E1;
  border-radius: 7px;
  background: #FFFFFF;
  color: #444444;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.azs-pill:hover {
  border-color: #C5832B;
  color: #242424;
}

.azs-pill.active {
  border-color: #C5832B;
  background: rgba(197, 131, 43, 0.08);
  color: #A96D20;
  font-weight: 600;
}

.azs-product-options .azs-pill {
  flex-basis: 115px;
}

.azs-control-group[hidden] { display: none !important; }

.azs-ral-section {
  margin-top: 24px;
  padding: 30px 32px 32px;
  border-radius: 12px;
  background: #242424;
  color: #FFFFFF;
}

.azs-ral-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.azs-ral-kicker {
  display: block;
  margin-bottom: 5px;
  color: #D9953D;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.azs-ral-heading h2 {
  margin: 0;
  color: #FFFFFF;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
}

.azs-ral-heading p {
  margin: 0 0 2px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
}

.azs-ral-heading strong {
  color: #FFFFFF;
  font-weight: 600;
}

.azs-ral-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 13px;
}

.azs-ral-swatch {
  display: flex;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 600;
  text-align: center;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.azs-ral-color {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 0.78;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 3px;
  background: var(--azs-swatch);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.azs-ral-swatch:hover .azs-ral-color,
.azs-ral-swatch.active .azs-ral-color {
  transform: translateY(-3px);
  box-shadow: 0 0 0 2px #242424, 0 0 0 4px #D9953D;
}

.azs-checkout-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 16px;
  padding: 22px 26px;
  border: 1px solid #EAEAEA;
  border-radius: 12px;
  background: #C5832B;
  color: #FFFFFF;
}

.azs-checkout-summary,
.azs-price-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.azs-summary-label,
.azs-price-info span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.azs-summary-text {
  color: #FFFFFF;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
}

.azs-checkout-action {
  display: flex;
  align-items: center;
  gap: 24px;
}

.azs-price-info strong {
  color: #FFFFFF;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 700;
  white-space: nowrap;
}

.azs-btn-checkout {
  min-height: 48px;
  padding: 13px 26px;
  border: 0;
  border-radius: 7px;
  background: #D9953D;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.2s ease;
}

.azs-btn-checkout:hover { background: #EAAA54; }

@media (max-width: 1080px) {
  .azs-configurator-main { grid-template-columns: minmax(0, 1fr) 440px; }
  .azs-preview-scene { min-height: 540px; }
  .azs-ral-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); row-gap: 22px; }
}

@media (max-width: 900px) {
  .azs-configurator-main { grid-template-columns: 1fr; }
  .azs-studio-pane { position: static; }
  .azs-preview-scene { min-height: 620px; }
  .azs-plaque-wrap { width: 67%; }
}

@media (max-width: 640px) {
  .azs-hero-typography,
  .azs-configurator-zenith { width: calc(100vw - 24px); padding-right: 12px; padding-left: 12px; }
  .azs-hero-typography { padding-right: 16px; padding-left: 16px; }
  .azs-hero-typography { margin-bottom: 30px; }
  .azs-kicker { padding: 0 38px; font-size: var(--global-kb-font-size-xl, 2.5rem); }
  .azs-main-title { font-size: 32px; }
  .azs-outline-title {
    top: 72%;
    font-size: clamp(54px, 17vw, 82px);
    line-height: 0.82;
    -webkit-text-stroke-width: 0.75px;
  }
  .azs-studio-pane {
    position: sticky;
    z-index: 30;
    top: 8px;
  }
  .azs-preview-scene {
    min-height: 285px;
    border-radius: 9px;
    box-shadow: 0 10px 28px rgba(28, 31, 33, 0.16);
  }
  .azs-plaque-wrap { top: 5%; left: 7%; width: 54%; }
  .azs-configurator-zenith[data-product="connected"] .azs-plaque-wrap {
    top: 14%;
    left: 5%;
    width: 56%;
  }
  .azs-configurator-zenith[data-product="number"] .azs-plaque-wrap {
    top: 12%;
    left: 13%;
    width: 43%;
  }
  .azs-configurator-zenith[data-product="text"] .azs-plaque-wrap {
    top: 14%;
    left: 5%;
    width: 56%;
  }
  .azs-configurator-zenith[data-product="plaque"] .azs-plaque-wrap {
    top: 5%;
    left: 7%;
    width: 54%;
  }
  .azs-preview-note {
    right: 8px;
    bottom: 8px;
    max-width: 155px;
    padding: 5px 7px;
    font-size: 8px;
    line-height: 1.25;
    text-align: right;
  }
  .azs-control-group { padding: 16px; }
  .azs-ral-section { padding: 24px 18px 26px; }
  .azs-ral-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .azs-ral-heading h2 { font-size: 24px; }
  .azs-ral-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; }
  .azs-ral-color { aspect-ratio: 1 / 0.54; }
  .azs-checkout-box,
  .azs-checkout-action { align-items: stretch; flex-direction: column; }
  .azs-checkout-action { gap: 14px; }
  .azs-btn-checkout { width: 100%; }
}

/* =========================================
   WERSJA 1.2 — WYMIARY, OZDOBY I MONTAŻ
========================================= */

.azs-configurator-zenith [hidden] { display: none !important; }

.azs-preview-toolbar {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.azs-preview-toolbar span,
.azs-preview-toolbar strong {
  padding: 7px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.88);
  color: #5e5e5e;
  font-family: inherit;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  backdrop-filter: blur(5px);
}

.azs-preview-toolbar span {
  color: #a96d20;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.azs-preview-notes {
  position: absolute;
  z-index: 3;
  bottom: 16px;
  left: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.azs-preview-notes span {
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(36, 36, 36, 0.68);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  backdrop-filter: blur(5px);
}

.azs-preview-holes circle {
  fill: rgba(231, 227, 220, 0.96);
  stroke: rgba(36, 36, 36, 0.35);
  stroke-width: 2;
}

.azs-extra-hole { display: none; }
.azs-more-holes .azs-extra-hole { display: inline; }

.azs-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.azs-text-group {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(105px, 0.65fr);
  gap: 14px;
}

.azs-field-help,
.azs-library-note,
.azs-calculated-size,
.azs-special-color-fields p {
  margin: 0;
  color: #777b80;
  font-size: 11px;
  line-height: 1.45;
}

.azs-control-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.azs-option-price {
  color: #c5832b;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}

.azs-number-unit {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #dfdfdf;
  border-radius: 7px;
  background: #fff;
}

.azs-number-unit input,
.azs-control-group .azs-number-unit input {
  width: 63px;
  min-height: 38px;
  padding: 7px 4px 7px 10px;
  border: 0;
  border-radius: 0;
  text-align: right;
  text-transform: none;
}

.azs-number-unit span {
  padding: 0 10px 0 4px;
  color: #777b80;
  font-size: 12px;
}

.azs-control-group .azs-range {
  width: 100%;
  min-height: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.azs-control-group .azs-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #c5832b var(--azs-range-progress, 50%), #e2e2e2 var(--azs-range-progress, 50%));
}

.azs-control-group .azs-range::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #c5832b;
  box-shadow: 0 1px 5px rgba(36, 36, 36, 0.25);
  appearance: none;
  -webkit-appearance: none;
}

.azs-control-group .azs-range::-moz-range-track {
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: #e2e2e2;
}

.azs-control-group .azs-range::-moz-range-progress { height: 4px; border-radius: 999px; background: #c5832b; }
.azs-control-group .azs-range::-moz-range-thumb { width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%; background: #c5832b; box-shadow: 0 1px 5px rgba(36,36,36,.25); }

.azs-range-scale {
  display: flex;
  justify-content: space-between;
  margin-top: -7px;
  color: #9a9a9a;
  font-size: 10px;
}

.azs-calculated-size {
  padding-top: 9px;
  border-top: 1px solid #eeeeee;
}

.azs-calculated-size strong { color: #242424; font-weight: 700; }

.azs-compact-range {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 45px;
  align-items: center;
  gap: 12px;
}

.azs-compact-range > span {
  color: #5f6265;
  font-size: 12px;
}

.azs-compact-range > strong {
  color: #242424;
  font-size: 12px;
  text-align: right;
}

.azs-ornament-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 22px 26px 28px;
}

.azs-ornament-choice {
  min-width: 0;
  min-height: 148px;
  padding: 18px 10px 13px;
  border: 1px solid #e1e1e1;
  border-radius: 12px;
  background: #fff;
  color: #444;
  font-family: inherit;
  cursor: pointer;
  box-shadow: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.azs-ornament-choice span { display: flex; align-items: center; justify-content: center; min-height: 82px; margin-bottom: 8px; color: #242424; font-size: 54px; line-height: 1; }
.azs-ornament-choice svg {
  display: block;
  width: 82px;
  height: 82px;
  margin: 0 auto 8px;
  color: #242424;
}
.azs-ornament-choice img {
  display: block;
  width: 82px;
  height: 82px;
  object-fit: contain;
  margin: 0 auto 8px;
}
.azs-ornament-choice small { display: block; overflow: hidden; font-size: 12px; line-height: 1.35; font-weight: 600; white-space: normal; text-overflow: ellipsis; }
.azs-ornament-choice:hover,
.azs-ornament-choice.active { border-color: #c5832b; background: rgba(197, 131, 43, 0.08); color: #a96d20; box-shadow: 0 10px 26px rgba(36,36,36,.08); transform: translateY(-2px); }

.azs-selected-ornament {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px;
  border: 1px solid #e4e4e4;
  border-radius: 12px;
  background: #fff;
}

.azs-selected-ornament-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 9px;
  background: #f3f2ef;
  color: #242424;
}

.azs-selected-ornament-preview span { font-size: 32px; line-height: 1; }
.azs-selected-ornament-preview svg { width: 58px; height: 58px; }
.azs-selected-ornament-preview img { width: 58px; height: 58px; object-fit: contain; }
.azs-selected-ornament-copy { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.azs-selected-ornament-copy > span { color: #8a8d90; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.azs-selected-ornament-copy strong { overflow: hidden; color: #242424; font-size: 14px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.azs-selected-ornament-copy small { color: #777b80; font-size: 11px; line-height: 1.4; }
.azs-selected-ornament-actions { display: flex; align-items: flex-end; flex-direction: column; gap: 6px; }

.azs-open-ornament-library,
.azs-remove-ornament {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid #242424;
  border-radius: 7px;
  background: #242424;
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.azs-remove-ornament { min-height: auto; padding: 2px 0; border: 0; background: transparent; color: #777b80; font-size: 10px; text-decoration: underline; }
.azs-open-ornament-library:hover { border-color: #c5832b; background: #c5832b; }

body.azs-modal-open { overflow: hidden; }
.azs-ornament-modal[hidden] { display: none !important; }
.azs-ornament-modal { position: fixed; z-index: 999999; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; }
.azs-ornament-modal-backdrop { position: absolute; inset: 0; background: rgba(16,17,18,.72); backdrop-filter: blur(5px); }

.azs-ornament-modal-panel {
  position: relative;
  display: flex;
  width: min(940px, 100%);
  max-height: min(780px, calc(100vh - 48px));
  overflow: hidden;
  flex-direction: column;
  border-radius: 18px;
  background: #f8f7f4;
  box-shadow: 0 28px 90px rgba(0,0,0,.32);
}

.azs-ornament-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 25px 26px 20px;
  border-bottom: 1px solid #e2e0dc;
  background: #242424;
  color: #fff;
}

.azs-ornament-modal-header span { display: block; margin-bottom: 5px; color: #c5832b; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.azs-ornament-modal-header h3 { margin: 0; color: #fff; font-size: 27px; line-height: 1.1; font-weight: 600; }
.azs-ornament-modal-header p { max-width: 620px; margin: 8px 0 0; color: rgba(255,255,255,.66); font-size: 12px; line-height: 1.5; }
.azs-ornament-modal-close { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; background: transparent; color: #fff; font-family: inherit; font-size: 27px; line-height: 1; cursor: pointer; }
.azs-ornament-modal-close:hover { border-color: #c5832b; background: #c5832b; }

.azs-ornament-tools { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 26px 0; }
.azs-ornament-search-wrap { flex: 1 1 310px; }
.azs-ornament-search { width: 100%; min-height: 46px; padding: 11px 15px; border: 1px solid #d7d5d0; border-radius: 8px; outline: 0; background: #fff; color: #242424; font-family: inherit; font-size: 14px; }
.azs-ornament-search:focus { border-color: #c5832b; box-shadow: 0 0 0 3px rgba(197,131,43,.13); }
.azs-ornament-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.azs-ornament-filters button { min-height: 40px; padding: 8px 13px; border: 1px solid #d7d5d0; border-radius: 999px; background: #fff; color: #56595c; font-family: inherit; font-size: 11px; font-weight: 600; cursor: pointer; }
.azs-ornament-filters button.active { border-color: #242424; background: #242424; color: #fff; }
.azs-ornament-modal .azs-ornament-grid { overflow-y: auto; overscroll-behavior: contain; }
.azs-ornament-empty { margin: 30px 26px; padding: 22px; border: 1px dashed #ccc8c1; border-radius: 10px; color: #777b80; font-size: 13px; text-align: center; }

.azs-ornament-settings { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; padding-top: 14px; border-top: 1px solid #eee; }
.azs-ornament-position .azs-pill { min-height: 36px; padding: 7px 8px; font-size: 10px; }
.azs-ornament-position .azs-pill[hidden] { display: none !important; }
.azs-ornament-scale-row { margin-top: 0; }

.azs-logistics-warning {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(197, 131, 43, .35);
  border-radius: 10px;
  background: rgba(197, 131, 43, .08);
  color: #72501f;
  font-size: 13px;
  line-height: 1.45;
}

.azs-switch-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 44px;
  align-items: center;
  gap: 13px;
  cursor: pointer;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.azs-switch-row > span:first-child { display: flex; flex-direction: column; gap: 4px; }
.azs-switch-row strong { color: #242424; font-size: 13px; line-height: 1.2; }
.azs-switch-row small { color: #777b80; font-size: 10px; line-height: 1.35; font-weight: 400; }
.azs-switch-price { color: #c5832b !important; font-size: 12px; font-weight: 700; white-space: nowrap; }
.azs-switch-row input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; }

.azs-switch-row i {
  position: relative;
  display: block;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #d8d8d8;
  transition: background .2s ease;
}

.azs-switch-row i::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform .2s ease;
}

.azs-switch-row input:checked + i { background: #c5832b; }
.azs-switch-row input:checked + i::after { transform: translateX(20px); }
.azs-switch-row input:focus-visible + i { outline: 2px solid #c5832b; outline-offset: 3px; }

.azs-ral-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.azs-metallic { background: linear-gradient(135deg, color-mix(in srgb, var(--azs-swatch) 72%, white), var(--azs-swatch) 48%, color-mix(in srgb, var(--azs-swatch) 78%, black)); }
.azs-special-swatch .azs-ral-color { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #383e42, #a47b34, #876c8f); }
.azs-special-swatch b { color: #fff; font-size: 13px; letter-spacing: .5px; text-shadow: 0 1px 4px rgba(0,0,0,.45); }

.azs-special-color-fields {
  max-width: 440px;
  margin-top: 23px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.14);
}

.azs-special-color-fields > label { display: block; margin-bottom: 9px; color: #fff; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.azs-special-color-fields > div { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.35); border-radius: 7px; background: #fff; }
.azs-special-color-fields > div span { padding-left: 13px; color: #242424; font-size: 14px; font-weight: 700; }
.azs-special-color-fields input { width: 100%; min-height: 44px; padding: 10px 8px; border: 0; outline: 0; background: #fff; color: #242424; font-family: inherit; font-size: 14px; }
.azs-special-color-fields small { padding-right: 13px; color: #a96d20; font-size: 11px; font-weight: 700; white-space: nowrap; }
.azs-special-color-fields p { margin-top: 7px; color: rgba(255,255,255,.58); }

.azs-summary-details,
.azs-price-breakdown { color: rgba(255,255,255,.72); font-size: 10px; line-height: 1.3; font-weight: 400; }
.azs-price-info { min-width: 145px; }
.azs-configurator-zenith .azs-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.azs-cart-feedback {
  flex: 0 0 100%;
  width: 100%;
  box-sizing: border-box;
  padding: 16px 18px;
  border: 1px solid #eadfce;
  border-left: 4px solid #C5832B;
  border-radius: 8px;
  background: #fff;
  color: #242424;
}
.azs-cart-feedback[hidden] { display: none !important; }
.azs-cart-message { margin: 0 0 12px; color: #242424; font-size: 14px; line-height: 1.45; font-weight: 700; text-align: left; }
.azs-cart-message-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.azs-cart-message__cart,
.azs-cart-message__continue {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 10px 16px;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.azs-cart-message__cart { background: #85663E; color: #fff; }
.azs-cart-message__cart:hover,
.azs-cart-message__cart:focus-visible { background: #765a37; color: #fff; }
.azs-cart-message__continue { background: #453C32; color: #fff; }
.azs-cart-message__continue:hover,
.azs-cart-message__continue:focus-visible { background: #382f27; color: #fff; }
.azs-cart-message__cart:focus-visible,
.azs-cart-message__continue:focus-visible { outline: 3px solid #d9953d; outline-offset: 2px; }
.azs-checkout-box { flex-wrap: wrap; }
.azs-btn-checkout:disabled { opacity: .65; cursor: wait; }

.azs-production-info {
  margin: 14px 0 0;
  color: #777b80;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.azs-production-info strong { color: #242424; }

@media (max-width: 1080px) {
  .azs-ral-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .azs-text-group { grid-template-columns: 1fr; }
  .azs-compact-range { grid-template-columns: 72px minmax(0, 1fr) 42px; gap: 9px; }
  .azs-selected-ornament { grid-template-columns: 58px minmax(0, 1fr); gap: 11px; }
  .azs-selected-ornament-preview { width: 58px; height: 58px; }
  .azs-selected-ornament-preview svg { width: 47px; height: 47px; }
  .azs-selected-ornament-preview img { width: 47px; height: 47px; }
  .azs-selected-ornament-actions { grid-column: 1 / -1; align-items: stretch; }
  .azs-open-ornament-library { width: 100%; min-height: 46px; }
  .azs-ornament-modal { align-items: flex-end; padding: 0; }
  .azs-ornament-modal-panel { width: 100%; max-height: 92dvh; border-radius: 18px 18px 0 0; }
  .azs-ornament-modal-header { padding: 20px 18px 16px; }
  .azs-ornament-modal-header h3 { font-size: 23px; }
  .azs-ornament-modal-header p { font-size: 11px; }
  .azs-ornament-tools { align-items: stretch; flex-direction: column; gap: 11px; padding: 14px 18px 0; }
  .azs-ornament-search-wrap { flex-basis: auto; }
  .azs-ornament-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .azs-ornament-filters button { flex: 0 0 auto; min-height: 42px; }
  .azs-ornament-modal .azs-ornament-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 16px 18px 24px; }
  .azs-ornament-choice { min-height: 132px; padding: 14px 8px 11px; }
  .azs-ornament-choice span { min-height: 70px; font-size: 47px; }
  .azs-ornament-choice svg { width: 70px; height: 70px; }
  .azs-ral-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .azs-preview-toolbar { top: 10px; right: 10px; left: 10px; }
  .azs-preview-toolbar span,
  .azs-preview-toolbar strong { padding: 5px 7px; font-size: 9px; }
  .azs-preview-notes { display: none; }
  .azs-sidebar-pane { gap: 12px; }
  .azs-sidebar-pane .azs-control-group { scroll-margin-top: 310px; }
  .azs-pill { min-height: 46px; }
  .azs-font-trigger { min-height: 54px; }
  .azs-ornament-choice { min-height: 72px; }
  .azs-control-group .azs-range::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
    margin-top: -10px;
  }
  .azs-control-group .azs-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
  }
  .azs-checkout-box { gap: 17px; }
  .azs-cart-message-actions { align-items: stretch; flex-direction: column; }
  .azs-cart-message__cart,
  .azs-cart-message__continue { width: 100%; }
}

@media (max-width: 640px) and (max-height: 620px) {
  .azs-studio-pane { position: static; }
}

/* RC28 UI adjustment: keep ornament library inside the viewport. */
.azs-ornament-modal {
  box-sizing: border-box;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
}

.azs-ornament-modal,
.azs-ornament-modal *,
.azs-ornament-modal *::before,
.azs-ornament-modal *::after {
  box-sizing: border-box;
}

.azs-ornament-modal-panel {
  box-sizing: border-box;
  min-height: 0;
  height: min(780px, calc(100vh - 48px));
  height: min(780px, calc(100dvh - 48px));
  max-height: min(780px, calc(100vh - 48px));
  max-height: min(780px, calc(100dvh - 48px));
}

.azs-ornament-modal-header,
.azs-ornament-tools {
  flex: 0 0 auto;
}

.azs-ornament-modal .azs-ornament-grid {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (max-width: 640px) {
  .azs-ornament-modal {
    align-items: flex-end;
    padding: 8px 0 0;
  }

  .azs-ornament-modal-panel {
    width: 100%;
    height: min(760px, calc(100vh - 8px));
    height: min(760px, calc(100dvh - 8px));
    max-height: min(760px, calc(100vh - 8px));
    max-height: min(760px, calc(100dvh - 8px));
    min-height: 0;
    border-radius: 18px 18px 0 0;
  }

  .azs-ornament-modal-header,
  .azs-ornament-tools {
    flex: 0 0 auto;
  }

  .azs-ornament-modal .azs-ornament-grid {
    grid-template-columns: repeat(2, clamp(124px, 37vw, 184px));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    grid-auto-columns: clamp(124px, 37vw, 184px);
    grid-auto-flow: column;
    gap: 9px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 12px 18px max(18px, env(safe-area-inset-bottom));
    scroll-snap-type: x proximity;
    scrollbar-color: #c5832b #e9e7e3;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
  }

  .azs-ornament-modal .azs-ornament-choice {
    width: 100%;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
    scroll-snap-align: start;
  }
}

@media (max-width: 640px) and (max-height: 620px) {
  .azs-ornament-modal-panel {
    height: calc(100vh - 8px);
    height: calc(100dvh - 8px);
  }

  .azs-ornament-modal-header {
    padding-top: 12px;
    padding-bottom: 10px;
  }

  .azs-ornament-modal-header p {
    display: none;
  }

  .azs-ornament-tools {
    gap: 8px;
    padding-top: 8px;
  }

  .azs-ornament-modal .azs-ornament-grid {
    grid-template-rows: repeat(2, minmax(0, 1fr));
    padding-top: 10px;
  }

  .azs-ornament-modal .azs-ornament-choice {
    padding: 8px 6px;
  }

  .azs-ornament-modal .azs-ornament-choice span,
  .azs-ornament-modal .azs-ornament-choice svg,
  .azs-ornament-modal .azs-ornament-choice img {
    width: 54px;
    height: 54px;
    min-height: 54px;
  }
}

.azs-cnc-suggestions { padding: 12px; margin: 12px 0; border: 1px solid #d8ddd6; border-radius: 8px; }
.azs-cnc-suggestions[hidden] { display: none; }
.azs-cnc-suggestions button { margin: 4px; padding: 10px 14px; cursor: pointer; }
