/* ===================================
   LINDAUER SPORTPARK V2 - Geraete
   =================================== */

/* ==============================
   Page Header (subpages)
   ============================== */
.page-header {
    padding: 140px 0 60px;
    text-align: center;
}

.page-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-top: 16px;
}

.page-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    margin-top: 12px;
}

/* ==============================
   Kategorie-Karten
   ============================== */
.kategorien-section {
    padding: 0 0 80px;
}

.kategorien-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.kategorie-card {
    position: relative;
    padding: 28px 20px;
    border-radius: var(--radius-lg);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    cursor: pointer;
    transition: all var(--transition-medium);
    text-align: center;
    overflow: hidden;
}

.kategorie-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.kategorie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
}

.kategorie-card:hover::before {
    opacity: 1;
}

.kategorie-card.active {
    border-color: var(--accent);
    background: rgba(22, 163, 74, 0.08);
}

.kategorie-card.active::before {
    opacity: 1;
}

.kategorie-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: var(--accent-light);
}

.kategorie-icon svg {
    width: 100%;
    height: 100%;
}

.kategorie-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.kategorie-count {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ==============================
   Filter Bar
   ============================== */
.geraete-section {
    padding: 0 0 100px;
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 16px;
    margin-bottom: 32px;
    border-radius: var(--radius-lg);
}

.filter-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: none;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    font-family: inherit;
}

.filter-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.filter-tab.active {
    color: var(--accent-light);
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.3);
    font-weight: 600;
}

.filter-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.filter-search {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    pointer-events: none;
}

.filter-search input {
    padding: 8px 12px 8px 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    width: 220px;
    transition: all var(--transition-fast);
    outline: none;
}

.filter-search input::placeholder {
    color: var(--text-secondary);
}

.filter-search input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.filter-count {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    font-weight: 500;
}

/* ==============================
   Geraete Grid
   ============================== */
.geraete-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ==============================
   Geraete Card
   ============================== */
.geraet-card {
    position: relative;
    border-radius: var(--radius-lg);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    transition: all var(--transition-medium);
    cursor: pointer;
}

.geraet-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

/* Card image placeholder */
.geraet-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.geraet-card-img .placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.placeholder-img .geraet-nr {
    font-size: 36px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.2);
    font-family: 'Barlow Condensed', sans-serif;
}

.placeholder-img .geraet-icon {
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.15);
}

.placeholder-img .geraet-icon svg {
    width: 100%;
    height: 100%;
}

/* Category-specific placeholder gradients */
.geraet-card[data-kategorie="cardio"] .placeholder-img {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.05) 100%);
}
.geraet-card[data-kategorie="maschinen"] .placeholder-img {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.15) 0%, rgba(16, 120, 55, 0.05) 100%);
}
.geraet-card[data-kategorie="freihanteln"] .placeholder-img {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.05) 100%);
}
.geraet-card[data-kategorie="calisthenics"] .placeholder-img {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(126, 34, 206, 0.05) 100%);
}
.geraet-card[data-kategorie="functional"] .placeholder-img {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15) 0%, rgba(13, 148, 136, 0.05) 100%);
}

/* Bookmark button on card */
.card-bookmark {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 2;
    padding: 0;
}

.card-bookmark svg {
    width: 18px;
    height: 18px;
}

.card-bookmark:hover {
    background: rgba(0, 0, 0, 0.7);
    color: var(--accent-light);
    border-color: var(--accent);
}

.card-bookmark.saved {
    background: rgba(22, 163, 74, 0.3);
    color: var(--accent-light);
    border-color: var(--accent);
}

.card-bookmark.saved svg {
    fill: var(--accent-light);
}

/* Category badge on card */
.card-kategorie {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2;
}

.card-kategorie[data-kat="cardio"] {
    background: rgba(59, 130, 246, 0.25);
    color: #93bbfd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.card-kategorie[data-kat="maschinen"] {
    background: rgba(22, 163, 74, 0.25);
    color: #6ee7a0;
    border: 1px solid rgba(22, 163, 74, 0.3);
}
.card-kategorie[data-kat="freihanteln"] {
    background: rgba(245, 158, 11, 0.25);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.card-kategorie[data-kat="calisthenics"] {
    background: rgba(168, 85, 247, 0.25);
    color: #c4b5fd;
    border: 1px solid rgba(168, 85, 247, 0.3);
}
.card-kategorie[data-kat="functional"] {
    background: rgba(20, 184, 166, 0.25);
    color: #5eead4;
    border: 1px solid rgba(20, 184, 166, 0.3);
}

/* Card body */
.geraet-card-body {
    padding: 16px;
}

.geraet-card-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.geraet-card-marke {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.geraet-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.geraet-tag {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ==============================
   Empty State
   ============================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ==============================
   Toast Notification
   ============================== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    background: rgba(22, 163, 74, 0.95);
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.toast-remove {
    background: rgba(239, 68, 68, 0.95);
}

/* ==============================
   DETAIL PAGE
   ============================== */
.detail-page {
    padding: 100px 0 80px;
    min-height: 100vh;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 32px;
    transition: color var(--transition-fast);
}

.back-link svg {
    width: 18px;
    height: 18px;
}

.back-link:hover {
    color: var(--accent-light);
}

/* Loading */
.detail-loading {
    text-align: center;
    padding: 100px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--accent-light);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.detail-loading p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* Detail Header */
.detail-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-bottom: 60px;
    align-items: start;
}

.detail-bild {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
}

.detail-bild .placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.detail-bild .placeholder-img .geraet-nr {
    font-size: 72px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.15);
    font-family: 'Barlow Condensed', sans-serif;
}

.detail-bild .placeholder-img .geraet-icon {
    width: 56px;
    height: 56px;
    color: rgba(255, 255, 255, 0.12);
}

.detail-bild .placeholder-img .geraet-icon svg {
    width: 100%;
    height: 100%;
}

.detail-nummer {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-light);
    margin-bottom: 8px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(22, 163, 74, 0.12);
    border: 1px solid rgba(22, 163, 74, 0.25);
}

