#tpc-creator,
#tpc-set-summary {
  margin-top: 1rem;
}

#tpc-creator .btn,
#tpc-creator .btn-primary {
  border-radius: 0.35rem;
}

#tpc-creator .tpc-front-header {
  margin-bottom: 1.5rem;
}

#tpc-creator .tpc-front-header h1 {
  margin-bottom: .5rem;
  font-size: 2rem;
}

#tpc-creator .tpc-front-header p {
  color: #667085;
}

#tpc-creator .tpc-front-list {
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid #e0e5ec;
  border-radius: .35rem;
  background: #fff;
}

#tpc-creator .tpc-front-list>summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  cursor: pointer;
  color: #202735;
  font-size: 1.05rem;
  font-weight: 700;
  list-style: none;
}

#tpc-creator .tpc-front-list>summary::-webkit-details-marker {
  display: none;
}

#tpc-creator .tpc-list-title {
  min-width: 0;
}

#tpc-creator .tpc-list-total {
  color: #6b7280;
  font-size: .9em;
  font-weight: 600;
}

#tpc-creator .tpc-list-chevron {
  flex: 0 0 auto;
  margin-left: 1rem;
  transition: transform .2s ease;
}

#tpc-creator .tpc-front-list[open] > summary .tpc-list-chevron {
  transform: rotate(180deg);
}

#tpc-creator .tpc-front-products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1rem;
  border-top: 1px solid #edf0f4;
  background: #f8f9fb;
}

#tpc-creator .tpc-front-product {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  padding: .8rem;
  border: 1px solid #e5e8ed;
  border-radius: .35rem;
  background: #fff;
}

#tpc-creator .tpc-front-product-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 145px;
  margin-bottom: .7rem;
}

#tpc-creator .tpc-front-product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

#tpc-creator .tpc-front-product-name {
  flex: 1;
  margin-bottom: .5rem;
  color: #252b36;
  font-weight: 600;
  line-height: 1.3;
}

#tpc-creator .tpc-front-product-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .7rem;
  font-size: 1.05rem;
  font-weight: 700;
}

#tpc-creator .tpc-deposit-icon { display: inline-flex; color: #76AB00; }
#tpc-creator .tpc-deposit-icon[hidden] { display: none; }
#tpc-creator .tpc-variant-picker { min-height: 38px; margin-top: auto; margin-bottom: .7rem; }
#tpc-creator .tpc-variant-select { width: 100%; min-height: 38px; }

#tpc-creator .tpc-add-product {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
}

#tpc-creator .tpc-front-product.tpc-is-adding {
  pointer-events: none;
  opacity: .6;
  transform: scale(.98);
}

#tpc-creator .tpc-spin {
  animation: tpc-front-spin .8s linear infinite;
}

#tpc-creator .tpc-package-loader {
  position: fixed;
  z-index: 1000000;
  top: 0;
  left: 0;
  display: none;
  width: 100%;
  height: 100%;
  background: #363636;
  background: radial-gradient(circle, rgba(54, 54, 54, .8) 20%, rgba(255, 255, 255, .8) 100%);
}

#tpc-creator.loading .tpc-package-loader {
  display: block;
}

#tpc-creator .tpc-package-loader .centerer {
  position: relative;
  width: 100%;
  height: 100%;
}

#tpc-creator .tpc-package-loader #loader_brand {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0 0 0 -55px;
  animation: tpc-jump-shaking .83s infinite;
}

.page-package-creator #tpc-set-summary {
  position: sticky;
  top: 2rem;
}

.page-package-creator #tpc-set-summary .tpc-summary-card {
  overflow: hidden;
  border: 1px solid #dfe4eb;
  border-radius: .35rem;
  background-color: #fbfbfb;
  box-shadow: 0 .4rem 1.5rem rgba(31, 41, 55, .1);
}

.page-package-creator #tpc-set-summary .tpc-summary-title {
  position: relative;
  padding: 1rem;
  color: #000;
  font-size: 1rem;
  font-weight: 700;
}

