@font-face {
  font-family: "Century Gothic Paneuropean";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/CenturyGothicPaneuropeanRegular.ttf") format("truetype");
}

@font-face {
  font-family: "Century Gothic Paneuropean";
  font-style: normal;
  font-weight: 700;
  src: url("../fonts/CenturyGothicPaneuropeanBold.ttf") format("truetype");
}

.wbcb-builder {
  --wbcb-ink: #111827;
  --wbcb-muted: #64748b;
  --wbcb-line: #dbe3ea;
  --wbcb-panel: #f8fafc;
  --wbcb-brand: #42145f;
  clear: both;
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(280px, 360px);
  gap: clamp(20px, 3vw, 36px);
  width: min(1280px, 100%);
  max-width: none;
  margin: 40px auto;
  color: var(--wbcb-ink);
}

.wbcb-builder.is-loading .wbcb-stage,
.wbcb-builder.is-loading .wbcb-panel {
  opacity: 0;
  transform: translateY(16px) scale(0.985);
}

.wbcb-builder.is-ready .wbcb-stage,
.wbcb-builder.is-ready .wbcb-panel {
  animation: wbcb-rise-in 620ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.wbcb-builder.is-ready .wbcb-panel {
  animation-delay: 90ms;
}

.wbcb-stage {
  min-width: 0;
  width: 100%;
}

.wbcb-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.wbcb-tool,
.wbcb-save {
  appearance: none;
  border: 1px solid var(--wbcb-line);
  background: #fff;
  color: var(--wbcb-ink);
  min-height: 40px;
  padding: 0 14px;
  border-radius: 7px;
  font-weight: 700;
  cursor: pointer;
}

.wbcb-tool.is-active,
.wbcb-save {
  background: var(--wbcb-brand);
  border-color: var(--wbcb-brand);
  color: #fff;
}

.wbcb-design-anchor,
.wbcb-design-anchor:hover,
.wbcb-design-anchor:focus {
  background: var(--wbcb-brand) !important;
  border-color: var(--wbcb-brand) !important;
  color: #fff !important;
}

.wbcb-status {
  min-height: 22px;
  color: var(--wbcb-muted);
  font-size: 14px;
}

.wbcb-card-wrap {
  width: 100%;
  max-width: 860px;
  perspective: 1400px;
}

.wbcb-card {
  position: relative;
  aspect-ratio: 91 / 61;
  width: 100%;
  container-type: inline-size;
  transform-style: preserve-3d;
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.wbcb-card[data-preview-side="back"] {
  transform: rotateY(180deg);
}

.wbcb-card-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.16);
  backface-visibility: hidden;
}

.wbcb-builder.is-saving .wbcb-card-face {
  animation: wbcb-save-pulse 820ms ease-in-out infinite;
}

.wbcb-builder.has-saved .wbcb-card-wrap {
  animation: wbcb-saved-pop 720ms cubic-bezier(0.18, 0.9, 0.22, 1.2);
}

.wbcb-front {
  background: #fff;
  padding: 0;
  color: var(--wbcb-brand);
  font-family: "Century Gothic Paneuropean", "Century Gothic", "CenturyGothic", Arial, Helvetica, sans-serif;
  transform: rotateY(0deg);
}

.wbcb-back {
  display: grid;
  place-items: center;
  background: #111827;
  color: #fff;
  transform: rotateY(180deg);
}

.wbcb-back-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 1;
}

