/* Konfigurator Stelmach — style spójne z motywem Sezam
   (pigułki jak .stan-badge, przycisk jak .btn-primary, box jak #product-availability) */

.sezam-st-configurator {
  margin: 2.4rem 0;
  padding: 2.4rem 2rem 2rem;
  background-color: var(--background-white, #fff);
  border: 1px solid var(--letter-line-grey, rgb(227, 227, 227));
  border-radius: .8rem;
  position: relative;
}

/* Nagłówek sekcji personalizacji */
.st-header {
  margin-bottom: 1.6rem;
}

.st-header__badge {
  position: absolute;
  top: -1.2rem;
  left: 1.6rem;
  display: inline-block;
  background-color: var(--color-accent, rgb(111, 38, 61));
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: .1rem;
  text-transform: uppercase;
  padding: .4rem 1.4rem;
  border-radius: 3rem;
}

.st-header__title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--primary-text-color, #000);
  margin: .4rem 0 .4rem;
}

.st-header__subtitle {
  font-size: 1.3rem;
  color: var(--middle-grey, rgb(117, 117, 117));
  margin: 0;
}

.st-field {
  margin-bottom: 2rem;
}

.st-label {
  display: block;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--primary-text-color, #000);
  margin-bottom: 1rem;
}

/* Pigułki — jak .stan-badge motywu */
.st-pills,
.st-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.st-pill,
.st-swatch {
  display: flex;
  align-items: center;
  gap: .8rem;
  background-color: var(--light-grey, rgb(248, 248, 248));
  border: 2px solid var(--light-grey, rgb(248, 248, 248));
  border-radius: 3rem;
  color: var(--middle-grey, rgb(117, 117, 117));
  cursor: pointer;
  font-size: 1.3rem;
  font-weight: 500;
  padding: .7rem 1.6rem;
  transition: all 0.3s ease;
  user-select: none;
}

.st-pill.active,
.st-pill:hover,
.st-swatch.active,
.st-swatch:hover {
  border-color: var(--color-accent, rgb(111, 38, 61));
  color: var(--color-accent, rgb(111, 38, 61));
}

