/* Crest & Leather – Tag Builder */
.ctb-stage { position: relative; }
/* Voorbeeld en keuzes naast elkaar; het voorbeeld schuift alleen mee binnen dit blok. */
.ctb-layout, .ctb-shortcode .product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; margin-bottom: 56px; }
.ctb-layout::after { content: none; }
@media (min-width: 861px) { .ctb-layout .ctb-svg { width: auto; max-width: 100%; height: calc(100vh - 300px); max-height: 560px; min-height: 300px; } .ctb-layout .ctb-stage__frame { padding: 24px 24px 14px; } }
.woocommerce div.product .ctb-layout .ctb-stage.images,
.ctb-shortcode .ctb-stage { float: none; width: auto; margin: 0; position: sticky; top: 120px; z-index: 1; }
.woocommerce div.product .ctb-layout .summary,
.ctb-shortcode .summary { float: none; width: auto; margin: 0; }
.woocommerce div.product .woocommerce-tabs { clear: both; position: relative; z-index: 2; background: #F4EFE4; }
.ctb-stage__frame { background: #EAE2D2; border-radius: 24px; padding: 32px 24px 18px; text-align: center; }
.ctb-svg { width: 100%; max-width: 360px; height: auto; display: block; margin: 0 auto; overflow: visible; filter: drop-shadow(0 26px 30px rgba(60, 30, 10, .25)); touch-action: none; transition: transform .6s cubic-bezier(.2,.7,.1,1); }
.ctb-stage.is-back .ctb-svg { transform: rotateY(180deg) scaleX(-1); }
.ctb-draggable { cursor: grab; outline: none; }
.ctb-draggable:focus-visible { outline: none; stroke: #B08D57; stroke-width: .25; }
.ctb-svg.is-dragging, .ctb-svg.is-dragging .ctb-draggable { cursor: grabbing; }
.ctb-hint { margin: 14px 0 0; font-size: 16px; font-style: italic; color: #5C4632; transition: opacity .5s; }
.ctb-hint.is-used { opacity: 0; }
.ctb-sides { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.ctb-sides button { min-height: 44px; padding: 8px 20px; border-radius: 999px; border: 1px solid #CDBFA5; background: transparent; color: #5C4632; font: 600 13px/1 'Cinzel', Georgia, serif; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.ctb-sides button.is-active { background: #7A4A22; border-color: #7A4A22; color: #F4EFE4; }

.ctb-controls { display: flex; flex-direction: column; gap: 22px; margin: 6px 0 22px; }
.ctb-field { border: 0; border-top: 1px solid rgba(122, 74, 34, .2); padding: 18px 0 0; margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ctb-field legend { font-family: 'Cinzel', Georgia, serif; font-weight: 600; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: #7A4A22; padding: 0 0 6px; }
.ctb-field legend small { font-family: inherit; letter-spacing: 0; text-transform: none; color: #5C4632; font-weight: 400; }
.ctb-label { font-size: 16px; color: #5C4632; display: flex; justify-content: space-between; gap: 8px; }
.ctb-input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid #CDBFA5; border-radius: 12px; background: #fff; font: 20px 'Cormorant Garamond', Georgia, serif; color: #1C1A17; }
.ctb-input:focus { outline: 2px solid #B08D57; outline-offset: 1px; border-color: #B08D57; }
.ctb-count { align-self: flex-end; font-size: 14px; color: #5C4632; margin-top: -6px; }

.ctb-swatches { display: flex; gap: 14px; flex-wrap: wrap; }
.ctb-swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.ctb-swatch input, .ctb-font input, .ctb-icon input, .ctb-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ctb-swatch__dot { width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); transition: box-shadow .2s; }
.ctb-swatch input:checked + .ctb-swatch__dot { box-shadow: 0 0 0 3px #F4EFE4, 0 0 0 5px #7A4A22; }
.ctb-swatch input:focus-visible + .ctb-swatch__dot { box-shadow: 0 0 0 3px #F4EFE4, 0 0 0 5px #B08D57; }
.ctb-fixed { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 19px; }
.ctb-fixed .ctb-swatch__dot { width: 32px; height: 32px; }
.ctb-swatch__label { font-size: 15px; color: #5C4632; }

.ctb-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.ctb-seg label span, .ctb-seg button { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border: 1px solid #CDBFA5; border-radius: 999px; background: #fff; color: #5C4632; font-size: 16px; cursor: pointer; font-family: 'Cormorant Garamond', Georgia, serif; }
.ctb-seg input:checked + span { background: #7A4A22; border-color: #7A4A22; color: #F4EFE4; }
.ctb-seg input:focus-visible + span, .ctb-seg button:focus-visible { outline: 2px solid #B08D57; outline-offset: 2px; }
.ctb-seg button:hover, .ctb-seg label span:hover { border-color: #7A4A22; }

.ctb-fonts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ctb-font { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border: 1px solid #CDBFA5; border-radius: 12px; background: #fff; cursor: pointer; }
.ctb-font span { font-size: 28px; line-height: 1.1; color: #1C1A17; }
.ctb-font small { font-size: 13px; color: #5C4632; }
.ctb-font:has(input:checked) { border-color: #7A4A22; box-shadow: inset 0 0 0 1px #7A4A22; background: #FBF8F2; }
.ctb-font:has(input:focus-visible) { outline: 2px solid #B08D57; outline-offset: 2px; }

.ctb-icons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ctb-icon { position: relative; cursor: pointer; }
.ctb-icon > span:first-of-type { display: flex; align-items: center; justify-content: center; height: 52px; border: 1px solid #CDBFA5; border-radius: 12px; background: #fff; color: #5C4632; }
.ctb-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ctb-icon em { font-size: 15px; }
.ctb-icon input:checked + span { border-color: #7A4A22; box-shadow: inset 0 0 0 1px #7A4A22; background: #FBF8F2; color: #7A4A22; }
.ctb-icon input:focus-visible + span { outline: 2px solid #B08D57; outline-offset: 2px; }
[data-ctb-icon-opts] { display: flex; flex-direction: column; gap: 10px; }
[data-ctb-icon-opts][hidden] { display: none; }

.ctb-help { margin: -2px 0 2px; font-size: 16px; line-height: 1.45; color: #5C4632; }
.ctb-upload { position: relative; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px; border: 1px dashed #B08D57; border-radius: 14px; background: #FBF8F2; cursor: pointer; }
.ctb-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.ctb-upload:focus-within { outline: 2px solid #B08D57; outline-offset: 2px; }
.ctb-upload__btn { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 18px; border-radius: 999px; background: #7A4A22; color: #F4EFE4; font: 600 13px/1 'Cinzel', Georgia, serif; letter-spacing: .12em; text-transform: uppercase; }
.ctb-upload__name { font-size: 16px; color: #5C4632; overflow-wrap: anywhere; }
[data-ctb-logo-opts], [data-ctb-gift-opts] { display: flex; flex-direction: column; gap: 10px; }
[data-ctb-logo-opts][hidden], [data-ctb-gift-opts][hidden] { display: none; }
.ctb-seg button.ctb-remove { color: #A32D2D; border-color: #E2C4C4; }
.ctb-gift { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid #CDBFA5; border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .2s, background .2s; }
.ctb-gift input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ctb-gift__box { flex: none; width: 52px; height: 52px; border-radius: 12px; background: #F4EFE4; color: #7A4A22; display: flex; align-items: center; justify-content: center; }
.ctb-gift__box svg { width: 34px; height: 34px; }
.ctb-gift__text { display: flex; flex-direction: column; gap: 2px; font-size: 16px; line-height: 1.4; color: #5C4632; }
.ctb-gift__text strong { font-size: 18px; color: #1C1A17; }
.ctb-gift::after { content: ''; flex: none; margin-left: auto; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #CDBFA5; background: #fff; }
.ctb-gift:has(input:checked) { border-color: #7A4A22; background: #FBF8F2; box-shadow: inset 0 0 0 1px #7A4A22; }
.ctb-gift:has(input:checked)::after { border-color: #7A4A22; background: #7A4A22 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23F4EFE4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.ctb-gift:has(input:focus-visible) { outline: 2px solid #B08D57; outline-offset: 2px; }
.ctb-pack { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 14px; border-radius: 14px; background: #FBF8F2; font-size: 16px; line-height: 1.4; color: #5C4632; }
.ctb-pack svg { flex: none; width: 36px; height: 36px; color: #7A4A22; }
.ctb-textarea { min-height: 84px; resize: vertical; font-size: 18px; }

.ctb-range { width: 100%; accent-color: #7A4A22; height: 28px; }
.ctb-check { display: flex; align-items: flex-start; gap: 10px; font-size: 18px; cursor: pointer; }
.ctb-check input { width: 20px; height: 20px; margin-top: 4px; accent-color: #7A4A22; }
.ctb-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 20px; background: #EAE2D2; border-radius: 14px; }
.ctb-total span { font-family: 'Cinzel', Georgia, serif; letter-spacing: .16em; font-size: 14px; color: #5C4632; }
.ctb-total strong { font-size: 28px; color: #1C1A17; }
.ctb-error { margin: 0; color: #A32D2D; font-size: 17px; }
.ctb-error[hidden] { display: none; }

.ctb-product .woocommerce-product-gallery { display: none; }
.ctb-product div.product form.cart { display: block; }
.ctb-product div.product form.cart .quantity { margin-right: 10px; }

@media (max-width: 860px) {
  .ctb-layout, .ctb-shortcode .product { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .woocommerce div.product .ctb-layout .ctb-stage.images, .ctb-shortcode .ctb-stage { position: static; }
  .ctb-stage { margin-bottom: 24px; }
  .ctb-svg { max-width: 240px; }
  .ctb-fonts, .ctb-icons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
