/* UI Design Specification - Notensammlung */
/* Überwältigend einfach • Wunderschön klar • Stylish */

/* ===== PAGINATION STYLES ===== */
.pagination-container {
    margin: 2rem 0;
}

.pagination .page-link {
    color: var(--primary-charcoal);
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background: var(--light-gold);
    border-color: var(--accent-gold);
    color: var(--primary-charcoal);
}

.pagination .page-item.active .page-link {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    cursor: not-allowed;
}

.pagination .page-link i {
    font-size: 0.875rem;
}

/* Results range display */
.results-count .text-muted {
    font-size: 0.9rem;
}

/* Typografie - Elegante Hierarchie */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Source+Sans+Pro:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

:root {
    /* Primary - Warmes Elfenbein & Tiefes Anthrazit */
    --primary-cream: #FBF9F6;        /* Haupthintergrund */
    --primary-charcoal: #2C3E3A;     /* Haupttext & Navigation */
    --accent-gold: #C9A96E;          /* Akzente & CTAs */
    --accent-burgundy: #8B3A3A;      /* Highlights & Status */

    /* Sekundär - Sanfte Neutrals */
    --soft-sage: #E8EDE9;           /* Subtle Backgrounds */
    --warm-gray: #6B7D79;           /* Secondary Text */
    --light-gold: #F4F0E7;          /* Hover States */
    --deep-cream: #F7F4EF;          /* Card Backgrounds */
    
    /* Pergament & Header Farben */
    --parchment-light: #F8F5F0;     /* Heller Pergament */
    --parchment-medium: #F4F0E8;    /* Mittlerer Pergament */
    --parchment-deep: #EDE6D8;      /* Tiefer Pergament */
    --antique-gold: #D4AF7A;        /* Antikes Gold */
    --classical-brown: #3D2F2A;     /* Klassisches Braun */

    /* System Colors */
    --success: #4A7C59;             /* Verfügbar */
    --warning: #B8860B;             /* Reserviert */
    --error: #A0522D;               /* Ausverkauft */
    --info: #708090;                /* Hinweise */

    /* Schriftarten */
    --font-display: 'Crimson Text', serif;
    --font-body: 'Inter', sans-serif;
    --font-header: 'Playfair Display', serif;
    --font-classic: 'Libre Baskerville', serif;

    /* Typografische Skala */
    --text-xs: 0.75rem;     /* 12px - Labels */
    --text-sm: 0.875rem;    /* 14px - Body Small */
    --text-base: 1rem;      /* 16px - Body */
    --text-lg: 1.125rem;    /* 18px - Lead */
    --text-xl: 1.25rem;     /* 20px - Subtitle */
    --text-2xl: 1.5rem;     /* 24px - Heading 3 */
    --text-3xl: 1.875rem;   /* 30px - Heading 2 */
    --text-4xl: 2.25rem;    /* 36px - Heading 1 */
    --text-5xl: 3rem;       /* 48px - Hero */

    /* Container Sizes */
    --container-xs: 475px;
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1400px;

    /* Spacing Scale - Goldener Schnitt inspiriert */
    --space-1: 0.25rem;     /* 4px */
    --space-2: 0.5rem;      /* 8px */
    --space-3: 0.75rem;     /* 12px */
    --space-4: 1rem;        /* 16px */
    --space-5: 1.25rem;     /* 20px */
    --space-6: 1.5rem;      /* 24px */
    --space-8: 2rem;        /* 32px */
    --space-10: 2.5rem;     /* 40px */
    --space-12: 3rem;       /* 48px */
    --space-16: 4rem;       /* 64px */
    --space-20: 5rem;       /* 80px */
}

body {
    font-family: var(--font-body);
    color: var(--primary-charcoal);
    line-height: 1.6;
    background-color: var(--primary-cream);
}

/* Responsive Grid - Perfekte Proportionen */
#catalogGrid.row {
    display: grid !important;
    gap: var(--space-6);
    justify-items: center;
    
    /* Mobile: 1 Spalte */
    grid-template-columns: 1fr;
    
    /* Tablet: 2 Spalten */
    @media (min-width: 640px) {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-8);
    }
    
    /* Desktop: 3 Spalten maximal */
    @media (min-width: 1024px) {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: var(--space-10);
        max-width: var(--container-xl);
        margin: 0 auto;
        padding: 0 var(--space-10);
    }
}

#catalogGrid > div {
    width: 100% !important;
    max-width: 280px !important;
    margin-bottom: 0 !important;
}

.bg-primary {
    background-color: var(--primary-charcoal) !important;
}

.text-primary {
    color: var(--primary-charcoal) !important;
}

/* Noten-Karte - Harmonische Proportionen */
.note-card, .sheet-music-card {
    width: 280px;
    /* Entferne feste aspect-ratio, lass Inhalt die Höhe bestimmen */
    min-height: 420px; /* Mindesthöhe für Konsistenz */
    border-radius: 12px;
    background: var(--deep-cream);
    border: none;
    box-shadow: 
        0 2px 4px rgba(44, 62, 58, 0.04),
        0 4px 12px rgba(44, 62, 58, 0.08);
    transition: all 0.3s ease;
    animation: none; /* Karten-Animation bei Filterwechsel deaktivieren */
    overflow: visible;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

#catalogGrid .col-6 .card.sheet-music-card:hover, .note-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 16px rgba(44, 62, 58, 0.15) !important;
}

#catalogGrid .col-6 .card.sheet-music-card:hover .card-img-top,
.note-card:hover .note-image {
    transform: scale(1.02);
}

.note-image-container, .sheet-music-card .card-img-container {
    position: relative;
    height: 200px; /* Feste Höhe für Bilder */
    overflow: hidden;
    background: var(--soft-sage);
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
}

