/* ===== PRODUCTS SECTION ===== */

/* Statistik-Kacheln */
.products-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 24px 0;
}

.products-stat-card {
    background: #1e1e1e;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #2a2a2a;
    text-align: center;
}

.products-stat-card .stat-label {
    display: block;
    font-size: 14px;
    color: #888;
    margin-bottom: 8px;
}

.products-stat-card .stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #fff;
}

/* Grid-Tabelle */
.products-grid-wrapper {
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
    overflow: hidden;
    margin-top: 24px;
}

.products-grid-header {
    display: grid;
    grid-template-columns: 0.5fr 2fr 1.5fr 0.5fr 1fr 1fr 1fr 0.5fr 0.5fr;
    padding: 14px 20px;
    background: #222;
    font-weight: 600;
    color: #aaa;
    border-bottom: 1px solid #2a2a2a;
    font-size: 14px;
}

.products-grid-row {
    display: grid;
    grid-template-columns: 0.5fr 2fr 1.5fr 0.5fr 1fr 1fr 1fr 0.5fr 0.5fr;
    padding: 14px 20px;
    align-items: center;
    border-bottom: 1px solid #222;
    font-size: 14px;
    color: #ddd;
}

.products-grid-row:last-child {
    border-bottom: none;
}

.products-grid-row:hover {
    background: #222;
}

/* Zellen-Inhalte */
.products-grid-row .product-title {
    font-weight: 500;
    color: #fff;
}

.products-grid-row .product-category,
.products-grid-row .product-filetype,
.products-grid-row .product-downloads {
    color: #aaa;
}

/* Status-Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    width: fit-content;
}

.status-badge.active {
    background: #1a3a2a;
    color: #4ade80;
}

.status-badge.inactive {
    background: #3a1a1a;
    color: #f87171;
}

.status-badge.pending {
    background: #3a2a1a;
    color: #fbbf24;
}

/* Aktionen (Buttons) */
.product-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: #333;
}

.btn-icon img {
    width: 18px;
    height: 18px;
    display: block;
}

.btn-icon:hover img {
    opacity: 0.75;
}

/* YES / NO MODAL */

.yesno-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    padding: 20px;
}

.yesno-modal {
    background: var(--bg-secondary);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 18px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: yesNoModalSlideUp 0.3s ease-out;
}

.yesno-modal h2 {
    font-size: 1.5rem;
    margin: 0 0 8px;
    color: var(--text-primary);
}

.yesno-modal p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
    margin: 0 0 24px;
}

.yesno-modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.yesno-modal-actions button {
    padding: 10px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.yesno-modal-no {
    background: var(--bg-card);
    color: var(--text-primary);
}

.yesno-modal-yes {
    background: var(--accent-pink);
    color: #fff;
}

.yesno-modal-actions button:hover {
    transform: scale(1.02);
}

@keyframes yesNoModalSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Anpassungen */
@media (max-width: 992px) {
    .products-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .products-grid-header,
    .products-grid-row {
        grid-template-columns: 1.5fr 1fr 0.8fr 0.8fr 0.8fr 1fr;
        font-size: 13px;
        padding: 12px 16px;
    }
}

@media (max-width: 600px) {
    .products-stats-grid {
        grid-template-columns: 1fr;
    }
    .products-grid-header {
        display: none; /* Header ausblenden, stattdessen label in rows? */
    }
    .products-grid-row {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 16px;
        border-bottom: 2px solid #2a2a2a;
        text-align: left;
    }
    .products-grid-row .product-actions {
        justify-content: flex-start;
    }
    /* Optional: labels vor jedem Wert anzeigen (über data-Attribute oder Pseudoelemente) */
}