.product-extra-content.wd-location-before {
    margin-bottom: -40px !important;
}

.trufle-svg-object {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
}

.trufle-configurator-spacer {
  height: 1px;         /* wysokość odstępu */
  width: 100%;          /* pełna szerokość */
}

/* wrapper na wszystkie kolory */
.color-slots-row,
.bordiura-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;        
}

/* pojedynczy zestaw: label nad buttonem */
.color-slot {
  display: flex;
  flex-direction: column;   /* label → button w pionie */
  align-items: center;      /* wycentrowanie poziome */
  gap: 6px;
  position: relative;
}

/* label nad przyciskiem */
.slot-label {
  /*font-weight: bold;*/
  align-self: flex-start;
  text-align: left;
  font-size: 12px;
  margin-bottom: 0px;
}

/* przycisk z kolorem */
.color-preview-btn {
  width: 60px;
  height: 60px;
  border-radius: 3px !important;
  border: 1px solid #888;
  color: #000;
  font-family: "Poppins Local", sans-serif !important;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;   /* potrzebne dla .color-code */
}

/* numer koloru w rogu przycisku */
.color-code {
  position: absolute;
  bottom: 7px;
  right: 7px;
  font-size: 1.4em;
  font-weight: 800;
  line-height: 1;
  color: #000;   /* albo automatyczny kontrast (np. mix-blend-mode) */
}

.color-preview-btn[data-code="1212"] .color-code,
.color-preview-btn[data-code="1217"] .color-code,
.color-preview-btn[data-code="1238"] .color-code,
.color-preview-btn[data-code="1274"] .color-code,
.color-preview-btn[data-code="1321"] .color-code,
.color-preview-btn[data-code="1331"] .color-code,
.color-preview-btn[data-code="1332"] .color-code,
.color-preview-btn[data-code="1351"] .color-code,
.color-preview-btn[data-code="1362"] .color-code,
.color-preview-btn[data-code="1371"] .color-code,
.color-preview-btn[data-code="1416"] .color-code,
.color-preview-btn[data-code="1419"] .color-code,
.color-preview-btn[data-code="1424"] .color-code,
.color-preview-btn[data-code="1429"] .color-code,
.color-preview-btn[data-code="1430"] .color-code,
.color-preview-btn[data-code="1431"] .color-code,
.color-preview-btn[data-code="1432"] .color-code,
.color-preview-btn[data-code="1433"] .color-code,
.color-preview-btn[data-code="1446"] .color-code,
.color-preview-btn[data-code="1448"] .color-code {
  color: #fff; /* dla ciemnych kolorów */
}


.popup-backdrop {
  display: none; /* ukryte domyślnie */
  margin-block: 0 !important;
  margin-bottom: 0px !important;
  position: fixed;
  inset: 0; /* top, right, bottom, left = 0 */
  background: rgba(0, 0, 0, 0.4); /* półprzezroczysty czarny */
  z-index: 998; /* tuż pod popupem */
}

/* Popup nad tłem */
.color-popup {
  position: fixed;
  top: 20vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  width: clamp(260px, 90vw, 520px);
  max-height: 80vh;
  overflow-y: auto;
  background: white;
/*  border: 1px solid #ccc;*/
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  padding: 32px;
  flex-wrap: wrap;
  gap: 10px;
  display: none;
}

.color-popup.open {
  display: flex;
}

.configurator-ui {
  position: relative;
}

.color-option {
  position: relative;
  display: flex;              /* zamiast inline-block */
  align-items: center;        /* środek pionowy */
  justify-content: center;    /* środek poziomy */
  width: 40px;
  height: 40px;
  border-radius: 2px;
  cursor: pointer;
  box-sizing: border-box;
  overflow: hidden;
  margin: 0;                  /* usuwamy marginesy */
  line-height: 0;             /* zero odstępów od line-height */
}

/* numer w prawym dolnym rogu */
.color-option .color-code {
  position: absolute;
  bottom: 4px;
  right: 4px;
  font-size: 12px;
  font-weight: 400;
  font-family: "Poppins Local", sans-serif;
  line-height: 1;
  color: #000; /* albo automatyczne różnicowanie: mix-blend-mode */
  pointer-events: none;     /* żeby klik działał na całej kostce */
}