.note-image, .sheet-music-card .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    cursor: pointer;
    opacity: 1; /* sofort sichtbar */
}

/* Optional: sanftes Einblenden nur für wirklich neue Bilder */
.note-image.lazy-init,
.sheet-music-card .card-img-top.lazy-init {
    opacity: 0;
    transition: opacity 0.25s ease;
}

.note-image.lazy-init.loaded,
.sheet-music-card .card-img-top.lazy-init.loaded {
    opacity: 1;
}


.note-status-badge {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    padding: var(--space-1) var(--space-3);
    border-radius: 12px;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-available { 
    background: var(--success); 
    color: white; 
}

.status-reserved { 
    background: var(--warning); 
    color: white; 
}

.note-content, .sheet-music-card .card-body {
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0; /* Ermöglicht Flex-Shrinking */
}

.note-title, .sheet-music-card .card-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    color: var(--primary-charcoal);
    margin-bottom: var(--space-2);
    font-weight: 600;
    line-height: 1.3;
}

.note-composer, .sheet-music-card .composer {
    color: var(--warm-gray);
    font-size: var(--text-base);
    margin-bottom: var(--space-1);
    font-weight: 500;
}

.note-period, .sheet-music-card .period-badge {
    color: var(--accent-burgundy);
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-4);
    padding: var(--space-1) var(--space-2);
    border-radius: 6px;
    background: var(--light-gold);
    display: inline-block;
    white-space: normal;
    word-wrap: break-word;
}

.note-metadata, .sheet-music-card .condition-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: var(--space-4);
    border-top: 1px solid var(--soft-sage);
    font-size: var(--text-sm);
    color: var(--warm-gray);
}

.sheet-music-card .card-footer {
    background: transparent;
    border-top: 1px solid var(--soft-sage);
    padding: var(--space-4) var(--space-6);
    margin-top: auto;
    flex-shrink: 0; /* Footer bleibt immer sichtbar */
}

/* Animationen & Micro-Interactions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gestaffelte Animation */
/* Animation delays entfernt - nicht mehr benötigt */

/* Buttons - Durchdachte Interaktionen */
.btn-primary {
    background: var(--light-gold);
    border: 1px solid var(--accent-gold);
    border-radius: 8px;
    padding: var(--space-3) var(--space-6);
    font-weight: 400;
    font-size: var(--text-base);
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
    color: var(--primary-charcoal);
}

.btn-primary:hover {
    background: var(--accent-gold);
    border-color: var(--accent-burgundy);
    color: white;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-charcoal);
    color: var(--primary-charcoal);
    border-radius: 8px;
    padding: calc(var(--space-3) - 2px) calc(var(--space-6) - 2px);
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--primary-charcoal);
    color: var(--primary-cream);
    transform: translateY(-1px);
    border-color: var(--primary-charcoal);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
    background: transparent;
    transition: all 0.2s ease;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
    transform: translateY(-1px);
}

/* Period badges mit neuen Farben */
.period-renaissance { 
    background-color: var(--light-gold); 
    color: var(--primary-charcoal); 
}
.period-frühbarock { 
    background-color: var(--soft-sage); 
    color: var(--primary-charcoal); 
}
.period-hochbarock { 
    background-color: #F4E6D7; 
    color: var(--accent-burgundy); 
}
.period-spätbarock { 
    background-color: #E6F2E6; 
    color: var(--success); 
}
.period-frühklassik { 
    background-color: #F2E6E6; 
    color: var(--error); 
}

/* Navigation styles entfernt - nicht mehr benötigt */

/* Search Hero - Elegant und minimalistisch */
.search-hero {
    background: linear-gradient(
        135deg, 
        var(--primary-cream) 0%, 
        var(--light-gold) 100%
    );
    padding: var(--space-8) var(--space-6);
    margin-bottom: var(--space-10);
    margin-top: var(--space-6);
    position: relative;
}

/* Cart Button in Header - unauffällig */
.cart-header-btn {
    top: var(--space-4);
    right: var(--space-4);
    font-size: var(--text-sm);
    padding: var(--space-3) var(--space-5);
    opacity: 0.8;
    transition: opacity 0.2s ease;
    gap: var(--space-2); /* Abstand zwischen Icon und Text */
    display: inline-flex;
    align-items: center;
}

.cart-header-btn:hover {
    opacity: 1;
}

/* Title with Icon Container */
.title-with-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-2);
}

.search-title {
    font-family: 'Cormorant Garamond', 'Playfair Display', var(--font-header);
    font-size: 3.5rem;
    color: #2B1810;
    margin-bottom: 0;
    font-weight: 600;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(43, 24, 16, 0.15);
    letter-spacing: 0.02em;
    font-feature-settings: 'liga' 1, 'kern' 1;
}

.fundgrube-icon {
    height: var(--text-5xl);
    width: auto;
    opacity: 0.8;
}

.search-subtitle {
    font-family: 'Source Sans Pro', 'Optima', sans-serif;
    font-size: calc(var(--text-5xl) * 0.35);
    color: #A67C52;
    margin-bottom: var(--space-3);
    max-width: 500px;
    font-style: normal;
    font-weight: 400;
    margin-left: auto;
    letter-spacing: 0.1em;
    font-variant: small-caps;
    margin-right: auto;
}

/* Price Message - Badge with Separator Lines */
.price-badge-centered {
    color: var(--primary-charcoal);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-top: var(--space-2);
    text-align: center;
    position: relative;
    padding: 0.5rem 0;
}

.price-badge-centered::before,
.price-badge-centered::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--warm-gray), transparent);
    opacity: 0.5;
}

