/* =====================================================================================
   Vkusno — 3D Cake Builder (studio layout v3). Loaded only on /cake-builder.
   Desktop: sidebar (6 sections + price) · contextual popup · large 3D stage · decorations drawer
            Popups/drawer dock beside the stage (they never cover the cake; the cake re-frames).
   Phones:  toolbar · 3D preview · bottom sheet (one section at a time) · section bar · price/order bar
   ===================================================================================== */
.bx {
  --bx-bg: #FBF1F4; --bx-card: #fff; --bx-soft: #FFF6F8; --bx-line: #F4E1E8; --bx-pink: #E3175E; --bx-ink: #2B2128;
  --bx-r: 26px; --bx-sh: 0 1px 2px rgba(110, 20, 60, .03), 0 18px 40px rgba(110, 20, 60, .07);
  --fly: 0px; --drw: 0px;
  display: grid; column-gap: 0; row-gap: 14px; padding: 16px 18px 18px;
  grid-template-columns: 304px var(--fly) minmax(0, 1fr) var(--drw);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "left top top top" "left fly stage drawer";
  height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); min-height: 660px;
  background: radial-gradient(1100px 620px at 62% 8%, #FFF8FA 0%, var(--bx-bg) 62%); overflow: hidden;
  transition: grid-template-columns .32s cubic-bezier(.2, .8, .2, 1);
}
.bx[data-panel="fly"] { --fly: 372px; }
.bx[data-panel="drawer"] { --drw: 470px; }
.bx h1, .bx h2, .bx h3 { font-family: var(--serif); color: var(--bx-ink); }
.bx svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.bx .b-hint { display: none; }

