/**
 * Akustikbild Konfigurator - Premium UI
 * Clean, modern design inspired by Desenio
 *
 * @package Plugin\fs_akustikbilder
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    --akb-primary: #1a1a1a;
    --akb-primary-hover: #333;
    --akb-accent: #c02942;
    --akb-accent-light: rgba(192, 41, 66, 0.08);
    --akb-text: #1a1a1a;
    --akb-text-muted: #666;
    --akb-text-light: #999;
    --akb-border: #e0e0e0;
    --akb-border-dark: #1a1a1a;
    --akb-bg: #fff;
    --akb-bg-light: #f7f7f7;
    --akb-bg-cream: #faf9f7;
    --akb-success: #22c55e;
    --akb-warning: #f59e0b;
    --akb-error: #dc2626;
    --akb-shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --akb-shadow: 0 4px 12px rgba(0,0,0,0.1);
    --akb-shadow-lg: 0 12px 40px rgba(0,0,0,0.15);
    --akb-radius: 8px;
    --akb-radius-lg: 16px;
    --akb-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base Container - Full Width Stage
   ========================================================================== */
.akb-configurator {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    color: var(--akb-text);
    line-height: 1.5;
    margin: 0 0 2rem;
    width: 100%;
}

/* Override product layout when configurator active */
.akb-configurator-active .product-detail .row {
    display: block !important;
}

/* Hide default product gallery */
.akb-configurator-active .product-detail .gallery,
.akb-configurator-active .product-detail #gallery,
.akb-configurator-active .product-detail .product-gallery,
.akb-configurator-active .product-detail .col-xl-7,
.akb-configurator-active .product-detail .product-images,
.akb-configurator-active .product-detail .product-image,
.akb-configurator-active .product-detail > .row > .col-12:first-child {
    display: none !important;
}

/* Make the product info column full width */
.akb-configurator-active .product-detail .col-xl-5,
.akb-configurator-active .product-detail > .row > .col-12:last-child {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* Hide JTL variations until image is uploaded */
.akb-configurator-active .variations,
.akb-configurator-active .simple-variations {
    display: none !important;
}

/* Hide product info inner (not needed with configurator) */
.akb-configurator-active .product-info-inner {
    display: none !important;
}

/* Remove theme padding on mobile for Akustikbilder */
@media (max-width: 991px) {
    .akb-configurator-active .product-info,
    .akb-configurator-active .product-details {
        padding: 0 !important;
    }
}

/* Show variations inside our wrapper */
.akb-variations-wrapper .variations,
.akb-variations-wrapper .simple-variations {
    display: block !important;
}
.product-attributes.blanklist.p-att {
    display: none !important;
}

/* ==========================================================================
   UPLOAD STATE - Full-width Hero Stage
   ========================================================================== */
.akb-state-upload {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem 1.5rem;
    text-align: center;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--akb-radius-lg);
    border: 2px dashed var(--akb-border);
    position: relative;
    overflow: hidden;
}

.akb-state-upload::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(192, 41, 66, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(26, 26, 26, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.product-attributes blanklist p-att {
    display: none !important;
}
@media (min-width: 768px) {
    .akb-state-upload {
        padding: 3rem 2rem;
        min-height: 400px;
    }
}

.akb-upload-container {
    max-width: 520px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.akb-upload-header {
    margin-bottom: 2rem;
}

.akb-upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    background: var(--akb-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.akb-upload-icon i {
    font-size: 28px;
    color: #fff;
}

.akb-upload-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--akb-text);
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .akb-upload-title {
        font-size: 2rem;
    }
}

.akb-upload-subtitle {
    font-size: 1rem;
    color: var(--akb-text-muted);
    margin: 0;
}

/* Dropzone */
.akb-dropzone {
    position: relative;
    border: 2px dashed var(--akb-border);
    border-radius: var(--akb-radius-lg);
    padding: 2.5rem 1.5rem;
    cursor: pointer;
    transition: var(--akb-transition);
    background: var(--akb-bg);
}

.akb-dropzone:hover {
    border-color: var(--akb-primary);
    background: var(--akb-bg-light);
}

.akb-dropzone.akb-drag-over {
    border-color: var(--akb-accent);
    border-style: solid;
    background: var(--akb-accent-light);
    transform: scale(1.02);
}

.akb-dropzone-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.akb-dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.akb-dropzone-icon {
    width: 48px;
    height: 48px;
    border: 2px solid var(--akb-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--akb-transition);
}

.akb-dropzone:hover .akb-dropzone-icon {
    border-color: var(--akb-primary);
    background: var(--akb-primary);
}

.akb-dropzone:hover .akb-dropzone-icon i {
    color: #fff;
}

.akb-dropzone-icon i {
    font-size: 20px;
    color: var(--akb-text-muted);
    transition: var(--akb-transition);
}

.akb-dropzone-text {
    font-size: 1rem;
    color: var(--akb-text);
}

.akb-dropzone-text strong {
    color: var(--akb-accent);
    font-weight: 600;
}

.akb-dropzone-hint {
    font-size: 0.875rem;
    color: var(--akb-text-light);
}

/* Progress Ring */
.akb-progress-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

.akb-progress-ring {
    position: relative;
    width: 80px;
    height: 80px;
}

.akb-progress-ring svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.akb-progress-bg {
    fill: none;
    stroke: var(--akb-border);
    stroke-width: 4;
}

.akb-progress-fill {
    fill: none;
    stroke: var(--akb-accent);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 251;
    stroke-dashoffset: 251;
    transition: stroke-dashoffset 0.3s ease;
}

.akb-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--akb-text);
}

.akb-progress-label {
    font-size: 0.875rem;
    color: var(--akb-text-muted);
}

/* Features */
.akb-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--akb-border);
    flex-wrap: wrap;
}

.akb-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--akb-text-muted);
}

.akb-feature i {
    font-size: 1.125rem;
    color: var(--akb-accent);
}

/* ==========================================================================
   PREVIEW STATE - Split Layout
   ========================================================================== */
.akb-state-preview {
    display: none;
}

