/* ── Brand Cards Plugin — Frontend Styles ─────────────────────────── */
/* Uses CSS custom properties injected per-wrapper by the shortcode    */

.bc-wrapper {
    font-family: inherit;
    box-sizing: border-box;
}

.bc-wrapper *,
.bc-wrapper *::before,
.bc-wrapper *::after {
    box-sizing: inherit;
}

/* ── Toolbar ──────────────────────────────────────────────────────── */
.bc-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.bc-search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 420px;
}

.bc-search-wrap .bc-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #999;
    pointer-events: none;
}

.bc-search {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1.5px solid #e2d6c4;
    border-radius: 50px;
    font-size: 14px;
    outline: none;
    background: #fff;
    color: inherit;
    transition: border-color .2s;
}

.bc-search:focus {
    border-color: var(--bc-accent, #c8a96e);
}

.bc-filter-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bc-filter-btn {
    padding: 6px 16px;
    border: 1.5px solid #ddd;
    border-radius: 50px;
    font-size: 13px;
    cursor: pointer;
    background: #fff;
    color: #555;
    transition: all .2s;
    line-height: 1.4;
}

.bc-filter-btn:hover {
    border-color: var(--bc-accent, #c8a96e);
    color: var(--bc-accent, #c8a96e);
}

.bc-filter-btn.bc-active {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}

/* ── Grid ────────────────────────────────────────────────────────── */
.bc-grid {
    display: grid;
    grid-template-columns: repeat(var(--bc-columns, 5), minmax(0, 1fr));
    gap: var(--bc-gap, 16px);
}

/* ── Card ────────────────────────────────────────────────────────── */
.bc-card {
    background: var(--bc-card-bg, #ffffff);
    border-radius: var(--bc-radius, 18px);
    border: 1px solid #ece8e0;
    box-shadow: var(--bc-shadow, 0 2px 12px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.06));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .22s ease, box-shadow .22s ease;
}

.bc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.08);
}

/* ── Card image ──────────────────────────────────────────────────── */
.bc-card-image {
    position: relative;
    overflow: hidden;
    background: #f5f2ed;
}

.bc-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.bc-card:hover .bc-card-image img {
    transform: scale(1.04);
}

.bc-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ede8df 0%, #ddd4c3 100%);
}

.bc-card-image-placeholder span {
    font-size: 32px;
    font-weight: 700;
    color: #a89070;
    letter-spacing: 2px;
}

/* ── Badge ───────────────────────────────────────────────────────── */
.bc-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #1a1a1a;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .5px;
    padding: 3px 10px;
    border-radius: 50px;
    text-transform: uppercase;
}

/* ── Card body ───────────────────────────────────────────────────── */
.bc-card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

.bc-card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.bc-card-subtitle {
    margin: 0;
    font-size: 12px;
    color: #888;
    line-height: 1.5;
    /* Truncate long subtitles */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.bc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding: 7px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s;
    width: fit-content;
}

.bc-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Outline */
.bc-btn--outline {
    border: 1.5px solid #ddd;
    color: #444;
    background: transparent;
}

.bc-btn--outline:hover {
    border-color: var(--bc-accent, #c8a96e);
    color: var(--bc-accent, #c8a96e);
    background: transparent;
}

/* Filled */
.bc-btn--filled {
    border: 1.5px solid var(--bc-accent, #c8a96e);
    background: var(--bc-accent, #c8a96e);
    color: #fff;
}

.bc-btn--filled:hover {
    filter: brightness(1.1);
    color: #fff;
}

/* Minimal / text */
.bc-btn--minimal {
    border: none;
    background: none;
    color: var(--bc-accent, #c8a96e);
    padding-left: 0;
    padding-right: 0;
}

.bc-btn--minimal:hover {
    opacity: .75;
    color: var(--bc-accent, #c8a96e);
}

/* ── Empty state ─────────────────────────────────────────────────── */
.bc-no-cards,
.bc-no-results {
    text-align: center;
    color: #999;
    padding: 40px 0;
    font-size: 15px;
}

/* ── Hidden cards (JS filter) ────────────────────────────────────── */
.bc-card[hidden],
.bc-card.bc-hidden {
    display: none;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .bc-grid {
        grid-template-columns: repeat(var(--bc-columns-tablet, 2), minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .bc-grid {
        grid-template-columns: repeat(var(--bc-columns-mobile, 1), minmax(0, 1fr));
    }
    .bc-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .bc-search-wrap {
        max-width: none;
    }
}