/* Ikona kruszcu w kolorze metalu (jak sezam-metal-* w badge'ach motywu) */
.st-swatch__metal {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Select rozmiaru — bazuje na klasach my-custom-select motywu */
.st-size-select {
  max-width: 36rem;
}

.st-size-select .my-custom-select__option small {
  color: var(--middle-grey, rgb(117, 117, 117));
  font-size: 1.1rem;
}

.st-size-select .st-size-value {
  color: #000;
  font-weight: 600;
}

.st-size-hint {
  margin-top: .6rem;
}

.st-size-guide-link {
  font-size: 1.2rem;
  color: var(--middle-grey, rgb(117, 117, 117));
  text-decoration: underline dotted;
}

.st-size-guide-link:hover {
  color: var(--color-accent, rgb(111, 38, 61));
}

/* Input grawer */
.st-input {
  width: 100%;
  max-width: 36rem;
  background-color: var(--light-grey, rgb(248, 248, 248));
  border: 2px solid var(--light-grey, rgb(248, 248, 248));
  border-radius: 3rem;
  font-size: 1.3rem;
  padding: .7rem 1.6rem;
  transition: border-color 0.3s ease;
}

.st-input:focus {
  outline: none;
  border-color: var(--color-accent, rgb(111, 38, 61));
  background-color: var(--background-white, #fff);
}

.st-input::placeholder {
  color: var(--middle-grey, rgb(117, 117, 117));
}

/* Pasek z ceną i wagą - przykleja się do GÓRY (pod menu sklepu), dopóki konfigurator jest w kadrze.
   Na dole kolidował z belką cookies i widgetem czatu. */
.sezam-st-configurator .st-price-sticky {
  position: -webkit-sticky;
  position: sticky;
  top: var(--st-sticky-top, 60px); /* jak .product-prices motywu */
  z-index: 7;
  display: flex;
  align-items: baseline;
  gap: 1.6rem;
  margin: 0 -2rem 2.4rem;
  padding: 0 2rem 1.4rem;
  background-color: var(--background-white, #fff);
  border-bottom: 1px solid var(--letter-line-grey, rgb(227, 227, 227));
}



.st-price-value {
  white-space: nowrap;
}

/* Kwota: typografia z motywu (.price), inny tylko kolor */
.sezam-st-configurator .st-price-value.price {
  color: var(--color-accent, #6f263d);
}

.st-price-amount,
.st-price-currency {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
}

/* w układzie flex spacja z tekstu jest zwijana - odstęp przed symbolem waluty daje CSS */
.st-price-currency:not(:empty) {
  margin-left: .4rem;
}

.st-price-value {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}

.sezam-st-configurator .st-price-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .2rem;
  min-width: 0;
  line-height: 1.25;
}

.st-price-details {
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--middle-grey, rgb(117, 117, 117));
  min-height: 1.6rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Omnibus - najniższa cena z 30 dni, drobnym drukiem pod wagą */
.st-price-omnibus {
  display: block;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--middle-grey, rgb(117, 117, 117));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Trzy "myślące" kropki podczas liczenia ceny */
.st-dots span {
  animation: st-dot-blink 1.2s infinite;
  opacity: 0;
}

.st-dots span:nth-child(2) { animation-delay: .2s; }
.st-dots span:nth-child(3) { animation-delay: .4s; }

@keyframes st-dot-blink {
  0%, 60%, 100% { opacity: 0; }
  20%, 40%      { opacity: 1; }
}

/* Przycisk — ten sam co w całym sklepie (.button--accent), bez niebieskiego stanu :focus/:active z Bootstrapa */
.st-add-btn {
  width: 100%;
  height: 5rem;
  margin-top: 2rem;
  font-size: 1.6rem;
}

.st-add-btn:disabled,
.st-add-btn:disabled:hover,
.st-add-btn:disabled:focus {
  background-color: var(--middle-grey, rgb(117, 117, 117));
  border-color: var(--middle-grey, rgb(117, 117, 117));
  color: #fff;
  cursor: not-allowed;
  opacity: 1;
}

/* Pigułka niedostępna */
.st-pill--unavailable {
  opacity: .45;
  cursor: not-allowed;
}

.st-pill--unavailable::after {
  content: ' – niedostępna';
  font-size: 1.1rem;
}

/* Opis wersji damskiej/męskiej pod wyborem płci */
.st-gender-note {
  margin-top: .8rem;
  padding: .8rem 1.4rem;
  background-color: var(--light-grey, rgb(248, 248, 248));
  border-radius: .8rem;
  font-size: 1.3rem;
  color: var(--middle-grey, rgb(117, 117, 117));
}

.st-gender-note__item::before {
  content: 'ℹ ';
}

/* Pytajnik pomocy przy labelach */
.st-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  margin-left: .4rem;
  padding: 0;
  border: 1px solid var(--middle-grey, rgb(117, 117, 117));
  border-radius: 50%;
  background: none;
  color: var(--middle-grey, rgb(117, 117, 117));
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
  transition: all .2s ease;
}

.st-help-btn:hover {
  border-color: var(--color-accent, rgb(111, 38, 61));
  color: var(--color-accent, rgb(111, 38, 61));
}

/* Treść modala-poradnika */
.st-help-content {
  padding: 1.6rem 2rem 2rem;
  font-size: 1.4rem;
  line-height: 1.6;
}

.st-help-section {
  margin-bottom: 2.8rem;
}

.st-help-section__title {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 .8rem;
}

.st-help-images {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.st-help-images figure {
  margin: 0;
}

.st-help-images img {
  width: 100%;
  max-width: 32rem;
  border-radius: .8rem;
  background: var(--light-grey, rgb(248, 248, 248));
  display: block;
  margin-bottom: .6rem;
}

.st-help-images figcaption {
  font-size: 1.4rem;
  color: var(--middle-grey, rgb(117, 117, 117));
  line-height: 1.6;
}

.st-help-images figcaption strong {
  color: var(--primary-text-color, #000);
}

/* Koszyk */
.sezam-st-cart-config {
  margin-top: .4rem;
  color: var(--middle-grey, rgb(117, 117, 117));
}

/* Wersja (damska/męska) — dopisek pod nazwą */
.st-pill__sub {
  display: block;
  font-size: 10px;
  font-weight: 400;
  opacity: .7;
  line-height: 1.1;
}

/* Modal wykończeń */
.st-help-intro {
  margin: 0 0 1.4rem;
  color: var(--middle-grey, rgb(117, 117, 117));
}
.st-mat-swatch {
  width: 100%;
  max-width: 32rem;
  height: auto;
  border-radius: .8rem;
  display: block;
  margin-bottom: .6rem;
}
.st-mat-item img {
  max-width: 32rem;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}
.st-mat-scope {
  display: block;
  font-size: 1.2rem;
  margin-top: .2rem;
}

/* Dopisek pod wyborem (np. „Na zdjęciu: Młotkowana – częściowo") */
.st-field-note {
  margin-top: .4rem;
  font-size: 1.2rem;
  color: var(--middle-grey, rgb(117, 117, 117));
}
.st-mat-badge {
  display: inline-block;
  margin-left: .4rem;
  padding: .1rem .7rem;
  border-radius: 1rem;
  background: var(--color-accent, rgb(111, 38, 61));
  color: #fff;
  font-size: 1.1rem;
  vertical-align: middle;
}

/* --- Dopłaty na pigułkach / swatchach --- */
/* Dopłata obok nazwy, w jednej linii; pojawia się płynnie, nie jest czyszczona przy przeliczaniu */
.st-delta {
  display: inline;
  margin-left: .5rem;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--middle-grey, rgb(117, 117, 117));
  white-space: nowrap;
  transition: opacity .25s ease;
}
.st-delta:empty { display: none; }
.st-delta.is-in { animation: st-delta-in .25s ease; }
@keyframes st-delta-in { from { opacity: 0; } to { opacity: 1; } }
.st-pill.active .st-delta { color: inherit; opacity: .8; }
.st-swatch .st-delta { margin-left: .4rem; }

/* Galeria: zmiana koloru bez skoku - kafelki przenikają */
.md-product-images picture { transition: opacity .2s ease; }

/* --- Wykończenie (bez wyboru) --- */
.st-static-value {
  font-size: 1.4rem;
}
.st-static-hint {
  margin-left: .6rem;
  font-size: 1.2rem;
  color: var(--middle-grey, rgb(117, 117, 117));
}

/* --- Grawer --- */
.st-label__sub {
  font-weight: 400;
  color: var(--middle-grey, rgb(117, 117, 117));
}
.st-graver-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 36rem;
}
.st-graver-count {
  font-size: 1.2rem;
  color: var(--middle-grey, rgb(117, 117, 117));
  white-space: nowrap;
}
.st-pills--small {
  margin-top: 0;
}
.st-pills--small .st-pill {
  padding: .3rem 1.2rem;
  font-size: 1.2rem;
}
.st-graver-preview {
  margin-top: 0;
  max-width: 36rem;
  padding: 1rem 1.6rem;
  border-radius: .8rem;
  background: linear-gradient(90deg, #e9e2cf 0%, #f7f2e4 50%, #e2d9c2 100%);
  color: #5a4a2a;
  text-align: center;
  min-height: 4.2rem;
  letter-spacing: .06em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.st-graver-preview--print .st-graver-preview__text {
  font-family: var(--font-secondary, 'Playfair Display', Georgia, serif);
  font-size: 1.7rem;
}
.st-graver-preview--script .st-graver-preview__text {
  font-family: 'Segoe Script', 'Brush Script MT', 'Snell Roundhand', cursive;
  font-size: 2rem;
  letter-spacing: .02em;
}
.st-graver-preview--empty .st-graver-preview__text {
  opacity: .45;
}

/* --- Pod przyciskiem: czas realizacji, link --- */
/* Pod grawerem: czas realizacji + link do konfiguracji, jako spokojna ramka informacyjna */
.st-info-box {
  margin: 2.4rem 0 .4rem;
  padding: 1.2rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  font-size: 1.3rem;
  color: var(--middle-grey, rgb(117, 117, 117));
  background-color: var(--light-grey, rgb(248, 248, 248));
  border-radius: .8rem;
}
.st-lead-time strong {
  color: var(--primary-text-color, #000);
}
.st-share-link {
  color: var(--middle-grey, rgb(117, 117, 117));
  text-decoration: underline;
  align-self: flex-start;
}
.st-share-link.is-copied {
  color: var(--color-accent, rgb(111, 38, 61));
  text-decoration: none;
}
.st-lead-time, .st-share-link {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}
.st-share-link { text-decoration: none; }
.st-share-link__text { text-decoration: underline; }
.st-share-link.is-copied .st-share-link__text { text-decoration: none; }
.st-ico {
  width: 1.6rem;
  height: 1.6rem;
  flex: none;
  color: var(--color-accent, rgb(111, 38, 61));
}

/* Pasek z ceną: bez cienia w górę (zasłaniał pole graweru), delikatna linia + odstęp */
.st-price-sticky {
  transition: padding .2s ease;
}

/* Przyklejony (przewinięty pod menu) - tylko odstęp u góry, bez cienia */
.sezam-st-configurator .st-price-sticky--stuck {
  padding-top: 1.2rem;
}

/* Mobile: etykieta i waga jedna pod drugą, cena po prawej */
@media (max-width: 767px) {
  .sezam-st-configurator .st-price-sticky {
    margin: 0 -1.6rem 2rem;
    padding: 0 1.6rem 1.2rem;
    gap: 1rem;
  }
  .sezam-st-configurator .st-price-info {
    flex: 1 1 auto;
  }
  .sezam-st-configurator .st-price-details {
    white-space: normal;
    font-size: 1.1rem;
  }

  .sezam-st-configurator .st-price-omnibus {
    white-space: normal;
    font-size: 1rem;
  }

  .sezam-st-configurator .st-price-value {
    flex: 0 0 auto;
  }
}

/* --- Grawer: porządek pionowy (pole → krój → podgląd → notka) --- */
.st-field--graver {
  margin-top: 2.8rem;
  padding-top: 2.4rem;
  border-top: 1px solid var(--letter-line-grey, rgb(227, 227, 227));
}
.st-graver-block {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  max-width: 36rem;
}
.st-graver-block .st-field-note {
  margin-top: 0;
  line-height: 1.5;
}
.st-sublabel {
  display: block;
  font-size: 1.2rem;
  color: var(--middle-grey, rgb(117, 117, 117));
  margin-bottom: .6rem;
}
.st-graver-row .st-input {
  max-width: none;
  flex: 1;
}
.st-graver-preview-wrap .st-graver-preview {
  max-width: none;
}

/* Reszta formularza: równy oddech między polami, notki bliżej swojego pola */
.st-field {
  margin-bottom: 2.4rem;
}
.st-field-note {
  margin-top: .8rem;
  line-height: 1.5;
}
.st-gender-note {
  margin-top: 1rem;
}

/* Przeliczanie ceny: stara cena zostaje, tylko przygasa (bez migania na kropki) */
.st-price-value.is-loading .st-price-amount,
.st-price-value.is-loading .st-price-currency {
  opacity: .35;
  transition: opacity .15s ease;
}

/* Modale z tekstem (rodowanie): akapity i nagłówki jak podpisy w pozostałych modalach */
.st-help-content p,
.st-help-section p {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--middle-grey, rgb(117, 117, 117));
  margin: 0 0 1.2rem;
}
.st-help-content .st-help-intro {
  font-size: 1.4rem;
  color: var(--primary-text-color, #000);
  margin-bottom: 2rem;
}
.st-help-section {
  margin-bottom: 2rem;
}
.st-help-section__title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--primary-text-color, #000);
  margin: 0 0 .6rem;
}
.st-help-section p strong {
  color: var(--primary-text-color, #000);
}

/* Proby zlota - lista w modalu */
.st-purity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border-color, #ebebeb);
}
.st-purity-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .2rem 1.6rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border-color, #ebebeb);
}
.st-purity-item__name {
  grid-column: 1;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--primary-text-color, #000);
  white-space: nowrap;
}
.st-purity-item__karat {
  font-weight: 400;
  color: var(--middle-grey, rgb(117, 117, 117));
}
.st-purity-item__share {
  grid-column: 2;
  justify-self: end;
  align-self: center;
  font-size: 1.3rem;
  color: #6f263d;
  white-space: nowrap;
}
.st-purity-item__desc {
  grid-column: 1 / -1;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--middle-grey, rgb(117, 117, 117));
}

/* Kolor jako link do produktu w tym kolorze (produkt per kolor) */
.st-swatches--links .st-swatch {
  text-decoration: none;
  color: inherit;
}
.st-swatches--links .st-swatch.active {
  cursor: default;
}

/* Przełączanie koloru w galerii: krótkie przenikanie zamiast skoku */
.md-product-images picture { transition: opacity .16s ease; }
.md-product-images.st-swapping picture { opacity: 0; }

/* Gotowy wariant: zamrożona konfiguracja */
.st-preset-box {
  background: var(--light-grey, rgb(248, 248, 248));
  border-radius: .8rem;
  padding: 1.2rem 1.6rem;
}
.st-preset-list {
  list-style: none;
  margin: 0 0 .8rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: .4rem 1.6rem;
  font-size: 1.3rem;
}
.st-preset-list li span {
  color: var(--middle-grey, rgb(117, 117, 117));
  margin-right: .5rem;
}
.st-preset-link {
  font-size: 1.2rem;
  text-decoration: underline;
  color: var(--color-accent, rgb(111, 38, 61));
}

/* Promocja sklepu: stara cena przekreślona + procent, obok ceny po rabacie */
.st-price-line {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .8rem;
}
.st-price-old {
  font-size: 1.4rem;
  color: var(--middle-grey, rgb(117, 117, 117));
  text-decoration: line-through;
}
.st-price-badge {
  padding: .1rem .7rem;
  border-radius: 1rem;
  background-color: var(--color-accent, #6f263d);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
}


/* --- Plakietka na kafelku listingu (hook displaySezamMetalBadge) --- */
/* Dziedziczy kształt po .product__flag-item z theme, dokładamy tylko kolor i sklejenie w jednej linii. */
.sezam-st-personalization {
  color: var(--dark-gold, #b4a373);
  white-space: nowrap;
}
.sezam-st-personalization svg {
  flex: 0 0 auto;
}
