/* ══════════════════════════════════════════════════════
   giftsell T-Shirt Konfigurator — CSS v1.0.0
   Prefix: .gs-  (wyłącznie wewnątrz .gs-root.gs-type-tshirt)
   Font: Barlow + Barlow Condensed — ładowane przez motyw
   ══════════════════════════════════════════════════════ */

.gs-root.gs-type-tshirt * {
  box-sizing: border-box;
}

/* ── LOADING ─────────────────────────────────────────── */
.gs-root.gs-type-tshirt .gs-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 40px 0;
  color: #888;
  font-size: 14px;
  font-family: 'Barlow', sans-serif;
}
.gs-root.gs-type-tshirt .gs-spinner {
  width: 22px; height: 22px;
  border: 3px solid #eee;
  border-top-color: #c8102e;
  border-radius: 50%;
  animation: gs-spin .8s linear infinite;
  flex-shrink: 0;
}
@keyframes gs-spin { to { transform: rotate(360deg); } }

.gs-root.gs-type-tshirt .gs-error {
  padding: 20px;
  background: #fff5f5;
  border: 1px solid #fcc;
  border-radius: 6px;
  font-size: 13px;
  color: #c00;
  font-family: 'Barlow', sans-serif;
}

/* ── LAYOUT 3 KOLUMNY ────────────────────────────────── */
.gs-root.gs-type-tshirt .gs-wrap {
  display: grid;
  grid-template-columns: 240px 1fr 260px;
  gap: 28px;
  align-items: start;
  font-family: 'Barlow', sans-serif;
}
@media (max-width: 900px) {
  .gs-root.gs-type-tshirt .gs-wrap {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .gs-root.gs-type-tshirt .gs-wrap {
    grid-template-columns: 200px 1fr 220px;
    gap: 20px;
  }
}

/* ── LEWA KOLUMNA — podgląd + nadruki ───────────────── */
.gs-root.gs-type-tshirt .gs-col-left {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.gs-root.gs-type-tshirt .gs-preview {
  background: #f6f6f6;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1/1;
}
.gs-root.gs-type-tshirt .gs-preview img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.gs-root.gs-type-tshirt .gs-preview-empty {
  background: #f6f6f6;
  border-radius: 8px;
  aspect-ratio: 1/1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 13px;
  gap: 8px;
}
.gs-root.gs-type-tshirt .gs-preview-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.gs-root.gs-type-tshirt .gs-preview-tab {
  width: 40px; height: 40px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .15s;
}
.gs-root.gs-type-tshirt .gs-preview-tab img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.gs-root.gs-type-tshirt .gs-preview-tab.gs-active {
  border-color: #c8102e;
}

/* Sekcje nadruku */
.gs-root.gs-type-tshirt .gs-print-section {
  margin-bottom: 14px;
}
.gs-root.gs-type-tshirt .gs-print-sec-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: #c8102e;
  margin-bottom: 6px;
}
.gs-root.gs-type-tshirt .gs-print-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.gs-root.gs-type-tshirt .gs-print-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 6px 4px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  width: 72px;
  transition: border-color .15s, background .15s;
  user-select: none;
}
.gs-root.gs-type-tshirt .gs-print-tile:hover {
  border-color: #bbb;
  background: #fafafa;
}
.gs-root.gs-type-tshirt .gs-print-tile.gs-selected {
  border-color: #c8102e;
  background: #fff5f5;
}
.gs-root.gs-type-tshirt .gs-tile-svg   { width: 48px; height: 56px; }
.gs-root.gs-type-tshirt .gs-tile-label { font-size: 9px; font-weight: 700; color: #222; text-align: center; line-height: 1.2; }
.gs-root.gs-type-tshirt .gs-tile-size  { font-size: 8px; color: #999; text-align: center; }
.gs-root.gs-type-tshirt .gs-tile-price { font-size: 9px; font-weight: 600; color: #c8102e; text-align: center; }

/* ── ŚRODKOWA KOLUMNA — kolory + tabela rozmiarów ────── */
.gs-root.gs-type-tshirt .gs-col-mid {
  min-width: 0;
}

.gs-root.gs-type-tshirt .gs-sec-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #999;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e8e8e8;
}

/* Siatka kolorów — małe kwadratowe kafelki z ikonką */
.gs-root.gs-type-tshirt .gs-colors-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 8px;
}
.gs-root.gs-type-tshirt .gs-color-tile {
  width: 22px; height: 22px;
  cursor: pointer;
  border: 1.5px solid #ccc;
  border-radius: 3px;
  padding: 1px;
  transition: border-color .15s, box-shadow .15s, transform .1s;
  background: #fff;
  flex-shrink: 0;
}
.gs-root.gs-type-tshirt .gs-color-tile:hover {
  border-color: #999;
  transform: scale(1.1);
}
.gs-root.gs-type-tshirt .gs-color-tile.gs-active {
  border-color: #c8102e;
  box-shadow: 0 0 0 2px rgba(200,16,46,.25);
}
.gs-root.gs-type-tshirt .gs-color-tile img {
  width: 16px; height: 16px;
  border-radius: 1px;
  object-fit: cover;
  display: block;
}
.gs-root.gs-type-tshirt .gs-color-label {
  font-size: 13px;
  font-weight: 600;
  color: #222;
  margin-bottom: 12px;
  min-height: 18px;
}
.gs-root.gs-type-tshirt .gs-placeholder {
  padding: 30px 0;
  color: #bbb;
  font-size: 14px;
}

/* Tabela rozmiarów */
.gs-root.gs-type-tshirt .gs-size-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.gs-root.gs-type-tshirt .gs-size-table th {
  text-align: left;
  padding: 7px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #999;
  background: #f8f8f8;
  border-bottom: 2px solid #e8e8e8;
}
.gs-root.gs-type-tshirt .gs-size-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}
.gs-root.gs-type-tshirt .gs-size-table tr:last-child td {
  border-bottom: none;
}
.gs-root.gs-type-tshirt .gs-size-table tr.gs-unavail td {
  opacity: .35;
}
.gs-root.gs-type-tshirt .gs-td-sz { font-weight: 600; color: #222; }
.gs-root.gs-type-tshirt .gs-td-pr { color: #333; }
.gs-root.gs-type-tshirt .gs-td-pr small { color: #aaa; font-size: 10px; }

/* Stan magazynowy */
.gs-root.gs-type-tshirt .gs-sok  { color: #2e7d32; font-weight: 600; }
.gs-root.gs-type-tshirt .gs-slow { color: #e65100; font-weight: 600; }
.gs-root.gs-type-tshirt .gs-s0   { color: #ccc; }

/* Licznik +/− */
.gs-root.gs-type-tshirt .gs-qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
}
.gs-root.gs-type-tshirt .gs-qb {
  width: 28px; height: 28px;
  background: #f8f8f8;
  border: none;
  cursor: pointer;
  font-size: 15px;
  color: #333;
  line-height: 1;
  transition: background .1s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gs-root.gs-type-tshirt .gs-qb:hover { background: #eee; }
.gs-root.gs-type-tshirt .gs-qv {
  width: 32px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #222;
  line-height: 28px;
}

/* Wiersz sumy */
.gs-root.gs-type-tshirt .gs-total-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  margin-top: 6px;
  border-top: 1px solid #ececec;
  font-size: 14px;
  color: #555;
}
.gs-root.gs-type-tshirt .gs-total-row strong {
  font-size: 18px;
  color: #111;
}
.gs-root.gs-type-tshirt .gs-min-ok   { color: #2e7d32; font-size: 12px; }
.gs-root.gs-type-tshirt .gs-min-fail { color: #c8102e; font-size: 12px; }

/* ── PRAWA KOLUMNA — ciemny panel ceny ───────────────── */
.gs-root.gs-type-tshirt .gs-col-right {
  position: sticky;
  top: 24px;
}
@media (max-width: 900px) {
  .gs-root.gs-type-tshirt .gs-col-right {
    position: static;
  }
}

.gs-root.gs-type-tshirt .gs-price-panel {
  background: #1a1a1a;
  color: #fff;
  padding: 22px 18px;
  border-radius: 10px;
}
.gs-root.gs-type-tshirt .gs-price-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #666;
  padding-bottom: 8px;
  border-bottom: 1px solid #333;
  margin-bottom: 12px;
}
.gs-root.gs-type-tshirt .gs-price-main {
  font-size: 40px;
  font-weight: 700;
  font-family: 'Barlow Condensed', 'Barlow', sans-serif;
  color: #fff;
  letter-spacing: -.02em;
  line-height: 1;
  margin-bottom: 4px;
}
.gs-root.gs-type-tshirt .gs-price-unit {
  font-size: 11px;
  color: rgba(255,255,255,.4);
  margin-bottom: 16px;
}

/* Breakdown */
.gs-root.gs-type-tshirt .gs-breakdown {
  border-top: 1px solid #2a2a2a;
  padding-top: 10px;
  margin-bottom: 16px;
}
.gs-root.gs-type-tshirt .gs-br-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: #888;
  padding: 3px 0;
}
.gs-root.gs-type-tshirt .gs-br-row span:last-child {
  font-weight: 600;
  color: #ccc;
}
.gs-root.gs-type-tshirt .gs-br-total {
  border-top: 1px solid #333;
  margin-top: 6px;
  padding-top: 8px;
  font-weight: 700;
}
.gs-root.gs-type-tshirt .gs-br-total span { color: #fff !important; }

/* Termin */
.gs-root.gs-type-tshirt .gs-termin {
  font-size: 12px;
  color: rgba(255,255,255,.45);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.gs-root.gs-type-tshirt .gs-termin strong { color: rgba(255,255,255,.7); }

/* Przycisk koszyka */
.gs-root.gs-type-tshirt .gs-btn-cart {
  width: 100%;
  padding: 14px 12px;
  background: #c8102e;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background .2s, transform .1s;
  font-family: 'Barlow', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.gs-root.gs-type-tshirt .gs-btn-cart:hover:not(:disabled) {
  background: #a50d25;
  transform: translateY(-1px);
}
.gs-root.gs-type-tshirt .gs-btn-cart:active:not(:disabled) {
  transform: translateY(0);
}
.gs-root.gs-type-tshirt .gs-btn-cart:disabled {
  background: #333;
  cursor: not-allowed;
  opacity: .6;
}

/* Komunikat walidacji */
.gs-root.gs-type-tshirt .gs-msg {
  font-size: 11px;
  color: #f87171;
  margin-top: 8px;
  min-height: 14px;
  text-align: center;
}