/* ---------- left sidebar: brand · sections (own scroll) · price (fixed bottom) ---------- */
.bx-left { grid-area: left; margin-right: 18px; display: flex; flex-direction: column; min-height: 0; background: var(--bx-card); border-radius: var(--bx-r); box-shadow: var(--bx-sh); overflow: hidden; }
.bx-brand { display: flex; align-items: center; gap: 12px; padding: 22px 22px 12px; }
.bx-brand img { height: 34px; width: auto; }
.bx-brand span { font-family: var(--serif); font-size: 1.05rem; color: #B0476F; letter-spacing: .02em; }
.bx .bx-steps { display: block; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 12px 12px; scrollbar-width: thin; scrollbar-color: #F1D3DE transparent; }
.bx .bx-step { display: flex; width: 100%; align-items: center; gap: 13px; padding: 11px 10px; margin: 0; border: 0; border-radius: 16px; background: none; text-align: left; cursor: pointer; color: var(--bx-ink); font-size: .88rem; }
.bx .bx-step:hover { background: var(--bx-soft); }
.bx .bx-step .bx-step-ic { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; background: var(--bx-soft); color: #B0476F; flex: none; transition: background .2s, color .2s; }
.bx .bx-step-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.bx .bx-step-tx em { font-style: normal; font-weight: 700; }
.bx .bx-step-tx small { color: var(--muted); font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bx .bx-step .bx-step-n { display: none; }
.bx .bx-step::after { content: ""; width: 7px; height: 7px; border-right: 1.6px solid #CFA9B8; border-bottom: 1.6px solid #CFA9B8; transform: rotate(-45deg); margin-right: 4px; transition: transform .2s; }
.bx .bx-step.is-open::after { transform: rotate(45deg); }
.bx .bx-step.is-active .bx-step-ic { background: var(--bx-pink); color: #fff; box-shadow: 0 8px 18px rgba(227, 23, 94, .28); }
.bx .bx-body { padding: 2px 4px 16px 14px; animation: bx-in .22s ease; }
@keyframes bx-in { from { opacity: 0; transform: translateY(-4px); } }
.bx .bx-body h2 { display: none; }
.bx .bx-body .b-sub { margin: 14px 0 8px; font-size: .72rem; }
.bx .bx-body .opt-grid { grid-template-columns: 1fr; gap: 6px; }
.bx .bx-body .opt-grid-3 { grid-template-columns: 1fr 1fr; }
.bx .bx-body .opt-card { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border-radius: 14px; border: 0; background: var(--bx-soft); font-size: .82rem; text-align: left; min-height: 0; box-shadow: none; }
.bx .bx-body .opt-card.is-active { background: #FFE6EE; box-shadow: inset 0 0 0 1.5px var(--bx-pink); }
.bx .bx-body .opt-card .opt-text { flex: 1; min-width: 0; }
.bx .bx-body .opt-card .opt-icon svg { width: 26px; height: 26px; }
.bx .bx-body .opt-card .opt-price { flex: none; font-size: .72rem; }
.bx .bx-body .opt-grid-3 .opt-card { flex-direction: column; align-items: flex-start; gap: 2px; }
.bx .bx-body .opt-badge { position: static; }
.bx .bx-body .muted.small { font-size: .74rem; }
.bx-compact { margin: 0 0 10px; display: grid; gap: 6px; }
.bx-compact div { display: flex; justify-content: space-between; gap: 10px; font-size: .8rem; }
.bx-compact dt { color: var(--muted); }
.bx-compact dd { margin: 0; font-weight: 700; text-align: right; }
.bx-open { display: inline-flex; align-items: center; gap: 6px; border: 0; background: #FFE9F0; color: #C21452; font-weight: 700; font-size: .8rem; padding: 9px 14px; border-radius: 999px; cursor: pointer; transition: background .15s; }
.bx-open:hover { background: #FFD9E6; }
.bx-swatch-line { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.bx-swatch-line div { display: flex; flex-direction: column; font-size: .82rem; }
.bx-swatch-line small { color: var(--muted); }
.bx-swatch-big { width: 42px; height: 42px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06), 0 4px 10px rgba(0, 0, 0, .08); }
.bx-placed { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.bx-placed li { display: flex; align-items: center; gap: 10px; font-size: .8rem; }
.bx-placed .bx-thumb { width: 36px; height: 36px; border-radius: 10px; font-size: 1.1rem; }
.bx-placed span { flex: 1; min-width: 0; }
.bx-placed b { color: #C21452; font-size: .76rem; }
.bx-x { width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--bx-soft); color: var(--muted); cursor: pointer; font-weight: 800; }
.bx-x:hover { background: #FFE3EC; color: var(--bx-pink); }

.bx-price { flex: none; padding: 16px 22px 20px; display: flex; flex-direction: column; gap: 8px; background: linear-gradient(180deg, rgba(255, 246, 248, 0), #FFF4F7 30%); border-top: 1px solid var(--bx-line); }
.bx-total { display: flex; align-items: baseline; justify-content: space-between; }
.bx-total span { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; }
.bx-total strong { font-family: var(--serif); font-size: 2.05rem; color: #B30F49; line-height: 1; }
.bx-details-btn { align-self: flex-start; border: 0; background: none; padding: 0; color: var(--muted); font-size: .78rem; font-weight: 700; cursor: pointer; }
.bx-details-btn:hover { color: var(--bx-pink); }
.bx-price .btn-lg { border-radius: 18px; padding-top: .9em; padding-bottom: .9em; box-shadow: 0 12px 26px rgba(227, 23, 94, .26); }
.bx-sub-actions { display: flex; justify-content: center; gap: 16px; white-space: nowrap; }
.bx-sub-actions .link-btn { font-size: .74rem; }
.bx-reset { display: block; margin: 2px auto 0; color: var(--muted); font-size: .74rem; }
.bx-reset:hover { color: var(--bx-pink); }
.bx-pop-body .bx-reset { margin-top: 12px; }
.bx .b-alerts:empty { display: none; }
.bx .demo-note { font-size: .7rem; margin: 0; padding: 8px 10px; }

/* ---------- top toolbar ---------- */
.bx-top { grid-area: top; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; }
.bx-title h1 { font-size: 1.9rem; margin: 0; line-height: 1.05; }
.bx-title p { margin: 3px 0 0; color: var(--muted); font-size: .82rem; }
.bx-actions { display: flex; align-items: center; gap: 2px; padding: 5px; background: rgba(255, 255, 255, .85); border-radius: 999px; box-shadow: var(--bx-sh); }
.bx-actions button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; border-radius: 999px; padding: 8px 13px; font-weight: 700; font-size: .78rem; color: var(--bx-ink); cursor: pointer; }
.bx-actions button:hover:not(:disabled) { background: #FFEFF4; color: #C21452; }
.bx-actions button:disabled { opacity: .3; cursor: default; }
.bx-actions button.is-active { background: var(--bx-pink); color: #fff; }
.bx-sep { width: 1px; height: 20px; background: var(--bx-line); margin: 0 3px; }

/* ---------- 3D stage: the hero ---------- */
.bx .bx-stage { grid-area: stage; position: relative; top: auto; min-height: 0; min-width: 0; border-radius: 32px; overflow: hidden; box-shadow: 0 30px 60px rgba(160, 40, 90, .13); background: linear-gradient(#FCEAF0, #F7D7E2 60%, #F2C9D6); }
.bx .bx-stage .b-canvas { position: absolute; inset: 0; }
.bx .bx-modes { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 4; display: flex; gap: 2px; padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, .78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 10px 28px rgba(120, 30, 70, .12); }
.bx .bx-modes button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border: 0; border-radius: 999px; background: none; font-weight: 700; font-size: .8rem; color: var(--bx-ink); cursor: pointer; }
.bx .bx-modes button.is-active { background: var(--bx-pink); color: #fff; box-shadow: 0 6px 16px rgba(227, 23, 94, .28); }
.bx .bx-views { position: absolute; left: 18px; top: 18px; right: auto; bottom: auto; display: flex; gap: 1px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: none; z-index: 4; }
.bx .bx-views button { border: 0; background: none; padding: 6px 12px; border-radius: 999px; font-size: .74rem; font-weight: 700; cursor: pointer; color: #6E5560; }
.bx .bx-views button.is-active { background: #fff; color: #C21452; box-shadow: 0 2px 8px rgba(120, 30, 70, .08); }
.bx .bx-zoom { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); z-index: 4; display: flex; flex-direction: column; gap: 2px; padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, .7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.bx .bx-zoom button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: none; font-weight: 800; font-size: 1.05rem; cursor: pointer; color: var(--bx-ink); }
.bx .bx-zoom button[data-action="spin"] { font-size: .62rem; }
.bx .bx-zoom button:hover, .bx .bx-zoom button.is-active { background: var(--bx-pink); color: #fff; }
.bx .b-select-bar { top: 66px; bottom: auto; z-index: 6; }
.bx .b-photo-bar { bottom: 84px; }
.bx-fs-exit { display: none; position: absolute; right: 18px; top: 18px; z-index: 7; border: 0; border-radius: 999px; padding: 8px 14px; background: rgba(41, 23, 32, .72); color: #fff; font-weight: 700; cursor: pointer; }
.bx .bx-stage:fullscreen .bx-fs-exit, .builder.is-fs .bx-fs-exit { display: block; }
.bx .bx-stage:fullscreen { border-radius: 0; }
.builder.bx.is-fs .bx-stage { position: fixed !important; inset: 0 !important; border-radius: 0; z-index: 2000; }
.bx .b-loader { background: transparent; }

/* ---------- contextual popup (left of the stage) & decorations drawer (right) ---------- */
.bx-fly, .bx-drawer { min-height: 0; min-width: 0; display: flex; flex-direction: column; background: var(--bx-card); border-radius: var(--bx-r); box-shadow: var(--bx-sh); overflow: hidden; animation: bx-pop .28s cubic-bezier(.2, .8, .2, 1); }
.bx-fly[hidden], .bx-drawer[hidden] { display: none; }
.bx-fly { grid-area: fly; margin-right: 18px; }
.bx-drawer { grid-area: drawer; margin-left: 18px; }
@keyframes bx-pop { from { opacity: 0; transform: translateY(6px) scale(.985); } }
.bx-pop-head { position: relative; padding: 22px 56px 6px 24px; flex: none; }
.bx-pop-head h2 { margin: 0; font-size: 1.45rem; }
.bx-pop-head p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }
.bx-pop-x { position: absolute; right: 16px; top: 18px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--bx-soft); cursor: pointer; color: var(--muted); font-size: .9rem; }
.bx-pop-x:hover { background: #FFE3EC; color: var(--bx-pink); }
.bx-pop-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px 24px 24px; scrollbar-width: thin; scrollbar-color: #F1D3DE transparent; }
.bx-pop-body > h2:first-child { display: none; }
.bx-pop-body .b-sub { margin: 18px 0 9px; font-size: .72rem; }
.bx-pop-body .opt-grid { grid-template-columns: 1fr; gap: 8px; }
.bx-pop-body .opt-grid-3 { grid-template-columns: 1fr 1fr; }
.bx-pop-body .opt-card { border: 0; background: var(--bx-soft); border-radius: 16px; box-shadow: none; }
.bx-pop-body .opt-card.is-active { background: #FFE6EE; box-shadow: inset 0 0 0 1.5px var(--bx-pink); }
.bx-pop-body .swatches { gap: 10px; }
.bx-pop-body .swatch { width: 40px; height: 40px; }
.bx-pop-body .swatch-sm { width: 30px; height: 30px; }
.bx-pop-foot { flex: none; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--bx-line); }
.bx-pop-body .review-list { margin-top: 6px; }

/* decoration library cards */
.bx-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 14px; position: sticky; top: -10px; background: #fff; z-index: 2; }
.bx-tabs::-webkit-scrollbar { display: none; }
.bx-tabs button { flex: none; border: 0; background: var(--bx-soft); border-radius: 999px; padding: 7px 14px; font-size: .78rem; font-weight: 700; color: #7A5A67; cursor: pointer; }
.bx-tabs button.is-active { background: var(--bx-ink); color: #fff; }
.bx-deco-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bx-fly .bx-deco-grid, .bx-deco-grid-sm { grid-template-columns: 1fr 1fr; }
.bx-deco { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px; padding: 12px 8px 12px; border-radius: 20px; background: var(--bx-soft); transition: box-shadow .15s, transform .15s, background .15s; }
.bx-deco:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(150, 30, 80, .08); background: #fff; }
.bx-deco.is-active { background: #fff; box-shadow: inset 0 0 0 1.5px var(--bx-pink), 0 10px 22px rgba(227, 23, 94, .1); }
.bx-deco-pic { position: relative; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 16px; }
.bx-deco-pic:disabled { cursor: default; }
.bx-thumb { width: 92px; height: 92px; border-radius: 16px; object-fit: cover; background: #FDF3F6; display: block; }
.bx-thumb-ic { display: grid; place-items: center; font-size: 2rem; }
.bx-badge { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--bx-pink); color: #fff; font-style: normal; font-size: .72rem; font-weight: 800; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(227, 23, 94, .35); }
.bx-deco strong { font-size: .78rem; line-height: 1.2; min-height: 2.4em; display: flex; align-items: center; }
.bx-deco-price { font-size: .7rem; color: #C21452; font-weight: 700; }
.bx-deco .qty { margin-top: 2px; background: #fff; }
.bx-deco .toggle { margin-top: 2px; }
.bx-deco .deco-input { width: 100%; margin-top: 4px; font-size: .78rem; text-align: center; }
.bx-sub-actions .link-btn { color: var(--muted); }

.bx-only-mobile { display: none; }
.bx .b-mobile-bar { display: none; }

/* ---------- tablet: narrower sidebar, drawer as wide as useful ---------- */
@media (max-width: 1280px) {
  .bx { grid-template-columns: 280px var(--fly) minmax(0, 1fr) var(--drw); }
  .bx[data-panel="fly"] { --fly: 330px; }
  .bx[data-panel="drawer"] { --drw: 380px; }
  .bx-deco-grid { grid-template-columns: 1fr 1fr; }
  .bx-actions button span:not(.sr-only) { display: none; }
  .bx-actions button { padding: 9px; }
}

/* ---------- phones: app-like column, bottom sheet ---------- */
@media (max-width: 980px) {
  .bx { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); min-height: 0; background: #FFF9FA; overflow: hidden; position: relative; }
  .bx-left { display: contents; }
  .bx-brand, .bx .bx-body, .bx-price, .bx-drawer { display: none !important; }
  .bx-top { order: 1; flex: none; height: 50px; padding: 0 8px 0 16px; background: #fff; }
  .bx-title h1 { font-size: 1.15rem; }
  .bx-title p { display: none; }
  .bx-actions { box-shadow: none; padding: 0; background: none; gap: 0; }
  .bx-actions button { padding: 8px 7px; }
  .bx-actions button svg { width: 19px; height: 19px; }
  .bx-sep { display: none; }
  .bx .bx-stage { order: 2; flex: 1 1 auto; position: relative; top: auto; height: auto; min-height: 0; border-radius: 0 0 28px 28px; box-shadow: none; }
  /* the sheet floats OVER the cake (the 3D area keeps its size) and sits on top of the section bar, which always stays */
  .bx-fly { position: absolute; left: 0; right: 0; bottom: var(--bx-dock, 136px); height: min(50dvh, calc(100% - var(--bx-dock, 136px) - 110px)); margin: 0; border-radius: 26px 26px 0 0; box-shadow: 0 -12px 30px rgba(120, 30, 70, .16); animation: bx-sheet .3s cubic-bezier(.2, .8, .2, 1); z-index: 9; display: flex; flex-direction: column; }
  .bx-fly[hidden] { display: none; }
  /* keyboard open (phones): the sheet jumps to the top of the builder, above the keyboard; the page stays still */
  .bx.kb-open .bx-fly { top: 0; bottom: auto; height: auto; max-height: 46%; border-radius: 0 0 26px 26px; animation: none; box-shadow: 0 12px 30px rgba(120, 30, 70, .16); }
  .bx.kb-open .bx-fly::before { display: none; }
  /* phones: the builder is an app screen — header on top, builder fills the rest, nothing scrolls, bounces or
     pulls to refresh (the footer isn't shown on this screen); "Sifariş et" leaves to the normal pages */
  html:has(body.is-builder) { overflow: hidden; overscroll-behavior: none; height: 100%; }
  body.is-builder { position: fixed; inset: 0; width: 100%; height: 100%; display: flex; flex-direction: column; overflow: hidden; overscroll-behavior: none; }
  body.is-builder > .site-header { flex: none; position: relative; }
  body.is-builder > main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  body.is-builder > main > .bx { flex: 1 1 auto; height: auto; }
  body.is-builder > .site-footer { display: none; }
  body.is-builder .site-header, body.is-builder .bx-top, body.is-builder .bx-steps, body.is-builder .b-mobile-bar { touch-action: manipulation; overscroll-behavior: none; }
  .bx-fly::before { content: ""; position: absolute; left: 50%; top: 8px; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: #EBD3DC; }
  @keyframes bx-sheet { from { transform: translateY(40%); opacity: .4; } }
  .bx-pop-head { padding: 20px 56px 4px 20px; }
  .bx-pop-head h2 { font-size: 1.2rem; }
  .bx-pop-x { top: 14px; }
  .bx-pop-body { padding: 8px 16px 16px; }
  .bx-fly .bx-deco-grid { grid-template-columns: 1fr 1fr; }
  .bx-thumb { width: 78px; height: 78px; }
  /* section toolbar */
  .bx .bx-steps { order: 4; flex: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; padding: 6px 4px 4px; overflow: visible; background: #fff; }
  .bx .bx-step { flex-direction: column; gap: 3px; padding: 6px 2px; border-radius: 14px; text-align: center; font-size: .62rem; }
  .bx .bx-step::after { display: none; }
  .bx .bx-step .bx-step-ic { width: 34px; height: 34px; border-radius: 12px; }
  .bx .bx-step .bx-step-ic svg { width: 18px; height: 18px; }
  .bx .bx-step-tx { align-items: center; }
  .bx .bx-step-tx em { font-size: .62rem; line-height: 1.15; }
  .bx .bx-step-tx small { display: none; }
  .bx .bx-step.is-active .bx-step-ic { background: var(--bx-soft); color: #B0476F; box-shadow: none; }
  .bx .bx-step.is-open .bx-step-ic { background: var(--bx-pink); color: #fff; }
  /* sticky price + order */
  .bx .b-mobile-bar { order: 5; flex: none; display: flex; position: relative; align-items: center; gap: 10px; padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--bx-line); z-index: 10; }
  .bx-mtotal { flex: 1; display: flex; flex-direction: column; align-items: flex-start; border: 0; background: none; padding: 0; line-height: 1.1; cursor: pointer; }
  .bx-mtotal strong { font-family: var(--serif); font-size: 1.45rem; color: #B30F49; }
  .bx .b-mobile-bar .btn-primary { padding-left: 1.6em; padding-right: 1.6em; border-radius: 16px; }
  .bx .bx-modes { bottom: 30px; }
  .bx .bx-modes button { padding: 7px 12px; font-size: .74rem; }
  .bx .bx-modes button svg { width: 15px; height: 15px; }
  .bx .bx-views { top: 10px; left: 10px; }
  .bx .bx-views button { padding: 5px 9px; font-size: .68rem; }
  .bx .bx-zoom { right: 10px; padding: 3px; }
  .bx .bx-zoom button { width: 34px; height: 34px; font-size: .95rem; }
  .bx .b-select-bar { top: auto; bottom: 74px; }
  .bx .b-photo-bar { bottom: 74px; }
  .bx[data-panel="sheet"] .bx-modes, .bx[data-panel="sheet"] .bx-zoom, .bx[data-panel="sheet"] .b-select-bar, .bx[data-panel="sheet"] .b-photo-bar { visibility: hidden; }
}
@media (max-width: 380px) {
  .bx-title h1 { font-size: 1rem; }
  .bx .bx-step-tx em { font-size: .58rem; }
}
/* sponge & filling cards: 3D cake-slice preview instead of a plain colour dot */
.opt-slice { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #fdf3f6; box-shadow: 0 0 0 1px rgba(197, 30, 98, .12), 0 2px 6px rgba(120, 30, 70, .12); }
.opt-card.is-active .opt-slice { box-shadow: 0 0 0 2px var(--pink), 0 2px 6px rgba(120, 30, 70, .16); }

/* colour of a selected decoration: small colour button in the selection bar + palette popover */
.b-select-bar { overflow: visible; }
.b-sel-tools .b-sel-color { display: inline-flex; align-items: center; justify-content: center; padding: 0; min-width: 32px; }
.b-sel-tools .b-sel-color[hidden] { display: none; }
.b-sel-color i { width: 20px; height: 20px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px rgba(0, 0, 0, .12); }
.b-sel-color.is-rainbow i, .b-sel-color i:not([style*="background"]) { background: conic-gradient(#f66, #fc6, #9e6, #6ce, #96f, #f6c, #f66) !important; }
.b-sel-palette { position: absolute; top: calc(100% + 8px); right: 8px; display: flex; flex-wrap: wrap; gap: 6px; width: 236px; max-width: 236px; padding: 10px; background: #fff; border-radius: 16px; box-shadow: 0 10px 30px rgba(90, 20, 50, .18); z-index: 8; }
.b-sel-palette[hidden] { display: none; }
@media (max-width: 980px) {
  .b-sel-palette { top: auto; bottom: calc(100% + 8px); right: 50%; transform: translateX(50%); width: min(300px, calc(100vw - 40px)); max-width: min(300px, calc(100vw - 40px)); }
}

/* radio pills (2/3/4 qat, Nazik/Orta/Qalın, Az/Standart/Hündür…): keep the hidden radio inside its pill —
   positioned against the page it sat far below, and clicking a pill focused it and scrolled the page down */
.bx .seg label { position: relative; }
.bx .seg input { top: 0; left: 0; width: 100%; height: 100%; margin: 0; }

/* selection bar for the inscription: edit ✎, colour, delete, close (rotate / size / copy belong to decorations) */
.b-sel-tools .b-sel-edit { display: none; }
.b-select-bar[data-kind="text"] .b-sel-edit { display: inline-flex; align-items: center; justify-content: center; }
.b-select-bar[data-kind="text"] [data-sel] { display: none; }

/* text colour: multicolour letters */
.swatch.swatch-rainbow { background: conic-gradient(#F2B705 0 14%, #2A2E8C 0 28%, #E3263B 0 42%, #2FA84F 0 57%, #1FA3DC 0 71%, #F07B1D 0 85%, #8E44AD 0); }

/* inscription field: up to 3 lines (Enter = new line) */
.bx textarea.b-text-input { min-height: 0; resize: none; line-height: 1.4; font-size: 16px; }
