/* ============================================
   Flagly Configurator v2.1 – Accordion Style
   Inspired by my-banner.de
   ============================================ */
.flagly-configurator {
    max-width: 780px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* === PRICE BAR === */
.flagly-price-bar {
    background: #1b2a4a;
    border-radius: 10px;
    margin-bottom: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.flagly-price-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
}
.flagly-price-label { color: rgba(255,255,255,0.7); font-size: 14px; }
.flagly-price-value { color: #fff; font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.flagly-price-tax { color: rgba(255,255,255,0.5); font-size: 11px; align-self: flex-end; margin-bottom: 3px; }

/* === PANEL (Accordion) === */
.flagly-panel {
    background: #fff;
    border: 1px solid #dde1e6;
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.flagly-panel--dropdown-open {
    overflow: visible;
}
.flagly-panel--open {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border-color: #b0bec5;
}
/* Erledigte Schritte: Flagly-Gold statt Gruen */
.flagly-panel--done {
    border-color: #f5d58a;
}
.flagly-panel--done .flagly-step-num {
    background: #f2b53c;
    color: #1b2a4a;
    box-shadow: 0 0 0 3px rgba(242,181,60,0.25);
    position: relative;
}
.flagly-panel--done .flagly-step-num::after {
    content: '\2713';
    position: absolute;
    right: -5px;
    bottom: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #1b2a4a;
    color: #f2b53c;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    border: 2px solid #fff;
    box-sizing: content-box;
}
.flagly-panel--done .flagly-chosen-tag {
    background: #fdf3dc;
    color: #8a5a00;
}

/* Panel Header */
.flagly-panel-header {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    gap: 14px;
    transition: background 0.15s;
}
.flagly-panel-header:hover {
    background: #f5f7fa;
}
.flagly-panel--open > .flagly-panel-header {
    background: #f0f4f8;
    border-bottom: 1px solid #dde1e6;
}
.flagly-panel-step-num {
    flex-shrink: 0;
}
.flagly-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1b2a4a;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}
.flagly-panel--open .flagly-step-num {
    background: #1b2a4a;
    box-shadow: 0 0 0 3px rgba(27,42,74,0.18);
}
.flagly-panel-title {
    flex: 1;
    min-width: 0;
}
.flagly-panel-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1b2a4a;
}
.flagly-panel-chosen {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}
.flagly-chosen-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e3f2fd;
    color: #1565c0;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
}
/* Bild der gewählten Option im eingeklappten Schritt */
.flagly-chosen-tag--img { padding-left: 3px; }
.flagly-chosen-tag--img img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    border: 1px solid #cfd8dc;
    display: block;
}
.flagly-panel-toggle-icon {
    color: #90a4ae;
    font-size: 12px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

/* Panel Body */
.flagly-panel-body {
    display: none;
    padding: 20px;
}
.flagly-hint {
    font-size: 13px;
    color: #78909c;
    margin: 0 0 16px;
}
.flagly-hint-multi {
    color: #1565c0;
    background: #e3f2fd;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12px;
}

/* === OPTION CARDS === */
.flagly-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}
.flagly-card {
    position: relative;
    border: 2px solid #e0e3e8;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    background: #fff;
}
.flagly-card:hover {
    border-color: #90caf9;
    background: #f5faff;
}
.flagly-card.selected {
    border-color: #1565c0;
    background: #e8f0fe;
}