.price-badge-centered::before {
    top: 0;
}

.price-badge-centered::after {
    bottom: 0;
}

.price-badge-centered i {
    font-size: var(--text-sm);
    color: var(--warm-gray);
}

/* Responsive Text Design */
@media (max-width: 768px) {
    .price-badge-centered {
        font-size: var(--text-xs);
        margin-top: var(--space-1);
    }
    
    .title-with-icon {
        flex-direction: column;
        gap: 0;
    }
    
    .search-title {
        font-size: var(--text-4xl);
    }
    
    .fundgrube-icon {
        height: var(--text-3xl);
    }
    
    .search-subtitle {
        margin-bottom: var(--space-4);
    }
}

.search-input-group {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: var(--space-4) var(--space-6);
    padding-right: 60px;
    border: 3px solid var(--accent-gold);
    border-radius: 50px;
    font-size: var(--text-lg);
    background: white;
    box-shadow: 0 4px 20px rgba(201, 169, 110, 0.2);
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-burgundy);
    box-shadow: 0 4px 20px rgba(201, 169, 110, 0.3);
}

.search-button {
    position: absolute;
    right: 8px;
    top: 8px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-gold);
    border: none;
    color: white;
    font-size: var(--text-lg);
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-button:hover {
    background: var(--accent-burgundy);
    transform: scale(1.05);
}

/* Filter Panel - Kompaktere Paddings */
.filter-panel {
    background: var(--deep-cream);
    border-radius: 16px;
    padding: var(--space-6);
    margin-bottom: var(--space-10);
    border: 1px solid rgba(44, 62, 58, 0.06);
    box-shadow: 0 2px 8px rgba(44, 62, 58, 0.04);
}

.filter-group {
    margin-bottom: var(--space-4);
}

.filter-label {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    color: var(--primary-charcoal);
    margin-bottom: var(--space-3);
    display: block;
    font-weight: 500;
}

.form-select, .form-control {
    border: 2px solid transparent;
    background: var(--primary-cream);
    border-radius: 8px;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

.form-select:focus, .form-control:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.1);
    outline: none;
    background: white;
}

.welcome-info {
    background: linear-gradient(135deg, var(--light-gold) 0%, var(--primary-cream) 100%);
    padding: var(--space-6);
    border-radius: 12px;
    border: 1px solid rgba(201, 169, 110, 0.2);
    text-align: center;
}

.info-title {
    font-family: var(--font-display);
    color: var(--primary-charcoal);
    margin-bottom: var(--space-3);
    font-size: var(--text-xl);
}

.info-text {
    color: var(--warm-gray);
    margin-bottom: 0;
    font-size: var(--text-sm);
    line-height: 1.5;
}

/* Warenkorb - Floating Design */
.cart-trigger {
    position: fixed;
    bottom: var(--space-8);
    right: var(--space-8);
    background: var(--accent-burgundy);
    color: white;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: none; /* Initial versteckt, wird von JavaScript eingeblendet */
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    box-shadow: 0 8px 25px rgba(139, 58, 58, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    border: none;
    cursor: pointer;
}

/* Wenn sichtbar, als Flexbox anzeigen */
.cart-trigger[style*="flex"] {
    display: flex !important;
}

.cart-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(139, 58, 58, 0.4);
}

/* On non-desktop: Always prioritize floating cart button */
@media (max-width: 991.98px) {
    .cart-trigger {
        z-index: 1050; /* Higher than most Bootstrap components */
    }
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-gold);
    color: var(--primary-charcoal);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: var(--text-xs);
    font-weight: 600;
    display: none; /* Initial versteckt */
    align-items: center;
    justify-content: center;
    min-width: 24px;
}

/* Wenn sichtbar, als Flexbox anzeigen */  
.cart-count[style*="flex"] {
    display: flex !important;
}

/* Modal Design - Glastoptik */
.modal-backdrop {
    background: rgba(44, 62, 58, 0.6);
    backdrop-filter: blur(8px);
}

.modal-content {
    background: rgba(251, 249, 246, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(201, 169, 110, 0.2);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(44, 62, 58, 0.15);
}

.modal-header {
    border-bottom: 1px solid rgba(44, 62, 58, 0.08);
    padding: var(--space-8);
    background: transparent;
}

.modal-title {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    color: var(--primary-charcoal);
    margin-bottom: 0;
}

.modal-body {
    padding: var(--space-8);
}

.modal-footer {
    border-top: 1px solid rgba(44, 62, 58, 0.08);
    padding: var(--space-8);
    background: transparent;
}

/* Ergebnis-Anzeige */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-8);
    padding: var(--space-6);
    background: var(--deep-cream);
    border-radius: 12px;
}

.results-count {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    color: var(--primary-charcoal);
}

#resultsInfo {
    background: var(--soft-sage);
    padding: var(--space-3) var(--space-4);
    border-radius: 8px;
    margin-bottom: var(--space-6);
}

#resultsInfo small {
    color: var(--warm-gray);
    font-weight: 500;
}

.sort-controls {
    display: flex;
    gap: var(--space-3);
    align-items: center;
}

.sort-label {
    font-size: var(--text-sm);
    color: var(--warm-gray);
    font-weight: 500;
}

.current-sort {
    font-size: var(--text-sm);
    color: var(--primary-charcoal);
    font-weight: 600;
}

/* Loading Skeleton */
.loading-skeleton {
    margin-bottom: var(--space-10);
}

.catalog-grid {
    display: grid;
    gap: var(--space-6);
    justify-items: center;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-8);
    }
}

@media (min-width: 1024px) {
    .catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: var(--space-10);
    }
}

