:root {
  --loybie-ink: #3f342f;
  --loybie-muted: #756660;
  --loybie-rose: #d88da2;
  --loybie-rose-dark: #b96881;
  --loybie-blush: #fbf1f3;
  --loybie-cream: #f8f1e8;
  --loybie-card: #fffdfb;
  --loybie-line: #eadbd5;
  --loybie-shadow: 0 18px 50px rgba(87, 62, 52, 0.08);
}

.loybie-builder-product div.product .woocommerce-product-gallery {
  display: none !important;
}

.loybie-builder-product div.product .summary,
.loybie-builder-product div.product .summary.entry-summary {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
}

.loybie-builder-product .loybie-starting-price {
  display: inline-flex !important;
  align-items: baseline;
  gap: 8px;
}

.loybie-builder-product .loybie-starting-price small {
  color: var(--loybie-muted);
  font-size: 0.72em;
  font-weight: 500;
}

.loybie-builder,
.loybie-builder * {
  box-sizing: border-box;
}

.loybie-builder {
  color: var(--loybie-ink);
  margin: 28px 0 34px;
}

.loybie-builder__intro {
  max-width: 760px;
  margin-bottom: 24px;
}

.loybie-builder__eyebrow,
.loybie-summary__eyebrow {
  color: var(--loybie-rose-dark);
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.loybie-builder__intro h2 {
  color: var(--loybie-ink);
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.05;
  margin: 0 0 12px;
}

.loybie-builder__intro p {
  color: var(--loybie-muted);
  font-size: 17px;
  line-height: 1.7;
  margin: 0;
}

.loybie-builder__layout {
  align-items: start;
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
}

.loybie-builder__steps {
  display: grid;
  gap: 20px;
}

.loybie-step {
  background: var(--loybie-card);
  border: 1px solid var(--loybie-line);
  border-radius: 24px;
  box-shadow: var(--loybie-shadow);
  padding: clamp(20px, 4vw, 32px);
}

.loybie-step__heading {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}

.loybie-step__heading > span {
  align-items: center;
  background: var(--loybie-rose);
  border-radius: 50%;
  color: white;
  display: inline-flex;
  flex: 0 0 34px;
  font-size: 14px;
  font-weight: 700;
  height: 34px;
  justify-content: center;
  margin-top: 1px;
}

.loybie-step__heading h3 {
  color: var(--loybie-ink);
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 5px;
}

.loybie-step__heading p {
  color: var(--loybie-muted);
  line-height: 1.5;
  margin: 0;
}

.loybie-size-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.loybie-size-card,
.loybie-choice,
.loybie-pill {
  cursor: pointer;
  display: block;
  margin: 0;
  position: relative;
}

.loybie-size-card input,
.loybie-choice input,
.loybie-pill input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.loybie-size-card {
  background: #fff;
  border: 1px solid var(--loybie-line);
  border-radius: 18px;
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.loybie-size-card:hover {
  border-color: var(--loybie-rose);
  transform: translateY(-2px);
}

.loybie-size-card:has(input:checked) {
  border-color: var(--loybie-rose-dark);
  box-shadow: 0 0 0 3px rgba(216, 141, 162, 0.2);
}

.loybie-size-card:has(input:focus-visible),
.loybie-choice:has(input:focus-visible),
.loybie-pill:has(input:focus-visible) {
  outline: 3px solid rgba(185, 104, 129, 0.3);
  outline-offset: 3px;
}

.loybie-size-card__visual {
  align-items: center;
  aspect-ratio: 1 / 1;
  background: #fff;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 10px;
}

.loybie-size-card__visual img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.loybie-size-card__copy {
  display: grid;
  gap: 3px;
  padding: 14px;
}

.loybie-size-card__copy strong {
  color: var(--loybie-ink);
  font-size: 17px;
}

.loybie-size-card__copy small {
  color: var(--loybie-muted);
}

.loybie-size-card__copy b {
  color: var(--loybie-rose-dark);
  font-size: 16px;
  margin-top: 5px;
}

.loybie-field-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.loybie-field {
  display: grid;
  gap: 7px;
  margin: 0 0 16px;
}

.loybie-field > span,
.loybie-option-group legend {
  color: var(--loybie-ink);
  font-size: 14px;
  font-weight: 700;
}

.loybie-field input[type="text"],
.loybie-field input[type="file"],
.loybie-field textarea {
  background: #fff;
  border: 1px solid var(--loybie-line);
  border-radius: 12px;
  color: var(--loybie-ink);
  font: inherit;
  margin: 0;
  min-height: 48px;
  padding: 12px 14px;
  width: 100%;
}

.loybie-field textarea {
  line-height: 1.5;
  resize: vertical;
}

.loybie-field input:focus,
.loybie-field textarea:focus {
  border-color: var(--loybie-rose-dark);
  box-shadow: 0 0 0 3px rgba(216, 141, 162, 0.18);
  outline: 0;
}

.loybie-field small,
.loybie-help {
  color: var(--loybie-muted);
  font-size: 13px;
  line-height: 1.5;
}

.loybie-help {
  margin: 0;
}

.loybie-option-group {
  border: 0;
  margin: 0 0 20px;
  padding: 0;
}

.loybie-option-group legend {
  margin-bottom: 10px;
}

.loybie-option-group.has-error {
  border-left: 3px solid #b42318;
  padding-left: 12px;
}

[data-packaging-group].has-error {
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.14);
}

.loybie-field-error {
  color: #b42318;
  font-size: 13px;
  font-weight: 700;
  margin: 10px 0 0;
}

.loybie-pill-grid,
.loybie-choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.loybie-pill > span,
.loybie-choice > span {
  align-items: center;
  background: #fff;
  border: 1px solid var(--loybie-line);
  border-radius: 999px;
  display: inline-flex;
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.loybie-pill:has(input:checked) > span,
.loybie-choice:has(input:checked) > span {
  background: var(--loybie-blush);
  border-color: var(--loybie-rose-dark);
  color: var(--loybie-rose-dark);
}

.loybie-pill small,
.loybie-choice small {
  color: var(--loybie-muted);
  font-size: 11px;
}

.loybie-choice-grid {
  margin-bottom: 18px;
}

.loybie-cream-colors {
  background: var(--loybie-blush);
  border-radius: 16px;
  margin-top: 14px;
  padding: 16px;
}

.loybie-cream-colors .loybie-help {
  margin-bottom: 12px;
}

.loybie-choice > span {
  align-items: flex-start;
  border-radius: 14px;
  display: grid;
  gap: 2px;
  min-width: 160px;
}

.loybie-conditional[hidden] {
  display: none !important;
}

.loybie-conditional {
  animation: loybie-fade-in 180ms ease both;
  background: var(--loybie-blush);
  border-radius: 16px;
  margin: 12px 0 18px;
  padding: 18px;
}

.loybie-file-field input[type="file"] {
  background: #fff;
}

.loybie-live-preview {
  background: linear-gradient(145deg, #fffaf7 0%, #f6e8e3 100%);
  border: 1px solid rgba(216, 141, 162, 0.55);
  border-radius: 18px;
  color: var(--loybie-ink);
  margin: 0 0 22px;
  padding: 12px;
}

.loybie-live-preview__head {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  margin: 0 2px 9px;
}

.loybie-live-preview__head strong {
  color: var(--loybie-ink);
  font-size: 14px;
}

.loybie-live-preview__head small {
  color: var(--loybie-muted);
  font-size: 10px;
}

.loybie-live-preview__stage {
  background: radial-gradient(circle at 50% 28%, #fff 0%, #fff8f4 48%, #eeddd7 100%);
  border-radius: 14px;
  height: 225px;
  overflow: hidden;
  position: relative;
}

.loybie-live-preview__canvas3d {
  cursor: grab;
  height: 100%;
  inset: 0;
  position: absolute;
  touch-action: none;
  width: 100%;
  z-index: 6;
}

.loybie-live-preview__canvas3d:active {
  cursor: grabbing;
}

.loybie-live-preview__canvas3d[hidden],
.loybie-live-preview__3d-hint[hidden] {
  display: none !important;
}

.loybie-live-preview__3d-hint {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(73, 57, 52, 0.14);
  border-radius: 999px;
  bottom: 8px;
  color: #6b554e;
  font-size: 8px;
  left: 50%;
  line-height: 1;
  padding: 5px 8px;
  pointer-events: none;
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 8;
}

.loybie-live-preview__3d-hint::before {
  content: "↔ ";
}

.loybie-live-preview__glass {
  transition: opacity 180ms ease;
}

.loybie-live-preview.is-3d-active .loybie-live-preview__glass {
  opacity: 0;
  pointer-events: none;
}

.loybie-live-preview__stage.is-gift::before,
.loybie-live-preview__stage.is-gift::after {
  background: rgba(216, 141, 162, 0.18);
  content: "";
  position: absolute;
  z-index: 1;
}

.loybie-live-preview__stage.is-gift::before {
  bottom: 0;
  left: calc(50% - 11px);
  top: 0;
  width: 22px;
}

.loybie-live-preview__stage.is-gift::after {
  height: 22px;
  left: 0;
  right: 0;
  top: calc(50% - 11px);
}

.loybie-live-preview__glass {
  bottom: 12px;
  left: 20px;
  position: absolute;
  right: 20px;
  top: 14px;
}

.loybie-live-preview__glass img {
  height: 100%;
  inset: 0;
  object-fit: contain;
  position: absolute;
  transition: opacity 180ms ease, transform 220ms ease;
  width: 100%;
  z-index: 2;
}

.loybie-live-preview__wax {
  background: rgba(231, 219, 197, 0.22);
  border-radius: 4px 4px 22px 22px;
  mix-blend-mode: multiply;
  opacity: 0.72;
  position: absolute;
  transition: background 220ms ease, inset 220ms ease, height 220ms ease;
  z-index: 3;
}

.loybie-live-preview[data-size="small"] .loybie-live-preview__wax {
  bottom: 18%;
  height: 43%;
  left: 10%;
  right: 10%;
}

.loybie-live-preview[data-size="medium"] .loybie-live-preview__wax {
  bottom: 10%;
  height: 57%;
  left: 21%;
  right: 21%;
}

.loybie-live-preview[data-size="large"] .loybie-live-preview__wax {
  bottom: 16%;
  height: 52%;
  left: 9%;
  right: 9%;
}

.loybie-live-preview__cream {
  border-radius: 50% 50% 42% 42%;
  box-shadow: 0 -5px 0 rgba(255, 255, 255, 0.45), 0 4px 9px rgba(80, 53, 47, 0.16);
  height: 18px;
  position: absolute;
  transform: translateY(50%);
  transition: background 180ms ease, left 220ms ease, right 220ms ease;
  z-index: 4;
}

.loybie-live-preview[data-size="small"] .loybie-live-preview__cream {
  bottom: 61%;
  left: 12%;
  right: 12%;
}

.loybie-live-preview[data-size="medium"] .loybie-live-preview__cream {
  bottom: 67%;
  left: 23%;
  right: 23%;
}

.loybie-live-preview[data-size="large"] .loybie-live-preview__cream {
  bottom: 68%;
  left: 11%;
  right: 11%;
}

.loybie-live-preview__decorations {
  align-items: flex-end;
  bottom: 59%;
  display: flex;
  gap: 2px;
  justify-content: center;
  left: 14%;
  min-height: 28px;
  pointer-events: none;
  position: absolute;
  right: 14%;
  z-index: 5;
}

.loybie-live-preview[data-size="medium"] .loybie-live-preview__decorations,
.loybie-live-preview[data-size="large"] .loybie-live-preview__decorations {
  bottom: 66%;
}

.loybie-preview-decoration {
  filter: drop-shadow(0 2px 2px rgba(69, 47, 41, 0.2));
  flex: 0 0 22px;
  height: 22px;
  position: relative;
  transform-origin: 50% 100%;
  width: 22px;
}

.loybie-preview-decoration.is-large {
  transform: scale(1.18);
}

.loybie-preview-decoration::before,
.loybie-preview-decoration::after {
  box-sizing: border-box;
  content: "";
  position: absolute;
}

.loybie-preview-decoration[data-decoration-kind="blueberry"]::before,
.loybie-preview-decoration[data-decoration-kind="blackberry"]::before {
  background: #5261a8;
  border: 1px solid rgba(43, 49, 104, 0.35);
  border-radius: 50%;
  box-shadow: 7px -4px 0 #6d79bd, 11px 4px 0 #3f4c91;
  height: 10px;
  left: 2px;
  top: 9px;
  width: 10px;
}

.loybie-preview-decoration[data-decoration-kind="blueberry"]::after,
.loybie-preview-decoration[data-decoration-kind="blackberry"]::after {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #66815f;
  left: 8px;
  top: 3px;
}

.loybie-preview-decoration[data-decoration-kind="raspberry"]::before,
.loybie-preview-decoration[data-decoration-kind="strawberry"]::before {
  background: #d95c73;
  border-radius: 58% 58% 68% 68%;
  box-shadow: inset -3px -2px 0 rgba(140, 37, 60, 0.18);
  height: 16px;
  left: 4px;
  top: 5px;
  width: 15px;
}

.loybie-preview-decoration[data-decoration-kind="raspberry"]::after,
.loybie-preview-decoration[data-decoration-kind="strawberry"]::after {
  border-bottom: 5px solid #66875a;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  left: 6px;
  top: 1px;
}

.loybie-preview-decoration[data-decoration-kind="macaron"]::before {
  background: #dfa0b4;
  border-bottom: 4px solid #f6e3d4;
  border-radius: 9px;
  border-top: 4px solid #dfa0b4;
  height: 14px;
  left: 2px;
  top: 5px;
  width: 19px;
}

.loybie-preview-decoration[data-decoration-kind="candy"]::before {
  background: repeating-linear-gradient(90deg, #d87aa0 0 4px, #f7d6e2 4px 7px);
  border: 2px solid rgba(125, 54, 82, 0.18);
  border-radius: 7px;
  height: 12px;
  left: 4px;
  top: 6px;
  transform: rotate(-12deg);
  width: 15px;
}

.loybie-preview-decoration[data-decoration-kind="chocolate"]::before {
  background-color: #79513c;
  background-image: linear-gradient(rgba(255,255,255,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.22) 1px, transparent 1px);
  background-size: 7px 7px;
  border: 2px solid #65402f;
  border-radius: 2px;
  height: 18px;
  left: 3px;
  top: 2px;
  transform: rotate(8deg);
  width: 16px;
}

.loybie-preview-decoration[data-decoration-kind="sunflower"]::before,
.loybie-preview-decoration[data-decoration-kind="daisy"]::before,
.loybie-preview-decoration[data-decoration-kind="rose"]::before,
.loybie-preview-decoration[data-decoration-kind="tulip"]::before,
.loybie-preview-decoration[data-decoration-kind="special"]::before {
  content: "✿";
  font-family: Georgia, serif;
  font-size: 25px;
  left: 0;
  line-height: 22px;
  text-align: center;
  top: 0;
  width: 22px;
}

.loybie-preview-decoration[data-decoration-kind="sunflower"]::before { color: #e5b634; }
.loybie-preview-decoration[data-decoration-kind="daisy"]::before { color: #fff; text-shadow: 0 0 1px #8b756d; }
.loybie-preview-decoration[data-decoration-kind="rose"]::before { color: #c94f66; }
.loybie-preview-decoration[data-decoration-kind="tulip"]::before { color: #dc7896; }
.loybie-preview-decoration[data-decoration-kind="special"]::before { color: #d68aa1; content: "✦"; }

.loybie-preview-decoration[data-decoration-kind="watermelon"]::before {
  background: #ec6772;
  border-bottom: 5px solid #6ea06e;
  border-radius: 14px 14px 5px 5px;
  height: 15px;
  left: 2px;
  top: 5px;
  transform: rotate(-7deg);
  width: 20px;
}

.loybie-preview-decoration[data-decoration-kind="lemon"]::before,
.loybie-preview-decoration[data-decoration-kind="lime"]::before {
  background: conic-gradient(from 0deg, #fff8cf 0 7deg, transparent 7deg 83deg, #fff8cf 83deg 97deg, transparent 97deg 173deg, #fff8cf 173deg 187deg, transparent 187deg 263deg, #fff8cf 263deg 277deg, transparent 277deg);
  border: 3px solid #e4c848;
  border-radius: 50%;
  height: 19px;
  left: 2px;
  top: 2px;
  width: 19px;
}

.loybie-preview-decoration[data-decoration-kind="lime"]::before {
  background-color: #d9ed9e;
  border-color: #78a951;
}

.loybie-preview-decoration[data-decoration-kind="lemon"]::before {
  background-color: #f5df65;
}

.loybie-preview-decoration[data-decoration-kind="bear"]::before {
  background: #aa7658;
  border-radius: 50%;
  box-shadow: -6px -4px 0 -2px #8e5f45, 6px -4px 0 -2px #8e5f45;
  height: 17px;
  left: 3px;
  top: 4px;
  width: 17px;
}

.loybie-preview-decoration[data-decoration-kind="bear"]::after {
  background: #d9ae8d;
  border-radius: 50%;
  height: 8px;
  left: 8px;
  top: 12px;
  width: 8px;
}

.loybie-live-preview__label {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(73, 57, 52, 0.18);
  border-radius: 4px;
  bottom: 28%;
  color: #493934;
  font-family: Georgia, serif;
  font-size: 10px;
  left: 50%;
  max-width: 104px;
  overflow: hidden;
  padding: 5px 7px;
  position: absolute;
  text-align: center;
  text-overflow: ellipsis;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 6;
}

.loybie-live-preview__scent,
.loybie-live-preview__gift {
  background: rgba(73, 57, 52, 0.88);
  border-radius: 999px;
  color: #fff;
  font-size: 9px;
  line-height: 1;
  padding: 6px 8px;
  position: absolute;
  z-index: 7;
}

.loybie-live-preview__scent {
  bottom: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loybie-live-preview__gift {
  background: #d88da2;
  right: 8px;
  top: 8px;
}

.loybie-summary {
  background: var(--loybie-ink);
  border-radius: 24px;
  box-shadow: var(--loybie-shadow);
  color: white;
  padding: 26px;
  position: sticky;
  top: 24px;
}

.loybie-summary__eyebrow {
  color: #efb4c3;
}

.loybie-summary h3 {
  color: white;
  font-size: 28px;
  margin: 0 0 22px;
}

.loybie-summary dl {
  margin: 0;
}

.loybie-summary dl > div {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  gap: 8px;
  grid-template-columns: 86px 1fr;
  padding: 12px 0;
}

.loybie-summary dt {
  color: rgba(255, 255, 255, 0.63);
  font-size: 13px;
}

.loybie-summary dd {
  color: white;
  font-size: 14px;
  margin: 0;
  text-align: right;
}

.loybie-summary__total {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  padding: 22px 0 12px;
}

.loybie-summary__total span {
  color: rgba(255, 255, 255, 0.72);
}

.loybie-summary__total strong {
  color: white;
  font-size: 28px;
}

.loybie-summary > p {
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}

.loybie-builder-product form.cart {
  display: block !important;
}

.loybie-builder-product form.cart .quantity {
  margin-bottom: 12px !important;
}

.loybie-builder-product form.cart .single_add_to_cart_button {
  background: var(--loybie-rose-dark) !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: 0 10px 24px rgba(185, 104, 129, 0.22);
  color: white !important;
  font-size: 16px !important;
  min-height: 52px;
  padding: 12px 24px !important;
}

.loybie-builder-product form.cart .single_add_to_cart_button:hover {
  background: #a95770 !important;
}

@keyframes loybie-fade-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .loybie-builder__layout {
    grid-template-columns: 1fr;
  }

  .loybie-summary {
    position: static;
  }
}

@media (max-width: 680px) {
  .loybie-size-grid {
    grid-template-columns: 1fr;
  }

  .loybie-size-card {
    align-items: center;
    display: grid;
    grid-template-columns: 120px 1fr;
  }

  .loybie-size-card__visual {
    aspect-ratio: 1 / 1;
  }

  .loybie-field-grid {
    grid-template-columns: 1fr;
  }

  .loybie-choice,
  .loybie-choice > span {
    width: 100%;
  }

  .loybie-step {
    border-radius: 18px;
  }
}
