/* Kreator /zaprojektuj-sam/ — poza @layer (woocommerce-general nadpisywał @layer components) */

body.cw-zaprojektuj-editor-page .ww-site-header,
body.cw-zaprojektuj-editor-page .cw-site-header,
body.cw-zaprojektuj-editor-page .cw-footer {
  display: none !important;
}

body.cw-zaprojektuj-editor-page {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: #f3f3f3;
}

html:has(body.cw-zaprojektuj-editor-page) {
  overflow: hidden;
}

body.cw-zaprojektuj-editor-page #main.site-main,
body.cw-zaprojektuj-editor-page .site-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: #f3f3f3;
}

.cw-design-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  background: #f3f3f3;
}

@media (min-width: 901px) {
  .cw-design-editor {
    grid-template-columns: 88px minmax(0, 1fr) 380px;
  }
}

.cw-design-editor__left {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 0;
  overflow: hidden;
  background: #fff;
  padding: 0.75rem;
}

@media (min-width: 901px) {
  .cw-design-editor__left {
    height: 100dvh;
    justify-content: space-between;
    border-right: 1px solid #e5e5e5;
    gap: 0.625rem;
  }
}

.cw-design-editor__left-top,
.cw-design-editor__left-tools,
.cw-design-editor__left-history {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cw-design-editor__tool {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #d4d4d4;
  border-radius: 0.25rem;
  background: #fff;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #262626;
  text-decoration: none;
  cursor: pointer;
}

@media (min-width: 901px) {
  .cw-design-editor__tool {
    min-height: 64px;
    flex-direction: column;
    gap: 0.375rem;
    border: 0;
    padding: 0.375rem;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    color: #0a0a0a;
  }

  .cw-design-editor__tool > span:first-child {
    font-size: 1.75rem;
    line-height: 1;
  }
}

.cw-design-editor__tool svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

@media (min-width: 901px) {
  .cw-design-editor__tool svg {
    width: 1.75rem;
    height: 1.75rem;
  }
}

.cw-design-editor__stage {
  display: flex;
  min-height: 0;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  overflow: hidden;
  background: #f3f3f3;
  padding: 0;
}

@media (min-width: 901px) {
  .cw-design-editor__stage {
    height: 100dvh;
  }
}

.cw-design-editor__canvas-wrap {
  display: flex;
  width: 100%;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  overflow: visible;
  background: transparent;
}

@media (min-width: 901px) {
  .cw-design-editor__canvas-wrap .canvas-container {
    --cw-editor-stage-w: calc(100vw - 88px - 380px - 16px);
    width: min(var(--cw-editor-stage-w), calc((100dvh - 16px) * 860 / 620 * 0.81)) !important;
    max-width: var(--cw-editor-stage-w) !important;
    max-height: calc(100dvh - 16px) !important;
    aspect-ratio: 860 / 620;
    height: auto !important;
    margin-inline: auto;
  }

  #cw-editor-canvas,
  .cw-design-editor__canvas-wrap .lower-canvas,
  .cw-design-editor__canvas-wrap .upper-canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    background: transparent !important;
  }
}

.cw-design-editor__views {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.cw-design-editor__views-rail {
  display: none;
}

.cw-design-editor__views-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.cw-design-editor__view-btn {
  display: inline-flex;
  min-height: 3.5rem;
  min-width: 3.5rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  border: 1px solid #d4d4d4;
  border-radius: 0.25rem;
  background: #fff;
  padding: 0.25rem 0.5rem;
  font-size: 11px;
  font-weight: 600;
  color: #404040;
  cursor: pointer;
}

.cw-design-editor__view-btn.is-active {
  border-color: #0a0a0a;
  color: #0a0a0a;
}

.cw-design-editor__view-btn img {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
}

/* Strzałki i kropki — tylko mobile */
.cw-design-editor__view-nav,
.cw-design-editor__view-dots {
  display: none;
}

.cw-design-editor__views--solo .cw-design-editor__view-nav {
  display: none !important;
}

.cw-design-editor__right {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 0.5rem;
  overflow: hidden;
  background: #f3f3f3;
  padding: 1rem;
  font-size: 15px;
}

@media (min-width: 901px) {
  .cw-design-editor__right {
    height: 100dvh;
    border-left: 1px solid #fff;
    padding: 1.25rem;
  }

  .cw-design-editor__right-bottom {
    display: flex;
    flex-direction: column;
    margin-top: auto;
    width: 100%;
  }

  .cw-design-editor__panel--summary {
    margin-top: 0;
    padding-bottom: 0;
  }

  .cw-design-editor__summary-foot {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.625rem;
    margin-top: 0.5rem;
  }

  .cw-design-editor__size-guide-link {
    align-self: flex-end;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    color: #0a0a0a;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
  }

  .cw-design-editor__size-guide-link:hover {
    opacity: 0.75;
  }
}

.cw-design-editor__panel {
  border-top: 4px solid #fff;
  background: #f3f3f3;
  padding-block: 0.75rem;
}

.cw-design-editor__panel-title {
  margin-bottom: 0.5rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #404040;
}

@media (min-width: 901px) {
  .cw-design-editor__panel-title {
    font-size: 12px;
  }
}

@media (min-width: 901px) {
  .cw-design-editor__panel--product-color .cw-design-editor__swatches--variants {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .cw-design-editor__panel--product-color .cw-design-editor__swatch {
    display: block !important;
    position: relative;
    aspect-ratio: 1;
    width: 100% !important;
    height: auto !important;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    border-radius: 0.375rem;
    background: #fff;
    padding: 0;
    cursor: pointer;
  }

  .cw-design-editor__panel--product-color .cw-design-editor__swatch::after {
    content: none !important;
  }

  .cw-design-editor__panel--product-color .cw-design-editor__swatch img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    object-position: center;
    padding: 2px;
  }

  .cw-design-editor__panel--product-color .cw-design-editor__swatch.is-active {
    border: 2px solid #0a0a0a;
    box-shadow: 0 2px 10px rgb(15 23 42 / 0.12);
    transform: scale(1.02);
  }

  .cw-design-editor__pickers--desktop {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
}

.cw-design-editor__dropdown {
  position: relative;
  width: 100%;
}

.cw-design-editor__dropdown-trigger {
  display: flex;
  width: 100%;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border: 1px solid #d4d4d4;
  background: #fff;
  padding: 0.625rem 0.75rem;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: #0a0a0a;
}

@media (min-width: 901px) {
  .cw-design-editor__dropdown-trigger {
    padding: 0.75rem 0.875rem;
    font-size: 15px;
  }
}

.cw-design-editor__dropdown-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  background: #fff;
  padding-block: 0.5rem;
  box-shadow: 0 10px 25px rgb(0 0 0 / 0.1);
}

@media (min-width: 901px) {
  .cw-design-editor__right-bottom .cw-design-editor__dropdown-menu {
    top: auto;
    bottom: calc(100% + 6px);
  }
}

.cw-design-editor__dropdown-menu[hidden] {
  display: none !important;
}

.cw-design-editor__dropdown-item {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 14px;
  color: #0a0a0a;
  cursor: pointer;
}

.cw-design-editor__dropdown-item:hover {
  background: #f5f5f5;
}

.cw-design-editor__summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 15px;
  color: #404040;
}