.note-skeleton {
    width: 280px;
    background: var(--deep-cream);
    border-radius: 16px;
    padding: var(--space-6);
    animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1 / 1.414;
    background: var(--soft-sage);
    border-radius: 8px;
    margin-bottom: var(--space-4);
}

.skeleton-title {
    height: 24px;
    background: var(--soft-sage);
    border-radius: 4px;
    margin-bottom: var(--space-3);
    width: 80%;
}

.skeleton-subtitle {
    height: 16px;
    background: var(--soft-sage);
    border-radius: 4px;
    width: 60%;
}

.loading-shimmer {
    background: linear-gradient(
        90deg,
        var(--soft-sage) 25%,
        var(--light-gold) 50%,
        var(--soft-sage) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: var(--space-20);
    color: var(--warm-gray);
    margin: var(--space-16) 0;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: var(--space-6);
    opacity: 0.5;
}

.empty-state-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    margin-bottom: var(--space-4);
    color: var(--primary-charcoal);
}

.empty-state-description {
    font-size: var(--text-lg);
    margin-bottom: var(--space-8);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Mobile Optimization - Touch-Friendly Interface */
@media (max-width: 768px) {
    /* Größere Touch-Targets */
    .btn {
        min-height: 48px;
        padding: var(--space-4) var(--space-6);
        font-size: var(--text-base);
    }
    
    .form-control, .form-select {
        min-height: 48px;
        font-size: 16px; /* Verhindert Zoom auf iOS */
        padding: var(--space-4);
    }
    
    .search-input {
        font-size: 16px; /* Verhindert Zoom auf iOS */
        min-height: 48px;
    }
    
    /* Mobile Card Anpassungen */
    .note-card, .sheet-music-card {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    
    /* Mobile Cover-Bilder - mehr vom Cover zeigen */
    .sheet-music-card .card-img-top {
        object-fit: contain;
        object-position: center top;
        height: 280px;
        padding-top: 12px;
    }
    
    /* Mobile Hero Section */
    .search-hero {
        padding: var(--space-4) var(--space-4) var(--space-6);
        margin-top: var(--space-2);
        margin-bottom: var(--space-8);
    }
    
    .search-title {
        font-size: var(--text-4xl);
        margin-bottom: var(--space-3);
        letter-spacing: 0.01em;
    }
    
    .search-subtitle {
        font-size: var(--text-base);
        margin-bottom: var(--space-6);
    }
    
    /* Mobile Filter Panel */
    .filter-panel {
        padding: var(--space-6);
        margin-bottom: var(--space-6);
    }
    
    .filter-label {
        font-size: var(--text-base);
    }
    
    /* Mobile Navigation Adjustments - entfernt */
    
    /* Floating Cart - Mobile Position */
    .cart-trigger {
        bottom: var(--space-6);
        right: var(--space-6);
        width: 56px;
        height: 56px;
        font-size: var(--text-lg);
    }
    
    .cart-count {
        width: 20px;
        height: 20px;
        font-size: 10px;
        top: -6px;
        right: -6px;
    }
    
    /* Mobile Modal */
    .modal-header, .modal-body, .modal-footer {
        padding: var(--space-6);
    }
    
    .modal-title {
        font-size: var(--text-2xl);
    }
    
    /* Mobile Empty State */
    .empty-state {
        padding: var(--space-12);
    }
    
    .empty-state-title {
        font-size: var(--text-xl);
    }
    
    .empty-state-description {
        font-size: var(--text-base);
    }
    
    /* Mobile Grid Adjustments */
    .catalog-grid {
        padding: 0 var(--space-2);
    }
    
    #catalogGrid.row {
        gap: var(--space-4);
        padding: 0;
    }
    
    /* Info Box Adjustments */
    .welcome-info {
        padding: var(--space-4);
        margin-top: var(--space-4);
    }
    
    .info-title {
        font-size: var(--text-lg);
    }
    
    .info-text {
        font-size: var(--text-xs);
    }
}

/* Ultra Small Screens */
@media (max-width: 475px) {
    .search-hero {
        padding: var(--space-4) var(--space-3) var(--space-6);
        border-radius: 12px;
    }
    
    .search-title {
        font-size: var(--text-4xl);
        margin-bottom: var(--space-2);
        letter-spacing: 0;
    }
    
    .filter-panel {
        padding: var(--space-4);
        border-radius: 12px;
    }
    
    .note-card, .sheet-music-card {
        max-width: 280px;
    }
    
    .cart-trigger {
        bottom: var(--space-4);
        right: var(--space-4);
        width: 52px;
        height: 52px;
    }
}

/* Condition badges mit neuem Design */
.condition-excellent { 
    background-color: var(--success); 
    color: white; 
    padding: var(--space-1) var(--space-2);
    border-radius: 6px;
    font-size: var(--text-xs);
    font-weight: 600;
}

.condition-very-good { 
    background-color: var(--info); 
    color: white;
    padding: var(--space-1) var(--space-2);
    border-radius: 6px;
    font-size: var(--text-xs);
    font-weight: 600;
}

.condition-good { 
    background-color: var(--warning); 
    color: white;
    padding: var(--space-1) var(--space-2);
    border-radius: 6px;
    font-size: var(--text-xs);
    font-weight: 600;
}

.condition-fair { 
    background-color: var(--error); 
    color: white;
    padding: var(--space-1) var(--space-2);
    border-radius: 6px;
    font-size: var(--text-xs);
    font-weight: 600;
}

/* Accessibility Improvements */
/* Focus Indicators */
.btn:focus,
.form-control:focus,
.form-select:focus,
.note-card:focus,
.sheet-music-card:focus {
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Screen Reader */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Cart styles */
.cart-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.25rem;
}

.cart-item-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.cart-item-composer {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.cart-summary {
    background-color: var(--bg-light);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
}

/* Responsive grid */
@media (max-width: 576px) {
    .row > [class*="col-"] {
        margin-bottom: 1rem;
    }
    
    .sheet-music-card .card-img-top {
        height: 240px;
        object-fit: contain;
        object-position: center top;
        padding-top: 12px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

@media (min-width: 576px) {
    #catalogGrid {
        --bs-gutter-x: 1.5rem;
        --bs-gutter-y: 1.5rem;
    }
}

/* Loading animations */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* Lightbox styles */
#lightboxImage {
    max-height: 70vh;
    width: auto;
}

/* Custom scrollbar */
.modal-body {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-light);
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--bg-light);
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* Search highlight */
.search-highlight {
    background-color: #fff3cd;
    padding: 0.1rem 0.2rem;
    border-radius: 0.2rem;
    font-weight: 600;
}

/* Status indicators */
.status-available { color: #28a745; }
.status-reserved { color: #ffc107; }
.status-sold { color: #dc3545; }

/* Form enhancements */
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 82, 130, 0.25);
}

/* Button animations */
.btn {
    transition: all 0.2s ease;
}

.btn:active {
    transform: translateY(1px);
}

/* Price proposal highlight */
.price-proposal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* Alert enhancements */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Header enhancements */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* Footer spacing */
.modal-footer {
    border-top: 1px solid var(--border-color);
}

/* ================================================= */
/* ADVANCED FILTER SYSTEM STYLES */
/* ================================================= */

/* Main Layout: Sidebar + Content */
.main-layout {
    display: flex;
    gap: var(--space-6);
    margin-top: var(--space-1);
}

/* Filter Sidebar */
.filter-sidebar {
    width: 280px;
    background: var(--deep-cream);
    border-radius: var(--space-3);
    padding: var(--space-6);
    height: fit-content;
    position: static;
    box-shadow: 0 2px 8px rgba(44, 62, 58, 0.08);
}

.filter-sidebar-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

/* Content Area */
.content-area {
    flex: 1;
    min-width: 0; /* Prevents flex overflow */
}

/* Filter Sections */
.filter-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.filter-section-title {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--primary-charcoal);
    margin: var(--space-6) 0 var(--space-1) 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.filter-section-title:first-child {
    margin-top: var(--space-3);
}

.filter-section-title.collapsible {
    cursor: pointer;
    justify-content: space-between;
    padding: var(--space-2) 0;
    border-radius: var(--space-1);
    transition: background-color 0.2s ease;
}

.filter-section-title.collapsible:hover {
    background-color: var(--light-gold);
    padding-left: var(--space-2);
    padding-right: var(--space-2);
}

.filter-section-title .toggle-icon {
    transition: transform 0.3s ease;
}

.filter-section-title[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

/* Filter Loading */
.filter-loading {
    padding: var(--space-8) 0;
    text-align: center;
    color: var(--warm-gray);
}

/* Checkbox Groups */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    max-height: 200px;
    overflow-y: auto;
    padding: var(--space-2);
}

.checkbox-group.composer-list {
    max-height: 250px;
}

.form-check {
    margin-bottom: 0 !important;
}

.form-check-input:checked {
    background-color: var(--accent-gold);
    border-color: var(--accent-gold);
}


.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(201, 169, 110, 0.25);
    border-color: var(--accent-gold);
}

.form-check-label {
    font-size: var(--text-sm);
    color: var(--primary-charcoal);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.form-check-label .count {
    font-size: var(--text-xs);
    color: var(--warm-gray);
    background: var(--soft-sage);
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* Nuclear option: Force compact line spacing everywhere in filters */
.filter-sidebar,
.filter-sidebar *,
.filter-sidebar .form-check,
.filter-sidebar .form-check-label,
.filter-sidebar .checkbox-group,
.filter-sidebar .checkbox-group *,
label[for*="composer"],
label[for*="publisher"],
.form-check-label[for*="composer"],
.form-check-label[for*="publisher"] {
    line-height: 1.1 !important;
}

/* Year Range Slider */
.year-range-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.year-range-display {
    text-align: center;
    font-weight: 600;
    color: var(--accent-burgundy);
    font-family: var(--font-display);
    font-size: var(--text-lg);
}

/* noUiSlider Custom Styling */
.year-slider-nouislider {
    margin: var(--space-4) 0;
    height: 8px;
}

/* Override noUiSlider default colors with our design system */
.year-slider-nouislider .noUi-connect {
    background: var(--accent-gold);
}

.year-slider-nouislider .noUi-base {
    background: var(--soft-sage);
    border-radius: 4px;
    box-shadow: none;
    border: none;
}

.year-slider-nouislider .noUi-handle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-gold);
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    outline: none;
}

.year-slider-nouislider .noUi-handle::before,
.year-slider-nouislider .noUi-handle::after {
    display: none;
}

.year-slider-nouislider .noUi-handle:hover {
    background: var(--accent-burgundy);
    transform: scale(1.1);
}

.year-slider-nouislider .noUi-handle.noUi-handle-lower {
    z-index: 2;
}

.year-slider-nouislider .noUi-handle.noUi-handle-upper {
    z-index: 3;
}

/* Filter Search Containers (unified styling for composer & publisher search) */
.filter-search-container,
.composer-search-container {
    margin-bottom: var(--space-3);
}

/* Unified styling for all filter search inputs */
.filter-search-container input,
.composer-search-container input {
    color: var(--primary-charcoal) !important;
    background-color: white !important;
    border: 1px solid var(--soft-sage) !important;
}

.filter-search-container input::placeholder,
.composer-search-container input::placeholder,
.filter-search-container input::-webkit-input-placeholder,
.composer-search-container input::-webkit-input-placeholder,
.filter-search-container input::-moz-placeholder,
.composer-search-container input::-moz-placeholder {
    color: var(--warm-gray) !important;
    opacity: 0.8 !important;
}

.filter-search-container input:focus,
.composer-search-container input:focus {
    border-color: var(--light-gold) !important;
    box-shadow: 0 0 0 2px rgba(166, 124, 82, 0.15) !important;
    outline: none !important;
}

/* Filter Toggle for Mobile - Elegante Navigation-Zeile */
.filter-toggle-section {
    padding: var(--space-3) 0;
    background: transparent;
    border-top: 1px solid rgba(44, 62, 58, 0.08);
    border-bottom: 1px solid rgba(44, 62, 58, 0.08);
    margin: var(--space-2) 0;
}

/* Mobile Filter Toggle - Subtile Navigation statt Button */
#mobileFilterToggle {
    background: none;
    border: none;
    color: var(--primary-charcoal);
    font-family: var(--font-body);
    font-weight: 500;
    padding: var(--space-3) 0;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 0.2s ease;
    font-size: var(--text-base);
}

