/* Czapki 513 — studio "/nowa": czapka rysowana wektorowo, galeria z lewitującym produktem */

:root {
  --bg: #f2efe9;
  --ink: #16181d;
  --ink-secondary: #585e6b;
  --ink-muted: #949aa8;
  --card: rgba(255, 255, 255, 0.78);
  --card-solid: #ffffff;
  --line: rgba(22, 24, 29, 0.1);
  --line-strong: rgba(22, 24, 29, 0.22);
  --accent: #e01b28;
  --accent-dark: #b8141f;
  --accent-soft: rgba(224, 27, 40, 0.09);
  --radius: 20px;
  --radius-sm: 11px;
  --shadow: 0 18px 60px rgba(22, 24, 29, 0.12);
  --font: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --display: "Unbounded", var(--font);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

.app {
  position: relative;
  min-height: 100vh;
}

/* ── Tło sceny ──────────────────────────────────────────────── */

.wash {
  position: fixed;
  left: calc(50% - 198px);
  top: 46%;
  width: 74vmin;
  height: 74vmin;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #8a8f9a;
  filter: blur(90px);
  opacity: 0.32;
  transition: background 0.7s ease;
  pointer-events: none;
  z-index: 0;
}

.bigname {
  position: fixed;
  left: calc(50% - 198px);
  top: 46%;
  transform: translate(-50%, -50%);
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(72px, 15vw, 210px);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 2px rgba(22, 24, 29, 0.09);
  user-select: none;
  pointer-events: none;
  z-index: 1;
}

.bigname.swap {
  animation: nameIn 0.7s ease both;
}

@keyframes nameIn {
  0% { opacity: 0; letter-spacing: 0.14em; }
  100% { opacity: 1; letter-spacing: 0.01em; }
}

/* ── Górny pasek ────────────────────────────────────────────── */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
  z-index: 40;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--display);
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
}

.brand-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  align-self: center;
}

.brand-sub {
  font-family: var(--font);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-pill {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 18px rgba(22, 24, 29, 0.07);
}

.price-pill span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.price-pill strong {
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  backdrop-filter: blur(14px);
  color: var(--ink-secondary);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.icon-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

/* ── Dok kolorów (lewa krawędź) ─────────────────────────────── */

/* ── Scena ──────────────────────────────────────────────────── */

.stage {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 90px 420px 60px 90px;
}

.stage-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.cap-scene {
  position: relative;
  width: min(100%, 104vh, 880px);
}

.cap-scene.is-loading #capCanvas {
  opacity: 0.35;
}

#capCanvas {
  display: block;
  width: 100%;
  height: auto;
  outline: none;
  touch-action: none;
  cursor: default;
  animation: floaty 5.5s ease-in-out infinite;
  transition: opacity 0.25s;
}

#capCanvas:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 8px;
  border-radius: 16px;
}

.cap-shadow {
  position: absolute;
  left: 14%;
  right: 16%;
  bottom: 2%;
  height: 8%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(20, 22, 28, 0.3), rgba(20, 22, 28, 0) 72%);
  filter: blur(9px);
  animation: shadowPulse 5.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-13px); }
}

@keyframes shadowPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.93); opacity: 0.75; }
}

@media (prefers-reduced-motion: reduce) {
  #capCanvas,
  .cap-shadow,
  .bigname.swap {
    animation: none;
  }
}

.statusline {
  position: fixed;
  left: 26px;
  bottom: 20px;
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  z-index: 40;
}

/* ── Panel ustawień (prawa strona) ──────────────────────────── */

.panel {
  position: fixed;
  top: 84px;
  right: 24px;
  bottom: 24px;
  width: 364px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  z-index: 40;
  scrollbar-width: thin;
}

.section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  backdrop-filter: blur(16px);
  box-shadow: 0 6px 26px rgba(22, 24, 29, 0.07);
  overflow: hidden;
  flex-shrink: 0;
}

.section summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.section summary::-webkit-details-marker {
  display: none;
}

.section summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: 2px;
  border-right: 2px solid var(--ink-muted);
  border-bottom: 2px solid var(--ink-muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s;
  flex-shrink: 0;
  align-self: center;
}

.section[open] summary::after {
  transform: rotate(225deg) translateY(-1px);
}

.section-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.03em;
}

.section-meta {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 45%;
}

.section-body {
  padding: 2px 20px 20px;
}