.cw-design-editor__cart-action {
  position: relative;
  width: 100%;
}

.cw-design-editor__cta {
  display: inline-flex;
  min-height: 2.5rem;
  width: 100%;
  align-items: center;
  justify-content: center;
  border: 1px solid #0a0a0a;
  border-radius: 0.25rem;
  background: #0a0a0a;
  padding: 0.5rem 0.75rem;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  cursor: pointer;
}

@media (min-width: 901px) {
  .cw-design-editor__cta {
    min-height: 2.75rem;
    font-size: 15px;
  }
}

.cw-design-editor__cart-hint {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 40;
  max-width: min(18rem, calc(100vw - 2rem));
  transform: translateX(-50%);
  border-radius: 0.5rem;
  border: 1px solid #e5e5e5;
  background: #0a0a0a;
  padding: 0.625rem 0.875rem;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.375;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 10px 25px rgb(0 0 0 / 0.15);
  transition: opacity 0.2s ease;
}

.cw-design-editor__cart-hint.is-visible {
  opacity: 1;
}

.cw-design-editor__cart-hint::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: #0a0a0a;
}

.cw-design-editor__notice {
  margin-top: 0.75rem;
  font-size: 12px;
  font-weight: 500;
  color: #dc2626;
}

.cw-design-editor__notice[hidden],
.cw-design-editor__cart-hint[hidden] {
  display: none !important;
}

.cw-design-editor__text-toolbar[hidden] {
  display: none !important;
}

/* Desktop — ukryj chrome mobile */
@media (min-width: 901px) {
  .cw-design-editor__mobile-top,
  .cw-design-editor__mobile-tools,
  .cw-design-editor__mobile-top-cloud-backdrop {
    display: none !important;
  }
}