#mobileFilterToggle:hover {
    color: var(--primary-charcoal);
    background: rgba(166, 124, 82, 0.1);
}

#mobileFilterToggle:focus {
    outline: none;
    color: var(--primary-charcoal);
    background: rgba(166, 124, 82, 0.1);
}

#mobileFilterToggle .bi {
    margin-right: var(--space-2);
    font-size: var(--text-lg);
}

/* Badge subtiler positionieren */
#mobileFilterToggle .badge {
    font-size: var(--text-xs);
    padding: 2px 6px;
    margin-left: var(--space-2);
}

/* Active Filters Section - Subtiler Ansatz */
.active-filters-section {
    padding: var(--space-3) 0 var(--space-4);
    background: transparent;
    border-bottom: 1px solid rgba(44, 62, 58, 0.06);
    margin-bottom: var(--space-2);
}

/* Filter Pills Container - Bessere Abstände */
#activeFilterPills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    row-gap: 10px; /* Mittelwert zwischen space-2 und space-3 */
}

/* Suchfeld Placeholder-Styling */
#searchInput::placeholder {
    color: var(--warm-gray);
    opacity: 0.7;
}

#searchInput {
    color: var(--primary-charcoal);
}

/* Komponisten-Suchfeld Placeholder-Styling */
#composerSearch::placeholder {
    color: var(--warm-gray);
    opacity: 0.7;
}

