/* Vectiny Listing Loop — assets/css/listing-loop.css */

/* ── Wrapper ───────────────────────────────────────────────── */
.vl-wrapper { width: 100%; }

/* ── Search ────────────────────────────────────────────────── */
.vl-search-bar { margin-bottom: 20px; }
.vl-search-input {
    width: 100%; padding: 10px 16px;
    border: 1px solid #ddd; border-radius: 8px;
    font-size: 14px; box-sizing: border-box;
    outline: none; transition: border-color .2s;
}
.vl-search-input:focus { border-color: #534ab7; }

/* ── Grid ──────────────────────────────────────────────────── */
.vl-grid {
    display: grid;
    grid-template-columns: repeat( var(--vl-cols, 3), 1fr );
    gap: var(--vl-gap, 20px);
    transition: opacity .2s;
}

/* Tablet */
@media (max-width: 1024px) {
    .vl-grid { grid-template-columns: repeat( var(--vl-cols-tab, 2), 1fr ); }
}
/* Mobile */
@media (max-width: 767px) {
    .vl-grid { grid-template-columns: repeat( var(--vl-cols-mob, 1), 1fr ); }
}

/* ── Layouts ───────────────────────────────────────────────── */
.vl-layout-masonry {
    grid-template-rows: masonry;   /* native */
    grid-auto-rows: 10px;          /* JS fallback base */
    align-items: start;
}
.vl-layout-list {
    grid-template-columns: 1fr !important;
}
.vl-layout-list .vl-card {
    flex-direction: row;
    gap: 16px;
}

/* Equal heights */
.vl-equal-height .vl-card { height: 100%; }
.vl-equal-height .vl-card-link { flex: 1; }

/* ── Item wrapper ──────────────────────────────────────────── */
.vl-item { box-sizing: border-box; }

/* ── Default asset card ────────────────────────────────────── */
.vl-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .15s;
}
.vl-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.10);
    transform: translateY(-2px);
}
.vl-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.vl-card-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    background: #f3f3f3;
}
.vl-no-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg,#f0eefd,#e6e3fb);
}
.vl-card-body { padding: 12px 14px 10px; }
.vl-card-title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.vl-card-footer {
    padding: 8px 14px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid #f2f2f2;
    margin-top: auto;
}

/* ── User card ─────────────────────────────────────────────── */
.vl-user-card .vl-card-link {
    flex-direction: row;
    padding: 14px;
    gap: 12px;
    align-items: center;
}
.vl-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
}
.vl-avatar-sm { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; vertical-align: middle; }
.vl-card-sub  { margin: 0; font-size: 12px; color: #888; }

/* ── Format badges ─────────────────────────────────────────── */
.vl-formats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.vl-format-badge {
    display: inline-block; padding: 2px 6px;
    border-radius: 4px; font-size: 10px;
    font-weight: 700; letter-spacing: .4px;
    text-transform: uppercase; color: #fff;
}
.vl-fmt-png { background: #3498db; }
.vl-fmt-svg { background: #e67e22; }
.vl-fmt-eps { background: #9b59b6; }
.vl-fmt-ai  { background: #e74c3c; }

/* ── Download button ───────────────────────────────────────── */
.vl-dl-btn {
    display: inline-block; padding: 5px 12px;
    background: #534ab7; color: #fff;
    border-radius: 6px; font-size: 12px;
    font-weight: 600; text-decoration: none;
    transition: background .15s;
}
.vl-dl-btn:hover { background: #3c3489; color: #fff; }

/* ── Not found ─────────────────────────────────────────────── */
.vl-not-found {
    text-align: center; padding: 40px 20px;
    font-size: 14px; color: #aaa;
}

/* ── Pagination ────────────────────────────────────────────── */
.vl-pagination { margin-top: 24px; }
.vl-pages {
    display: flex; gap: 6px;
    flex-wrap: wrap; justify-content: center;
}
.vl-page-btn {
    padding: 7px 14px;
    border: 1px solid #ddd; border-radius: 6px;
    background: #fff; cursor: pointer;
    font-size: 13px; color: #333;
    transition: all .15s;
}
.vl-page-btn:hover   { border-color: #534ab7; color: #534ab7; }
.vl-page-active      { background: #534ab7; border-color: #534ab7; color: #fff !important; }
.vl-page-dots        { padding: 7px 4px; font-size: 13px; color: #aaa; }

/* ── Load More ─────────────────────────────────────────────── */
.vl-load-more-wrap   { margin-top: 24px; text-align: center; }
.vl-load-more-btn {
    padding: 10px 32px;
    background: #534ab7; color: #fff;
    border: none; border-radius: 8px;
    font-size: 14px; font-weight: 600;
    cursor: pointer; transition: background .15s;
}
.vl-load-more-btn:hover    { background: #3c3489; }
.vl-load-more-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ── Dark mode ─────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    .vl-card              { background: #1a1a2e; border-color: #2a2a3e; }
    .vl-card-title        { color: #e2e2f0; }
    .vl-card-footer       { border-color: #2a2a3e; }
    .vl-search-input      { background: #1a1a2e; border-color: #3a3a5e; color: #e2e2f0; }
    .vl-page-btn          { background: #1a1a2e; border-color: #3a3a5e; color: #b0b0d0; }
    .vl-no-thumb          { background: linear-gradient(135deg,#1e1c3a,#1a1832); }
}