/* Mobile kreator — panel jak w oryginale (poza @layer) */
@media (max-width: 900px) {
  .cw-design-editor {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100dvh !important;
    max-width: none !important;
    padding: 0 !important;
    background: #f3f3f3 !important;
  }

  .cw-design-editor__left,
  .cw-design-editor__right,
  .cw-design-editor__stage-head {
    display: none !important;
  }

  .cw-design-editor__mobile-top {
    display: flex !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    z-index: 1020 !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: calc(1rem + env(safe-area-inset-top, 0px)) 16px 0 !important;
  }

  .cw-design-editor__mobile-top-center {
    display: flex !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    justify-content: center !important;
    padding-inline: 4px !important;
  }

  .cw-design-editor__mobile-cloud-wrap {
    position: relative !important;
    z-index: 1030 !important;
  }

  .cw-design-editor__mobile-top-pill {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    max-height: 44px !important;
    height: 44px !important;
    border: 1px solid rgb(229 229 229 / 90%) !important;
    border-radius: 999px !important;
    background: rgb(255 255 255 / 95%) !important;
    color: #0a0a0a !important;
    box-shadow: 0 4px 14px rgb(15 23 42 / 8%) !important;
  }

  .cw-design-editor__mobile-top-pill--history {
    gap: 0 !important;
    overflow: hidden !important;
    padding: 0 4px !important;
  }

  .cw-design-editor__mobile-top-pill-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    color: #0a0a0a !important;
  }

  .cw-design-editor__mobile-top-pill-btn svg {
    width: 18px !important;
    height: 18px !important;
  }

  .cw-design-editor__mobile-top-pill--color {
    gap: 8px !important;
    max-width: min(100%, 16rem) !important;
    padding: 0 12px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
  }

  .cw-design-editor__mobile-top-pill-dot {
    box-sizing: border-box !important;
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
    border: 2px solid #fff !important;
    border-radius: 999px !important;
    box-shadow:
      0 0 0 1px rgb(100 116 139 / 22%),
      0 3px 10px rgb(15 23 42 / 10%) !important;
  }

  .cw-design-editor__mobile-top-pill-label {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    text-align: left !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
  }

  .cw-design-editor__mobile-top-pill-chevron {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
  }

  .cw-design-editor__mobile-top-pill--more {
    width: 44px !important;
    flex-shrink: 0 !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  .cw-design-editor__mobile-top-pill-more-icon {
    width: 20px !important;
    height: 20px !important;
    fill: currentColor !important;
  }

  .cw-design-editor__mobile-cloud-wrap.is-open .cw-design-editor__mobile-top-pill-chevron {
    transform: rotate(180deg) !important;
    color: #0a0a0a !important;
  }

  .cw-design-editor__mobile-cloud-wrap.is-open .cw-design-editor__mobile-top-pill--color,
  .cw-design-editor__mobile-cloud-wrap.is-open .cw-design-editor__mobile-top-pill--more {
    box-shadow:
      0 4px 14px rgb(15 23 42 / 8%),
      0 0 0 2px rgb(10 10 10 / 8%) !important;
  }

  .cw-design-editor__mobile-cloud {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    z-index: 1031 !important;
    border: 1px solid rgb(0 0 0 / 6%) !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 8px 24px rgb(0 0 0 / 12%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-10px) !important;
    transition:
      opacity 0.25s ease,
      transform 0.25s ease,
      visibility 0.25s !important;
  }

  .cw-design-editor__mobile-cloud-wrap.is-open .cw-design-editor__mobile-cloud {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  .cw-design-editor__mobile-cloud--swatches {
    left: 50% !important;
    width: max-content !important;
    max-width: min(200px, calc(100vw - 2rem)) !important;
    padding: 12px !important;
    transform: translate(-50%, -10px) !important;
  }

  .cw-design-editor__mobile-cloud-wrap.is-open .cw-design-editor__mobile-cloud--swatches {
    transform: translate(-50%, 0) !important;
  }

  .cw-design-editor__mobile-cloud-swatch-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-content: flex-start !important;
    gap: 10px !important;
    max-width: 12.5rem !important;
    max-height: min(50dvh, 280px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .cw-design-editor__mobile-cloud--swatches .cw-design-editor__swatch--cloud {
    position: relative !important;
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid rgb(0 0 0 / 8%) !important;
    border-radius: 9999px !important;
    overflow: hidden !important;
    background: #f5f5f5 !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
  }

  .cw-design-editor__mobile-cloud--swatches .cw-design-editor__swatch--cloud::after {
    content: none !important;
  }

  .cw-design-editor__mobile-cloud--swatches .cw-design-editor__swatch--cloud span {
    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;
  }

  .cw-design-editor__mobile-cloud--swatches .cw-design-editor__swatch--cloud img {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: cover !important;
  }

  .cw-design-editor__mobile-cloud--swatches .cw-design-editor__swatch--cloud.is-active {
    z-index: 1 !important;
    border: 2px solid #fff !important;
    outline: none !important;
    box-shadow:
      0 0 0 1px rgb(100 116 139 / 38%),
      0 0 0 3px #fff,
      0 6px 18px -4px rgb(15 23 42 / 18%) !important;
  }

  .cw-design-editor__mobile-cloud--menu {
    right: 0 !important;
    left: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    width: min(220px, calc(100vw - 2rem)) !important;
    min-width: 200px !important;
    padding: 8px !important;
    box-sizing: border-box !important;
  }

  .cw-design-editor__mobile-cloud-wrap.is-open .cw-design-editor__mobile-cloud--menu {
    transform: translateY(0) !important;
  }

  .cw-design-editor__mobile-cloud--menu .cw-design-editor__mobile-cloud-item,
  a.cw-design-editor__mobile-cloud-item,
  span.cw-design-editor__mobile-cloud-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: transparent !important;
    padding: 12px 14px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    color: #262626 !important;
    text-align: left !important;
    text-decoration: none !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent !important;
    appearance: none !important;
    -webkit-appearance: none !important;
  }

  a.cw-design-editor__mobile-cloud-item:hover,
  a.cw-design-editor__mobile-cloud-item:active {
    background: #f8fafc !important;
    color: #0a0a0a !important;
  }

  .cw-design-editor__mobile-cloud-item--disabled,
  span.cw-design-editor__mobile-cloud-item--disabled {
    color: #a3a3a3 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
  }

  .cw-design-editor__mobile-cloud-item--disabled:hover,
  .cw-design-editor__mobile-cloud-item--disabled:active {
    background: transparent !important;
  }

  .cw-design-editor__mobile-cloud-item svg {
    display: block !important;
    flex: 0 0 auto !important;
    width: 18px !important;
    height: 18px !important;
    color: #64748b !important;
  }

  .cw-design-editor__mobile-cloud-item svg:not([data-cw-cloud-icon-fill]) {
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
  }

  .cw-design-editor__mobile-cloud-item svg[data-cw-cloud-icon-fill] {
    fill: none !important;
  }

  .cw-design-editor__mobile-cloud-item svg[data-cw-cloud-icon-fill] circle {
    fill: currentColor !important;
    stroke: none !important;
  }

  .cw-design-editor__mobile-cloud-item svg[data-cw-cloud-icon-fill] path {
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
  }

  .cw-design-editor__mobile-cloud-sep {
    display: block !important;
    height: 1px !important;
    margin: 4px 8px !important;
    background: #f1f5f9 !important;
  }

  .cw-design-editor__stage {
    display: flex !important;
    width: 100% !important;
    height: 100dvh !important;
    min-height: 0 !important;
    flex-direction: column !important;
    justify-content: center !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding-top: calc(52px + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: calc(5.75rem + 2.75rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  .cw-design-editor__canvas-wrap {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    flex: 1 1 auto !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    margin-inline: auto !important;
  }

  .cw-design-editor__canvas-wrap .canvas-container {
    --cw-editor-side-pad: 8px;
    --cw-editor-chrome-top: calc(52px + env(safe-area-inset-top, 0px));
    --cw-editor-chrome-bottom: calc(5.75rem + 2.75rem + env(safe-area-inset-bottom, 0px));
    --cw-editor-max-w: calc(100vw - var(--cw-editor-side-pad) * 2);
    --cw-editor-max-h: calc(100dvh - var(--cw-editor-chrome-top) - var(--cw-editor-chrome-bottom));
    width: min(var(--cw-editor-max-w), calc(var(--cw-editor-max-h) * 860 / 620)) !important;
    max-width: var(--cw-editor-max-w) !important;
    max-height: var(--cw-editor-max-h) !important;
    aspect-ratio: 860 / 620 !important;
    height: auto !important;
    overflow: visible !important;
    background: transparent !important;
  }

  .cw-design-editor__views {
    position: static !important;
    inset: auto !important;
    bottom: auto !important;
    z-index: auto !important;
    display: contents !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    pointer-events: none !important;
  }

  .cw-design-editor__views-rail {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 30 !important;
    display: flex !important;
    width: max-content !important;
    max-width: calc(100vw - 24px) !important;
    margin: 0 !important;
    padding-inline: 12px !important;
    box-sizing: border-box !important;
    transform: translateX(-50%) !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    pointer-events: auto !important;
  }

  .cw-design-editor__views-picker {
    display: none !important;
  }

  .cw-design-editor__views--solo .cw-design-editor__views-rail {
    display: none !important;
  }

  .cw-design-editor__view-btn {
    display: none !important;
  }

  .cw-design-editor__view-nav {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
    width: 2.5rem !important;
    height: 2.5rem !important;
    border: 1px solid #d4d4d4 !important;
    border-radius: 9999px !important;
    background: #fff !important;
    color: #0a0a0a !important;
    cursor: pointer !important;
  }

  .cw-design-editor__view-nav svg {
    width: 1.25rem !important;
    height: 1.25rem !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2.25 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
  }

  .cw-design-editor__view-dots {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-width: 0 !important;
  }

  .cw-design-editor__view-dots span {
    display: block !important;
    flex: 0 0 auto !important;
    width: 6px !important;
    height: 6px !important;
    border-radius: 9999px !important;
    background: #0a0a0a !important;
  }

  .cw-design-editor__view-dots span.is-active {
    width: 10px !important;
    height: 10px !important;
    background: #fff !important;
    box-shadow: 0 0 0 2px #0a0a0a !important;
  }

  .cw-design-editor .bottom-nav.cw-design-editor__mobile-tools {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 1000 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    border-top-left-radius: 20px !important;
    border-top-right-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 -4px 20px rgb(0 0 0 / 8%) !important;
  }

  .cw-design-editor .bottom-nav .cw-design-editor__cart-action--nav {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    align-self: stretch !important;
  }

  .cw-design-editor .bottom-nav .nav-item {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    color: #757575 !important;
    font: inherit !important;
    text-decoration: none !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .cw-design-editor .bottom-nav .nav-item svg {
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
  }

  .cw-design-editor .bottom-nav .nav-item span {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
  }

  .cw-design-editor .bottom-nav .nav-item.cart-btn {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    border-radius: 12px !important;
    background-color: #000 !important;
    color: #fff !important;
    padding: 10px 6px !important;
    box-shadow: 0 4px 12px rgb(0 0 0 / 15%) !important;
  }

  .cw-design-editor .bottom-nav .nav-item.cart-btn span {
    color: #fff !important;
    font-weight: 600 !important;
  }

  .cw-design-editor .cw-design-editor__text-toolbar:not([hidden]) ~ nav.bottom-nav.cw-design-editor__mobile-tools,
  .cw-design-editor.cw-design-editor--mobile-top-cloud-open nav.bottom-nav.cw-design-editor__mobile-tools,
  .cw-design-editor.cw-design-editor--upload-open nav.bottom-nav.cw-design-editor__mobile-tools,
  .cw-design-editor.cw-design-editor--product-sheet-open nav.bottom-nav.cw-design-editor__mobile-tools,
  body.cw-upload-sheet-open .cw-design-editor .bottom-nav.cw-design-editor__mobile-tools,
  body.cw-product-sheet-open .cw-design-editor .bottom-nav.cw-design-editor__mobile-tools {
    display: none !important;
  }

  .cw-design-editor__mobile-top-cloud-backdrop {
    display: none !important;
  }

  .cw-design-editor--mobile-top-cloud-open .cw-design-editor__mobile-top-cloud-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 1010 !important;
    background: rgb(15 23 42 / 22%) !important;
  }
}

/* Popup „Dodaj własny obraz” — layout poza @layer */
.cw-design-editor__modal.cw-design-editor__modal--upload:not([hidden]) {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 10050 !important;
  padding: 16px !important;
}

.cw-design-editor__modal--upload .cw-design-editor__modal-backdrop {
  position: absolute !important;
  inset: 0 !important;
}

.cw-design-editor__upload-sheet-head,
.cw-design-editor__upload-desktop-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
}

.cw-design-editor__upload-sheet-title {
  margin: 0 !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: #0a0a0a !important;
  text-align: left !important;
}

.cw-design-editor__upload-sheet-close {
  display: inline-flex !important;
  flex-shrink: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  cursor: pointer !important;
}

.cw-design-editor__upload-desktop-copy {
  margin: 0 0 16px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  color: #737373 !important;
}

.cw-design-editor__upload-card.cw-design-editor__upload-card--desktop {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 0 0 16px !important;
  padding: 32px 20px !important;
  border: 2px dashed #e5e5e5 !important;
  border-radius: 16px !important;
  background: #fafafa !important;
  text-align: center !important;
  cursor: pointer !important;
}

.cw-design-editor__upload-card .cw-design-editor__upload-title,
.cw-design-editor__upload-card .cw-design-editor__upload-meta {
  display: block !important;
  width: 100% !important;
}

.cw-design-editor__upload-card .cw-design-editor__upload-title {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #0a0a0a !important;
}

.cw-design-editor__upload-card .cw-design-editor__upload-meta {
  max-width: 100% !important;
  font-size: 12px !important;
  color: #737373 !important;
}

.cw-design-editor__upload-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 56px !important;
  height: 56px !important;
  margin-bottom: 4px !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 4px 12px rgb(0 0 0 / 5%) !important;
}

.cw-design-editor__upload-sheet-action,
.cw-design-editor__upload-sheet-action.cw-design-editor__upload-desktop-action {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 0 0 16px !important;
  padding: 14px 16px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #0a0a0a !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #fff !important;
  cursor: pointer !important;
}

.cw-design-editor__upload-sheet-legal,
.cw-design-editor__upload-sheet-legal.cw-design-editor__upload-desktop-legal {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 11px !important;
  line-height: 1.45 !important;
  color: #737373 !important;
  text-align: center !important;
}

.cw-design-editor__upload-sheet-legal a {
  color: #525252 !important;
  font-weight: 500 !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
}

@media (min-width: 901px) {
  .cw-design-editor__modal--upload .cw-design-editor__upload-sheet {
    display: none !important;
  }

  .cw-design-editor__modal-dialog.cw-design-editor__modal-dialog--upload-desktop {
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    z-index: 1 !important;
    width: 100% !important;
    max-width: 420px !important;
    margin: 0 !important;
    padding: 24px !important;
    border-radius: 24px !important;
    background: #fff !important;
    text-align: left !important;
    box-shadow: 0 20px 40px rgb(0 0 0 / 15%) !important;
  }
}

@media (max-width: 900px) {
  .cw-design-editor__modal--upload .cw-design-editor__modal-dialog--upload-desktop {
    display: none !important;
  }

  .cw-design-editor__modal--upload {
    align-items: flex-end !important;
    justify-content: flex-end !important;
    padding: 0 !important;
  }

  .cw-design-editor__modal--upload .cw-design-editor__upload-sheet {
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    z-index: 1 !important;
    width: 100% !important;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 20px 20px 0 0 !important;
    background: #fff !important;
    box-shadow: 0 -10px 40px rgb(15 23 42 / 14%) !important;
  }
}

/* Panel wariantu + tabela rozmiarów — poza @layer */
.cw-design-editor__modal.cw-design-editor__modal--product:not([hidden]),
.cw-design-editor__modal.cw-design-editor__modal--size-guide:not([hidden]) {
  display: flex !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 10050 !important;
  margin: 0 !important;
  padding: 0 !important;
  animation: cw-editor-fade-in 180ms ease-out !important;
}

.cw-design-editor__modal--product .cw-design-editor__modal-backdrop,
.cw-design-editor__modal--size-guide .cw-design-editor__modal-backdrop {
  position: absolute !important;
  inset: 0 !important;
  background: rgb(0 0 0 / 45%) !important;
  backdrop-filter: blur(4px) !important;
}

.cw-design-editor__product-sheet-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 16px !important;
}

.cw-design-editor__product-sheet-head-text {
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.cw-design-editor__product-sheet-eyebrow {
  margin: 0 0 4px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: #737373 !important;
}

.cw-design-editor__product-sheet-title {
  margin: 0 !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: #0a0a0a !important;
}

.cw-design-editor__product-sheet-close {
  display: inline-flex !important;
  flex-shrink: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  border: 0 !important;
  border-radius: 9999px !important;
  background: #f5f5f5 !important;
  padding: 0 !important;
  color: #0a0a0a !important;
  cursor: pointer !important;
}

.cw-design-editor__product-sheet-scroll {
  max-height: min(52dvh, 420px) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  padding-right: 2px !important;
}

.cw-design-editor__product-sheet-section + .cw-design-editor__product-sheet-section {
  margin-top: 20px !important;
  padding-top: 20px !important;
  border-top: 1px solid #f5f5f5 !important;
}

.cw-design-editor__product-sheet-label {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  gap: 4px 6px !important;
  margin: 0 0 12px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: #0a0a0a !important;
}

.cw-design-editor__product-sheet-label span {
  font-weight: 800 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

.cw-design-editor__product-sheet-size-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
  min-width: 0 !important;
}

.cw-design-editor__product-sheet-size-head .cw-design-editor__product-sheet-label {
  margin-bottom: 0 !important;
}

.cw-design-editor__product-sheet-size-guide {
  flex: 0 0 auto !important;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #0a0a0a !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
  white-space: nowrap !important;
  cursor: pointer !important;
}

.cw-design-editor__product-sheet-colors {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.cw-design-editor__product-sheet-colors .cw-design-editor__swatch--thumb {
  display: block !important;
  position: relative !important;
  aspect-ratio: 1 / 1 !important;
  width: 100% !important;
  height: auto !important;
  overflow: hidden !important;
  border: 1px solid #e5e5e5 !important;
  border-radius: 8px !important;
  background: #fff !important;
  padding: 0 !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

.cw-design-editor__product-sheet-colors .cw-design-editor__swatch--thumb::after,
.cw-design-editor__product-sheet-colors .cw-design-editor__swatch--thumb span {
  display: none !important;
}

.cw-design-editor__product-sheet-colors .cw-design-editor__swatch--thumb img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  padding: 2px !important;
}

.cw-design-editor__product-sheet-colors .cw-design-editor__swatch--thumb.is-active {
  border: 2px solid #0a0a0a !important;
  box-shadow: 0 2px 10px rgb(15 23 42 / 12%) !important;
  transform: scale(1.02) !important;
}

.cw-design-editor__product-sheet-sizes {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.cw-design-editor__product-sheet-sizes .cw-design-editor__size-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 40px !important;
  border: 1px solid #e5e5e5 !important;
  border-radius: 8px !important;
  background: #fff !important;
  padding: 0 8px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #0a0a0a !important;
  cursor: pointer !important;
}

.cw-design-editor__product-sheet-sizes .cw-design-editor__size-btn.is-active {
  border-color: #0a0a0a !important;
  background: #0a0a0a !important;
  color: #fff !important;
}

.cw-design-editor__product-sheet-sizes .cw-design-editor__size-btn.is-disabled,
.cw-design-editor__product-sheet-sizes .cw-design-editor__size-btn:disabled {
  border-color: #e5e5e5 !important;
  background: #e5e5e5 !important;
  color: #a3a3a3 !important;
  cursor: not-allowed !important;
  opacity: 0.7 !important;
}

.cw-design-editor__product-sheet-shop-link {
  display: block !important;
  margin-top: 20px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #525252 !important;
  text-align: center !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
}

.cw-design-editor__size-guide-dialog {
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  max-width: 980px !important;
  border-radius: 24px !important;
  background: #fff !important;
  padding: 24px !important;
  box-shadow: 0 20px 40px rgb(0 0 0 / 15%) !important;
  text-align: left !important;
}

.cw-design-editor__modal-close {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  border: 0 !important;
  border-radius: 9999px !important;
  background: #f5f5f5 !important;
  font-size: 22px !important;
  line-height: 1 !important;
  color: #0a0a0a !important;
  cursor: pointer !important;
}

.cw-design-editor__size-guide-title {
  margin: 0 48px 16px 0 !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  color: #0a0a0a !important;
}

.cw-design-editor__size-guide-intro,
.cw-design-editor__size-guide-desc {
  margin: 0 0 8px !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  color: #262626 !important;
}

.cw-design-editor__size-guide-desc {
  margin-bottom: 16px !important;
}

.cw-design-editor__size-guide-grid {
  display: grid !important;
  align-items: end !important;
  gap: 24px !important;
}

.cw-design-editor__size-guide-image {
  display: block !important;
  width: 100% !important;
  max-width: 210px !important;
  height: auto !important;
  object-fit: contain !important;
}

.cw-design-editor__size-guide-legend {
  margin-top: 12px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.6 !important;
  color: #0a0a0a !important;
}

.cw-design-editor__size-table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  text-align: left !important;
}

.cw-design-editor__size-table th {
  border-bottom: 1px solid #d4d4d4 !important;
  padding: 8px 12px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #0a0a0a !important;
}

.cw-design-editor__size-table td {
  padding: 8px 12px !important;
  font-size: 16px !important;
  color: #262626 !important;
}

.cw-design-editor__size-table tbody tr:nth-child(even) td {
  background: #f5f5f5 !important;
}

.cw-design-editor__size-guide-empty {
  margin: 0 !important;
  border: 1px dashed #d4d4d4 !important;
  border-radius: 12px !important;
  padding: 40px 16px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #525252 !important;
  text-align: center !important;
}

@media (min-width: 901px) {
  .cw-design-editor__modal--product {
    display: none !important;
  }

  .cw-design-editor__modal--size-guide:not([hidden]) {
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
  }

  .cw-design-editor__size-guide-grid {
    grid-template-columns: 220px minmax(0, 1fr) !important;
  }
}

@media (max-width: 900px) {
  .cw-design-editor__modal--product:not([hidden]),
  .cw-design-editor__modal--size-guide:not([hidden]) {
    align-items: flex-end !important;
    justify-content: flex-end !important;
  }

  .cw-design-editor__product-sheet {
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    z-index: 1 !important;
    width: 100% !important;
    max-width: none !important;
    padding: 20px 20px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 20px 20px 0 0 !important;
    background: #fff !important;
    box-shadow: 0 -10px 40px rgb(15 23 42 / 14%) !important;
    box-sizing: border-box !important;
  }

  .cw-design-editor__size-guide-dialog {
    width: 100% !important;
    max-width: none !important;
    max-height: min(88dvh, calc(100dvh - 1rem)) !important;
    overflow: auto !important;
    border-radius: 20px 20px 0 0 !important;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    box-sizing: border-box !important;
  }

  .cw-design-editor__size-guide-title {
    margin-bottom: 12px !important;
    font-size: 20px !important;
  }

  .cw-design-editor__size-guide-intro,
  .cw-design-editor__size-guide-desc {
    font-size: 14px !important;
  }

  .cw-design-editor__size-guide-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .cw-design-editor__size-guide-image {
    max-width: 150px !important;
  }

  .cw-design-editor__size-guide-legend {
    font-size: 12px !important;
  }

  .cw-design-editor__size-table th,
  .cw-design-editor__size-table td {
    padding: 6px 8px !important;
    font-size: 14px !important;
  }
}

/* Mobile — panel „Styl tekstu” (poza @layer) */
@media (max-width: 900px) {
  .cw-design-editor__text-toolbar:not([hidden]) {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    z-index: 10040 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    background: #fff !important;
    box-shadow: 0 -4px 20px rgb(0 0 0 / 12%) !important;
    transform: none !important;
  }

  .cw-design-editor__text-toolbar-track,
  .cw-design-editor__text-nav,
  .cw-design-editor__text-divider,
  .cw-design-editor__text-toolbar > .cw-design-editor__text-size,
  .cw-design-editor__text-toolbar > .cw-design-editor__text-color,
  .cw-design-editor__text-toolbar > button[data-cw-text-action]:not(.cw-design-editor__text-mobile-tab):not(.cw-design-editor__text-mobile-icon-btn):not(.cw-design-editor__text-mobile-done) {
    display: none !important;
  }

  .cw-design-editor__text-mobile-sheet {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: none !important;
    max-height: min(78dvh, calc(100dvh - 4.5rem - env(safe-area-inset-top, 0px))) !important;
    overflow-y: auto !important;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    box-sizing: border-box !important;
    background: #fff !important;
  }

  .cw-design-editor__text-mobile-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
  }

  .cw-design-editor__text-mobile-title {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #0a0a0a !important;
  }

  .cw-design-editor__text-mobile-done {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    color: #0a0a0a !important;
    cursor: pointer !important;
  }

  .cw-design-editor__text-mobile-done svg {
    width: 24px !important;
    height: 24px !important;
  }

  .cw-design-editor__text-mobile-tabs {
    display: flex !important;
    align-items: stretch !important;
    gap: 8px !important;
    min-width: 0 !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid #e5e5e5 !important;
  }

  .cw-design-editor__text-mobile-tabs-scroll {
    display: flex !important;
    flex: 1 1 auto !important;
    align-items: center !important;
    gap: 4px !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }

  .cw-design-editor__text-mobile-tabs-scroll::-webkit-scrollbar {
    display: none !important;
  }

  .cw-design-editor__text-mobile-tab {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 8px 12px !important;
    border: 0 !important;
    border-radius: 9999px !important;
    background: transparent !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: #737373 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
  }

  .cw-design-editor__text-mobile-tab.is-active {
    background: #f5f5f5 !important;
    color: #0a0a0a !important;
  }

  .cw-design-editor__text-mobile-tab--write {
    color: #0a0a0a !important;
  }

  .cw-design-editor__text-mobile-tab-icons {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    gap: 8px !important;
    color: #737373 !important;
  }

  .cw-design-editor__text-mobile-icon-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    color: #525252 !important;
    cursor: pointer !important;
  }

  .cw-design-editor__text-mobile-icon-btn--danger {
    color: #ef4444 !important;
  }

  .cw-design-editor__text-mobile-icon-btn svg {
    width: 20px !important;
    height: 20px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
  }

  .cw-design-editor__text-tab-panel[hidden] {
    display: none !important;
  }

  .cw-design-editor__text-tab-panel:not([hidden]) {
    display: block !important;
    min-width: 0 !important;
  }

  .cw-design-editor__format-buttons {
    display: flex !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
  }

  .cw-design-editor__format-buttons button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 48px !important;
    height: 48px !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 8px !important;
    background: #fff !important;
    font-size: 18px !important;
    color: #0a0a0a !important;
    cursor: pointer !important;
  }

  .cw-design-editor__format-buttons button.is-active,
  .cw-design-editor__format-buttons button:active {
    border-color: #a3a3a3 !important;
    background: #f5f5f5 !important;
  }

  .cw-design-editor__align-buttons {
    display: flex !important;
    width: 100% !important;
    overflow: hidden !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 8px !important;
  }

  .cw-design-editor__align-buttons button {
    display: flex !important;
    flex: 1 1 0 !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    min-height: 64px !important;
    border: 0 !important;
    border-right: 1px solid #e5e5e5 !important;
    background: #fff !important;
    padding: 8px 4px !important;
    color: #737373 !important;
    cursor: pointer !important;
  }

  .cw-design-editor__align-buttons button:last-child {
    border-right: 0 !important;
  }

  .cw-design-editor__align-buttons button.is-active {
    background: #f5f5f5 !important;
    color: #0a0a0a !important;
  }

  .cw-design-editor__align-label {
    font-size: 10px !important;
    font-weight: 500 !important;
  }

  .cw-design-editor__align-buttons svg {
    width: 20px !important;
    height: 20px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
  }

  .cw-design-editor__text-font-cards {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    overflow-x: auto !important;
    padding: 2px 2px 8px !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
  }

  .cw-design-editor__text-font-cards-col {
    display: flex !important;
    flex: 0 0 calc(50% - 5px) !important;
    flex-direction: column !important;
    gap: 8px !important;
    min-width: calc(50% - 5px) !important;
    scroll-snap-align: start !important;
  }

  .cw-design-editor__text-font-card {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 52px !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 6px !important;
    background: #f5f5f5 !important;
    padding: 10px 8px !important;
    text-align: center !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #0a0a0a !important;
    cursor: pointer !important;
  }

  .cw-design-editor__text-font-card.is-active {
    border-color: #0a0a0a !important;
    background: #fff !important;
    box-shadow: inset 0 0 0 2px #0a0a0a !important;
  }

  .cw-design-editor__text-font-card-preview {
    display: block !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
  }

  .cw-design-editor__text-font-card-name {
    display: block !important;
    margin-top: 2px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #737373 !important;
  }

  .cw-design-editor__text-mobile-size {
    padding: 8px 0 !important;
    text-align: center !important;
  }

  .cw-design-editor__text-mobile-size-value {
    margin-bottom: 16px !important;
    font-size: 36px !important;
    font-weight: 700 !important;
    color: #0a0a0a !important;
  }

  .cw-design-editor__text-mobile-size-slider {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    font-size: 14px !important;
    color: #737373 !important;
  }

  .cw-design-editor__text-mobile-size-slider input[type='range'] {
    flex: 1 1 auto !important;
    min-height: 24px !important;
    margin: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background: transparent !important;
  }

  .cw-design-editor__text-mobile-size-slider input[type='range']::-webkit-slider-runnable-track {
    height: 6px !important;
    border-radius: 9999px !important;
    background: #e5e5e5 !important;
  }

  .cw-design-editor__text-mobile-size-slider input[type='range']::-webkit-slider-thumb {
    width: 24px !important;
    height: 24px !important;
    margin-top: -9px !important;
    border: 2px solid #0a0a0a !important;
    border-radius: 9999px !important;
    background: #fff !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    box-shadow: 0 2px 6px rgb(0 0 0 / 15%) !important;
  }

  .cw-design-editor__mobile-color-rows {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  .cw-design-editor__mobile-color-row {
    display: flex !important;
    justify-content: space-between !important;
    gap: 4px !important;
  }

  .cw-design-editor__mobile-color-row--trailing {
    justify-content: flex-end !important;
  }

  .cw-design-editor__mobile-swatch {
    position: relative !important;
    display: block !important;
    flex: 0 0 auto !important;
    width: 36px !important;
    height: 36px !important;
    border: 2px solid transparent !important;
    border-radius: 9999px !important;
    padding: 0 !important;
    cursor: pointer !important;
  }

  .cw-design-editor__mobile-swatch--light {
    border-color: #e5e5e5 !important;
  }

  .cw-design-editor__mobile-swatch--rainbow {
    border: 1px solid #e5e5e5 !important;
    background: linear-gradient(135deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f) !important;
  }

  .cw-design-editor__text-tab-panel[data-cw-text-panel='color'] .cw-design-editor__custom-color-view {
    border-radius: 16px !important;
    background: #fafafa !important;
    padding: 12px !important;
  }
}

