.lmfwc-demo-theme-card,
.lmfwc-demo-plugin-card {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 12px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.lmfwc-demo-theme-card:hover,
.lmfwc-demo-plugin-card:hover {
    transform: translateY(-3px);
    border-color: #bfdbfe;
    box-shadow: 0 16px 36px rgba(15, 23, 42, .10);
}

.lmfwc-demo-theme-card {
    width: 100%;
}

.lmfwc-demo-plugins-grid {
    --lmfwc-demo-plugin-columns: 4;
    --lmfwc-demo-plugin-rows: 2;
    display: grid;
    grid-template-columns: repeat(var(--lmfwc-demo-plugin-columns), minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}

.lmfwc-demo-plugin-card[hidden] {
    display: none !important;
}

.lmfwc-demo-item-media {
    align-items: center;
    aspect-ratio: 1 / 1;
    background: linear-gradient(145deg, #f8fafc, #eef2ff);
    border-radius: 13px;
    display: flex;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    width: 100%;
}

.lmfwc-demo-theme-card .lmfwc-demo-item-media {
    aspect-ratio: 4 / 3;
}

.lmfwc-demo-item-media img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.lmfwc-demo-item-title {
    color: #111827;
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.8;
    margin-top: 12px;
    overflow-wrap: anywhere;
    text-align: center;
}

.lmfwc-demo-item-fallback {
    color: #64748b;
    font-size: clamp(36px, 8vw, 72px);
    height: auto;
    line-height: 1;
    width: auto;
}

.lmfwc-demo-widget-empty {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    color: #64748b;
    padding: 18px;
    text-align: center;
}

@media (max-width: 1024px) {
    .lmfwc-demo-plugins-grid {
        --lmfwc-demo-plugin-columns: 2;
        --lmfwc-demo-plugin-rows: 3;
    }
}

@media (max-width: 767px) {
    .lmfwc-demo-plugins-grid {
        --lmfwc-demo-plugin-columns: 1;
        --lmfwc-demo-plugin-rows: 4;
    }
}