.page-package-creator #tpc-set-summary .tpc-summary-count {
  float: right;
  min-width: 1.6rem;
  border-radius: .35rem;
  color: #2937a6;
  background: #fff;
  text-align: center;
}

.page-package-creator .tpc-mobile-summary-close,
.page-package-creator .tpc-mobile-summary-toggle,
.page-package-creator .tpc-mobile-summary-backdrop {
  display: none;
}

.page-package-creator #tpc-set-summary .tpc-summary-products {
  max-height: 330px;
  overflow-y: auto;
}

.page-package-creator #tpc-set-summary .tpc-summary-product {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 25px;
  gap: .55rem;
  align-items: center;
  padding: .75rem;
  border-bottom: 1px solid #edf0f4;
}

.page-package-creator #tpc-set-summary .tpc-summary-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
}

.page-package-creator #tpc-set-summary .tpc-summary-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.page-package-creator #tpc-set-summary .tpc-summary-details {
  min-width: 0;
}

.page-package-creator #tpc-set-summary .tpc-summary-details strong {
  display: block;
  overflow: hidden;
  font-size: .78rem;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.page-package-creator #tpc-set-summary .tpc-summary-details span {
  font-size: .78rem;
  font-weight: 700;
}

.page-package-creator #tpc-set-summary .tpc-summary-attributes { display: flex; flex-direction: column; margin: .2rem 0; color: #737d8d; }
.page-package-creator #tpc-set-summary .tpc-summary-attributes span { font-size: .68rem; font-weight: 400; }
.page-package-creator #tpc-set-summary .tpc-summary-purchase-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .35rem; }
.page-package-creator #tpc-set-summary .tpc-summary-line-price { flex: 0 0 auto; }
.page-package-creator #tpc-set-summary .tpc-summary-quantity { display: inline-flex; align-items: center; border: 1px solid #dfe4eb; border-radius: .3rem; }
.page-package-creator #tpc-set-summary .tpc-summary-quantity button { width: 24px; height: 25px; padding: 0; border: 0; color: #2937a6; background: #f1f3f8; font-weight: 700; cursor: pointer; }
.page-package-creator #tpc-set-summary .tpc-summary-quantity input { width: 34px; height: 25px; padding: 0; border: 0; border-right: 1px solid #dfe4eb; border-left: 1px solid #dfe4eb; text-align: center; -moz-appearance: textfield; }
.page-package-creator #tpc-set-summary .tpc-summary-quantity input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.page-package-creator #tpc-set-summary .tpc-summary-deposit { display: flex; align-items: center; gap: .25rem; margin-top: .35rem; color: #76AB00; }
.page-package-creator #tpc-set-summary .tpc-summary-deposit span { font-size: .7rem; font-weight: 500; }

.page-package-creator #tpc-set-summary .tpc-summary-remove {
  padding: 0;
  border: 0;
  color: #d63745;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
}

.page-package-creator #tpc-set-summary .tpc-summary-product.tpc-is-removing {
  opacity: .35;
  transform: scale(.95);
  transition: .2s ease;
}

.page-package-creator #tpc-set-summary .tpc-summary-empty {
  margin: 0;
  padding: 1.3rem;
  color: #7a8494;
  text-align: center;
}

.page-package-creator #tpc-set-summary .tpc-summary-totals {
  padding: .85rem 1rem;
  border-top: 1px solid #e8ebf0;
}

.page-package-creator #tpc-set-summary .tpc-summary-totals>div {
  display: flex;
  justify-content: space-between;
  margin-bottom: .3rem;
}

.page-package-creator #tpc-set-summary .tpc-summary-discount {
  color: #d3263c;
}

.page-package-creator #tpc-set-summary .tpc-summary-totals > .tpc-summary-final-total {
  margin-top: .65rem;
  margin-bottom: 0;
  padding-top: .65rem;
  border-top: 1px solid #dfe4eb;
  color: #202735;
  font-size: 1.05rem;
  font-weight: 700;
}

