/* ============================================================
   Wheel Gallery Filter – Front-end Styles v3
   ============================================================ */

.wgf-wrapper {
    font-family: inherit;
    box-sizing: border-box;
}
.wgf-wrapper *, .wgf-wrapper *::before, .wgf-wrapper *::after {
    box-sizing: inherit;
}

/* ── Filter Bar ──────────────────────────────────────────── */
.wgf-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 36px;
}

.wgf-filter-group {
    flex: 1 1 200px;
    min-width: 180px;
}

/* ── Dropdowns ───────────────────────────────────────────── */
.wgf-select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 11px 40px 11px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23888' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #111;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    line-height: 1.4;
}

.wgf-select:focus {
    outline: none;
    border-color: #e63946;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.18);
}

/* ── Loading / Feedback ──────────────────────────────────── */
.wgf-loading,
.wgf-prompt,
.wgf-no-results,
.wgf-error {
    width: 100%;
    padding: 48px 24px;
    text-align: center;
    font-size: 15px;
    color: #777;
}

.wgf-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid #ddd;
    border-top-color: #e63946;
    border-radius: 50%;
    animation: wgf-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes wgf-spin { to { transform: rotate(360deg); } }

/* ── Grid ────────────────────────────────────────────────── */
.wgf-grid {
    display: grid;
    gap: 20px;
    width: 100%;
}

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

/* ── Cards ───────────────────────────────────────────────── */
.wgf-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: #fff;
    overflow: hidden;
    transition: transform 0.25s ease;
    cursor: pointer;
}

.wgf-card:hover {
    transform: translateY(-4px);
}

/* ── Image — fills the thumb completely ──────────────────── */
.wgf-card__thumb {
    width: 100%;
    height: 260px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.wgf-card__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

.wgf-card:hover .wgf-card__img {
    transform: scale(1.05);
}

/* 35% black overlay on hover */
.wgf-card__thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.wgf-card:hover .wgf-card__thumb::after {
    background: rgba(0, 0, 0, 0.35);
}

.wgf-card__img--placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #aaa;
}

/* ── Card body ───────────────────────────────────────────── */
.wgf-card__body {
    padding: 10px 0 0;
}

.wgf-card__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #111;
    line-height: 1.35;
}

.wgf-card__excerpt {
    margin: 6px 0 0;
    font-size: 13px;
    color: #666;
    line-height: 1.55;
}

.wgf-card__date {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #aaa;
    font-weight: 500;
}

/* ── Pagination ──────────────────────────────────────────── */
.wgf-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.wgf-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: none;
    background: #f0f0f0;
    color: #111;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
    line-height: 1;
}

.wgf-page-btn:hover {
    background: #e0e0e0;
}

.wgf-page-btn:active {
    transform: scale(0.95);
}

.wgf-page-btn--active {
    background: #111;
    color: #fff;
    cursor: default;
}

.wgf-page-btn--active:hover {
    background: #111;
}

.wgf-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #aaa;
    font-size: 14px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
    .wgf-cols-4,
    .wgf-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .wgf-filter-bar { flex-direction: column; gap: 12px; }
    .wgf-filter-group { flex: 1 1 100%; min-width: 0; }
    .wgf-cols-4,
    .wgf-cols-3,
    .wgf-cols-2 { grid-template-columns: 1fr; }
}