@media (min-width: 901px) {
  .cw-design-editor__text-mobile-sheet {
    display: none !important;
  }

  /* Desktop — panel koloru czcionki */
  .cw-design-editor__text-color-panel[hidden] {
    display: none !important;
  }

  .cw-design-editor__text-color-panel {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 76px !important;
    z-index: 1030 !important;
    width: 270px !important;
    overflow: visible !important;
    border-right: 1px solid #e5e5e5 !important;
    background: #fff !important;
    box-shadow: 0 10px 30px rgb(0 0 0 / 12%) !important;
  }

  .cw-design-editor__text-color-panel > div {
    height: 100% !important;
    overflow-y: auto !important;
    padding: 24px 20px !important;
    box-sizing: border-box !important;
  }

  .cw-design-editor__text-color-close {
    position: absolute !important;
    right: -18px !important;
    top: 50% !important;
    z-index: 10 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 48px !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 9999px !important;
    background: #fff !important;
    padding: 0 !important;
    box-shadow: 0 4px 12px rgb(0 0 0 / 10%) !important;
    font-size: 28px !important;
    line-height: 1 !important;
    color: #0a0a0a !important;
    transform: translateY(-50%) !important;
    cursor: pointer !important;
  }

  .cw-design-editor__text-color-panel h2 {
    margin: 0 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #0a0a0a !important;
  }

  .cw-design-editor__text-color-panel p {
    margin: 4px 0 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #525252 !important;
  }

  .cw-design-editor__text-palette-view[hidden],
  .cw-design-editor__custom-color-view[hidden] {
    display: none !important;
  }

  .cw-design-editor__text-palette {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .cw-design-editor__text-palette button {
    display: block !important;
    width: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 9999px !important;
    box-shadow: 0 1px 2px rgb(0 0 0 / 6%) !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    transition: transform 0.15s ease !important;
  }

  .cw-design-editor__text-palette button:hover {
    transform: scale(1.05) !important;
  }

  .cw-design-editor__text-palette button.is-active {
    border: 2px solid #fff !important;
    outline: none !important;
    box-shadow:
      0 0 0 1px rgb(100 116 139 / 38%),
      0 0 0 3px #fff,
      0 4px 12px rgb(15 23 42 / 15%) !important;
  }

  .cw-design-editor__custom-color-btn {
    background: conic-gradient(red, #ff0, lime, cyan, blue, magenta, red) !important;
  }

  .cw-design-editor__custom-color-view header {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 12px !important;
  }

  .cw-design-editor__custom-color-view header button {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 24px !important;
    color: #0a0a0a !important;
    cursor: pointer !important;
  }

  .cw-design-editor__custom-color-view h2 {
    margin: 0 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    color: #0a0a0a !important;
  }

  .cw-design-editor__custom-color-square {
    position: relative !important;
    width: 100% !important;
    height: 152px !important;
    overflow: hidden !important;
    border-radius: 4px !important;
    background:
      linear-gradient(to top, #000, transparent),
      linear-gradient(to right, #fff, transparent),
      red !important;
    touch-action: none !important;
  }

  .cw-design-editor__custom-color-square span {
    position: absolute !important;
    width: 24px !important;
    height: 24px !important;
    border: 2px solid #fff !important;
    border-radius: 9999px !important;
    box-shadow: 0 0 0 1px rgb(0 0 0 / 55%) !important;
    transform: translate(-50%, -50%) !important;
  }

  .cw-design-editor__custom-color-hue {
    width: 100% !important;
    height: 16px !important;
    margin-top: 12px !important;
    border-radius: 9999px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background: linear-gradient(to right, red, #ff0, lime, cyan, blue, magenta, red) !important;
  }

  .cw-design-editor__custom-color-hue::-webkit-slider-thumb {
    width: 20px !important;
    height: 20px !important;
    border: 2px solid #fff !important;
    border-radius: 9999px !important;
    background: transparent !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    box-shadow: 0 0 0 1px rgb(0 0 0 / 55%) !important;
  }

  .cw-design-editor__custom-color-row {
    display: flex !important;
    gap: 8px !important;
    margin-top: 12px !important;
  }

  .cw-design-editor__custom-color-row span {
    display: block !important;
    width: 44px !important;
    height: 44px !important;
    flex-shrink: 0 !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 9999px !important;
    background: #fff !important;
  }

  .cw-design-editor__custom-color-row input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 44px !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 4px !important;
    padding: 0 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #0a0a0a !important;
  }
}