.akb-state-preview.akb-active {
    display: block;
    animation: akbFadeIn 0.4s ease;
}

@keyframes akbFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.akb-preview-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .akb-preview-layout {
        grid-template-columns: 1fr 400px;
        gap: 2rem;
        align-items: start;
    }
}

/* Image Section */
.akb-image-section {
    background: var(--akb-bg-light);
    border-radius: var(--akb-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Snackys Zone unter dem Bild */
.akb-after-preview-zone {
    margin-top: 1rem;
}

.akb-after-preview-zone:empty {
    display: none;
}

.akb-image-frame {
    position: relative;
    padding: 0;
    min-height: 400px;
    height: 500px;
    display: block;
    /* Room background for size context */
    background-image: url('/plugins/fs_content/images/akustikbilder/bg_wohnzimmer.webp');
    background-size: var(--akb-bg-size, cover);
    background-position: var(--akb-bg-position, center 30%);
    background-repeat: no-repeat;
    border-radius: var(--akb-radius-lg);
    overflow: hidden;
    transition: background-size 0.4s ease, background-position 0.4s ease, background-image 0.3s ease;
}

/* Named backgrounds - stage-dependent */
.akb-image-frame.akb-bg-wohnzimmer {
    background-image: url('/plugins/fs_content/images/akustikbilder/bg_wohnzimmer.webp');
}

.akb-image-frame.akb-bg-wohnzimmer2 {
    background-image: url('/plugins/fs_content/images/akustikbilder/bg_wohnzimmer2.webp');
}

.akb-image-frame.akb-bg-atelier {
    background-image: url('/plugins/fs_content/images/akustikbilder/bg_atelier.webp');
}

.akb-image-frame.akb-bg-kids {
    background-image: url('/plugins/fs_content/images/akustikbilder/bg_kids.webp');
}

.akb-image-frame.akb-bg-restaurant {
    background-image: url('/plugins/fs_content/images/akustikbilder/bg_restaurant.webp');
}

.akb-image-frame.akb-bg-esszimmer {
    background-image: url('/plugins/fs_content/images/akustikbilder/bg_esszimmer.webp');
}

.akb-image-frame.akb-bg-praxis {
    background-image: url('/plugins/fs_content/images/akustikbilder/bg_praxis.webp');
}

@media (min-width: 768px) {
    .akb-image-frame {
        min-height: 500px;
        height: 600px;
    }
}

@media (min-width: 1200px) {
    .akb-image-frame {
        min-height: 700px;
        height: 900px;
    }
}

/* ==========================================================================
   Dual-View Carousel (Desktop defaults + Mobile overrides)
   ========================================================================== */

/* Desktop: Carousel is transparent wrapper, detail-view hidden */
.akb-view-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}
.akb-view-detail { display: none; }
.akb-view-dots { display: none; }
.akb-view-room {
    width: 100%;
    height: 100%;
}

/* Rotate Button - bottom center, above zoom */
.akb-rotate-overlay {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--akb-border);
    border-radius: 24px;
    color: var(--akb-text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--akb-transition);
    z-index: 15;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.akb-rotate-overlay:hover {
    background: var(--akb-accent);
    border-color: var(--akb-accent);
    color: #fff;
    transform: translateX(-50%) scale(1.05);
}

.akb-rotate-overlay:disabled,
.akb-rotate-overlay.akb-loading {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

.akb-rotate-overlay.akb-loading i {
    animation: akbSpin 0.8s linear infinite;
}

@keyframes akbSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.akb-rotate-overlay i {
    font-size: 1.125rem;
}

/* Zoom Button - bottom right */
.akb-zoom-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    z-index: 10;
}

/* Background Selector - bottom left */
.akb-bg-selector {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.akb-bg-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: var(--akb-transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.akb-bg-thumb:hover {
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

.akb-bg-thumb.active {
    border-color: var(--akb-accent);
    box-shadow: 0 0 0 2px var(--akb-accent), 0 2px 8px rgba(0,0,0,0.3);
}

/* Background thumbnails - named */
.akb-bg-thumb[data-bg="wohnzimmer"] {
    background-image: url('/plugins/fs_content/images/akustikbilder/bg_wohnzimmer.webp');
}

.akb-bg-thumb[data-bg="wohnzimmer2"] {
    background-image: url('/plugins/fs_content/images/akustikbilder/bg_wohnzimmer2.webp');
}

.akb-bg-thumb[data-bg="atelier"] {
    background-image: url('/plugins/fs_content/images/akustikbilder/bg_atelier.webp');
}

.akb-bg-thumb[data-bg="kids"] {
    background-image: url('/plugins/fs_content/images/akustikbilder/bg_kids.webp');
}

.akb-bg-thumb[data-bg="restaurant"] {
    background-image: url('/plugins/fs_content/images/akustikbilder/bg_restaurant.webp');
}

.akb-bg-thumb[data-bg="esszimmer"] {
    background-image: url('/plugins/fs_content/images/akustikbilder/bg_esszimmer.webp');
}

.akb-bg-thumb[data-bg="praxis"] {
    background-image: url('/plugins/fs_content/images/akustikbilder/bg_praxis.webp');
}

.akb-control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--akb-radius);
    color: #fff;
    font-size: 1.125rem;
    cursor: pointer;
    transition: var(--akb-transition);
    backdrop-filter: blur(4px);
}

.akb-control-btn:hover {
    background: rgba(0, 0, 0, 0.85);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.akb-control-btn.active {
    background: var(--akb-accent);
    border-color: var(--akb-accent);
}

.akb-control-btn i {
    font-size: 1.25rem;
}

.akb-preview-image {
    position: absolute;
    /* Centered horizontally above the sofa, top position controlled by JS */
    left: 50%;
    top: var(--akb-panel-top, 20%);
    transform: translateX(-50%);
    /* Size controlled by JS based on selected dimensions */
    width: var(--akb-panel-width, 120px);
    height: var(--akb-panel-height, 180px);
    object-fit: cover;
    box-shadow: var(--akb-shadow-lg);
    border-radius: 2px;
    transition: width 0.3s ease, height 0.3s ease, top 0.3s ease;
}

/* Draggable image - show move cursor when panning is possible */
.akb-preview-image.akb-can-drag {
    cursor: grab;
}

.akb-preview-image.akb-can-drag:active,
.akb-preview-image.akb-dragging {
    cursor: grabbing;
    transition: none; /* Disable transitions while dragging */
}

/* Frame preview effects */

/* Keilrahmen: 4cm thick, 0.5cm radius, depth + shadow */
.akb-image-frame.frame-keilrahmen .akb-preview-image {
    border: none;
    border-radius: 3px;
    box-shadow:
        /* Main drop shadow for depth */
        0 8px 24px rgba(0,0,0,0.25),
        0 4px 8px rgba(0,0,0,0.15),
        /* Simulated canvas edge depth (4cm = ~16px scaled) */
        -3px 3px 0 -1px rgba(0,0,0,0.1),
        3px 3px 0 -1px rgba(0,0,0,0.1),
        /* Soft inner glow for canvas texture feel */
        inset 0 0 0 1px rgba(255,255,255,0.1);
}

/* Schattenfugenrahmen weiß: 2.5cm frame + 1.5cm shadow gap (image recessed)
   Structure from outside to inside: Frame (2.5cm cream) -> Gap (1.5cm gray) -> Image */
.akb-image-frame.frame-weiss .akb-preview-image {
    border: var(--akb-shadow-gap, 8px) solid #eaeaea;
    border-radius: 0;
    outline: var(--akb-frame-schattenfuge, 12px) solid #f8f6f1;
    outline-offset: 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 4px 12px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.06);
}

/* Schattenfugenrahmen schwarz: 2.5cm frame + 1.5cm shadow gap (image recessed)
   Structure from outside to inside: Frame (2.5cm dark) -> Gap (1.5cm dark gray) -> Image */
.akb-image-frame.frame-schwarz .akb-preview-image {
    border: var(--akb-shadow-gap, 8px) solid #2a2a2a;
    border-radius: 0;
    outline: var(--akb-frame-schattenfuge, 12px) solid #242424;
    outline-offset: 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.03);
}

/* ==========================================================================
   SIZE PRESETS - Clickable Swatches
   ========================================================================== */
.akb-size-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.akb-size-preset {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    min-width: 80px;
    background: var(--akb-bg);
    border: 2px solid var(--akb-border);
    border-radius: var(--akb-radius);
    cursor: pointer;
    transition: var(--akb-transition);
    text-align: center;
}

.akb-size-preset:hover {
    border-color: var(--akb-primary);
    background: var(--akb-bg-light);
}

.akb-size-preset.active {
    border-color: var(--akb-accent);
    background: var(--akb-accent-light);
}

.akb-size-preset-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--akb-text);
}

