/**
 * Zulieferer Katalog - Frontend Styles
 */

/* Modal Overlay */
.zk-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
}

.zk-modal.zk-active {
    display: block;
}

.zk-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
}

/* Modal Container */
.zk-modal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: zkModalIn 0.3s ease-out;
}

@keyframes zkModalIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Close Button */
.zk-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
    padding: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    line-height: 36px;
    text-align: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
}

.zk-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modal Header */
.zk-modal-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #fff;
    padding: 30px;
    text-align: center;
}

.zk-modal-header h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
    color: #fff;
}

.zk-modal-header p {
    margin: 0;
    opacity: 0.85;
    font-size: 14px;
    color: #ccc;
}

/* Filter Bar */
.zk-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 15px 30px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.zk-filter-btn {
    padding: 8px 16px;
    border: 2px solid #ddd;
    background: #fff;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #555;
}

.zk-filter-btn:hover {
    border-color: #aaa;
    background: #f5f5f5;
}

.zk-filter-btn.zk-filter-active {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

/* Modal Content */
.zk-modal-content {
    padding: 30px;
    background: #f8f9fa;
    max-height: calc(90vh - 150px);
    overflow-y: auto;
}

/* Card hidden by filter */
.zk-card.zk-hidden {
    display: none !important;
}

/* Grid */
.zk-grid {
    display: grid;
    gap: 20px;
}

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

@media (max-width: 768px) {
    .zk-grid-3,
    .zk-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .zk-modal-content {
        padding: 20px;
    }
}

/* Card */
.zk-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 20px;
    background: #fff;
    border-radius: 10px;
    text-decoration: none;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    min-height: 140px;
}

.zk-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #3498db;
}

.zk-card img {
    max-width: 120px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 12px;
}

.zk-card-name {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    text-align: center;
}

/* Trigger Button */
.zk-modal-trigger {
    display: inline-block;
    padding: 12px 24px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.zk-modal-trigger:hover {
    background: #2980b9;
}

/* Menu Item Trigger (für Navigation) */
a.zk-menu-trigger {
    cursor: pointer;
}