/* Dropzone */

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 22px 16px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone.has-file {
  border-style: solid;
  border-color: var(--line);
}

.dropzone-icon {
  display: flex;
  color: var(--ink-muted);
}

.dropzone-icon svg {
  width: 32px;
  height: 32px;
}

.dropzone-title {
  font-size: 13.5px;
  font-weight: 700;
}

.dropzone-hint {
  font-size: 11.5px;
  color: var(--ink-muted);
}

/* Suwaki */

.logo-controls {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.slider-field label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.slider-field output {
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.slider-field input[type="range"] {
  width: 100%;
  height: 5px;
  appearance: none;
  background: rgba(22, 24, 29, 0.14);
  border-radius: 3px;
  cursor: pointer;
}

.slider-field input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid #fff;
  box-shadow: 0 1px 5px rgba(22, 24, 29, 0.3);
  cursor: grab;
}

.slider-field input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid #fff;
  box-shadow: 0 1px 5px rgba(22, 24, 29, 0.3);
  cursor: grab;
}

.slider-field input[type="range"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.toggle-field {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 2px;
}

.toggle-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.toggle-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
}

/* Techniki */

.tech-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.tech-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1px 12px;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.55);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.tech-card:hover {
  border-color: var(--line-strong);
}

.tech-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tech-card[aria-checked="true"] {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.tech-card strong {
  font-size: 13.5px;
  font-weight: 800;
}

.tech-card b {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.tech-card span {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--ink-secondary);
}

/* Ilość i cennik */

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.qty-caption {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.qty-stepper {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
}

.qty-stepper button {
  width: 36px;
  border: none;
  background: rgba(22, 24, 29, 0.05);
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.qty-stepper button:hover {
  background: rgba(22, 24, 29, 0.12);
}

.qty-stepper input {
  width: 60px;
  padding: 8px 4px;
  border: none;
  text-align: center;
  font-weight: 800;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}

.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-stepper input:focus-visible,
.qty-stepper button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.tier-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 13px;
}

.tier-chip {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
}

.tier-chip.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.price-list {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}

.price-row dt {
  font-size: 13px;
  color: var(--ink-secondary);
}

.price-row dd {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.price-row--unit {
  border-bottom: none;
}

.price-row--total {
  border-bottom: none;
  padding-top: 10px;
  border-top: 1.5px solid var(--line-strong);
}

.price-row--total dt,
.price-row--total dd {
  font-weight: 800;
  color: var(--ink);
  font-size: 15.5px;
}

/* Akcje */

.panel-actions {
  display: flex;
  gap: 9px;
  flex-shrink: 0;
}

.btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px 14px;
  border: none;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
}

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

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

.btn-ghost {
  background: var(--card-solid);
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
}

.btn-ghost:hover {
  background: #f2f3f5;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 22px rgba(224, 27, 40, 0.32);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Toast */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: 12px 22px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 200;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Responsywność ──────────────────────────────────────────── */

@media (max-width: 1120px) {
  .wash,
  .bigname {
    left: 50%;
    top: 38vh;
    position: absolute;
  }

  .bigname {
    font-size: clamp(56px, 16vw, 130px);
  }

  .topbar {
    position: sticky;
    background: linear-gradient(var(--bg) 65%, transparent);
  }

  .stage {
    min-height: auto;
    padding: 12px 20px 12px;
  }

  .cap-scene {
    width: min(100%, 600px);
  }

  .panel {
    position: static;
    width: auto;
    padding: 0 16px 90px;
    overflow: visible;
  }

  .statusline {
    display: none;
  }

  .panel-actions {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 60;
  }

  .panel-actions .btn {
    box-shadow: 0 10px 30px rgba(22, 24, 29, 0.25);
  }
}

@media (max-width: 480px) {
  .topbar {
    padding: 12px 14px;
  }

  .price-pill {
    padding: 7px 13px;
  }
}

/* ── Strefy kolorów truckerki ───────────────────────────────── */

.zone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}

.zone-row:last-child {
  border-bottom: none;
}

.zone-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-secondary);
  white-space: nowrap;
}

.zone-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.zone-dot {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16);
  transition: transform 0.12s;
}

.zone-dot:hover {
  transform: scale(1.15);
}

.zone-dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.zone-dot[aria-checked="true"] {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16), 0 0 0 2px #fff, 0 0 0 4px var(--ink);
}