.akb-size-preset-dim {
    font-size: 0.75rem;
    color: var(--akb-text-muted);
    margin-top: 0.25rem;
}

/* Custom Size Toggle */
.akb-size-custom-toggle {
    border-style: dashed;
}

.akb-size-custom-toggle .akb-size-preset-label i {
    font-size: 1.25rem;
}

/* Swap Dimensions Button */
.akb-swap-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--akb-border);
    border-radius: var(--akb-radius);
    color: var(--akb-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--akb-transition);
}

.akb-swap-btn:hover {
    border-color: var(--akb-primary);
    color: var(--akb-primary);
    background: var(--akb-bg-light);
}

.akb-swap-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.akb-swap-btn:hover i {
    transform: rotate(90deg);
}

/* Custom Size Inputs */
.akb-custom-size {
    display: none;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--akb-bg-light);
    border-radius: var(--akb-radius);
}

.akb-custom-size.akb-visible {
    display: flex;
}

.akb-size-input-group {
    flex: 1;
}

.akb-size-input-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--akb-text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.akb-size-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--akb-bg);
    border: 2px solid var(--akb-border);
    border-radius: var(--akb-radius);
    overflow: hidden;
}

.akb-size-btn {
    width: 48px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--akb-bg);
    border: none;
    color: var(--akb-text);
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--akb-transition);
}

.akb-size-btn:hover {
    background: var(--akb-bg-light);
    color: var(--akb-accent);
}

.akb-size-btn:active {
    background: var(--akb-accent-light);
}

.akb-size-input {
    flex: 1;
    width: 80px;
    height: 56px;
    border: none;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--akb-text);
    background: transparent;
    /* Hide spinner arrows */
    -moz-appearance: textfield !important;
}

/* Chrome, Safari, Edge - hide number input spinners */
.akb-size-input::-webkit-outer-spin-button,
.akb-size-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    appearance: none !important;
    margin: 0 !important;
    display: none !important;
}

/* Firefox - hide number input spinners */
.akb-size-input[type="number"] {
    -moz-appearance: textfield !important;
}

.akb-size-input:focus {
    outline: none;
}

/* Quality Warning */
.akb-quality-warning {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid var(--akb-warning);
}

.akb-quality-warning.akb-visible {
    display: flex;
}

.akb-quality-warning i {
    color: var(--akb-warning);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.akb-quality-warning span {
    font-size: 0.875rem;
    color: #92400e;
}

/* Image Info Bar */
.akb-image-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    margin-top: 1rem;
    background: var(--akb-primary);
    color: #fff;
    flex-wrap: wrap;
    gap: 0.75rem;
    border-radius: 0.5rem;
}

.akb-info-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.akb-info-separator {
    opacity: 0.4;
}

.akb-change-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--akb-radius);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--akb-transition);
}

.akb-change-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
}

/* ==========================================================================
   Config Section
   ========================================================================== */
.akb-config-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.akb-config-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--akb-border);
    margin-bottom: 1.5rem;
}

.akb-product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--akb-text);
    margin: 0 0 0.25rem;
}

.akb-product-sku {
    font-size: 0.75rem;
    color: var(--akb-text-light);
    margin: 0;
}

.akb-config-group {
    margin-bottom: 1.5rem;
}

