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

.lagb-builder {
  --lagb-bg: #fff7f8;
  --lagb-card: #ffffff;
  --lagb-ink: #2b1c22;
  --lagb-muted: #7b6870;
  --lagb-accent: #b65770;
  --lagb-accent-2: #f4d3dc;
  --lagb-border: rgba(99, 56, 70, 0.14);
  --lagb-shadow: 0 18px 50px rgba(82, 35, 49, 0.12);
  color: var(--lagb-ink);
  width: 100%;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 34px);
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(246, 203, 213, 0.72), transparent 38%),
    linear-gradient(135deg, #fff, var(--lagb-bg));
  overflow: visible;
}

.lagb-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 28px;
}

.lagb-kicker {
  display: inline-flex;
  margin: 0 0 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(182, 87, 112, 0.12);
  color: var(--lagb-accent);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.lagb-head h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.06;
  color: var(--lagb-ink);
}

.lagb-head p:not(.lagb-kicker) {
  margin: 0;
  color: var(--lagb-muted);
  font-size: 16px;
}

.lagb-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 22px;
  align-items: start;
}

.lagb-products {
  display: grid;
  gap: 16px;
}

.lagb-cols-2 .lagb-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lagb-cols-3 .lagb-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lagb-cols-4 .lagb-products { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.lagb-card {
  position: relative;
  border: 1px solid var(--lagb-border);
  background: rgba(255,255,255,0.88);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(82, 35, 49, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.lagb-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--lagb-shadow);
}

.lagb-card.is-selected {
  border-color: rgba(182, 87, 112, 0.55);
  box-shadow: 0 16px 34px rgba(182, 87, 112, 0.18);
}

.lagb-card-disabled {
  opacity: 0.66;
}

.lagb-card-image-wrap {
  aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, #fff, #fff2f5);
  display: grid;
  place-items: center;
  padding: 18px;
}

.lagb-card-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(80, 34, 48, 0.12));
}

.lagb-card-body {
  padding: 14px;
}

.lagb-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.25;
  color: var(--lagb-ink);
}

.lagb-price {
  min-height: 24px;
  margin-bottom: 12px;
  color: var(--lagb-accent);
  font-weight: 700;
}

.lagb-price del {
  opacity: 0.55;
  font-weight: 500;
}

.lagb-pick,
.lagb-submit,
.lagb-mobile-submit,
.lagb-clear {
  appearance: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.lagb-pick {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--lagb-ink);
  color: #fff;
  font-size: 14px;
}

.lagb-pick:hover,
.lagb-submit:hover,
.lagb-mobile-submit:hover,
.lagb-clear:hover {
  transform: translateY(-1px);
}

.lagb-pick.is-selected {
  background: var(--lagb-accent);
}

.lagb-pick:disabled,
.lagb-submit:disabled,
.lagb-mobile-submit:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

.lagb-plus,
.lagb-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: rgba(255,255,255,0.18);
}

.lagb-preview {
  position: sticky;
  top: 22px;
  border: 1px solid var(--lagb-border);
  border-radius: 26px;
  background: rgba(255,255,255,0.92);
  box-shadow: var(--lagb-shadow);
  padding: 18px;
  overflow: hidden;
}

.lagb-box-stage {
  min-height: 210px;
  display: grid;
  place-items: center;
  position: relative;
  margin-bottom: 4px;
}

