/**
 * Flavor Property Cards - Frontend Styles
 * Black & White Design
 */

/* === WRAPPER === */
.fpc-wrapper {
    position: relative;
    font-family: inherit;
}

/* === FILTERS === */
.fpc-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
}

.fpc-filter-group {
    display: flex;
    gap: 0;
}

.fpc-filter-btn {
    padding: 12px 24px;
    border: 1px solid #1a1a1a;
    background: transparent;
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* First button in group - rounded left */
.fpc-filter-group .fpc-filter-btn:first-child {
    border-radius: 4px 0 0 4px;
}

/* Last button in group - rounded right */
.fpc-filter-group .fpc-filter-btn:last-child {
    border-radius: 0 4px 4px 0;
}

/* Single button - rounded all */
.fpc-filter-group .fpc-filter-btn:only-child {
    border-radius: 4px;
}

/* Remove double borders between buttons */
.fpc-filter-group .fpc-filter-btn:not(:first-child) {
    margin-left: -1px;
}

.fpc-filter-btn:hover {
    background: #f5f5f5;
}

.fpc-filter-btn.active {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
    position: relative;
    z-index: 1;
}

/* Dropdown button */
.fpc-filter-btn--dropdown {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 4px;
}

.fpc-chevron {
    transition: transform 0.2s ease;
}

.fpc-filter-btn--dropdown.active .fpc-chevron {
    transform: rotate(180deg);
}

/* === CARDS GRID === */
.fpc-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* === CARD === */
.fpc-card {
    background: #ffffff;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fpc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

/* Card Image */
.fpc-card__image {
    position: relative;
    overflow: hidden;
    height: 220px; /* domyślna wysokość, nadpisywana przez Elementor */
}

.fpc-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.5s ease;
}

.fpc-card:hover .fpc-card__image img {
    transform: scale(1.05);
}

.fpc-card__image a {
    display: block;
    width: 100%;
    height: 100%;
}

.fpc-card__image a img {
    display: block;
    width: 100%;
    height: 100%;
}

/* Card Content */
.fpc-card__content {
    padding: 24px 20px;
    background: #ffffff;
}

.fpc-card__title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.fpc-card__title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.fpc-card__title a:hover {
    color: #666;
}

.fpc-card__excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* Card Footer */
.fpc-card__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 16px 20px;
    background: #1a3a38;
    color: #ffffff;
    font-size: 14px;
    gap: 0;
}

/* Footer layout when no status - spread evenly */
.fpc-card__footer:not(:has(.fpc-card__status)) {
    justify-content: space-evenly;
}

/* Footer layout with status */
.fpc-card__footer:has(.fpc-card__status) {
    justify-content: flex-start;
}

.fpc-card__meta {
    white-space: nowrap;
    flex: 1;
    text-align: center;
}

.fpc-card__separator {
    margin: 0 8px;
    opacity: 0.5;
    font-weight: 300;
    flex: 0 0 auto;
}

.fpc-card__status {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.fpc-card__status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--status-color, #22c55e);
}

/* Status Colors */
.fpc-card__status.status-available {
    --status-color: #22c55e;
}

.fpc-card__status.status-rented {
    --status-color: #ef4444;
}

.fpc-card__status.status-date {
    --status-color: #f59e0b;
}

/* === NO RESULTS === */
.fpc-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

/* === LOADING === */
.fpc-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.fpc-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid #e0e0e0;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: fpc-spin 0.8s linear infinite;
}

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

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .fpc-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .fpc-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .fpc-filter-group {
        flex-wrap: wrap;
        justify-content: center;
    }

    .fpc-filter-btn {
        padding: 10px 16px;
        font-size: 12px;
    }

    .fpc-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .fpc-card__content {
        padding: 20px 16px;
    }

    .fpc-card__footer {
        padding: 14px 16px;
        flex-wrap: wrap;
        gap: 6px;
    }

    .fpc-card__status {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
        justify-content: flex-start;
    }

    .fpc-card__meta:not(:last-child)::after {
        content: '|';
        margin-left: 6px;
    }
}

@media (max-width: 480px) {
    .fpc-filter-btn {
        padding: 8px 12px;
        font-size: 11px;
    }

    .fpc-card__title {
        font-size: 16px;
    }

    .fpc-card__excerpt {
        font-size: 13px;
    }

    .fpc-card__footer {
        font-size: 13px;
    }
}

/* === ELEMENTOR EDITOR === */
.elementor-editor-active .fpc-wrapper {
    min-height: 300px;
}