.akb-config-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--akb-text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* JTL Variations Container - no box, clean style */
.akb-variations-wrapper {
    background: transparent;
    border: none;
    padding: 0;
}

/* Override JTL variation styles */
.akb-variations-wrapper .variations,
.akb-variations-wrapper .simple-variations {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.akb-variations-wrapper .var-it {
    padding: 0;
    margin: 0;
    border: none;
}

/* Hide variation titles (we use our own label) */
.akb-variations-wrapper .var-title,
.akb-variations-wrapper dt {
    display: none;
}

/* Style radio/swatch options like size presets */
.akb-variations-wrapper .variation,
.akb-variations-wrapper label.variation {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    min-width: 100px;
    background: var(--akb-bg);
    border: 2px solid var(--akb-border);
    border-radius: var(--akb-radius);
    cursor: pointer;
    transition: var(--akb-transition);
    text-align: center;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--akb-text);
}

.akb-variations-wrapper .variation:hover,
.akb-variations-wrapper label.variation:hover {
    border-color: var(--akb-primary);
    background: var(--akb-bg-light);
}

.akb-variations-wrapper .variation.active,
.akb-variations-wrapper label.variation.active,
.akb-variations-wrapper input:checked + label.variation,
.akb-variations-wrapper input:checked + .variation {
    border-color: var(--akb-accent);
    background: var(--akb-accent-light);
}

/* ==========================================================================
   Custom Material Selector (same pattern as frame selector)
   ========================================================================== */
.akb-material-selector {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.akb-material-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
    min-width: 140px;
    padding: 1rem 0.75rem;
    background: var(--akb-bg);
    border: 2px solid var(--akb-border);
    border-radius: var(--akb-radius);
    cursor: pointer;
    transition: var(--akb-transition);
}

.akb-material-option:hover {
    border-color: var(--akb-primary);
    background: var(--akb-bg-light);
}

.akb-material-option.active {
    border-color: var(--akb-accent);
    background: var(--akb-accent-light);
}

.akb-material-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--akb-text-muted);
    background: var(--akb-bg-light);
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.akb-material-badge-premium {
    color: #b45309;
    background: #fef3c7;
}

.akb-material-option.active .akb-material-badge {
    color: white;
    background: var(--akb-accent);
}

.akb-material-option.active .akb-material-badge-premium {
    color: white;
    background: #b45309;
}

.akb-material-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--akb-text);
}

.akb-material-details {
    font-size: 0.75rem;
    color: var(--akb-text-muted);
}

/* ==========================================================================
   Frame Selector with Images
   ========================================================================== */
.akb-frame-selector {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.akb-frame-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--akb-bg);
    border: 2px solid var(--akb-border);
    border-radius: var(--akb-radius);
    cursor: pointer;
    transition: var(--akb-transition);
    min-width: 90px;
}

.akb-frame-option img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    transition: var(--akb-transition);
}

.akb-frame-option:hover {
    border-color: var(--akb-primary);
    background: var(--akb-bg-light);
}

.akb-frame-option:hover img {
    transform: scale(1.05);
}

.akb-frame-option.active {
    border-color: var(--akb-accent);
    background: var(--akb-accent-light);
}

.akb-frame-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--akb-text);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Frame Preview */
.akb-frame-preview {
    margin-top: 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.akb-frame-preview.visible {
    max-height: 300px;
    opacity: 1;
}

.akb-frame-preview img {
    width: 100%;
    max-width: 350px;
    border-radius: var(--akb-radius);
    box-shadow: var(--akb-shadow);
}

/* Hide radio inputs, show only labels */
.akb-variations-wrapper input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Flex container for swatches */
.akb-variations-wrapper dd,
.akb-variations-wrapper .var-value {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

/* Hide ALL JTL variations - we use custom buttons for everything */
.akb-variations-wrapper .var-it,
.akb-variations-wrapper dl,
.akb-variations-wrapper .variations,
.akb-variations-wrapper .simple-variations {
    display: none !important;
}

/* Cart Wrapper */
.akb-cart-wrapper {
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--akb-border);
}

.akb-cart-wrapper .form-inline,
.akb-cart-wrapper .product-buy-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.akb-cart-wrapper .btn-primary,
.akb-cart-wrapper .btn-basket {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    background: var(--akb-accent);
    border-color: var(--akb-accent);
    border-radius: var(--akb-radius);
}

.akb-cart-wrapper .btn-primary:hover,
.akb-cart-wrapper .btn-basket:hover {
    background: #a82238;
    border-color: #a82238;
}

/* Info Cards */
.akb-info-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.akb-info-card {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem;
    background: var(--akb-bg-light);
    border-radius: var(--akb-radius);
}

.akb-info-card i {
    font-size: 1.25rem;
    color: var(--akb-accent);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.akb-info-card-content {
    flex: 1;
}

.akb-info-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--akb-text);
    margin: 0 0 0.125rem;
}

.akb-info-card-desc {
    font-size: 0.8125rem;
    color: var(--akb-text-muted);
    margin: 0;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.akb-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--akb-primary);
    color: #fff;
    border-radius: var(--akb-radius);
    box-shadow: var(--akb-shadow-lg);
    z-index: 10000;
    font-size: 0.9375rem;
    max-width: 400px;
    animation: akbSlideIn 0.3s ease;
}

.akb-toast.akb-toast-error {
    background: var(--akb-error);
}

.akb-toast.akb-toast-success {
    background: var(--akb-success);
}

