/* Gift Box Builder — Kravings design.
   Colours come from WooCommerce → Settings → Gift Box Builder → Appearance (defaults are the Kravings palette). */

.gbb-wizard {
	--gbb-red: var(--gbb-btn-primary-bg, #CA2026);
	--gbb-choc: var(--gbb-text, #381516);
	--gbb-custard: var(--gbb-card-bg, #FFEECF);
	--gbb-vanilla: var(--gbb-qty-btn-bg, #F7E7D0);
	--gbb-muted: #6B4A3A;
	--gbb-yellow: #E8BB39;
	--gbb-orange: #F38C56;
	--gbb-line: 2.5px solid var(--gbb-choc);
	--gbb-display: var(--wp--preset--font-family--titan-one, 'Titan One', 'Arial Rounded MT Bold', sans-serif);
	--gbb-label: var(--wp--preset--font-family--archivo, Archivo, 'Arial Narrow', sans-serif);
	font-family: var(--gbb-font, inherit);
	color: var(--gbb-choc);
	box-sizing: border-box;
}
.gbb-wizard *, .gbb-wizard *::before, .gbb-wizard *::after { box-sizing: border-box; }
.gbb-wizard h2, .gbb-wizard h3 { color: var(--gbb-heading, var(--gbb-choc)); }
.gbb-wizard img { max-width: 100%; display: block; }
.gbb-wizard .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Step indicator ---------- */
.gbb-steps { margin: 0 0 32px; padding: 16px 20px; border: var(--gbb-line); border-radius: 999px; background: var(--gbb-vanilla); }
.gbb-steps-indicator { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.gbb-step-dot { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; color: var(--gbb-muted); }
.gbb-step-num { flex: none; width: 40px; height: 40px; border: 2.5px solid rgba(56, 21, 22, .45); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--gbb-display); font-size: 19px; line-height: 1; }
.gbb-step-dot.active { color: var(--gbb-choc); font-weight: 900; }
.gbb-step-dot.active .gbb-step-num { border-color: var(--gbb-choc); background: var(--gbb-red); color: var(--gbb-btn-primary-text, #FFEECF); }
.gbb-step-dot.done { color: var(--gbb-choc); font-weight: 800; }
.gbb-step-dot.done .gbb-step-num { border-color: var(--gbb-choc); background: var(--gbb-choc); color: var(--gbb-custard); }
.gbb-step-line { flex: 1 1 20px; min-width: 20px; max-width: 80px; height: 2.5px; border-radius: 2px; background: rgba(56, 21, 22, .3); }
.gbb-step-line.done { background: var(--gbb-choc); }
@media (max-width: 760px) {
	.gbb-steps { border-radius: 22px; padding: 12px 14px; }
	.gbb-step-label { display: none; }
	.gbb-step-dot.active .gbb-step-label { display: inline; }
	.gbb-step-num { width: 34px; height: 34px; font-size: 16px; }
}

/* ---------- Layout ---------- */
.gbb-layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px; }
.gbb-main { flex: 999 1 600px; min-width: 0; }
.gbb-title { margin: 0 0 22px; font-family: var(--gbb-display); font-weight: 400; font-size: clamp(30px, 3vw, 38px); line-height: 1.05; }
.gbb-lead { margin: -10px 0 22px; font-size: 17px; font-weight: 600; line-height: 1.55; }

/* ---------- Cards (shared) ---------- */
.gbb-card { position: relative; cursor: pointer; }
.gbb-check { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border: var(--gbb-line); border-radius: 50%; background: var(--gbb-red); color: var(--gbb-btn-primary-text, #FFEECF); display: flex; align-items: center; justify-content: center; z-index: 2; }

/* Step 1 — boxes and styles */
.gbb-attr-level { margin-bottom: 28px; }
.gbb-attr-level h3 { margin: 0 0 14px; font-family: var(--gbb-label); font-stretch: 75%; font-weight: 800; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; color: var(--gbb-red); }
.gbb-attr-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 44%), 1fr)); gap: 18px; }
.gbb-attr-options.gbb-label-only { display: flex; flex-wrap: wrap; gap: 10px; }
.gbb-option { display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 16px; border: var(--gbb-line); border-radius: var(--gbb-card-radius, 22px); background: var(--gbb-custard); transition: transform .15s ease, box-shadow .15s ease; }
.gbb-option:hover, .gbb-option:focus-visible { transform: translateY(-3px); box-shadow: 0 5px 0 var(--gbb-choc); outline: none; }
.gbb-option.selected { border: 3px solid var(--gbb-card-selected-border, #CA2026); box-shadow: 0 5px 0 var(--gbb-card-selected-border, #CA2026); }
.gbb-option__img { display: block; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; background: #F5DC98; }
.gbb-option__img img { width: 100%; height: 100%; object-fit: cover; }
.gbb-option .gbb-name { font-size: 17px; font-weight: 900; line-height: 1.3; }
.gbb-option .gbb-price { font-size: 17px; font-weight: 900; }
.gbb-option__meta { font-size: 14px; font-weight: 700; color: var(--gbb-muted); }
.gbb-option--pill { flex-direction: row; align-items: center; padding: 0 22px; height: 48px; border-radius: 999px; }
.gbb-option--pill .gbb-name { font-size: 16px; }
.gbb-option--pill.selected { background: var(--gbb-choc); color: var(--gbb-custard); border-color: var(--gbb-choc); box-shadow: none; }
.gbb-out-of-stock { font-size: 13px; font-weight: 900; color: var(--gbb-error, #CA2026); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Step 2 — treats ---------- */
.gbb-panel-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 24px; margin-bottom: 22px; }
.gbb-panel-header .gbb-title { margin: 0; }
.gbb-header-tools { display: flex; flex-wrap: wrap; gap: 12px; }
.gbb-field { display: flex; flex-direction: column; gap: 6px; }
.gbb-field label { font-size: 13px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--gbb-red); }
.gbb-field select, .gbb-field input[type=search] { height: 48px; min-width: 180px; padding: 0 18px; border: var(--gbb-line); border-radius: 999px; background: var(--gbb-vanilla); font-weight: 700; font-size: 16px; font-family: inherit; line-height: 1.2; color: var(--gbb-choc); }
.gbb-field select { -webkit-appearance: none; appearance: none; padding-right: 40px; background: var(--gbb-vanilla) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23381516' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 14px center / 16px no-repeat; }
.gbb-field input[type=search] { width: 220px; }
.gbb-field select:focus, .gbb-field input:focus { outline: 2px solid var(--gbb-red); outline-offset: 2px; }

.gbb-carousel-wrap { position: relative; display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.gbb-carousel-wrap[hidden] { display: none; }
.gbb-carousel { flex: 1; min-width: 0; display: flex; gap: 10px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; padding: 2px; }
.gbb-carousel::-webkit-scrollbar { display: none; }
.gbb-cat-tab, .gbb-brand-tab { flex: none; height: 46px; padding: 0 20px; border: 2.5px solid var(--gbb-tab-border, #381516); border-radius: var(--gbb-tab-radius, 999px); background: var(--gbb-tab-bg, transparent); color: var(--gbb-tab-text, #381516); font-weight: 800; font-size: 15.5px; font-family: inherit; line-height: 1.2; white-space: nowrap; cursor: pointer; }
.gbb-cat-tab:hover, .gbb-brand-tab:hover { background: var(--gbb-vanilla); }
.gbb-cat-tab.active, .gbb-brand-tab.active { background: var(--gbb-tab-active-bg, #381516); color: var(--gbb-tab-active-text, #FFEECF); font-weight: 900; }
.gbb-carousel-arrow { flex: none; width: 42px; height: 42px; border: var(--gbb-line); border-radius: 50%; background: var(--gbb-choc); color: var(--gbb-custard); font-size: 24px; font-weight: 900; line-height: 1; cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 3px 0 var(--gbb-red); }
.gbb-carousel-arrow svg { display: block; width: 20px; height: 20px; }
.gbb-carousel-arrow[hidden] { display: none; }
.gbb-carousel-arrow:disabled { background: var(--gbb-vanilla); color: rgba(56, 21, 22, .35); border-color: rgba(56, 21, 22, .3); box-shadow: none; cursor: default; }

.gbb-capacity-note { margin: 0 0 18px; font-weight: 800; font-size: 15.5px; color: var(--gbb-muted); }
.gbb-capacity-note.gbb-at-capacity { color: var(--gbb-red); }

.gbb-filler-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 44%), 1fr)); gap: 34px 18px; }
.gbb-product { display: flex; flex-direction: column; gap: 10px; min-width: 0; cursor: default; }
.gbb-product__img { position: relative; aspect-ratio: 1 / 1; border: var(--gbb-line); border-radius: var(--gbb-card-radius, 22px); overflow: hidden; }
.gbb-product__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.gbb-product.selected .gbb-product__img { border: 3px solid var(--gbb-card-selected-border, #CA2026); }
.gbb-product.is-out .gbb-product__img img { opacity: .5; }
.gbb-product__brand { font-size: 12.5px; line-height: 1; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--gbb-red); }
.gbb-product .gbb-name { font-size: 16.5px; line-height: 1.35; font-weight: 800; color: var(--gbb-card-name, #381516); }
.gbb-product .gbb-price { font-size: 17px; font-weight: 900; color: var(--gbb-card-price, #381516); }
.gbb-product .gbb-price del { font-size: 14.5px; font-weight: 600; color: var(--gbb-muted); margin-left: 6px; }
.gbb-product .gbb-price ins { text-decoration: none; }
.gbb-add { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border: var(--gbb-line); border-radius: 999px; background: var(--gbb-custard); color: var(--gbb-choc); font-weight: 900; font-size: 15.5px; font-family: inherit; line-height: 1.2; cursor: pointer; }
.gbb-add:hover:not(:disabled) { background: var(--gbb-vanilla); }
.gbb-add:disabled { opacity: .5; cursor: not-allowed; }
.gbb-filler-qty { margin-top: auto; display: flex; align-items: center; justify-content: space-between; height: 46px; border: var(--gbb-line); border-radius: 999px; background: var(--gbb-red); color: var(--gbb-btn-primary-text, #FFEECF); overflow: hidden; }
.gbb-qty-btn { width: 46px; height: 100%; border: 0; background: transparent; color: inherit; font-weight: 900; font-size: 22px; font-family: inherit; line-height: 1.2; cursor: pointer; }
.gbb-qty-btn:hover:not(:disabled) { background: rgba(0, 0, 0, .12); }
.gbb-qty-btn:disabled { opacity: .45; cursor: not-allowed; }
.gbb-qty-value { font-size: 15px; font-weight: 900; }
.gbb-empty-state { grid-column: 1 / -1; padding: 40px; border: 2px dashed rgba(56, 21, 22, .35); border-radius: 22px; text-align: center; font-weight: 800; color: var(--gbb-muted); background: var(--gbb-vanilla); }

.gbb-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.gbb-page-btn { min-width: 46px; height: 46px; padding: 0 14px; border: 2.5px solid var(--gbb-page-border, #381516); border-radius: var(--gbb-page-radius, 999px); background: var(--gbb-page-bg, transparent); color: var(--gbb-page-text, #381516); font-weight: 800; font-size: 15px; font-family: inherit; line-height: 1.2; cursor: pointer; }
.gbb-page-btn.active { background: var(--gbb-page-active-bg, #381516); color: var(--gbb-page-active-text, #FFEECF); }
.gbb-page-btn:disabled:not(.active) { opacity: .4; cursor: default; }
.gbb-page-btn--arrow { width: 46px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.gbb-page-btn--arrow svg { display: block; width: 22px; height: 22px; }
.gbb-page-btn:not(:disabled):not(.active):hover { background: var(--gbb-yellow, #E8BB3A); }
.gbb-page-ellipsis { align-self: center; font-weight: 900; }

/* ---------- Step 3 & 4 ---------- */
.gbb-card-yesno { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 18px; }
.gbb-card-yesno button { position: relative; display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 16px 20px; border: var(--gbb-line); border-radius: 22px; background: var(--gbb-custard); color: var(--gbb-choc); font-weight: 800; font-size: 17px; font-family: inherit; line-height: 1.2; text-align: left; cursor: pointer; }
.gbb-card-yesno button:hover { box-shadow: 0 4px 0 var(--gbb-choc); }
.gbb-card-yesno button.selected { border: 3px solid var(--gbb-red); box-shadow: 0 4px 0 var(--gbb-red); }
.gbb-yesno__icon { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--gbb-choc); color: var(--gbb-custard); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.gbb-card-yesno .gbb-check { top: 50%; transform: translateY(-50%); right: 16px; }
.gbb-wizard textarea { width: 100%; padding: 16px 18px; border: var(--gbb-line); border-radius: 18px; background: var(--gbb-vanilla); font-weight: 600; font-size: 16px; font-family: inherit; line-height: 1.2; color: var(--gbb-choc); resize: vertical; }
.gbb-wizard textarea:focus { outline: 2px solid var(--gbb-red); outline-offset: 2px; }

/* ---------- Step 5 — review ---------- */
#gbb-review { border: var(--gbb-line); border-radius: 26px; background: var(--gbb-custard); padding: 6px 24px; }
.gbb-review-section { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 2px dashed rgba(56, 21, 22, .25); font-weight: 700; }
.gbb-review-section strong { font-weight: 900; }
.gbb-review-item { display: flex; align-items: center; gap: 12px; }
.gbb-review-item img { width: 46px; height: 46px; border: 2px solid var(--gbb-choc); border-radius: 10px; object-fit: contain; background: #F3CFD7; }
.gbb-review-total { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0; font-family: var(--gbb-display); font-size: 30px; }

/* ---------- Summary ---------- */
.gbb-summary { flex: 1 1 340px; min-width: 0; position: sticky; top: 24px; border: var(--gbb-line); border-radius: 28px; background: var(--gbb-custard); overflow: hidden; box-shadow: 8px 8px 0 var(--gbb-choc); }
.gbb-summary__head { position: relative; padding: 22px 24px; background: var(--gbb-choc); color: #F7E7D0; }
.gbb-summary__eyebrow { margin: 0; font-family: var(--gbb-label); font-stretch: 75%; font-weight: 800; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--gbb-yellow); }
.gbb-summary__title { margin: 8px 0 0; padding-right: 92px; font-family: var(--gbb-display); font-weight: 400; font-size: 30px; line-height: 1.05; color: var(--gbb-custard) !important; }
.gbb-summary__box { margin: 6px 0 0; padding-right: 90px; font-size: 15px; font-weight: 700; }
.gbb-link { padding: 0; border: 0; background: none; color: var(--gbb-yellow); font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.gbb-summary__count { position: absolute; top: 18px; right: 18px; width: 86px; height: 86px; border: 2.5px solid #F7E7D0; border-radius: 50%; background: var(--gbb-orange); transform: rotate(10deg); display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--gbb-label); font-stretch: 75%; font-weight: 900; color: var(--gbb-choc); line-height: 1; text-transform: uppercase; text-align: center; }
.gbb-summary__count b { font-size: 30px; }
.gbb-summary__count b i { font-style: normal; font-size: 16px; }
.gbb-summary__count small { font-size: 13.5px; }
.gbb-summary__items { list-style: none; margin: 0; padding: 4px 22px; max-height: 340px; overflow: auto; }
.gbb-summary__items li { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.gbb-summary__items li + li { border-top: 2px dashed rgba(56, 21, 22, .25); }
.gbb-sum-img { flex: none; width: 54px; height: 54px; border: 2px solid var(--gbb-choc); border-radius: 12px; background: #F3CFD7; overflow: hidden; }
.gbb-sum-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.gbb-sum-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 15px; font-weight: 800; line-height: 1.3; }
.gbb-sum-txt b { font-weight: 900; }
.gbb-sum-remove { flex: none; width: 40px; height: 40px; margin-right: -8px; border: 0; background: transparent; color: var(--gbb-choc); font-size: 16px; cursor: pointer; border-radius: 50%; }
.gbb-sum-remove:hover { background: var(--gbb-vanilla); }
.gbb-sum-empty { font-size: 15px; font-weight: 700; color: var(--gbb-muted); }
.gbb-summary__totals { margin: 0; padding: 16px 22px; display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; font-size: 15.5px; background: var(--gbb-vanilla); border-top: var(--gbb-line); border-bottom: var(--gbb-line); }
.gbb-summary__totals dt { font-weight: 700; color: var(--gbb-muted); }
.gbb-summary__totals dd { margin: 0; text-align: right; font-weight: 900; }
.gbb-summary__totals dd.gbb-muted { font-weight: 700; color: var(--gbb-muted); }
.gbb-summary__foot { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 12px; }
.gbb-summary__total-wrap { display: flex; flex-direction: column; gap: 4px; }
.gbb-summary__label { font-family: var(--gbb-label); font-stretch: 75%; font-weight: 800; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--gbb-red); }
.gbb-summary__total { font-family: var(--gbb-display); font-size: 36px; line-height: 1; white-space: nowrap; }
.gbb-summary__note { margin: 0; font-size: 14.5px; line-height: 1.5; font-weight: 700; color: var(--gbb-muted); }
.gbb-nav { display: flex; flex-direction: column; gap: 8px; }
.gbb-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 58px; padding: 0 22px; border: var(--gbb-line); border-radius: var(--gbb-btn-radius, 999px); font-weight: 900; font-size: 17px; font-family: inherit; line-height: 1.2; cursor: pointer; transition: transform .12s ease; }
.gbb-btn-primary { background: var(--gbb-btn-primary-bg, #CA2026); color: var(--gbb-btn-primary-text, #FFEECF); box-shadow: 0 5px 0 var(--gbb-choc); }
.gbb-btn-primary:hover:not(:disabled) { background: var(--gbb-choc); }
.gbb-btn-primary:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 var(--gbb-choc); }
.gbb-btn-primary::after { content: "→"; font-size: 20px; }
.gbb-btn:disabled { opacity: .55; cursor: not-allowed; }
.gbb-btn-secondary { background: var(--gbb-btn-secondary-bg, #FFEECF); color: var(--gbb-btn-secondary-text, #381516); }
.gbb-btn-link { min-height: 44px; border: 0; background: none; color: var(--gbb-choc); font-size: 16px; text-decoration: underline; text-decoration-color: var(--gbb-red); text-decoration-thickness: 2.5px; text-underline-offset: 6px; box-shadow: none; }
.gbb-error { padding: 12px 16px; border: 2px solid var(--gbb-error, #CA2026); border-radius: 16px; background: #FBE1DF; color: var(--gbb-choc); font-weight: 800; font-size: 15px; }
.gbb-capacity-reminder { padding: 12px 16px; border: 2px solid var(--gbb-choc); border-radius: 16px; background: var(--gbb-yellow); font-weight: 800; font-size: 15px; }

/* ---------- Mobile ---------- */
.gbb-mobilebar { display: none; }
@media (max-width: 980px) {
	.gbb-summary { position: static; flex-basis: 100%; }
	.gbb-mobilebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 2.5px solid var(--gbb-choc); background: var(--gbb-custard); }
	.gbb-mobilebar__total { flex: 1; display: flex; flex-direction: column; line-height: 1.1; }
	.gbb-mobilebar__total small { font-size: 12.5px; font-weight: 800; color: var(--gbb-red); text-transform: uppercase; letter-spacing: .06em; }
	.gbb-mobilebar__total b { font-family: var(--gbb-display); font-weight: 400; font-size: 24px; }
	.gbb-mobilebar .gbb-btn { width: auto; min-height: 48px; font-size: 15.5px; box-shadow: 0 3px 0 var(--gbb-choc); }
	.gbb-wizard { padding-bottom: 80px; }
	.gbb-field input[type=search], .gbb-field select { width: 100%; min-width: 0; }
	.gbb-header-tools, .gbb-field { width: 100%; }
}
