/* Grundlayout */

.fa-page {
    max-width: 1100px;
    margin: 24px auto 32px;
    padding: 0 16px 24px;
    color: #e8eaed;
}

/* Intro-Bereich */

.fa-intro {
    background: #15171b;
    border-radius: 16px;
    padding: 18px 18px 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    border: 1px solid rgba(255, 255, 255, .04);
    margin-bottom: 18px;
}

.fa-intro-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 600;
}

.fa-intro-text {
    margin: 0 0 14px;
    font-size: 14px;
    color: #a2afc0;
    line-height: 1.5;
}

/* Info-Karten zu den Filamentarten */

.fa-intro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.fa-intro-card {
    background: #181c24;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .04);
    padding: 12px 12px 10px;
    font-size: 13px;
    line-height: 1.45;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fa-intro-card h2 {
    margin: 0 0 4px;
    font-size: 15px;
}

.fa-intro-card p {
    margin: 0 0 4px;
    color: #c0cad8;
}

.fa-intro-card ul {
    margin: 0 0 4px;
    padding-left: 18px;
    color: #9ba8bc;
}

/* Integrierte Listen */

.fa-intro-card-list {
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.fa-intro-card-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.fa-intro-card-list-title {
    font-size: 12px;
    font-weight: 600;
    color: #dde4f1;
}

.fa-intro-card-empty {
    font-size: 11px;
    color: #7f8ba0;
    margin-top: 2px;
}

/* Liste der konkreten Filamente innerhalb der Kacheln */

.fa-filament-list {
    list-style: none;
    margin: 2px 0 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
}

.fa-filament-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 2px;
    border-radius: 8px;
    transition: background .12s ease;
}

.fa-filament-item:hover {
    background: rgba(255, 255, 255, .03);
}

/* kleines Bild links */

.fa-filament-thumb {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .2), transparent 55%),
        #10121a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    border: none;
    padding: 0;
}

.fa-filament-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Text rechts */

.fa-filament-main {
    flex: 1;
    min-width: 0;
}

.fa-filament-name {
    font-size: 12px;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fa-filament-meta {
    font-size: 10px;
    color: #a2afc0;
    margin: 0;
}

/* Rechts Infos (Preis) */

.fa-filament-side {
    flex: 0 0 auto;
    text-align: right;
    font-size: 10px;
    color: #cbd4e1;
}

.fa-filament-price {
    font-weight: 600;
}

/* Filter / Suche */

.fa-filter {
    margin-top: 6px;
}

.fa-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.fa-filter-main {
    flex: 1;
    min-width: 220px;
}

.fa-filter-label {
    display: block;
    margin-bottom: 3px;
    font-size: 13px;
    color: #a7b3c8;
}

#fa-q {
    width: 100%;
    background: #0d1117;
    border: 1px solid #2a2f36;
    color: #e8eaed;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 14px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

#fa-q::placeholder {
    color: #596678;
}

#fa-q:focus {
    border-color: #3a82f7;
    box-shadow: 0 0 0 2px rgba(58, 130, 247, .35);
    background: #0b1016;
}

.fa-filter-side {
    flex: 0 0 auto;
}

.fa-filter-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #a2afc0;
}

.fa-filter-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #3a4250;
    background: #15171b;
    appearance: none;
    cursor: pointer;
    position: relative;
}

.fa-filter-check input[type="checkbox"]:checked {
    background: #f6b300;
    border-color: #f6b300;
}

.fa-filter-check input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 4px;
    width: 6px;
    height: 9px;
    border: solid #111;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.fa-filter-count {
    flex: 0 0 auto;
}

.fa-filter-hint {
    margin: 4px 0 0;
    font-size: 12px;
    color: #7f8ba0;
}

/* Count-Badge */

.fa-count-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    color: #cbd4e1;
}

/* Loading-Hinweis (falls benötigt) */

.fa-loading {
    font-size: 13px;
    color: #9aa9c0;
    padding: 8px 0;
}

/* Modal */

.fa-img-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.fa-img-modal-overlay.open {
    display: flex;
}

.fa-img-modal {
    max-width: 90vw;
    max-height: 90vh;
    background: #050608;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .75);
    padding: 10px 12px 12px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, .18);
}

.fa-img-modal img {
    display: block;
    max-width: 86vw;
    max-height: 70vh;
    margin: 4px auto 6px;
    object-fit: contain;
}

.fa-img-modal-caption {
    font-size: 13px;
    color: #cfd7e3;
    text-align: center;
    padding-top: 4px;
}

.fa-img-modal-close {
    position: absolute;
    top: 4px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background: rgba(0, 0, 0, .65);
    color: #f5f5f5;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fa-img-modal-close:hover {
    background: rgba(0, 0, 0, .9);
}

/* Light Mode grob angleichen */

body.light-mode .fa-page {
    color: #111;
}

body.light-mode .fa-intro {
    background: #ffffff;
    border-color: rgba(0, 0, 0, .06);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

body.light-mode .fa-intro-card {
    background: #f6f7fb;
    border-color: #dde2ee;
}

body.light-mode .fa-intro-text,
body.light-mode .fa-filter-hint,
body.light-mode .fa-intro-card-empty {
    color: #5f6a7a;
}

body.light-mode .fa-intro-card p {
    color: #3f4858;
}

body.light-mode #fa-q {
    background: #ffffff;
    border-color: #dfe3ea;
    color: #1c2433;
}

body.light-mode #fa-q::placeholder {
    color: #80889a;
}

body.light-mode #fa-q:focus {
    border-color: #3a82f7;
    box-shadow: 0 0 0 2px rgba(58, 130, 247, .25);
}

body.light-mode .fa-filament-item:hover {
    background: rgba(0, 0, 0, .04);
}

body.light-mode .fa-filament-thumb {
    background:
        radial-gradient(circle at 30% 20%, rgba(0, 0, 0, .18), transparent 55%),
        #f0f2f8;
}

body.light-mode .fa-img-modal {
    background: #ffffff;
    border-color: rgba(0, 0, 0, .15);
}

body.light-mode .fa-img-modal-caption {
    color: #333a46;
}

body.light-mode .fa-count-badge {
    background: #e7ecf7;
    color: #1b2130;
}

/* Responsive */

@media (max-width: 700px) {
    .fa-intro {
        padding: 14px 12px 12px;
    }

    .fa-filter-row {
        align-items: stretch;
    }

    .fa-filter-count {
        width: 100%;
        margin-top: 4px;
    }
}