.color-option[data-code="1212"] .color-code,
.color-option[data-code="1217"] .color-code,
.color-option[data-code="1238"] .color-code,
.color-option[data-code="1274"] .color-code,
.color-option[data-code="1321"] .color-code,
.color-option[data-code="1331"] .color-code,
.color-option[data-code="1332"] .color-code,
.color-option[data-code="1351"] .color-code,
.color-option[data-code="1362"] .color-code,
.color-option[data-code="1371"] .color-code,
.color-option[data-code="1416"] .color-code,
.color-option[data-code="1419"] .color-code,
.color-option[data-code="1424"] .color-code,
.color-option[data-code="1429"] .color-code,
.color-option[data-code="1430"] .color-code,
.color-option[data-code="1431"] .color-code,
.color-option[data-code="1432"] .color-code,
.color-option[data-code="1433"] .color-code,
.color-option[data-code="1446"] .color-code,
.color-option[data-code="1448"] .color-code {
  color: #fff; /* dla ciemnych kolorów */
}

/* pojedynczy „kafelek” bordiury */
.bordiura-option {
  width: 60px;
  height: 60px;
  border-radius: 3px !important;
  border: 1px solid #888;
  background: #f5f5f5;     /* neutralne tło (możesz zmienić) */
  position: relative;      /* dla numerka w rogu */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-sizing: border-box;
  font: inherit;           /* nie pokazujemy nazwy, tylko numer */
}

/* stan aktywny (jak przy kolorach) */
.bordiura-option.active {
  outline: 2px solid #000; /* wyraźne zaznaczenie */
  outline-offset: 0;
  border-color: #000;
  background: #e9e9e9;
}

/* numer w prawym-dolnym rogu kafelka */
.bordiura-option .bordiura-num {
  position: absolute;
/*  right: 7px;
  bottom: 7px;*/
  font-family: "Poppins Local", sans-serif;
  font-weight: 800;
  font-size: 1.6em;
  line-height: 1;
  color: #000;
/*  text-shadow: 0 0 2px rgba(255,255,255,0.5);*/
  pointer-events: none;  /* klik działa wszędzie */
}

/* opcjonalnie „0” (bez) jaśniejsze tło – łatwiej rozpoznać */
.bordiura-option[data-bordiura="bez"] {
  background: #fafafa;
}

.finish-grid {
  display: flex;
  gap: 12px;             /* odstęp między połysk/mat */
  width: 100%;           /* pełna szerokość */
}

/* wygląd przycisku – bazowany na bordiura-option */
.finish-option {
  flex: 1;               /* każdy zajmuje po połowie szerokości */
  height: 50px;          /* jak bordiury */
  border: 1px solid #aaa;
  border-radius: 4px !important;    /* zaokrąglenie narożników jak w bordiurach */
  background: #f9f9f9;
  cursor: pointer;
  font-family: "Poppins Local", sans-serif;
  font-size: 0.95em;
  font-weight: 500;

  display: flex;
  flex-direction: column;    /* tekst główny + opis */
  align-items: center;
  justify-content: center;
  text-align: center;

  transition: background 0.2s, border-color 0.2s;
}

.finish-option .finish-icon svg {
  display: block;
  width: 28px;
  height: 28px;
  opacity: .6;
}

/* teksty wewnątrz */
.finish-option .finish-main {
  font-size: 1em;
  font-weight: 600;
}

.finish-option .finish-sub {
  font-size: 0.8em;
  font-weight: 400;
  color: #555;
}

.finish-texts { display: flex; flex-direction: column; line-height: 1.1; }
/*.finish-main  { font-family: "Poppins Local", sans-serif; font-size: 16px; font-weight: 700; }*/
/*.finish-sub   { font-family: "Poppins Local", sans-serif; font-size: 12px; font-weight: 500; opacity: .8; margin-top: 2px; }*/

/* hover */
.finish-option:hover {
  background: #f0f0f0;
}

/* stan aktywny */
.finish-option.active,
.finish-option[aria-pressed="true"] {
  outline: 2px solid #000; /* wyraźne zaznaczenie */
  outline-offset: 0;
  border-color: #000;
  background: #e9e9e9;
}

.sample-order,
.dim-actions {
  width: 100%;               /* kontener też pełna szerokość */
}

