/* FK Macaron Boxes – Frontend-Konfigurator */

.fkmb-open-btn { cursor: pointer; }

/* Kompositbild in Warenkorb/Kasse: einheitliche Bildbox (contain), damit alle Zeilen gleich hoch sind. */
img.fkmb-cart-thumb { width: 92px !important; height: 116px !important; max-width: 92px !important; object-fit: contain !important; display: block; }

/* Produktseiten-Umschalter (Bestseller / eigene Mischung) */
.fkmb-pdp { margin: 1rem 0 1.5rem; }
.fkmb-pdp .fkmb-toggle { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; margin: 0 0 1.2rem; padding: 0; }
.fkmb-pdp .fkmb-opt { flex: 1 1 240px; display: flex; align-items: center; gap: 12px; border: 2px solid #e2d8c8; border-radius: 12px; padding: 14px 16px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; }
.fkmb-pdp .fkmb-opt:hover { border-color: #e0b34d; }
.fkmb-pdp .fkmb-opt.selected { border-color: #d89b1f; background: #fff8ea; }
.fkmb-pdp .fkmb-opt:focus-visible { outline: 2px solid #e0b34d; outline-offset: 2px; }
.fkmb-pdp .fkmb-radio { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #c9bda8; position: relative; }
.fkmb-pdp .fkmb-opt.selected .fkmb-radio { border-color: #d89b1f; }
.fkmb-pdp .fkmb-opt.selected .fkmb-radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: #d89b1f; }
.fkmb-pdp .fkmb-opt-text { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.fkmb-pdp .fkmb-opt-title { font-weight: 700; color: #3a3025; }
.fkmb-pdp .fkmb-opt-sub { font-size: 12.5px; color: #8a8178; margin-top: 2px; }
.fkmb-pdp .fkmb-pdp-add { cursor: pointer; }
.fkmb-edit-wrap { margin-top: 4px; }
.fkmb-edit-link { font-size: 13px; color: #8a8178; text-decoration: underline; cursor: pointer; }
.fkmb-edit-link:hover { color: #333; }

/* Modal */
.fkmb-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 24px 12px; }
.fkmb-modal[hidden] { display: none; }
.fkmb-backdrop { position: fixed; inset: 0; background: rgba(20,16,14,.55); backdrop-filter: blur(2px); }
.fkmb-card {
	position: relative; z-index: 1; background: #fff; border-radius: 14px;
	width: 100%; max-width: 940px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
	padding: 22px 24px 26px; margin: auto;
}
.fkmb-close { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: #8a8178; }
.fkmb-close:hover { color: #333; }
.fkmb-title { margin: 0 0 2px; font-size: 22px; }
.fkmb-sub { color: #8a8178; margin: 0 0 16px; font-size: 14px; }

/* Schritt „Auswahl" */
.fkmb-choose { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .fkmb-choose { grid-template-columns: 1fr; } }
.fkmb-choice {
	border: 2px solid #ece6df; border-radius: 12px; padding: 20px; text-align: center; cursor: pointer;
	transition: border-color .15s, box-shadow .15s; background: #fdfcfa;
}
.fkmb-choice:hover { border-color: #e0b34d; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.fkmb-choice h3 { margin: 6px 0 4px; font-size: 18px; }
.fkmb-choice p { margin: 0; color: #8a8178; font-size: 13px; }
.fkmb-choice .fkmb-choice-ico { font-size: 34px; }

/* Schritt „Mixer" */
.fkmb-mix { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 22px; }
@media (max-width: 720px) { .fkmb-mix { grid-template-columns: 1fr; } }

.fkmb-tray-wrap { position: sticky; top: 8px; }
.fkmb-tray {
	background: #efe9e1; border-radius: 0; padding: 3px; display: grid; gap: 3px;
	aspect-ratio: var(--fkmb-ratio, 1); box-shadow: inset 0 0 0 1px rgba(0,0,0,.05);
	background-size: 100% 100%; background-position: center;
	/* Hochkant-Boxen (z. B. 8er 1×8) dürfen das Modal nicht sprengen. */
	max-height: 62vh; max-width: 100%; width: auto; margin: 0 auto;
}
.fkmb-slot { position: relative; }
.fkmb-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.fkmb-slot.fkmb-filled { animation: fkmb-pop .18s ease; cursor: pointer; }
.fkmb-slot.fkmb-filled:hover::after { content: '−'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; background: rgba(180,40,40,.45); }
@keyframes fkmb-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.fkmb-counter { text-align: center; margin: 10px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.fkmb-counter .fkmb-c-now { font-size: 20px; }
.fkmb-counter.full { color: #218838; }

.fkmb-sorts { max-height: 60vh; overflow-y: auto; padding-right: 4px; }
.fkmb-cat-h { margin: 14px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #b08a3e; border-bottom: 1px solid #f0eae1; padding-bottom: 4px; }
.fkmb-cat-h:first-child { margin-top: 0; }
.fkmb-sort-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }

.fkmb-sort {
	border: 1px solid #ece6df; border-radius: 10px; padding: 8px; text-align: center; position: relative;
	background: #fff;
}
.fkmb-sort:hover { border-color: #e0b34d; }
.fkmb-sort-add { cursor: pointer; display: block; }
.fkmb-sort.fkmb-has { border-color: #e0b34d; box-shadow: 0 0 0 1px #e0b34d inset; }
.fkmb-sort-img { width: 88px; max-width: 100%; aspect-ratio: 1.575; height: auto; object-fit: contain; margin: 2px auto 4px; display: block; }
.fkmb-sort-name { font-size: 12.5px; line-height: 1.2; min-height: 2.4em; display: flex; align-items: center; justify-content: center; }
.fkmb-step2 { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 6px; }
.fkmb-step2 button {
	width: 30px; height: 30px; border-radius: 50%; border: 1px solid #d9d2c8; background: #faf7f2;
	font-size: 17px; line-height: 1; cursor: pointer; color: #5a4a36;
}
.fkmb-step2 button:hover { background: #f0e7d6; }
.fkmb-step2 button:disabled { opacity: .35; cursor: not-allowed; }
.fkmb-step2 .fkmb-q { min-width: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fkmb-badge { position: absolute; top: 6px; right: 6px; background: #e0b34d; color: #3a2c12; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; }

.fkmb-foot { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fkmb-foot .fkmb-price { font-size: 18px; font-weight: 700; }
.fkmb-actions { display: flex; gap: 10px; align-items: center; }
.fkmb-link { background: none; border: 0; color: #8a8178; text-decoration: underline; cursor: pointer; font-size: 13px; }
.fkmb-cta {
	background: #e6a92b; color: #3a2c12; border: 0; border-radius: 8px; padding: 12px 22px;
	font-size: 15px; font-weight: 700; cursor: pointer;
}
.fkmb-cta:disabled { opacity: .45; cursor: not-allowed; }
.fkmb-hint { color: #b3261e; font-size: 13px; }
.fkmb-busy { opacity: .6; pointer-events: none; }