.lagb-box-lid {
  position: absolute;
  top: 30px;
  width: 170px;
  height: 42px;
  border-radius: 14px 14px 8px 8px;
  background: linear-gradient(135deg, #d8849b, #b65770);
  transform: rotate(-7deg) translateX(-18px);
  box-shadow: 0 14px 24px rgba(182, 87, 112, 0.22);
}

.lagb-box-target {
  position: relative;
  width: 210px;
  height: 145px;
  margin-top: 38px;
  border-radius: 22px 22px 28px 28px;
  background: linear-gradient(145deg, #f8d4dd, #b65770);
  box-shadow: inset 0 10px 22px rgba(255,255,255,0.28), 0 24px 38px rgba(108, 51, 66, 0.18);
  transition: transform 0.24s ease;
}

.lagb-box-target:before {
  content: '';
  position: absolute;
  inset: 18px 0 auto;
  height: 28px;
  background: rgba(255,255,255,0.22);
}

.lagb-box-inner {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 43%, rgba(255,255,255,0.38) 43%, rgba(255,255,255,0.38) 57%, transparent 57%);
}

.lagb-box-ribbon {
  position: absolute;
  top: -9px;
  left: 50%;
  width: 56px;
  height: 56px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(255,255,255,0.42);
  box-shadow: 0 0 0 12px rgba(255,255,255,0.18);
}

.lagb-box-pop {
  transform: scale(1.045);
}

.lagb-progress-wrap {
  padding: 4px 2px 16px;
}

.lagb-progress-text {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--lagb-muted);
}

.lagb-progress-text strong {
  color: var(--lagb-ink);
}

.lagb-progress {
  height: 9px;
  border-radius: 999px;
  background: #f3e5e9;
  overflow: hidden;
}

.lagb-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b65770, #ec9aad);
  transition: width 0.22s ease;
}

.lagb-progress-wrap small {
  display: block;
  margin-top: 8px;
  color: var(--lagb-muted);
}

.lagb-selected {
  display: grid;
  gap: 10px;
  min-height: 74px;
  max-height: 282px;
  overflow: auto;
  padding-right: 4px;
}

.lagb-empty-box {
  margin: 12px 0;
  padding: 16px;
  border: 1px dashed var(--lagb-border);
  border-radius: 16px;
  color: var(--lagb-muted);
  text-align: center;
}

.lagb-selected-item {
  display: grid;
  grid-template-columns: 48px 1fr 28px;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--lagb-border);
  border-radius: 16px;
  background: #fff;
}

.lagb-selected-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff5f7;
}

.lagb-selected-item span {
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
}