.page-package-creator #tpc-set-summary .tpc-next-threshold {
  display: flex;
  gap: .55rem;
  margin: 0 1rem 1rem;
  padding: .75rem;
  border-radius: .35rem;
  color: #898a8b;
  background: #f2f5f2;
  font-size: .8rem;
  line-height: 1.3;
  border-color: #dbe0dc;
}

.page-package-creator #tpc-set-summary .tpc-next-threshold i {
  font-size: 1.2rem;
}

.page-package-creator #tpc-set-summary .btn {
  width: calc(100% - 2rem);
  margin: 0 1rem .7rem;
}

@media (min-width: 360px) {
  #tpc-creator .tpc-front-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap:.1rem;
    padding: 1rem .1rem;
  }
  #tpc-creator .tpc-add-product {
    line-height: 12px;
  }
}
@media (min-width: 476px) {
  #tpc-creator .tpc-front-products {
    gap:1rem;
    padding: 1rem;
  }
  #tpc-creator .tpc-add-product {
    line-height: 21px;
  }
}
@media (min-width: 992px) {
  #tpc-creator .tpc-front-products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .page-package-creator #right-column {
    position: fixed;
    z-index: 1052;
    right: 0;
    bottom: 0;
    left: 0;
    display: block !important;
    width: 100%;
    max-width: none;
    max-height: min(88vh, 760px);
    padding: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transform: translateY(100%);
    transition: transform .25s ease, opacity .25s ease, visibility .25s ease;
  }

  .page-package-creator.tpc-mobile-summary-open #right-column {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .page-package-creator #tpc-set-summary {
    position: static;
    margin: 0;
  }

  .page-package-creator #tpc-set-summary .tpc-summary-card {
    display: flex;
    flex-direction: column;
    max-height: min(88vh, 88dvh);
    border: 0;
    border-radius: 1rem 1rem 0 0;
    box-shadow: 0 -.5rem 2rem rgba(0, 0, 0, .22);
  }

  .page-package-creator #tpc-set-summary .tpc-summary-products {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .page-package-creator #tpc-set-summary .tpc-summary-title,
  .page-package-creator #tpc-set-summary .tpc-summary-totals,
  .page-package-creator #tpc-set-summary .tpc-next-threshold,
  .page-package-creator #tpc-set-summary > .btn {
    flex: 0 0 auto;
  }

  .page-package-creator #tpc-set-summary .tpc-summary-title {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding-right: 3.25rem;
  }

  .page-package-creator #tpc-set-summary .tpc-summary-title-text {
    min-width: 0;
  }

  .page-package-creator #tpc-set-summary .tpc-summary-count {
    float: none;
  }

  .page-package-creator #tpc-set-summary .tpc-mobile-summary-close {
    position: absolute;
    top: .55rem;
    right: .65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    color: #202735;
    background: transparent;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
  }

  .page-package-creator .tpc-mobile-summary-toggle {
    position: fixed;
    z-index: 1050;
    right: .35rem;
    bottom: 4.35rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 46px;
    padding: .65rem 1rem;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: #000;
    box-shadow: 0 .35rem 1.2rem rgba(0, 0, 0, .3);
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
  }

  .page-package-creator.tpc-mobile-summary-open .tpc-mobile-summary-toggle {
    visibility: hidden;
    opacity: 0;
  }

  .page-package-creator .tpc-mobile-summary-cart,
  .page-package-creator .tpc-mobile-summary-chevron {
    flex: 0 0 auto;
  }

  .page-package-creator .tpc-mobile-summary-backdrop {
    position: fixed;
    z-index: 1051;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    visibility: hidden;
    opacity: 0;
    background: rgba(0, 0, 0, .42);
    transition: opacity .25s ease, visibility .25s ease;
  }

  .page-package-creator.tpc-mobile-summary-open .tpc-mobile-summary-backdrop {
    visibility: visible;
    opacity: 1;
  }

  .page-package-creator.tpc-mobile-summary-open {
    overflow: hidden;
  }

}

