/*
 * cards.css — Shared premium card components
 * lfc  = listing featured card
 * bfc  = business featured card
 *
 * Extracted from home.css so search results, map, and any
 * future page can use the same card design without loading home.css.
 *
 * Load on: home page, search results page, map page.
 */

/* ═════════════════════════════════════════════
   PREMIUM FEATURE CARDS
   Design language: gold 4px top accent, 28px radius,
   stat pills, feature list, full-width CTA button.
═════════════════════════════════════════════ */

/* ── Shared card base ── */
.lfc,
.bfc {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%; /* puni grid/flex ćeliju — jednaka visina svih kartica */
    overflow: hidden;
    border-radius: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    box-shadow: 0 18px 42px rgba(0,0,0,.08);
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

/* Gold top accent */
.lfc::before,
.bfc::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), #e5cb95);
    z-index: 1;
}

.lfc:hover,
.bfc:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 56px rgba(0,0,0,.14);
    border-color: rgba(200,145,63,.32);
}

/* Featured variant */
.lfc--featured,
.bfc--featured {
    border-color: rgba(200,145,63,.30);
    box-shadow: 0 24px 52px rgba(54,43,22,.12);
}

/* ── Image area ── */
.lfc-image,
.bfc-image {
    position: relative;
    width: 100%;
    height: 196px;
    overflow: hidden;
    background: var(--bg-surface);
    flex-shrink: 0;
}

/* Favorite button */
.lfc-fav {
    position: absolute;
    top: 10px;
    right: 10px;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    z-index: 3;
    transition: background var(--t-base), transform var(--t-base);
    color: #666;
}
.lfc-fav:hover {
    background: #fff;
    transform: scale(1.08);
}
.lfc-fav.active { color: #e04f5f; }

.lfc-image img,
.bfc-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 400ms ease;
}

.lfc:hover .lfc-image img,
.bfc:hover .bfc-image img {
    transform: scale(1.04);
}

.lfc-img-placeholder,
.bfc-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-card-hover) 100%);
    color: var(--text-muted);
    font-weight: 900;
}

/* Type chip — bottom-left on image */
.lfc-type-chip {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(9,9,28,.72);
    color: rgba(255,255,255,.90);
    font-size: 11px;
    font-weight: 700;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    white-space: nowrap;
}

/* Logo overlay — bfc only */
.bfc-logo-overlay {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,.22);
    background: var(--bg-card);
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
}

.bfc-logo-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Card body ── */
.lfc-body,
.bfc-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 12px 16px 14px;
}

/* Meta row (agent + location) */
.lfc-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
}

.lfc-agent {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lfc-location,
.bfc-location {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Type chip inside body — bfc */
.bfc-type-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(200,145,63,.12);
    color: var(--color-accent);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
    margin-bottom: 4px;
    align-self: flex-start;
}

/* Title */
.lfc-title,
.bfc-title {
    margin: 0 0 4px;
    color: var(--text-primary);
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -.01em;
}

/* Description */
.lfc-desc,
.bfc-desc {
    margin: 0 0 5px;
    color: var(--text-secondary);
    font-size: 11.5px;
    line-height: 1.4;
}

/* Price block */
.lfc-price {
    margin: 4px 0 8px;
}

.lfc-price strong {
    display: block;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: -.01em;
    line-height: 1.15;
}

.lfc-price span {
    display: block;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    margin-top: 1px;
}

/* Stats row — inline pills */
.lfc-stats,
.bfc-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0 0 8px;
}

.lfc-stat,
.bfc-stat {
    display: flex;
    align-items: baseline;
    gap: 3px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
}

.lfc-stat strong,
.bfc-stat strong {
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
}

.lfc-stat span,
.bfc-stat span {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Feature list */
.lfc-features,
.bfc-features {
    flex: 1 1 auto;
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
}

.lfc-features li,
.bfc-features li {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.lfc-features li i,
.bfc-features li i {
    font-size: 11px;
    color: var(--color-accent);
}

.lfc-features li:first-child i {
    color: #34c759;
}

/* CTA button */
.lfc-cta,
.bfc-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #e1bf7f 0%, var(--color-accent) 48%, #ae833e 100%);
    color: #0b2b24;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
    box-shadow: 0 10px 24px rgba(200,145,63,.20);
    transition: box-shadow var(--transition-base), transform var(--transition-base), opacity var(--transition-base);
    margin-top: auto;
}

/* bfc-cta: hidden, reveal on hover */
.bfc-cta {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}

.lfc:hover .lfc-cta,
.bfc:hover .bfc-cta {
    box-shadow: 0 14px 32px rgba(200,145,63,.32);
    opacity: 1;
    transform: translateY(0);
}

/* ── Light mode ── */
html[data-theme="light"] .lfc,
html[data-theme="light"] .bfc {
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
}

html[data-theme="light"] .lfc:hover,
html[data-theme="light"] .bfc:hover {
    box-shadow: 0 12px 36px rgba(0,0,0,.12);
}

html[data-theme="light"] .lfc-stat,
html[data-theme="light"] .bfc-stat {
    background: #f5f3ef;
    border-color: rgba(0,0,0,.06);
}

html[data-theme="light"] .lfc-type-chip {
    background: rgba(0,0,0,.48);
}

/* Fav count badge */
.lfc-fav-count {
    font-size: 11px;
    font-weight: 800;
    color: inherit;
    line-height: 1;
    margin-left: 2px;
}

/* ── Mobile ── */
@media (max-width: 575px) {
    .lfc-body,
    .bfc-body {
        padding: 16px 18px 18px;
    }

    .lfc-price strong { font-size: 1.35rem; }

    .lfc-stats,
    .bfc-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}