.wbcb-preview-name {
  position: absolute;
  left: 7.69%;
  top: 15.37%;
  max-width: 45%;
  font-size: max(10px, 3.49cqw);
  line-height: 1.16;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.wbcb-preview-role {
  position: absolute;
  left: 7.69%;
  top: 21.46%;
  max-width: 45%;
  font-size: max(10px, 3.49cqw);
  line-height: 1.16;
  font-weight: 700;
  color: var(--wbcb-brand);
  overflow-wrap: anywhere;
}

.wbcb-preview-phone,
.wbcb-preview-email,
.wbcb-preview-address,
.wbcb-preview-website {
  position: absolute;
  left: 7.69%;
  max-width: 48%;
  color: var(--wbcb-brand);
  font-size: max(10px, 3.49cqw);
  line-height: 1.18;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.wbcb-preview-phone {
  top: 27.53%;
}

.wbcb-preview-phone::before {
  content: "T: ";
}

.wbcb-preview-email {
  top: 33.6%;
}

.wbcb-preview-email::before {
  content: "E: ";
}

.wbcb-preview-address {
  top: 45.75%;
  white-space: pre-line;
}

.wbcb-preview-website {
  top: 85.07%;
}

.wbcb-qr {
  position: absolute;
  left: 72.6%;
  top: 59.12%;
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  width: 20.81%;
  aspect-ratio: 1;
  background: #fff;
}

.wbcb-qr i {
  display: block;
}

.wbcb-qr .is-on {
  background: #222;
}

.wbcb-qr img {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wbcb-contact {
  display: none;
}

.wbcb-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  align-self: start;
  padding: 18px;
  border: 1px solid var(--wbcb-line);
  border-radius: 8px;
  background: var(--wbcb-panel);
}

.wbcb-panel .wbcb-save {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
}

.wbcb-panel label {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #334155;
  font-size: 16px;
  font-weight: 800;
}

.wbcb-panel input:not([type="color"]):not([type="file"]),
.wbcb-panel textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 8px 10px;
  background: #fff;
  color: var(--wbcb-ink);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
}

.wbcb-panel input[type="color"] {
  width: 70px;
  height: 40px;
  padding: 2px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
}

.wbcb-cart-thumb {
  width: 220px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border: 1px solid #dbe3ea;
  border-radius: 6px;
  background: #fff;
}

.wbcb-cart-preview {
  clear: both;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
  width: min(760px, 90vw);
  max-width: none;
}

.wbcb-cart-preview__image {
  flex: 0 0 min(760px, 90vw);
  max-width: none;
  margin: 0;
}

.wbcb-cart-preview__image img {
  display: block;
  width: min(760px, 90vw);
  max-width: none;
  height: auto;
  border: 1px solid #dbe3ea;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.woocommerce-cart .wbcb-cart-preview__image img,
.woocommerce-checkout .wbcb-cart-preview__image img,
.wc-block-cart .wbcb-cart-preview__image img,
.wc-block-checkout .wbcb-cart-preview__image img {
  width: min(760px, 90vw) !important;
  max-width: none !important;
  height: auto !important;
}

.wbcb-cart-preview__image figcaption {
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.wbcb-cart-preview__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 150px;
}

.wbcb-cart-preview--blocks {
  margin-bottom: 10px;
}

@media (max-width: 680px) {
  .wbcb-cart-preview__image {
    flex-basis: 100%;
  }

  .wbcb-cart-preview__image img {
    width: 100%;
  }
}

@keyframes wbcb-rise-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes wbcb-save-pulse {
  0%,
  100% {
    box-shadow: 0 20px 55px rgba(15, 23, 42, 0.16);
  }
  50% {
    box-shadow: 0 24px 70px rgba(0, 166, 118, 0.34);
  }
}

@keyframes wbcb-saved-pop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.025);
  }
  100% {
    transform: scale(1);
  }
}

@media (max-width: 780px) {
  .wbcb-builder {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .wbcb-contact {
    display: none;
  }

  .wbcb-preview-name,
  .wbcb-preview-role {
    max-width: 48%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wbcb-builder.is-ready .wbcb-stage,
  .wbcb-builder.is-ready .wbcb-panel,
  .wbcb-builder.is-saving .wbcb-card-face,
  .wbcb-builder.has-saved .wbcb-card-wrap {
    animation: none;
  }

  .wbcb-card,
  .wbcb-card-face {
    transition: none;
  }
}