.lagb-remove {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #f6e5e9;
  color: var(--lagb-accent);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.lagb-actions {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.lagb-submit,
.lagb-mobile-submit {
  min-height: 48px;
  padding: 0 18px;
  background: linear-gradient(135deg, #2b1c22, #6d3748);
  color: #fff;
  box-shadow: 0 12px 22px rgba(43, 28, 34, 0.16);
}

.lagb-clear {
  min-height: 42px;
  background: #f6e8ec;
  color: var(--lagb-ink);
}

.lagb-message {
  min-height: 20px;
  margin: 0;
  color: var(--lagb-muted);
  font-size: 13px;
  text-align: center;
}

.lagb-message.is-success { color: #267a4f; }
.lagb-message.is-error { color: #b8324a; }

.lagb-flying-item {
  position: fixed;
  z-index: 999999;
  object-fit: contain;
  pointer-events: none;
  border-radius: 14px;
  transition: left 0.62s cubic-bezier(.22,.9,.33,1), top 0.62s cubic-bezier(.22,.9,.33,1), width 0.62s ease, height 0.62s ease, opacity 0.62s ease, transform 0.62s ease;
  filter: drop-shadow(0 16px 24px rgba(43,28,34,0.18));
}

.lagb-mobile-bar {
  display: none;
}

.lagb-empty-state,
.lagb-notice {
  padding: 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--lagb-border, rgba(0,0,0,0.12));
  text-align: center;
}

.lagb-empty-state span {
  display: block;
  color: var(--lagb-muted);
  margin-top: 4px;
}

@media (max-width: 1024px) {
  .lagb-shell {
    grid-template-columns: 1fr;
  }

  .lagb-preview {
    position: relative;
    top: auto;
    order: -1;
  }

  .lagb-cols-3 .lagb-products,
  .lagb-cols-4 .lagb-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .lagb-builder {
    padding: 16px;
    border-radius: 20px;
    margin-bottom: 84px;
  }

  .lagb-head {
    margin-bottom: 18px;
  }

  .lagb-head h2 {
    font-size: 28px;
  }

  .lagb-head p:not(.lagb-kicker) {
    font-size: 14px;
  }

  .lagb-shell {
    gap: 14px;
  }

  .lagb-preview {
    padding: 14px;
    border-radius: 20px;
  }

  .lagb-box-stage {
    min-height: 156px;
  }

  .lagb-box-lid {
    width: 136px;
    height: 34px;
    top: 18px;
  }

  .lagb-box-target {
    width: 168px;
    height: 116px;
    margin-top: 28px;
  }

  .lagb-cols-2 .lagb-products,
  .lagb-cols-3 .lagb-products,
  .lagb-cols-4 .lagb-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .lagb-card-image-wrap {
    padding: 12px;
  }

  .lagb-card-body {
    padding: 10px;
  }

  .lagb-card h3 {
    font-size: 13px;
  }

  .lagb-price {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .lagb-pick {
    min-height: 38px;
    font-size: 12px;
  }

  .lagb-actions .lagb-submit {
    display: none;
  }

  .lagb-mobile-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 9999;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.94);
    box-shadow: 0 16px 40px rgba(43,28,34,0.18);
    border: 1px solid rgba(99,56,70,0.12);
    backdrop-filter: blur(14px);
  }

  .lagb-mobile-submit {
    min-height: 44px;
  }
}

@media (max-width: 420px) {
  .lagb-cols-2 .lagb-products,
  .lagb-cols-3 .lagb-products,
  .lagb-cols-4 .lagb-products {
    grid-template-columns: 1fr 1fr;
  }
}


/* v1.1.0 compatibility patch: force layout even inside Elementor/Blocksy shortcode preview */
.elementor-widget-shortcode .lagb-builder,
.lagb-builder {
  display: block !important;
  max-width: 1180px !important;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
  line-height: 1.45 !important;
}

.lagb-builder h1,
.lagb-builder h2,
.lagb-builder h3,
.lagb-builder h4,
.lagb-builder p,
.lagb-builder span,
.lagb-builder button,
.lagb-builder small,
.lagb-builder strong {
  font-family: inherit !important;
}

.lagb-builder .lagb-head {
  display: block !important;
  text-align: center !important;
}

.lagb-builder .lagb-head h2 {
  font-size: clamp(28px, 4vw, 46px) !important;
  line-height: 1.08 !important;
  letter-spacing: -0.02em !important;
  font-weight: 800 !important;
}

.lagb-builder .lagb-shell {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px) !important;
  gap: 22px !important;
  align-items: start !important;
}

.lagb-builder .lagb-products {
  display: grid !important;
  gap: 16px !important;
  align-items: stretch !important;
}

.lagb-builder.lagb-cols-2 .lagb-products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.lagb-builder.lagb-cols-3 .lagb-products { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.lagb-builder.lagb-cols-4 .lagb-products { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }

.lagb-builder .lagb-card {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
}

.lagb-builder .lagb-card-image-wrap {
  display: grid !important;
  place-items: center !important;
}

.lagb-builder .lagb-card-image,
.lagb-builder img.lagb-card-image {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 100% !important;
  object-fit: contain !important;
  margin: 0 auto !important;
}

.lagb-builder .lagb-card h3 {
  font-size: 15px !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
  margin: 0 0 8px !important;
  color: var(--lagb-ink) !important;
}

.lagb-builder .lagb-pick,
.lagb-builder .lagb-submit,
.lagb-builder .lagb-mobile-submit,
.lagb-builder .lagb-clear {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
}

@media (max-width: 1024px) {
  .lagb-builder .lagb-shell {
    grid-template-columns: 1fr !important;
  }
  .lagb-builder.lagb-cols-3 .lagb-products,
  .lagb-builder.lagb-cols-4 .lagb-products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767px) {
  .lagb-builder {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .lagb-builder.lagb-cols-2 .lagb-products,
  .lagb-builder.lagb-cols-3 .lagb-products,
  .lagb-builder.lagb-cols-4 .lagb-products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