@keyframes akbSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.akb-hidden {
    display: none !important;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 575px) {
    .akb-upload-title {
        font-size: 1.5rem;
    }

    .akb-dropzone {
        padding: 2rem 1rem;
    }

    .akb-features {
        flex-direction: column;
        gap: 1rem;
    }

    .akb-image-info {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .akb-change-btn {
        justify-content: center;
    }
}

/* ==========================================================================
   Mobile UX Overhaul
   ========================================================================== */

/* --- A) Image Frame auf Mobile optimieren --- */
@media (max-width: 991px) {
    .akb-image-frame {
        min-height: 300px;
        height: 60vw;
        max-height: 500px;
        border-radius: 0;
        margin: 0 -15px;
        width: calc(100% + 30px);
    }
    .akb-image-section {
        border-radius: 0;
    }
}

/* --- B) Overlay-Buttons auf Mobile reorganisieren --- */
@media (max-width: 575px) {
    .akb-rotate-overlay {
        bottom: 0.75rem;
        left: auto;
        right: 3.5rem;
        transform: none;
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    .akb-rotate-overlay span { display: none; }

    .akb-zoom-btn {
        bottom: 0.75rem;
        right: 0.75rem;
        width: 40px;
        height: 40px;
    }

    .akb-bg-thumb {
        width: 36px;
        height: 36px;
    }
    .akb-bg-selector {
        bottom: 0.75rem;
        left: 0.75rem;
    }
}

/* --- C) Size-Presets als Grid auf Mobile --- */
@media (max-width: 575px) {
    .akb-size-presets {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    .akb-size-preset {
        min-width: unset;
        padding: 0.625rem 0.5rem;
    }
    .akb-size-preset-label { font-size: 0.8rem; }
    .akb-size-preset-dim { font-size: 0.7rem; }
}

/* --- D) Frame & Material Selectors auf Mobile --- */
@media (max-width: 575px) {
    .akb-frame-selector {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
    .akb-frame-option { min-width: unset; }
    .akb-frame-option img { width: 56px; height: 56px; }

    .akb-material-selector {
        flex-direction: column;
    }
    .akb-material-option {
        flex-direction: row;
        min-width: unset;
        gap: 0.75rem;
        text-align: left;
        padding: 0.875rem 1rem;
    }
}

/* --- E) Sticky Add-to-Cart Bar auf Mobile --- */
@media (max-width: 991px) {
    .akb-sticky-cart {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100001;
        background: #fff;
        border-top: 1px solid var(--akb-border);
        box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
        padding: 0.75rem 1rem;
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }
    .akb-sticky-cart.akb-visible {
        transform: translateY(0);
    }
    .akb-sticky-cart-price {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--akb-text);
        white-space: nowrap;
    }
    .akb-sticky-cart-price small {
        display: block;
        font-size: 0.7rem;
        font-weight: 400;
        color: var(--akb-text-muted);
    }
    .akb-sticky-cart-btn {
        flex: 1;
        max-width: 220px;
        padding: 0.875rem 1.5rem;
        background: var(--akb-accent);
        color: #fff;
        border: none;
        border-radius: var(--akb-radius);
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: var(--akb-transition);
    }
    .akb-sticky-cart-btn:active {
        transform: scale(0.97);
        background: #a82238;
    }

    /* Body-Padding fuer Sticky Bar */
    .akb-configurator-active {
        padding-bottom: 80px;
    }

    /* Original cart wrapper auf Mobile weniger prominent */
    .akb-cart-wrapper .btn-primary,
    .akb-cart-wrapper .btn-basket {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
}

/* --- F) Toast auf Mobile fixen --- */
@media (max-width: 991px) {
    .akb-toast {
        top: auto;
        bottom: calc(80px + env(safe-area-inset-bottom, 0px));
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

/* --- G) Config-Section Mobile-Spacing --- */
@media (max-width: 991px) {
    .akb-config-section {
        padding: 0 0.5rem;
    }
    .akb-config-group {
        margin-bottom: 1.25rem;
    }
    .akb-config-label {
        font-size: 0.7rem;
        margin-bottom: 0.5rem;
    }
}

/* --- H) Custom-Size-Inputs Mobile-Optimierung --- */
@media (max-width: 575px) {
    .akb-custom-size {
        gap: 0.75rem;
    }
    .akb-size-input {
        font-size: 1.25rem;
        height: 48px;
    }
    .akb-size-btn {
        width: 44px;
        height: 48px;
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   I) Mobile Dual-View Carousel
   ========================================================================== */
@media (max-width: 991px) {
    .akb-view-carousel {
        position: relative;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    .akb-view-slide {
        position: absolute;
        top: 0; left: 0;
        width: 100%; height: 100%;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }
    .akb-view-slide.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Detail View: Bild zentriert, kein Raum, neutraler BG */
    .akb-view-detail {
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--akb-bg-light);
    }
    .akb-detail-image {
        max-width: 85%;
        max-height: 85%;
        object-fit: contain;
        border-radius: 2px;
        box-shadow: var(--akb-shadow-lg);
    }

    /* Frame-Styles auch auf Detail-Image */
    .akb-image-frame.frame-keilrahmen .akb-detail-image {
        border: none;
        border-radius: 3px;
        box-shadow:
            0 8px 24px rgba(0,0,0,0.25),
            0 4px 8px rgba(0,0,0,0.15),
            -3px 3px 0 -1px rgba(0,0,0,0.1),
            3px 3px 0 -1px rgba(0,0,0,0.1),
            inset 0 0 0 1px rgba(255,255,255,0.1);
    }
    .akb-image-frame.frame-weiss .akb-detail-image {
        border: var(--akb-shadow-gap, 8px) solid #eaeaea;
        border-radius: 0;
        outline: var(--akb-frame-schattenfuge, 12px) solid #f8f6f1;
        outline-offset: 0;
        box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 4px 12px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.06);
    }
    .akb-image-frame.frame-schwarz .akb-detail-image {
        border: var(--akb-shadow-gap, 8px) solid #2a2a2a;
        border-radius: 0;
        outline: var(--akb-frame-schattenfuge, 12px) solid #242424;
        outline-offset: 0;
        box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.03);
    }

    /* Room View: Hintergrund vom Frame auf den Slide verschieben */
    .akb-image-frame {
        background-image: none !important;
    }
    .akb-image-frame.akb-bg-wohnzimmer .akb-view-room {
        background-image: url('/plugins/fs_content/images/akustikbilder/bg_wohnzimmer.webp');
        background-size: var(--akb-bg-size, cover);
        background-position: var(--akb-bg-position, center 30%);
        background-repeat: no-repeat;
    }
    .akb-image-frame.akb-bg-wohnzimmer2 .akb-view-room {
        background-image: url('/plugins/fs_content/images/akustikbilder/bg_wohnzimmer2.webp');
        background-size: var(--akb-bg-size, cover);
        background-position: var(--akb-bg-position, center 30%);
        background-repeat: no-repeat;
    }
    .akb-image-frame.akb-bg-atelier .akb-view-room {
        background-image: url('/plugins/fs_content/images/akustikbilder/bg_atelier.webp');
        background-size: var(--akb-bg-size, cover);
        background-position: var(--akb-bg-position, center 30%);
        background-repeat: no-repeat;
    }
    .akb-image-frame.akb-bg-kids .akb-view-room {
        background-image: url('/plugins/fs_content/images/akustikbilder/bg_kids.webp');
        background-size: var(--akb-bg-size, cover);
        background-position: var(--akb-bg-position, center 30%);
        background-repeat: no-repeat;
    }
    .akb-image-frame.akb-bg-restaurant .akb-view-room {
        background-image: url('/plugins/fs_content/images/akustikbilder/bg_restaurant.webp');
        background-size: var(--akb-bg-size, cover);
        background-position: var(--akb-bg-position, center 30%);
        background-repeat: no-repeat;
    }
    .akb-image-frame.akb-bg-esszimmer .akb-view-room {
        background-image: url('/plugins/fs_content/images/akustikbilder/bg_esszimmer.webp');
        background-size: var(--akb-bg-size, cover);
        background-position: var(--akb-bg-position, center 30%);
        background-repeat: no-repeat;
    }
    .akb-image-frame.akb-bg-praxis .akb-view-room {
        background-image: url('/plugins/fs_content/images/akustikbilder/bg_praxis.webp');
        background-size: var(--akb-bg-size, cover);
        background-position: var(--akb-bg-position, center 30%);
        background-repeat: no-repeat;
    }

    /* Dot Navigation */
    .akb-view-dots {
        display: flex;
        gap: 0.5rem;
        position: absolute;
        bottom: 0.75rem;
        left: 50%;
        transform: translateX(-50%);
        z-index: 20;
    }
    .akb-view-dot {
        width: 8px; height: 8px;
        border-radius: 50%;
        border: none;
        background: rgba(255,255,255,0.5);
        cursor: pointer;
        transition: all 0.2s;
        padding: 0;
    }
    .akb-view-dot.active {
        background: #fff;
        width: 24px;
        border-radius: 4px;
    }

    /* Dots auf hellem Detail-Hintergrund dunkler darstellen */
    .akb-image-frame.akb-showing-detail .akb-view-dot {
        background: rgba(0,0,0,0.25);
    }
    .akb-image-frame.akb-showing-detail .akb-view-dot.active {
        background: rgba(0,0,0,0.6);
    }

    /* Overlay-Buttons: Kontext-Awareness per View
       .akb-showing-detail is set on .akb-image-frame by JS */
    .akb-image-frame.akb-showing-detail .akb-zoom-btn { display: none; }
    .akb-image-frame.akb-showing-detail .akb-bg-selector { display: none; }
}

/* ==========================================================================
   J) Mobile Selector Cards + Bottom Sheets (Variante E)
   ========================================================================== */

/* Desktop: Cards & Sheets verstecken */
.akb-selector-cards { display: none; }
.akb-sheet-overlay { display: none; }
.akb-sheet-panel { display: none; }
.akb-config-header { /* Desktop: normal anzeigen */ }

@media (max-width: 991px) {
    /* Config-Header auf Mobile ausblenden (kein Nutzer braucht SKU) */
    .akb-config-header { display: none; }

    /* Config-Section auf Mobile verstecken (wird durch Selector-Cards ersetzt) */
    .akb-config-section { display: none !important; }

    /* After-Preview-Zone auf Mobile verstecken */
    .akb-after-preview-zone { display: none; }

    /* Image-Frame größer */
    .akb-image-frame {
        height: 50vh;
        max-height: 480px;
    }

    /* === Selector Cards === */
    .akb-selector-cards {
        display: flex;
        gap: 6px;
        padding: 8px 12px;
        background: #fff;
    }
    .akb-selector-card {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 8px 4px;
        border: 1.5px solid #eee;
        border-radius: 10px;
        background: #fff;
        cursor: pointer;
        transition: all 0.15s;
        text-align: center;
        min-width: 0;
    }
    .akb-selector-card:active {
        transform: scale(0.97);
        background: var(--akb-bg-light);
    }
    .akb-selector-card-label {
        font-size: 8px;
        font-weight: 700;
        color: #999;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }
    .akb-selector-card-value {
        font-size: 11px;
        font-weight: 600;
        color: var(--akb-text);
        margin-top: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    .akb-selector-card-chevron {
        font-size: 8px;
        color: #bbb;
        margin-top: 2px;
    }

    /* === Bottom Sheet Overlay === */
    .akb-sheet-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1000;
        opacity: 0;
        transition: opacity 0.25s ease;
    }
    .akb-sheet-overlay.akb-open {
        display: block;
        opacity: 1;
    }

    /* === Bottom Sheet Panel === */
    .akb-sheet-panel {
        display: block;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        background: #fff;
        border-radius: 16px 16px 0 0;
        z-index: 1001;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
        max-height: 80vh;
        overflow-y: auto;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .akb-sheet-panel.akb-open {
        transform: translateY(0);
    }
    .akb-sheet-handle {
        width: 36px;
        height: 4px;
        background: #ddd;
        border-radius: 2px;
        margin: 10px auto 0;
    }
    .akb-sheet-header {
        padding: 12px 20px 8px;
        font-size: 15px;
        font-weight: 700;
        color: var(--akb-text);
    }
    .akb-sheet-body {
        padding: 0 16px calc(20px + 4rem);
    }

    /* Sheet: Größen-Optionen */
    .akb-sheet-sizes {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .akb-sheet-size-option {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 12px 8px;
        border: 2px solid #eee;
        border-radius: 10px;
        background: #fff;
        cursor: pointer;
        transition: all 0.15s;
    }
    .akb-sheet-size-option.active {
        border-color: var(--akb-accent);
        background: var(--akb-accent-light);
    }
    .akb-sheet-size-option .akb-sheet-size-dim {
        font-size: 14px;
        font-weight: 600;
        color: var(--akb-text);
    }
    .akb-sheet-size-option .akb-sheet-size-label {
        font-size: 11px;
        color: var(--akb-text-muted);
        margin-top: 2px;
    }

    /* Sheet: Custom Size Toggle */
    .akb-sheet-custom-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 12px;
        border: 2px dashed #ddd;
        border-radius: 10px;
        cursor: pointer;
        color: var(--akb-text-muted);
        font-size: 13px;
        font-weight: 500;
        transition: all 0.15s;
        grid-column: 1 / -1;
    }
    .akb-sheet-custom-toggle.active {
        border-color: var(--akb-accent);
        color: var(--akb-accent);
        background: var(--akb-accent-light);
    }
    .akb-sheet-swap-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        padding: 12px;
        margin-top: 12px;
        border: 1px dashed var(--akb-border);
        border-radius: var(--akb-radius);
        background: none;
        color: var(--akb-text-muted);
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.15s;
    }
    .akb-sheet-swap-btn:active {
        border-color: var(--akb-primary);
        color: var(--akb-primary);
    }
    .akb-sheet-swap-btn i {
        font-size: 1rem;
    }
    .akb-sheet-custom-inputs {
        display: none;
        grid-column: 1 / -1;
        gap: 8px;
        padding-top: 4px;
    }
    .akb-sheet-custom-inputs.akb-visible {
        display: flex;
    }
    .akb-sheet-custom-inputs .akb-size-input-group {
        flex: 1;
    }

    /* Sheet: Rahmen-Optionen */
    .akb-sheet-frames {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .akb-sheet-frame-option {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 12px 8px;
        border: 2px solid #eee;
        border-radius: 10px;
        background: #fff;
        cursor: pointer;
        transition: all 0.15s;
    }
    .akb-sheet-frame-option.active {
        border-color: var(--akb-accent);
        background: var(--akb-accent-light);
    }
    .akb-sheet-frame-option img {
        width: 56px;
        height: 56px;
        object-fit: cover;
        border-radius: 6px;
        margin-bottom: 6px;
    }
    .akb-sheet-frame-option span {
        font-size: 12px;
        font-weight: 500;
        color: var(--akb-text);
    }

    /* Sheet: Material-Optionen */
    .akb-sheet-materials {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .akb-sheet-material-option {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 16px;
        border: 2px solid #eee;
        border-radius: 10px;
        background: #fff;
        cursor: pointer;
        transition: all 0.15s;
    }
    .akb-sheet-material-option.active {
        border-color: var(--akb-accent);
        background: var(--akb-accent-light);
    }
    .akb-sheet-material-option .akb-sheet-mat-badge {
        font-size: 9px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        padding: 2px 6px;
        border-radius: 4px;
        background: var(--akb-bg-light);
        color: var(--akb-text-muted);
        white-space: nowrap;
    }
    .akb-sheet-material-option.active .akb-sheet-mat-badge {
        background: var(--akb-accent);
        color: #fff;
    }
    .akb-sheet-material-option .akb-sheet-mat-info {
        flex: 1;
    }
    .akb-sheet-material-option .akb-sheet-mat-name {
        font-size: 14px;
        font-weight: 600;
        color: var(--akb-text);
    }
    .akb-sheet-material-option .akb-sheet-mat-details {
        font-size: 11px;
        color: var(--akb-text-muted);
        margin-top: 1px;
    }
}

/* ============================================
   MAP DESIGNER STYLES
   ============================================ */

/* Map Frame - positioned like akb-preview-image, sized by JS */
.akb-map-frame {
    position: absolute;
    left: 50%;
    top: var(--akb-panel-top, 20%);
    transform: translateX(-50%);
    transform-origin: center top;
    width: var(--akb-panel-width, 200px);
    height: var(--akb-panel-height, 150px);
    z-index: 2;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: var(--akb-shadow-lg);
    transition: transform 0.3s ease, top 0.3s ease;
}

.akb-maplibre-container {
    width: 100%;
    height: 100%;
}

/* Map Frame inherits frame styles like preview-image */
.akb-image-frame.frame-keilrahmen .akb-map-frame {
    border: none;
    border-radius: 3px;
    box-shadow:
        0 8px 24px rgba(0,0,0,0.25),
        0 4px 8px rgba(0,0,0,0.15),
        -3px 3px 0 -1px rgba(0,0,0,0.1),
        3px 3px 0 -1px rgba(0,0,0,0.1),
        inset 0 0 0 1px rgba(255,255,255,0.1);
}

.akb-image-frame.frame-weiss .akb-map-frame {
    border: var(--akb-shadow-gap, 8px) solid #eaeaea;
    border-radius: 0;
    outline: var(--akb-frame-schattenfuge, 12px) solid #f8f6f1;
    outline-offset: 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 4px 12px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.06);
}

.akb-image-frame.frame-schwarz .akb-map-frame {
    border: var(--akb-shadow-gap, 8px) solid #2a2a2a;
    border-radius: 0;
    outline: var(--akb-frame-schattenfuge, 12px) solid #242424;
    outline-offset: 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 4px 12px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.06);
}

/* Map Confirm Button */
.akb-map-confirm {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 12px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #e0e0e0;
    color: #999;
}

.akb-map-confirm.akb-dirty {
    background: var(--akb-primary, #2a6b4a);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.akb-map-confirm.akb-dirty:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.akb-map-confirm.akb-saving {
    opacity: 0.6;
    pointer-events: none;
}

.akb-map-confirm.akb-saving i {
    animation: akb-spin 0.6s linear infinite;
}

@keyframes akb-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Map Text Overlay — sized relative to map-frame via container query */
.akb-map-frame {
    container-type: size;
    container-name: map-frame;
}

/* Map Marker */
.akb-map-marker {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transition: color 0.3s;
}
.akb-map-marker svg {
    display: block;
    width: 6cqw;
    height: auto;
}

.akb-map-text-overlay {
    position: absolute;
    bottom: 4%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 5;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2cqh;
    color: #1a1a1a;
    width: 90%;
    padding: 3cqh 4cqw;
    border-radius: 2px;
    transition: background-color 0.3s, color 0.3s;
}

.akb-map-text-city {
    font-size: clamp(8px, 5cqw, 28px);
    font-weight: 700;
    letter-spacing: 0.15em;
    line-height: 1.1;
    white-space: nowrap;
}

.akb-map-text-divider {
    width: 20%;
    height: 1px;
    background: rgba(0,0,0,0.2);
}

.akb-map-text-subtitle {
    font-size: clamp(6px, 2.5cqw, 14px);
    font-weight: 300;
    opacity: 0.7;
}

.akb-map-text-coords {
    font-size: clamp(5px, 2cqw, 11px);
    font-weight: 300;
    opacity: 0.5;
    letter-spacing: 0.05em;
}

/* Search */
.akb-map-search-wrapper {
    position: relative;
}

.akb-map-search-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--akb-border);
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s;
    outline: none;
    box-sizing: border-box;
}

.akb-map-search-input:focus {
    border-color: var(--akb-primary);
}

.akb-map-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--akb-border);
    border-radius: 0 0 8px 8px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    display: none;
}

.akb-map-search-results.akb-visible {
    display: block;
}

.akb-map-search-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f0f0f0;
    font-family: inherit;
}

.akb-map-search-item:hover {
    background: #f5f5f5;
}

.akb-map-search-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--akb-text);
}

