/* ============================================
   VIKVEK SHOWCASE FRONTEND STYLES
   Professional grid with constrained cards
   ============================================ */

/* Grid Container */
.vvsc-showcase {
    display: grid;
    gap: 24px;
    margin: 30px auto;
    max-width: 1280px;
    padding: 0 16px;
    box-sizing: border-box;
}

/* Auto-fill with min/max for responsive without stretching */
.vvsc-columns-1 { grid-template-columns: 1fr; max-width: 600px; }
.vvsc-columns-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.vvsc-columns-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.vvsc-columns-4 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.vvsc-columns-5 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.vvsc-columns-6 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* ============================================
   Item Card – Light theme default
   ============================================ */
.vvsc-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    max-width: 100%;
    box-sizing: border-box;
}

.vvsc-item:hover {
    transform: translateY(-6px);
    border-color: var(--vvsc-color, #6366f1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12),
                0 0 0 1px var(--vvsc-color, #6366f1);
}

/* Header */
.vvsc-item__header {
    position: relative;
    padding: 24px;
    background: linear-gradient(135deg,
            rgba(99, 102, 241, 0.06) 0%,
            transparent 100%);
    border-bottom: 1px solid #f1f5f9;
}

/* Use the CSS custom property for the header gradient */
.vvsc-item[style*="--vvsc-color"] .vvsc-item__header {
    background: linear-gradient(135deg,
            color-mix(in srgb, var(--vvsc-color) 8%, transparent) 0%,
            transparent 100%);
}

/* Fallback for browsers without color-mix */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
    .vvsc-item[style*="--vvsc-color"] .vvsc-item__header {
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, transparent 100%);
    }
}

.vvsc-item__icon {
    width: 56px;
    height: 56px;
    background: var(--vvsc-color, #6366f1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.vvsc-item__icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #fff;
}

.vvsc-item__badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f0f0ff;
    border: 1px solid #e0e0ff;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4f46e5;
}

.vvsc-item__version {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #94a3b8;
    font-family: monospace;
}

/* Body */
.vvsc-item__body {
    padding: 20px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.vvsc-item__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: #0f172a;
    line-height: 1.3;
}

.vvsc-item__desc {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 14px;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.vvsc-item__features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.vvsc-feature-tag {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.vvsc-item:hover .vvsc-feature-tag {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
}

/* Footer */
.vvsc-item__footer {
    padding: 14px 24px 18px;
    background: #fafbfc;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

.vvsc-item__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: var(--vvsc-color, #4f46e5);
    border: none;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.vvsc-item__btn:hover {
    opacity: 0.9;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.vvsc-item__btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.vvsc-item:hover .vvsc-item__btn .dashicons {
    transform: translateX(3px);
}

/* No Items */
.vvsc-no-items {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    font-size: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
}

/* Card Style Variation: Minimal */
.vvsc-style-minimal .vvsc-item {
    background: transparent;
    border: 1px solid #e2e8f0;
    box-shadow: none;
}

.vvsc-style-minimal .vvsc-item__header {
    background: transparent;
    border-bottom: none;
    padding-bottom: 0;
}

.vvsc-style-minimal .vvsc-item__footer {
    background: transparent;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .vvsc-showcase {
        gap: 16px;
    }

    .vvsc-columns-2,
    .vvsc-columns-3,
    .vvsc-columns-4,
    .vvsc-columns-5,
    .vvsc-columns-6 {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }

    .vvsc-item__header {
        padding: 20px;
    }

    .vvsc-item__icon {
        width: 48px;
        height: 48px;
    }

    .vvsc-item__icon .dashicons {
        font-size: 24px;
        width: 24px;
        height: 24px;
    }

    .vvsc-item__body {
        padding: 16px 20px;
    }

    .vvsc-item__title {
        font-size: 1.05rem;
    }

    .vvsc-item__footer {
        padding: 12px 20px 14px;
    }
}

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