.detail-name {
    font-family: 'Inter', sans-serif;
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.detail-marke {
    display: inline-block;
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.detail-tag {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-beschreibung {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

/* Bookmark button (detail) */
.btn-bookmark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.btn-bookmark .bookmark-icon {
    width: 20px;
    height: 20px;
}

.btn-bookmark:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-bookmark.saved {
    background: rgba(22, 163, 74, 0.15);
    border-color: var(--accent);
    color: var(--accent-light);
}

.btn-bookmark.saved .bookmark-icon {
    fill: var(--accent-light);
}

/* Videos */
.detail-videos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 48px;
}

.video-slot {
    border-radius: var(--radius-lg);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.video-slot-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--glass-border);
}

.video-slot-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.video-slot-body {
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
}

.video-placeholder {
    text-align: center;
    padding: 20px;
}

.video-placeholder svg {
    width: 48px;
    height: 48px;
    color: var(--text-secondary);
    opacity: 0.4;
    margin-bottom: 8px;
}

.video-placeholder p {
    font-size: 13px;
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Muskelgruppen section */
.detail-muskelgruppen {
    padding: 32px;
    border-radius: var(--radius-lg);
    margin-bottom: 48px;
}

.detail-muskelgruppen h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

.muskel-visual {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.muskel-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    background: rgba(22, 163, 74, 0.1);
    border: 1px solid rgba(22, 163, 74, 0.2);
    color: var(--accent-light);
    font-size: 14px;
    font-weight: 600;
}

.muskel-badge .muskel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-light);
}

/* Not found */
.detail-not-found {
    text-align: center;
    padding: 100px 0;
}

.detail-not-found h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.detail-not-found p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ==============================
   Animations
   ============================== */
.geraet-card {
    opacity: 0;
    transform: translateY(20px);
    animation: cardFadeIn 0.4s ease forwards;
}

@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for cards */
.geraet-card:nth-child(1) { animation-delay: 0.02s; }
.geraet-card:nth-child(2) { animation-delay: 0.04s; }
.geraet-card:nth-child(3) { animation-delay: 0.06s; }
.geraet-card:nth-child(4) { animation-delay: 0.08s; }
.geraet-card:nth-child(5) { animation-delay: 0.10s; }
.geraet-card:nth-child(6) { animation-delay: 0.12s; }
.geraet-card:nth-child(7) { animation-delay: 0.14s; }
.geraet-card:nth-child(8) { animation-delay: 0.16s; }
.geraet-card:nth-child(9) { animation-delay: 0.18s; }
.geraet-card:nth-child(10) { animation-delay: 0.20s; }
.geraet-card:nth-child(11) { animation-delay: 0.22s; }
.geraet-card:nth-child(12) { animation-delay: 0.24s; }
.geraet-card:nth-child(13) { animation-delay: 0.26s; }
.geraet-card:nth-child(14) { animation-delay: 0.28s; }

/* ==============================
   Responsive
   ============================== */
@media (max-width: 1024px) {
    .kategorien-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .geraete-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-right {
        justify-content: space-between;
    }

    .detail-header {
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 120px 0 40px;
    }

    .kategorien-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .kategorie-card {
        padding: 20px 12px;
    }

    .kategorie-icon {
        width: 36px;
        height: 36px;
        margin-bottom: 8px;
    }

    .kategorie-name {
        font-size: 13px;
    }

    .kategorie-count {
        font-size: 11px;
    }

    .geraete-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .filter-search input {
        width: 100%;
    }

    .filter-right {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-count {
        text-align: center;
    }

    .detail-header {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .detail-videos {
        grid-template-columns: 1fr;
    }

    .detail-muskelgruppen {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .kategorien-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .kategorien-grid .kategorie-card:last-child {
        grid-column: 1 / -1;
    }

    .geraete-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .geraet-card-body {
        padding: 12px;
    }

    .geraet-card-name {
        font-size: 14px;
    }

    .geraet-card-marke {
        font-size: 12px;
    }

    .geraet-card-tags {
        display: none;
    }

    .placeholder-img .geraet-nr {
        font-size: 28px;
    }

    .filter-tabs {
        gap: 2px;
    }

    .filter-tab {
        padding: 6px 10px;
        font-size: 12px;
    }

    .detail-bild .placeholder-img .geraet-nr {
        font-size: 48px;
    }

    .detail-name {
        font-size: 24px;
    }

    .back-link {
        margin-bottom: 20px;
    }
}