.dim-actions button,
.sample-order button {
  display: block;             /* aby zajmował całą szerokość */
  width: 100%;                /* pełna szerokość diva */
  height: 50px;               /* wysokość przycisku */
/*  font-size: 1em;*/
  color: var(--btn-color, #3E3E3E);
  background-color: var(--btn-bgcolor, #F3F3F3);
  font-weight: 600;
  border-radius: 6px;         /* opcjonalnie lekko zaokrąglone rogi */
  cursor: pointer;
  margin-bottom: 10px;
}

.dim-actions button:hover,
.sample-order button:hover {
  color: var(--btn-color-hover, var(--btn-color, #3E3E3E));
  border-color: var(--btn-brd-color-hover, var(--btn-brd-color, #e0e0e0));
  background-color: var(--btn-bgcolor-hover, var(--btn-bgcolor, #e0e0e0));
  box-shadow: var(--btn-box-shadow-hover, var(--btn-box-shadow, unset));
}

.trufle-configurator-link-row{
  margin-top: 50px;
}

.trufle-configurator-text-link {
  color: #b0ac35;
  font-size: 13px;
  font-weight: 500; 
  text-decoration: underline;   
  transition: color 0.2s ease;
}

.trufle-configurator-text-link:hover {
  color: #b0ac35;
  text-decoration: underline;
  filter: brightness(90%);
}

.trufle-configurator-text {
  width: 100%;
  display: block;
  margin-bottom: 8px !important;
  font-size: 12px;
  color: var(--wd-title-color);
  font-weight: var(--wd-title-font-weight);
  font-style: var(--wd-title-font-style);
  font-family: var(--wd-title-font);
  text-transform: uppercase;
}

.order-sample-btn:hover {
  background-color: #333;
}

#generated-mosaic-svg-wrapper {
  width: 100%;
  max-height: 60vh; /* 60% wysokości ekranu */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#generated-mosaic-svg {
  width: 100%;
  height: auto;
  max-height: 60vh;
}

/* Podgląd SVG na szerokość */
.dim-preview {
  width: 100%;
  margin-bottom: 16px;
}

#mosaic-shape-preview {
  width: 100%;
  height: 340px;          /* stała wysokość dla sensownego podglądu */
  border: 1px solid #ddd;
  border-radius: 4px;
  display: block;
}

/* Tabele */
.dim-table-wrap {
  margin-top: 12px;
}

.dim-subtitle {
  margin: 0 0 8px 0;
  font-size: 15px;
  font-weight: 600;
}

.dim-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
/*  border: 1px solid #e6e6e6;*/
/*  border-radius: 8px;*/
  overflow: hidden;
}

.dim-table thead th {
/*  background: #f7f7f7;*/
/*  font-weight: 600;*/
  font-size: 12px;
  padding: 12px 10px;
  text-align: center;
  border-bottom: 1px solid #e6e6e6;
}

.dim-table tbody td {
  padding: 10px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.dim-table tbody tr:last-child td {
  border-bottom: none;
}

.dim-table .col-left {
  width: 40%;
  text-align: left;
}

.dim-table .col-mid,
.dim-table .col-right {
  width: 30%;
  text-align: center;
}

/* Etykieta w kolumnie lewej */
.row-label {
  font-weight: 500;
  color: #333;
}

/* Ikonki narożników + podpis */
.corner-icon {
  display: flex;
  align-items: center;
  gap: 8px;
}

.corner-icon svg {
  width: 28px;
  height: 28px;
  fill: #bbb;
  stroke: none;
  display: inline-block;
}

/* Pola input liczbowe */
.dim-table input[type="number"] {
  width: 100%;
  max-width: 160px;
  padding: 8px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
  outline: none;
  transition: border-color 0.15s ease;
}

.dim-table input[type="number"]:focus {
  border-color: #7aa7ff; /* delikatny akcent */
}

/* Akcje */
.dim-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.dim-actions .button,
.dim-actions button {
  padding: 10px 18px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
}

/*.modal-hidden { display: none; }
.modal-backdrop { position: fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.4); z-index:1000; }
.modal-content { position:fixed; z-index:1001; background:#fff; padding:30px; left:50%; top:50%; transform:translate(-50%,-50%); border-radius:10px; box-shadow:0 0 30px rgba(0,0,0,.2);}*/

/* Sekcja cena + przycisk */
.trufle-price-action {
  display: flex;
  /*align-items: flex-end;   */
  align-items: center; 
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;       /* zawsze w jednej linii */
}

.price-side,
.action-side {
  flex: 1;                /* zajmują tyle samo miejsca */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

./*price-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}*/

/* lewa strona – cena */
/*.trufle-price-action .price-side {
  display: flex;
  flex-direction: column; 
  align-items: center;
  gap: 20px;  
}*/


/* prefix nad ceną */
.pricing-prefix {
  font-size: 13px;
}

/* rząd z ceną + sufiksem */
.pricing-row {
  display: flex;
  align-items: baseline;   /* wyrównanie sufiksu do dolnej linii cyfry */
  gap: 6px;
}

/* duża cena */
.pricing-value {
  font-weight: 800;
  font-size: 30px;
  font-family: "Poppins Local", sans-serif;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--wd-title-color);
}

/* suffix (PLN z VAT) */
.pricing-suffix {
  font-size: 13px;
  white-space: nowrap;
}

/* prawa strona – przycisk */
.trufle-price-action .action-side button{
  height: 60px !important;
  /*border-radius: 4px;*/
  /*color: #b0ac35;*/
}

.cta-send-project {
  appearance: none;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  border-radius: 8px;
  padding: 12px 20px;
  font: 600 16px/1 "Poppins Local", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  cursor: pointer;
  transition: transform .06s ease, box-shadow .15s ease, background .15s ease;
}
.cta-send-project:hover { background: #222; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.cta-send-project:active { transform: translateY(1px); }

/* Responsywność: na wąskich ekranach cena nad przyciskiem */
@media (max-width: 768px) {
  .trufle-price-action {
    gap: 12px;
  }
  .trufle-price-action .action-side {
    justify-content: flex-start;
  }
}

/* Modal – jeśli już masz te klasy, to ten blok można pominąć */
.modal-hidden { display: none; }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1000;
}

.modal-content {
  position: fixed;
  z-index: 1001;
  background: #fff;
  padding: 30px;
  left: 50%;
  top: 5%;
  transform: translateX(-50%);
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
  max-width: 720px;
  width: calc(100% - 32px);
  max-height: 90vh;              /* <--- kluczowy krok */
  overflow-y: auto;              /* <--- umożliwia przewijanie */
}

.modal-header {
  display: flex;
  justify-content: flex-end;
}

.modal-close {
  font-size: 24px;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #333;
}

/* === Pattern shift (3x3) === */
.pattern-shift { margin-top: 14px; }

.shift-grid {
  display: grid;
  grid-template-columns: repeat(3, 44px);
  grid-template-rows: repeat(3, 44px);
  gap: 8px;
  align-items: center;
  justify-items: center;
  /* pozwala „przykleić” cały blok do lewej, jeśli potrzeba: */
  justify-content: start;
}

.cell-up    { grid-row: 1; grid-column: 2; }
.cell-left  { grid-row: 2; grid-column: 1; }
.cell-right { grid-row: 2; grid-column: 3; }
.cell-down  { grid-row: 3; grid-column: 2; }
.cell-center{ grid-row: 2; grid-column: 2; }

/* „puste” pola siatki */
.shift-spacer {
  width: 44px;
  height: 44px;
}

/* Kwadratowe, lekko zaokrąglone przyciski */
.shift-btn {
  width: 44px;
  height: 44px;
  border: 1px solid #D6D6D6;
  background: #fff;
  border-radius: 8px;          /* delikatne zaokrąglenie */
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: transform .05s ease, box-shadow .15s ease, border-color .15s ease, background-color .15s ease;
  box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

/* Hover/active/focus – czytelny stan */
.shift-btn:hover {
  border-color: #bfbfbf;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}

.shift-btn:active {
  transform: translateY(1px);
}

.shift-btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, .3);
  border-color: #2196f3;
}

/* Lekki „disabled look”, gdyby kiedyś był potrzebny */
.shift-btn[disabled] {
  opacity: .6;
  cursor: not-allowed;
}

/* === Nowy układ poziomy przycisków === */
.shift-buttons-horizontal {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 8px;
}

/* Responsywnie, na mniejszych ekranach minimalnie mniejsze */
@media (max-width: 480px) {
  .shift-grid {
    grid-template-columns: repeat(3, 40px);
    grid-template-rows: repeat(3, 40px);
    gap: 6px;
  }
  .shift-btn, .shift-spacer { width: 40px; height: 40px; }
}