#composerSearch {
    color: var(--primary-charcoal);
}

/* Elegantere Focus-States für Suchfelder */
#searchInput:focus,
#composerSearch:focus,
.filter-sidebar .search-input-group .form-control:focus {
    border-color: var(--light-gold);
    box-shadow: 0 0 0 2px rgba(166, 124, 82, 0.15);
    outline: none;
}

/* Bootstrap Focus Override */
.form-control:focus {
    border-color: var(--light-gold);
    box-shadow: 0 0 0 2px rgba(166, 124, 82, 0.15);
}

/* Form-Select Focus Override */
.form-select:focus {
    border-color: var(--light-gold);
    box-shadow: 0 0 0 2px rgba(166, 124, 82, 0.15);
}

/* noUiSlider Touch-Fix für Mobile */
.noUi-target {
    touch-action: none;
}

.noUi-handle {
    touch-action: none;
}

/* Mobile noUiSlider Verbesserungen */
@media (max-width: 768px) {
    .noUi-handle {
        cursor: grab;
    }
    
    .noUi-handle:active {
        cursor: grabbing;
    }
}

/* "Alle löschen" Button - Eleganter aber touch-friendly */
#clearAllFilters {
    background: none;
    border: none;
    color: var(--warm-gray);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    padding: var(--space-2) var(--space-3);
    min-height: 44px; /* Touch-friendly size */
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    border-radius: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
}

#clearAllFilters:hover {
    background: rgba(44, 62, 58, 0.04);
    color: var(--primary-charcoal);
    border: none;
}

#clearAllFilters:focus {
    outline: 2px solid rgba(166, 124, 82, 0.3);
    outline-offset: 1px;
    background: rgba(44, 62, 58, 0.04);
}

#clearAllFilters .bi {
    font-size: var(--text-base);
}

/* Filter Pills */
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--accent-gold);
    color: white;
    padding: var(--space-1) var(--space-3);
    border-radius: 15px;
    font-size: var(--text-xs);
    font-weight: 500;
    text-decoration: none;
}

.filter-pill .remove-filter {
    background: none;
    border: none;
    color: white;
    padding: 0;
    margin-left: var(--space-1);
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.filter-pill .remove-filter:hover {
    opacity: 1;
}

/* Filter Actions */
.filter-actions {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--soft-sage);
}

/* Search Input Group in Sidebar */
.filter-sidebar .search-input-group {
    position: relative;
    display: flex;
}

.filter-sidebar .search-input-group .form-control {
    border-radius: 6px;
    font-size: var(--text-sm);
}