.akb-map-search-detail {
    display: block;
    font-size: 11px;
    color: var(--akb-text-muted);
    margin-top: 2px;
}

.akb-map-search-empty {
    padding: 12px 14px;
    color: var(--akb-text-muted);
    font-size: 13px;
}

/* Theme Swatches */
.akb-map-theme-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.akb-map-theme-swatch,
.akb-sheet-theme-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: none;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
    font-family: inherit;
}

.akb-map-theme-swatch:hover,
.akb-sheet-theme-swatch:hover {
    transform: scale(1.05);
}

.akb-map-theme-swatch.active,
.akb-sheet-theme-swatch.active {
    border-color: var(--akb-primary);
}

.akb-swatch-bg {
    display: block;
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.akb-swatch-water {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 45%;
    height: 35%;
    border-radius: 0 8px 0 0;
}

.akb-swatch-road {
    position: absolute;
    top: 30%;
    left: 20%;
    width: 60%;
    height: 3px;
    border-radius: 2px;
}

.akb-swatch-label {
    font-size: 11px;
    color: var(--akb-text-muted);
    font-weight: 500;
}

/* Zoom Slider */
.akb-map-zoom-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.akb-map-zoom-label {
    font-size: 11px;
    color: var(--akb-text-muted);
    white-space: nowrap;
    min-width: 36px;
}

.akb-map-zoom-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--akb-border);
    border-radius: 2px;
    outline: none;
}