/* Checkmark */
.flagly-card-check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    border: 2px solid #cfd8dc;
    border-radius: 50%;
    transition: all 0.15s;
}
.flagly-card.selected .flagly-card-check {
    border-color: #1565c0;
    background: #1565c0;
}
.flagly-card.selected .flagly-card-check::after {
    content: '✓';
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* === DESIGNER CARD (Druckdatenkonfigurator) === */
.flagly-card--designer {
    grid-column: span 2;
    text-align: left;
    color: #fff;
    border-color: #0a5382;
    background: linear-gradient(120deg, #094b74 0%, #0c6196 60%, #1180b8 100%);
    box-shadow: 0 2px 10px rgba(12, 97, 150, 0.35);
}
.flagly-card--designer:hover {
    border-color: #12719f;
    background: linear-gradient(120deg, #0a5382 0%, #0d6ba5 60%, #1a8cc4 100%);
    box-shadow: 0 4px 14px rgba(12, 97, 150, 0.5);
}
.flagly-card--designer.selected {
    border-color: #43a047;
    background: linear-gradient(120deg, #094b74 0%, #0c6196 60%, #1180b8 100%);
}
.flagly-card--designer.selected .flagly-card-check {
    border-color: #43a047;
    background: #43a047;
}
.flagly-designer-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    /* Feste Höhe: Designer- und Uploader-Kachel sind dadurch gleich groß,
       unabhängig von der Länge der Beschreibung */
    min-height: 62px;
    padding: 2px;
}
/* Beschreibung einzeilig halten, sonst wächst eine der beiden Kacheln */
.flagly-card--designer .flagly-card-desc {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.flagly-designer-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.flagly-designer-texts {
    flex: 1 1 auto;
    min-width: 0;
}
.flagly-card--designer .flagly-card-name {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 1px;
}
.flagly-card--designer .flagly-card-desc {
    color: #d6ecf9;
    font-size: 11.5px;
    margin-bottom: 0;
}
/* Beschreibung bleibt auch bei Auswahl sichtbar – sonst wäre die gewählte
   Kachel niedriger als die andere. Gegen Umbruch wirkt die nowrap-Regel. */
.flagly-designer-open {
    flex: 0 0 auto;
    border: none;
    background: #fff;
    color: #094b74;
    font-size: 12.5px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    transition: all 0.15s;
    /* Feste Breite, damit der Button bei Designer und Uploader an
       derselben Stelle sitzt – die Beschriftungen sind unterschiedlich lang */
    min-width: 215px;
    text-align: center;
}
.flagly-designer-open:hover {
    background: #dcefff;
    transform: translateY(-1px);
}
.flagly-card--designer .flagly-card-option-price {
    color: #d6ecf9;
    position: absolute;
    right: 34px;
    top: 6px;
}
/* Das jeweils andere Werkzeug liefert die Druckdaten: diese Kachel ist
   ausgegraut, bleibt aber anklickbar (Wechsel nach Rückfrage möglich) */
.flagly-card--designer-off {
    filter: grayscale(1);
    opacity: 0.55;
    box-shadow: none;
}
.flagly-card--designer-off:hover {
    filter: grayscale(0.75);
    opacity: 0.75;
    box-shadow: none;
}

.flagly-designer-preview {
    flex: 0 0 auto;
    max-width: 32%;
}
.flagly-designer-preview img {
    display: block;
    max-width: 100%;
    max-height: 48px;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
@media (max-width: 480px) {
    .flagly-designer-inner { flex-wrap: wrap; }
    .flagly-designer-preview { max-width: 45%; }
}

/* Upload-Status in der Designer-Kachel */
.flagly-designer-upload {
    flex: 1 1 100%;
    order: 10;
    margin-top: 6px;
    display: none;
}
.flagly-designer-upload .flagly-upload-label {
    font-size: 11.5px;
    color: #eaf5fc;
    margin-bottom: 4px;
}
.flagly-designer-upload .flagly-upload-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    overflow: hidden;
}
.flagly-designer-upload .flagly-upload-bar {
    height: 100%;
    width: 0;
    background: #fff;
    border-radius: 999px;
    transition: width 0.25s ease;
}
.flagly-designer-upload .flagly-upload-retry {
    border: none;
    background: #fff;
    color: #094b74;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.flagly-designer-upload .flagly-upload-retry:hover {
    background: #dcefff;
}
.flagly-designer-inner {
    flex-wrap: wrap;
}

/* Card Image */
.flagly-card-img {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    border-radius: 4px;
    overflow: hidden;
    background: transparent;
}
.flagly-card-img img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
}
.flagly-card-name {
    font-size: 13px;
    font-weight: 600;
    color: #263238;
    margin-bottom: 2px;
    line-height: 1.3;
    padding-left: 20px;
    padding-right: 22px;
}
.flagly-card-desc {
    font-size: 11px;
    color: #90a4ae;
    line-height: 1.2;
    margin-bottom: 4px;
    padding-left: 20px;
    padding-right: 22px;
}
.flagly-card-price {
    font-size: 13px;
    font-weight: 700;
    color: #1b2a4a;
}

/* Quantity */
.flagly-card-qty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 8px;
}
.flagly-qty-btn {
    width: 26px; height: 26px;
    border: 1px solid #cfd8dc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    color: #37474f;
    display: flex;
    align-items: center;
    justify-content: center;
}
.flagly-qty-btn:hover { background: #e3f2fd; }
.flagly-qty-input {
    width: 36px; height: 26px;
    text-align: center;
    border: 1px solid #cfd8dc;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

/* === SIZE INPUTS === */
.flagly-size-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 380px;
    margin: 0 auto 16px;
}
.flagly-size-field { flex: 1; }
.flagly-size-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #546e7a;
    margin-bottom: 6px;
}
.flagly-size-field input {
    width: 100%;
    padding: 10px;
    border: 2px solid #dde1e6;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.flagly-size-field input:focus {
    outline: none;
    border-color: #1565c0;
    box-shadow: 0 0 0 3px rgba(21,101,192,0.1);
}
.flagly-size-x {
    font-size: 22px;
    color: #b0bec5;
    margin-top: 30px;
}
.flagly-field-range {
    display: block;
    font-size: 11px;
    color: #90a4ae;
    margin-top: 4px;
    text-align: center;
}
.flagly-size-info {
    text-align: center;
    padding: 10px 16px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 16px;
}

/* === SIZE PRESET DROPDOWN === */
.flagly-size-preset-wrap {
    margin-bottom: 16px;
}
.flagly-size-preset-select {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #1b2a4a;
    border-radius: 8px;
    background: #fff;
    color: #1b2a4a;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231b2a4a' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.flagly-size-preset-select:focus {
    outline: none;
    border-color: #2979ff;
    box-shadow: 0 0 0 3px rgba(41,121,255,0.15);
}
.flagly-size-preset-select:hover {
    border-color: #2979ff;
}

/* === STEP TEXT === */
.flagly-step-text {
    margin-top: 16px;
    max-width: 100%;
    word-break: break-word;
    line-height: 1.5;
}

/* === NAVIGATION === */
.flagly-panel-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #eceff1;
    margin-top: 8px;
}
.flagly-btn-next, .flagly-btn-back, .flagly-btn-cart {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.flagly-btn-next {
    background: #1565c0;
    color: #fff;
}
.flagly-btn-next:hover:not(:disabled) { background: #0d47a1; }
.flagly-btn-next:disabled { opacity: 0.35; cursor: not-allowed; }
.flagly-btn-back {
    background: none;
    color: #78909c;
    border: 1px solid #cfd8dc;
}
.flagly-btn-back:hover { background: #f5f5f5; }
/* Warenkorb-Button im Flagly-Gold */
.flagly-btn-cart {
    background: linear-gradient(180deg, #f7c355 0%, #f2b53c 100%);
    color: #1b2a4a;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 28px;
    box-shadow: 0 3px 8px rgba(242,181,60,0.45);
}
.flagly-btn-cart:hover:not(:disabled) {
    background: linear-gradient(180deg, #f2b53c 0%, #e3a225 100%);
    box-shadow: 0 5px 14px rgba(242,181,60,0.6);
    transform: translateY(-1px);
}
.flagly-btn-cart:active:not(:disabled) { transform: translateY(0); }
.flagly-btn-cart:disabled { opacity: 0.35; cursor: not-allowed; }

/* === SUMMARY (Kundensicht: Ihr Produkt / Zubehör / Einmalig) === */
.flagly-sum-box {
    position: relative;
    background: #f4f6f9;
    border: 1px solid #dde1e6;
    border-radius: 10px;
    padding: 14px 18px 12px;
    margin: 6px 0 14px;
}
.flagly-summary--pending .flagly-sum-item-price,
.flagly-summary--pending .flagly-sum-trow span:last-child { color: #ccc !important; transition: color 0.15s; }
.flagly-sum-section {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #90a4ae;
    padding: 12px 0 4px;
}
.flagly-sum-section:first-child { padding-top: 0; }
.flagly-sum-item {
    display: grid;
    grid-template-columns: 56px 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid #e8ecf0;
}
.flagly-sum-section + .flagly-sum-item { border-top: none; }
.flagly-sum-item-img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e0e3e8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.flagly-sum-item-img img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.flagly-sum-item-noimg {
    width: 26px; height: 26px; border-radius: 50%;
    background: #e3f2fd;
}
.flagly-sum-item-qty {
    font-size: 15px;
    font-weight: 700;
    color: #1b2a4a;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.flagly-sum-item-name { font-size: 14px; font-weight: 700; color: #263238; line-height: 1.3; }
.flagly-sum-item-sub  { font-size: 12px; color: #78909c; margin-top: 2px; }
.flagly-sum-item-discount { color: #2e7d32; font-weight: 700; }
.flagly-sum-item-price {
    font-size: 14px;
    font-weight: 700;
    color: #1b2a4a;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.flagly-sum-item-price small { display: block; font-size: 11px; font-weight: 400; color: #90a4ae; }
.flagly-sum-item-free { font-size: 12px; font-weight: 700; color: #43a047; }
.flagly-muted { color: #b0bec5; font-style: italic; }

/* === TOAST === */
/* Stapel: mehrere Meldungen liegen untereinander statt übereinander */
.flagly-toast-stack {
    position: fixed; bottom: 24px; right: 24px;
    z-index: 10000;
    display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
    pointer-events: none;
    max-width: min(420px, calc(100vw - 48px));
}
.flagly-toast {
    background: #2e7d32; color: #fff;
    padding: 14px 22px; border-radius: 8px;
    font-weight: 600; font-size: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    animation: fToastIn 0.3s ease, fToastOut 0.3s ease 2.6s forwards;
}
@keyframes fToastIn { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fToastOut { from { opacity:1; } to { opacity:0; transform:translateY(20px); } }

/* === CART / CHECKOUT – Inline-Attribute === */
.flagly-cart-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.flagly-cart-inline-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f0f4f8;
    border: 1px solid #dde1e6;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 12px;
    line-height: 1.4;
    color: #263238;
}
.flagly-cart-inline-label {
    font-weight: 600;
    color: #546e7a;
}
.flagly-cart-inline-value {
    font-weight: 500;
    color: #1b2a4a;
}

/* Bestellübersicht im Checkout: jedes Produkt als eigene Karte */
.cart-summary__product__list .cart-summary__product {
    background: #f6f9fc;
    border: 1px solid #dde5ec;
    border-radius: 10px;
    padding: 12px 10px;
    margin: 0 0 10px 0 !important;
}
.cart-summary__product__list .cart-summary__product:last-child {
    margin-bottom: 0 !important;
}
.cart-summary__product__list .cart-summary__product .product-name {
    font-weight: 600;
}
/* Menge als auffälliges Badge statt "Menge x14" */
.cart-summary__product__list .product-line-info-secondary .label {
    display: none;
}
.cart-summary__product__list .product-line-info-secondary .value {
    display: inline-block;
    background: #0c6196;
    /* !important noetig: die Theme-Regel .cart-summary__products … .value laedt spaeter und setzt sonst dunkles Grau */
    color: #fff !important;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
    padding: 5px 10px;
    border-radius: 999px;
    margin-top: 2px;
}
/* Errechneter Zeilenpreis (Einzelpreis × Menge) unter dem Einzelpreis */
.cart-summary__product__list .flagly-line-total {
    display: block;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #b9c9d6;
}
.cart-summary__product__list .flagly-line-total .flagly-lt-label {
    display: block;
    font-size: 11px;
    color: #6b7d8d;
    font-weight: 500;
    line-height: 1.2;
}
.cart-summary__product__list .flagly-line-total .flagly-lt-value {
    font-size: 16px;
    font-weight: 700;
    color: #0c6196;
    white-space: nowrap;
}

/* === CART / CHECKOUT – Modal-Details === */
.flagly-cart-details {
    padding: 8px 0;
}
.flagly-cart-detail-row {
    display: flex;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}
.flagly-cart-detail-row:last-child {
    border-bottom: none;
}
.flagly-cart-detail-label {
    font-size: 13px;
    font-weight: 600;
    color: #546e7a;
    min-width: 100px;
    flex-shrink: 0;
}
.flagly-cart-detail-label::after {
    content: ':';
}
.flagly-cart-detail-value {
    font-size: 13px;
    font-weight: 500;
    color: #1b2a4a;
}

/* === BESTELLBESTÄTIGUNG / BESTELLDETAILS === */
.flagly-order-config-title {
    font-size: 13px;
    font-weight: 700;
    color: #546e7a;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0 0 6px;
}
.flagly-order-config .flagly-cart-fixed-info {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1b2a4a;
}

/* === ANZAHL + GESAMT (Zusammenfassung) === */
.flagly-sum-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 18px 28px;
    align-items: start;
    padding: 4px 0 10px;
}
.flagly-qty-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.flagly-qty-label {
    font-size: 14px;
    font-weight: 700;
    color: #263238;
}
.flagly-qty-selector {
    display: flex;
    align-items: center;
    gap: 6px;
}
.flagly-qty-selector .flagly-qty-btn {
    width: 38px;
    height: 40px;
    font-size: 18px;
    border-radius: 6px;
}
.flagly-qty-selector #flagly-qty-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 2px solid #dde1e6;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
}
.flagly-sum-totals {
    font-size: 13.5px;
    font-variant-numeric: tabular-nums;
}
.flagly-sum-trow {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0;
    color: #263238;
}
.flagly-sum-trow span:last-child { font-weight: 600; color: #1b2a4a; white-space: nowrap; }
.flagly-sum-trow--muted, .flagly-sum-trow--muted span:last-child { color: #90a4ae; font-weight: 400; font-size: 12.5px; }
.flagly-sum-trow--grand {
    border-top: 2px solid #1b2a4a;
    margin-top: 6px;
    padding-top: 10px;
    font-size: 16px;
    font-weight: 800;
}
.flagly-sum-trow--grand span:last-child { font-size: 22px; font-weight: 800; }
.flagly-sum-trow--net { padding-top: 0; }

/* === WARENKORB: PS-nativen "Benutzerdefiniert"-Button NUR im Warenkorb ausblenden === */
/* Nur in .cart__items (Warenkorb-Kontext), nicht in Bestellbestätigung/Verlauf */
.cart__items .product-customization-modal__content { display: none !important; }

/* Spacing zwischen Konfigurations-Tags und Preis im Warenkorb */
.flagly-cart-inline { margin-bottom: 10px; }

/* === INFO BADGE & TOOLTIP === */
.flagly-card-info-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 18px;
    height: 18px;
    background: #000;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    z-index: 2;
    line-height: 1;
    user-select: none;
}
.flagly-info-tooltip {
    position: absolute;
    background: #fff;
    border: 1px solid #e0e3e8;
    border-radius: 10px;
    padding: 12px 16px;
    max-width: 260px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.13);
    font-size: 13px;
    color: #263238;
    z-index: 9999;
    pointer-events: none;
    line-height: 1.55;
}

/* === IMAGE TOOLTIP === */
.flagly-image-tooltip {
    position: absolute;
    max-width: 400px;
    max-height: 400px;
    background: #fff;
    border: 1px solid #e0e3e8;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    z-index: 9999;
    pointer-events: none;
    overflow: hidden;
    padding: 0;
}
.flagly-image-tooltip img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}
.flagly-card-img[data-image-tooltip] img {
    cursor: zoom-in;
}

/* === OPTION PRICE ON CARD === */
.flagly-card-option-price {
    font-size: 11px;
    font-weight: 700;
    color: #000;
    line-height: 1.3;
    margin-bottom: 4px;
    padding-left: 20px;
    padding-right: 22px;
}

/* === LINKED PRODUCT PRICE ON CARD === */
.flagly-card-linked-price {
    font-size: 11px;
    color: #90a4ae;
    line-height: 1.2;
    margin-bottom: 4px;
    padding-left: 20px;
    padding-right: 22px;
    font-weight: 600;
}

/* === CART: EINMALKOSTEN + GESAMT === */
.flagly-cart-fixed-info {
    margin-top: 4px;
    font-size: 12px;
    color: #555;
}
.flagly-cart-line-total {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #1b2a4a;
    border-top: 1px dashed #ccc;
    padding-top: 4px;
}

/* === LIST DROPDOWN (Listentyp) === */
.flagly-panel--list {
    max-width: 100%;
}

.flagly-list-select {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    user-select: none;
}

.flagly-list-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 2px solid #1b2a4a;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #1b2a4a;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 52px;
}
.flagly-list-trigger:hover,
.flagly-list-trigger:focus {
    outline: none;
    border-color: #2979ff;
    box-shadow: 0 0 0 3px rgba(41,121,255,0.15);
}
.flagly-list-trigger--selected {
    border-color: #1565c0;
    background: #f0f4ff;
}
.flagly-list-trigger-img {
    width: 36px;
    height: 24px;
    object-fit: contain;
    border-radius: 3px;
    flex-shrink: 0;
    border: 1px solid #e0e3e8;
}
.flagly-list-trigger-label {
    flex: 1;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.flagly-list-trigger-arrow {
    color: #90a4ae;
    font-size: 12px;
    flex-shrink: 0;
}

.flagly-list-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dde1e6;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 1000;
    overflow: hidden;
}

.flagly-list-search-wrap {
    padding: 10px 12px;
    border-bottom: 1px solid #eceff1;
    background: #f5f7fa;
}
.flagly-list-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dde1e6;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s;
}
.flagly-list-search:focus {
    border-color: #1565c0;
    box-shadow: 0 0 0 2px rgba(21,101,192,0.1);
}

.flagly-list-items {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    max-height: 320px;
    overflow-y: auto;
}
.flagly-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.12s;
    font-size: 14px;
    color: #263238;
}
.flagly-list-item:hover {
    background: #e8f0fe;
}
.flagly-list-item img {
    width: 36px;
    height: 24px;
    object-fit: contain;
    border-radius: 3px;
    flex-shrink: 0;
    border: 1px solid #e0e3e8;
}
.flagly-list-item-noimg {
    width: 36px;
    height: 24px;
    background: #f0f0f0;
    border-radius: 3px;
    flex-shrink: 0;
    display: inline-block;
}
.flagly-list-item-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* === RESPONSIVE === */
@media (max-width: 580px) {
    /* minmax(0, 1fr): sonst haelt ein langes Wort („Fahnenpolyester") die Spalte breiter als
       der Platz und die rechte Kachel wird abgeschnitten */
    .flagly-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .flagly-card { padding: 8px; min-width: 0; }
    .flagly-card-img { height: 60px; }
    /* Unter einem Bild braucht der Name die Randabstände für Info-/Häkchen-Symbol nicht –
       so passt „Fahnenpolyester" in eine Zeile; sehr lange Wörter werden getrennt */
    .flagly-card-img + .flagly-card-name, .flagly-card-img ~ .flagly-card-desc { padding-left: 4px; padding-right: 4px; }
    .flagly-card-name, .flagly-card-desc, .flagly-card-option-price { hyphens: auto; overflow-wrap: anywhere; }
    /* Preisleiste einzeilig, damit sie als Sticky-Leiste wenig Hoehe frisst */
    .flagly-price-bar-inner { flex-direction: row; flex-wrap: wrap; gap: 2px 8px; padding: 8px 12px; }
    .flagly-price-value { font-size: 20px; }
    .flagly-panel-header { padding: 12px 14px; gap: 10px; }
    .flagly-panel-body { padding: 14px; }
    .flagly-panel-nav { flex-wrap: wrap; gap: 8px; }
    .flagly-btn-next, .flagly-btn-back, .flagly-btn-cart { flex: 1; justify-content: center; min-width: 100px; }
    .flagly-size-row { flex-direction: column; gap: 8px; }
    .flagly-size-x { margin-top: 0; text-align: center; }
    .flagly-sum-foot { grid-template-columns: 1fr; gap: 12px; }
    .flagly-sum-item { grid-template-columns: 48px 34px minmax(0, 1fr); gap: 10px; }
    .flagly-sum-item-img { width: 48px; height: 48px; }
    .flagly-sum-item-price { grid-column: 3; text-align: left; }
    .flagly-sum-item-price small { display: inline; margin-left: 6px; }
    .flagly-cart-inline { gap: 4px; }
    .flagly-cart-inline-tag { font-size: 11px; padding: 2px 8px; }
    .flagly-cart-detail-label { min-width: 80px; }
}

/* ============================================
   Druckvorlagen-Download (CTA + Register-Modal)
   ============================================ */
/* Theme-Lupe (Hummingbird, Produktbild-Zoom) fest rechts unten im Bildrahmen
   verankern – unabhängig vom jeweils aktiven Carousel-Bild */
.page-product .product__images .carousel { position: relative; }
.page-product .product__images .carousel-item.active { position: static !important; }
.page-product .product__images__modal-opener {
    position: absolute !important;
    right: 12px !important;
    bottom: 12px !important;
    top: auto !important;
    left: auto !important;
    z-index: 10;
}

/* Pill-Button rechts außen in der „Teilen"-Zeile des Themes: die Zeile
   (.social-sharing, 24px hoch) sitzt direkt über dem Konfigurator, der mit
   20px Abstand folgt. -46px zieht die 28px-Zeile genau auf diese Höhe,
   18px Abstand darunter stellt die ursprüngliche Position der Preisleiste her. */
.flagly-tpl-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 28px;
    margin-top: -46px;
    margin-bottom: 18px;
}
.flagly-tpl-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    color: #1b2a4a;
    border: 1.5px solid #1b2a4a;
    border-radius: 999px;
    padding: 5px 13px 5px 10px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.flagly-tpl-btn:hover { background: #1b2a4a; color: #fff; }
.flagly-tpl-btn svg { color: #f2b53c; flex-shrink: 0; }

/* --- Modal --- */
.flagly-tpl-modal {
    position: fixed;
    inset: 0;
    z-index: 100000; /* über Theme-Elementen wie der Bild-Lupe */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.flagly-tpl-modal[hidden] { display: none; }
.flagly-tpl-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}
.flagly-tpl-dialog {
    position: relative;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(20, 33, 61, 0.28);
    max-width: 740px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    padding: 26px 28px 28px;
    animation: flagly-tpl-pop 0.2s ease-out;
}
@keyframes flagly-tpl-pop { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }
.flagly-tpl-x {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 34px;
    height: 34px;
    border: none;
    background: #f0f4f8;
    color: #5b697d;
    border-radius: 8px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
}
.flagly-tpl-x:hover { background: #e2e8f0; color: #1b2a4a; }
.flagly-tpl-head { margin-bottom: 20px; padding-right: 40px; }
.flagly-tpl-head h3 { margin: 0 0 6px; font-size: 20px; font-weight: 800; color: #1b2a4a; }
.flagly-tpl-head p { margin: 0; font-size: 13.5px; line-height: 1.55; color: #5b697d; }

.flagly-tpl-cols { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: stretch; }

/* Vorlagen-Liste (links) */
.flagly-tpl-list {
    list-style: none; margin: 0; padding: 0;
    max-height: 380px; overflow-y: auto;
    border: 1px solid #e6ebf1; border-radius: 10px; background: #fff;
}
.flagly-tpl-item {
    padding: 12px 14px; font-size: 14px; font-weight: 600; color: #1b2a4a;
    cursor: pointer; border-bottom: 1px solid #eef2f6; transition: background 0.12s;
}
.flagly-tpl-item:last-child { border-bottom: 0; }
.flagly-tpl-item:hover { background: #f5f8fc; }
.flagly-tpl-item.active { background: #1b2a4a; color: #fff; }
.flagly-tpl-item:focus { outline: 2px solid #1565c0; outline-offset: -2px; }

/* Detail (rechts) */
.flagly-tpl-detail { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* Theme-Lupe ausblenden, solange das Druckvorlagen-Fenster offen ist */
body.flagly-tpl-open .product__images__modal-opener { display: none !important; }

/* Vergrößern-Button rechts unten im Vorschaubild */
.flagly-tpl-zoom {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #1b2a4a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}
.flagly-tpl-zoom:hover { background: #f2b53c; }
.flagly-tpl-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100001;
    background: rgba(15, 23, 42, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    cursor: zoom-out;
}
.flagly-tpl-lightbox[hidden] { display: none; }
.flagly-tpl-lightbox img {
    max-width: 100%;
    max-height: 100%;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.flagly-tpl-lightbox-x { position: fixed; top: 18px; right: 22px; background: #fff; }

.flagly-tpl-preview {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 16px;
    background:
        linear-gradient(45deg, #f4f6f9 25%, transparent 25%, transparent 75%, #f4f6f9 75%),
        linear-gradient(45deg, #f4f6f9 25%, #fff 25%, #fff 75%, #f4f6f9 75%);
    background-size: 18px 18px;
    background-position: 0 0, 9px 9px;
    border: 1px solid #e6ebf1;
    border-radius: 10px;
}
.flagly-tpl-preview img { max-width: 100%; max-height: 360px; width: auto; height: auto; filter: drop-shadow(0 6px 18px rgba(20, 33, 61, 0.18)); }
.flagly-tpl-noimg { color: #90a4ae; font-size: 14px; font-weight: 600; }

.flagly-tpl-detail-foot { display: flex; flex-direction: column; gap: 10px; }
.flagly-tpl-detail-name { font-size: 15px; font-weight: 700; color: #1b2a4a; text-align: center; }

.flagly-tpl-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: #f2b53c;
    color: #1b2a4a;
    border-radius: 9px;
    padding: 13px 18px;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.15s, transform 0.05s;
}
.flagly-tpl-download:hover { background: #e0a52e; color: #1b2a4a; }
.flagly-tpl-download:active { transform: translateY(1px); }

@media (max-width: 640px) {
    .flagly-tpl-cols { grid-template-columns: 1fr; gap: 16px; }
    .flagly-tpl-list { max-height: 180px; }
    .flagly-tpl-preview { min-height: 220px; }
    .flagly-tpl-preview img { max-height: 260px; }
    .flagly-tpl-dialog { padding: 20px 18px 22px; }
}
/* === LIEFERTERMIN + ZAHLUNG (v3.32) === */
.flagly-delivery {
    background: #f3f7fb;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    padding: 10px 14px;
    margin: -8px 0 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    line-height: 1.4;
    color: #1b2a4a;
}
.flagly-delivery-row { display: flex; align-items: flex-start; gap: 8px; }
.flagly-delivery-row svg { flex: 0 0 18px; margin-top: 1px; color: #0c6196; }
.flagly-delivery-row strong { color: #0c6196; }
.flagly-delivery-pay { color: #445; }
.flagly-delivery-pay strong { color: #1b2a4a; }
.flagly-delivery-date { font-weight: 700; white-space: nowrap; }