@keyframes tpc-front-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes tpc-jump-shaking {
  0% { transform: translateX(0); }
  25% { transform: translateY(-9px); }
  35% { transform: translateY(-9px) rotate(17deg); }
  55% { transform: translateY(-9px) rotate(-17deg); }
  65% { transform: translateY(-9px) rotate(17deg); }
  75% { transform: translateY(-9px) rotate(-17deg); }
  100% { transform: translateY(0) rotate(0); }
}


#tpc-creator .promo-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  max-width: 820px;
  width: 100%;
  margin-bottom: 24px;
}

#tpc-creator .promo-container > * {
  min-width: 0;
  width: 100%;
}

/* Karta Lewa - Promocja */
#tpc-creator .promo-card {
  position: relative;
  background: #ffffff;
  border: 1.5px solid #76AB00;
  border-radius: 12px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* Wstążka w lewym górnym rogu */
#tpc-creator .ribbon {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-top: 36px solid #2d2d2d;
  border-right: 36px solid transparent;
}

#tpc-creator .ribbon-check {
  position: absolute;
  top: -33px;
  left: 4px;
  color: #76AB00;
  width: 14px;
  height: 14px;
}

#tpc-creator .promo-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 10px;
}

#tpc-creator .promo-text-group {
  flex: 1;
}

#tpc-creator .title-main {
  font-size: 26px;
  font-weight: 800;
  color: #000000;
  line-height: 1.15;
}

#tpc-creator .discount-highlight {
  font-size: 58px;
  font-weight: 900;
  color: #76AB00;
  line-height: 1;
  margin: 4px 0 2px 0;
}

#tpc-creator .title-sub {
  font-size: 24px;
  font-weight: 800;
  color: #000000;
  margin-bottom: 20px;
}

/* Znaczek / Badge z rabatem */
#tpc-creator .badge-discount {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  flex-shrink: 0;
  color: #76AB00;
}

#tpc-creator .badge-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#tpc-creator .badge-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: rotate(15deg);
}

#tpc-creator .badge-icon {
  width: 28px;
  height: 28px;
  stroke: #76AB00;
  fill: none;
  margin-bottom: 2px;
}

#tpc-creator .badge-text {
  color: #76AB00;
  font-weight: 900;
  font-size: 20px;
  line-height: 1;
}

#tpc-creator .promo-divider {
  width: 100%;
  height: 2px;
  background-color: #76AB00;
  margin-bottom: 14px;
  border: none;
}

#tpc-creator .promo-desc {
  font-size: 13.5px;
  color: #333333;
  line-height: 1.4;
  font-weight: 500;
}

#tpc-creator .highlight-orange {
  color: #76AB00;
  font-weight: 700;
}

/* Karta Prawa - Jak to działa */
#tpc-creator .info-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  position: relative;
}

@media (min-width: 992px) {
  #tpc-creator .promo-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 479px) {
  #tpc-creator .promo-card,
  #tpc-creator .info-card {
    padding: 20px;
  }

  #tpc-creator .title-main {
    font-size: 22px;
  }

  #tpc-creator .discount-highlight {
    font-size: 48px;
  }

  #tpc-creator .title-sub {
    font-size: 21px;
  }

  #tpc-creator .badge-discount {
    width: 82px;
    height: 82px;
  }
}

#tpc-creator .info-title {
  font-size: 16px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 24px;
}

#tpc-creator .step-item {
  display: flex;
  align-items: center;
  margin-bottom: 22px;
}

#tpc-creator .step-item:last-child {
  margin-bottom: 0;
}

#tpc-creator .step-icon-wrapper {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  flex-shrink: 0;
}

#tpc-creator .step-text {
  font-size: 13.5px;
  color: #333333;
  line-height: 1.35;
  font-weight: 500;
}

#tpc-creator .step-info {
  position: absolute;
  bottom: 10px;
}