.filter-sidebar .search-input-group .search-button {
    background: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    color: white;
    padding: var(--space-2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    transition: background-color 0.2s ease;
}

.filter-sidebar .search-input-group .search-button:hover {
    background: var(--accent-burgundy);
}

/* Mobile Responsiveness */
@media (max-width: 991.98px) {
    .main-layout {
        flex-direction: column;
    }
    
    .filter-sidebar {
        display: none;
        width: 100%;
        position: static;
    }
    
    .filter-toggle-section {
        display: block !important;
    }
    
    /* Hide header cart button on non-desktop */
    .cart-header-btn {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .filter-toggle-section {
        display: none !important;
    }
    
    /* Show header cart button only on desktop */
    .cart-header-btn {
        display: inline-flex !important;
    }
}

/* Mobile Offcanvas Styling */
.offcanvas-body .filter-sidebar-content {
    padding: var(--space-4);
}

/* Scrollbar Styling for Checkbox Groups */
.checkbox-group::-webkit-scrollbar {
    width: 6px;
}

.checkbox-group::-webkit-scrollbar-track {
    background: var(--soft-sage);
    border-radius: 3px;
}

.checkbox-group::-webkit-scrollbar-thumb {
    background: var(--warm-gray);
    border-radius: 3px;
}

.checkbox-group::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold);
}

/* Results Header Sort Control Styling */
.results-header .sort-controls {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.results-header .sort-controls .form-select {
    min-width: 180px;
    border: 2px solid var(--soft-sage);
    border-radius: 8px;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
    background-color: var(--deep-cream);
    color: var(--primary-charcoal);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(44, 62, 58, 0.05);
}

.results-header .sort-controls .form-select:hover {
    border-color: var(--accent-gold);
    background-color: var(--light-gold);
    box-shadow: 0 3px 8px rgba(201, 169, 110, 0.15);
    transform: translateY(-1px);
}

.results-header .sort-controls .form-select:focus {
    border-color: var(--light-gold);
    background-color: var(--light-gold);
    box-shadow: 0 0 0 2px rgba(166, 124, 82, 0.15);
    outline: none;
}

.results-header .sort-controls .form-label {
    color: var(--warm-gray);
    font-size: var(--text-sm);
    font-weight: 600;
    margin-bottom: 0;
    white-space: nowrap;
}

/* Required field asterisks - positioned next to checkbox */
.form-check .required-asterisk.text-danger {
    font-size: 0.8em !important;
    vertical-align: top !important;
    position: relative !important;
    top: 0.1em !important;
    margin-left: 0.2em !important;
    margin-right: 0.3em !important;
    display: inline !important;
}

/* Ensure label stays inline with checkbox */
.form-check .form-check-label {
    display: inline !important;
    vertical-align: top !important;
    margin-left: 0 !important;
}

/* ================================================= */
/* HOW IT WORKS COMPONENT */
/* ================================================= */

:root {
  /* benutze bestehende Variablen */
  --hw-bg: var(--parchment-light);       /* heller Pergament-Hintergrund */
  --hw-border: var(--parchment-deep);    /* dezente Rahmenfarbe */
  --hw-text: var(--primary-charcoal);    /* Hauptschrift */
  --hw-muted: var(--warm-gray);          /* Sekundärschrift */
  --hw-pill: var(--deep-cream);          /* Kachel-Hintergrund */
  --hw-shadow: 0 6px 20px rgba(44,62,58,0.08); /* gleiche Logik wie Karten */
  --radius: 12px; /* angleichen an .note-card */
}

.howitworks{ 
  margin: var(--space-6) 0 var(--space-10);
}

#howitworksContainer {
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.howitworks__inner{
  background: var(--hw-bg);
  border: 1px solid var(--hw-border);
  border-radius: var(--radius);
  box-shadow: var(--hw-shadow);
  padding: var(--space-6);
  position: relative;
  max-width: 992px;
  margin: 0 auto;
}

/* Mobile: Entferne Rahmen für fließenderes Design */
@media (max-width: 768px) {
  .howitworks__inner {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: var(--space-4) 0;
  }
  
  .howitworks {
    margin: var(--space-4) 0 var(--space-6);
  }
  
  /* Filter-Bereiche noch subtiler in Mobile */
  .filter-toggle-section {
    background: transparent;
    border-top: 1px solid rgba(44, 62, 58, 0.06);
    border-bottom: 1px solid rgba(44, 62, 58, 0.06);
    padding: var(--space-2) 0;
    margin: var(--space-2) 0;
  }
  
  .active-filters-section {
    background: transparent;
    padding: var(--space-2) 0 var(--space-3);
    border: none;
    margin-bottom: var(--space-1);
  }
  
  /* Hero-Bereich weniger abgegrenzt */
  .search-hero {
    background: transparent;
    margin-bottom: var(--space-4);
  }
}

/* Desktop: Elegantere Übergänge */
@media (min-width: 769px) {
  .howitworks {
    margin: var(--space-8) 0 var(--space-8);
  }
  
  .filter-toggle-section,
  .active-filters-section {
    background: transparent;
    border: none;
    margin: var(--space-3) 0;
  }
  
  /* Sanfterer Übergang zwischen Bereichen */
  .search-hero {
    margin-bottom: var(--space-6);
    border-bottom: 1px solid rgba(44, 62, 58, 0.06);
    padding-bottom: var(--space-6);
  }
}

/* Allgemein: Weniger "boxige" Karten */
.note-card, .sheet-music-card {
  border: 1px solid rgba(44, 62, 58, 0.06);
  box-shadow: 0 1px 3px rgba(44, 62, 58, 0.04);
}

.note-card:hover, .sheet-music-card:hover {
  border-color: rgba(44, 62, 58, 0.1);
}

/* Mobile: Noch subtilere Karten-Schatten */
@media (max-width: 768px) {
  .note-card, .sheet-music-card {
    border: 1px solid rgba(44, 62, 58, 0.04);
    box-shadow: 0 1px 2px rgba(44, 62, 58, 0.02);
    margin-bottom: var(--space-4);
  }
}

.howitworks__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: none;
  border: none;
  color: var(--primary-charcoal);
  font-size: var(--text-lg);
  cursor: pointer;
  padding: var(--space-1);
  border-radius: 4px;
  transition: all 0.2s ease;
  opacity: 0.6;
  z-index: 10;
}