.akb-map-zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--akb-primary);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.akb-map-zoom-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--akb-primary);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* Text Controls */
.akb-map-text-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.akb-map-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.akb-map-toggle-row label:first-child {
    font-size: 13px;
    color: var(--akb-text);
}

/* Toggle Switch */
.akb-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    cursor: pointer;
}

.akb-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.akb-toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 22px;
    transition: background 0.2s;
}

.akb-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.akb-toggle input:checked + .akb-toggle-slider {
    background: var(--akb-primary);
}

.akb-toggle input:checked + .akb-toggle-slider::before {
    transform: translateX(18px);
}

/* Text Inputs */
.akb-map-input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.akb-map-text-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--akb-border);
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.akb-map-text-input:focus {
    border-color: var(--akb-primary);
}

/* Font Selector */
/* Marker Icon Selector */
.akb-map-icon-selector {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.akb-map-icon-option,
.akb-sheet-icon-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 8px;
    border: 1.5px solid var(--akb-border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    min-width: 48px;
}
.akb-map-icon-option:hover,
.akb-sheet-icon-option:hover {
    border-color: var(--akb-text-muted);
}
.akb-map-icon-option.active,
.akb-sheet-icon-option.active {
    border-color: var(--akb-primary);
    background: var(--akb-bg-light);
}
.akb-icon-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}
.akb-icon-preview svg {
    width: 22px;
    height: 22px;
}
.akb-icon-label {
    font-size: 9px;
    color: var(--akb-text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.akb-map-font-selector {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.akb-map-font-option,
.akb-sheet-font-option {
    padding: 6px 12px;
    border: 1px solid var(--akb-border);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    transition: border-color 0.2s, background 0.2s;
    font-family: inherit;
}

.akb-map-font-option:hover,
.akb-sheet-font-option:hover {
    background: #f5f5f5;
}

.akb-map-font-option.active,
.akb-sheet-font-option.active {
    border-color: var(--akb-primary);
    background: var(--akb-primary);
    color: #fff;
}

/* Mobile Map Selector Cards */
@media (max-width: 991px) {
    .akb-map-selector-cards {
        display: flex !important;
        gap: 8px;
        padding: 8px 0;
    }

    .akb-map-selector-cards .akb-selector-card {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px 8px;
        background: #fff;
        border: 1px solid var(--akb-border);
        border-radius: 10px;
        cursor: pointer;
        transition: border-color 0.2s;
        font-family: inherit;
    }

    .akb-map-selector-cards .akb-selector-card:active {
        border-color: var(--akb-primary);
    }

    /* Map frame on mobile */
    .akb-map-frame {
        position: relative;
        width: 100%;
        height: 100%;
    }

    /* Hide map controls on mobile (use sheets instead) */
    .akb-map-controls {
        display: none !important;
    }

    /* Map sheet panels inherit existing sheet styles */
    #akb-sheet-location,
    #akb-sheet-theme,
    #akb-sheet-text {
        display: block;
    }

    /* Theme grid in sheets */
    #akb-sheet-theme-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}