.howitworks__close:hover {
  opacity: 1;
  background: rgba(44,62,58,0.1);
}

.howitworks__lead{ 
  margin-bottom: var(--space-4);
  text-align: center;
}

.howitworks__lightbulb {
  width: 24px;
  height: 24px;
  color: var(--accent-gold);
  margin-right: 8px;
  vertical-align: -2px;
}

.howitworks h2 {
  display: inline-flex;
  align-items: center;
}
.howitworks h2{
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  margin: 0;
  color: var(--primary-charcoal);
}
.howitworks__lead p{
  color: var(--hw-muted);
  margin: var(--space-2) 0 0;
  font-size: var(--text-base);
}

.howitworks__steps{
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
}
@media (min-width: 768px){
  .howitworks__steps{ grid-template-columns: repeat(4,1fr); }
}

.howitworks__step{ position: relative; }
.howitworks__pill{
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-3);
  background: var(--hw-pill);
  border: 1px solid var(--hw-border);
  border-radius: calc(var(--radius) - 2px);
  padding: var(--space-3) var(--space-4);
  cursor: default;
  transition: transform .08s ease, box-shadow .2s ease;
  font-family: var(--font-body);
  position: relative;
}
.howitworks__pill:hover{
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(44,62,58,0.12);
}

/* Custom Tooltip */
.howitworks__pill[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-charcoal);
  color: white;
  padding: var(--space-2) var(--space-3);
  border-radius: 6px;
  font-size: var(--text-xs);
  font-family: var(--font-body);
  white-space: nowrap;
  max-width: 200px;
  white-space: normal;
  text-align: center;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: tooltipFadeIn 0.5s ease-in 0.5s both;
}

.howitworks__pill[data-tooltip]:hover::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--primary-charcoal);
  z-index: 1000;
  animation: tooltipFadeIn 0.5s ease-in 0.5s both;
}

@keyframes tooltipFadeIn {
  from { 
    opacity: 0; 
    transform: translateX(-50%) translateY(4px); 
  }
  to { 
    opacity: 1; 
    transform: translateX(-50%) translateY(0); 
  }
}

/* Mobile tooltip positioning */
@media (max-width: 768px) {
  .howitworks__pill[data-tooltip]:hover::after {
    max-width: 180px;
    font-size: 11px;
  }
}
.howitworks__num{
  display: grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--hw-border);
  font-weight: 600;
  color: var(--accent-burgundy);
  background: var(--light-gold);
  font-size: var(--text-sm);
}
.howitworks__label{ 
  text-align: left; 
  font-weight: 600; 
  color: var(--hw-text); 
  font-size: var(--text-sm);
}
.howitworks__icon{ 
  width: 18px; height: 18px; 
  color: var(--accent-gold); 
}

/* Tablet Breakpoint: Kleinere Schriften für besseres Layout */
@media (min-width: 768px) and (max-width: 991px) {
  .howitworks__num {
    width: 22px;
    height: 22px;
    font-size: var(--text-xs);
  }

  .howitworks__label {
    font-size: var(--text-xs);
    font-weight: 500;
  }

  .howitworks__icon {
    width: 16px;
    height: 16px;
  }
}

/* ===== LIST VIEW (TABLE) STYLES ===== */
#catalogList {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

#catalogList table {
    margin-bottom: 0;
}

#catalogList thead {
    background: var(--light-gold) !important;
    border-bottom: 2px solid var(--accent-gold);
}

#catalogList thead th {
    font-weight: 600;
    color: var(--primary-charcoal);
    padding: 1rem 0.75rem;
    white-space: nowrap;
    vertical-align: middle;
    font-size: 0.9rem;
    border-bottom: 2px solid var(--accent-gold);
}

#catalogList thead th.sortable:hover {
    background: rgba(201, 169, 110, 0.2);
}

#catalogList thead th .sort-icon {
    font-size: 0.75rem;
    color: var(--accent-gold);
    margin-left: 4px;
    transition: transform 0.2s ease;
}

#catalogList thead th.sort-asc .sort-icon {
    transform: rotate(180deg);
}

#catalogList thead th.sort-desc .sort-icon {
    transform: rotate(0deg);
}

#catalogList tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s ease;
}

#catalogList tbody tr:hover {
    background: var(--primary-cream);
}

#catalogList tbody td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    font-size: 0.9rem;
}

#catalogList tbody td.composer-cell {
    font-weight: 500;
    color: var(--primary-charcoal);
}

#catalogList tbody td.title-cell {
    color: var(--soft-grey);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#catalogList tbody td.publisher-cell {
    color: var(--soft-grey);
    font-size: 0.85rem;
}

#catalogList tbody td.pages-cell,
#catalogList tbody td.weight-cell,
#catalogList tbody td.price-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

#catalogList tbody td.weight-cell {
    color: var(--soft-grey);
    font-size: 0.85rem;
}

#catalogList tbody td.price-cell {
    font-weight: 600;
    color: var(--accent-burgundy);
}

#catalogList tbody td.action-cell {
    text-align: center;
}

#catalogList .btn-sm {
    font-size: 0.85rem;
    padding: 0.375rem 0.75rem;
}

/* View Toggle Buttons */
.btn-group .btn.active {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: white;
}

.btn-group .btn:not(.active):hover {
    background: var(--light-gold);
    border-color: var(--accent-gold);
}

/* Responsive table for mobile */
@media (max-width: 991px) {
    #catalogList {
        font-size: 0.85rem;
    }

    #catalogList thead th,
    #catalogList tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }

    #catalogList tbody td.title-cell {
        max-width: 200px;
    }
}

