/**
 * Property Archive (List & Filter) Styles
 * File: static/css/archive/property.css
 */

.p-property-archive {
    padding: 40px 0 60px;
    background-color: #F8F9FB;
    background-image: url(../../img/property/archive/bg_sp.jpg);
    background-repeat: no-repeat;
    background-position: top center;
    background-size: 100% 100%;
}

@media (min-width: 769px) {
    .p-property-archive {
        padding: 70px 0 80px;
        background-image: url(../../img/property/archive/bg.jpg);
    }
}

.p-property-archive__container {
    max-width: 1200px;
    margin: 40px auto ;
    padding: 0 20px;
}

/* =========================================================================
   2. Filter Panel
   ========================================================================= */
.p-property-archive__filter-panel {
    margin-bottom: 50px;
}

.p-property-archive__filter-heading {
    margin: 0 0 15px;
    text-align: center;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-color);
    letter-spacing: 0.1em;
}

.p-property-filter {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
    background: #ffffff;
    border-radius: 10px;
    padding: 24px 20px;
}

.p-property-filter__row {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.p-property-filter__group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid #DDDDDD;
}

.p-property-filter__group:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.p-property-filter__label {
    font-size: 16px;
    color: var(--main-color);
    letter-spacing: 0.05em;
}

.p-property-filter__options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

/* Custom Checkbox Design */
.p-property-filter__checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-color);
    user-select: none;
}

.p-property-filter__checkbox-label input {
    display: none;
}

.p-property-filter__checkbox-dummy {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    border: 1px solid var(--text-color);
    background: #ffffff;
    display: inline-block;
    position: relative;
    transition: all 0.2s ease;
}

.p-property-filter__checkbox-label input:checked + .p-property-filter__checkbox-dummy {
    border-color: var(--main-color);
    background-color: var(--main-color);
}

.p-property-filter__checkbox-label input:checked + .p-property-filter__checkbox-dummy::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 4px;
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Search Button */
.p-property-filter__actions {
    text-align: center;
    padding-top: 4px;
}

.p-property-filter__search-btn {
    width: 100%;
    max-width: 300px;
    height: 50px;
    border: none;
    border-radius: 25px;
    background-image: url(../../img/property/archive/button.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: opacity 0.3s;
}

.p-property-filter__search-btn:hover {
    opacity: 0.8;
}

/* =========================================================================
   3. Count Bar & Sort
   ========================================================================= */
.p-property-archive__count-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.p-property-archive__count-text {
    font-size: 18px;
    color: var(--text-color);
}

.p-property-archive__count-text strong {
    font-size: 28px;
    color: var(--main-color);
    margin: 0 2px;
}

.p-property-filter__sort {
    position: relative;
    width: auto;
}

.p-property-filter__sort-select {
    padding: 8px 30px 8px 14px;
    border: 1px solid var(--text-color);
    background: #ffffff;
    font-size: 16px;
    color: var(--text-color);
    outline: none;
    cursor: pointer;
    appearance: none;
}

.p-property-filter__sort-select:focus {
    border-color: var(--main-color);
}

.p-property-filter__sort::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 12px;
    width: 8px;
    height: 8px;
    border: 2px solid var(--text-color);
    border-width: 0 2px 2px 0;
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

/* =========================================================================
   4. Property Cards Grid
   ========================================================================= */
.p-property-archive__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.c-property-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
}

.c-property-card__image-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
    background-color: #e2e8f0;
    font-size: 0;
    line-height: 0;
}

.c-property-card__link {
    display: block;
    width: 100%;
    height: 100%;
}

.c-property-card__img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    display: block;
}

.c-property-card__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.c-property-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 13px;
    font-size: 14px;
    color: #fff;
    line-height: 1.4;
    letter-spacing: 0.05em;
}

.c-property-badge--seller,
.c-property-badge--cat {
    background-color: var(--main-color);
}

.c-property-badge--feature {
    background-color: var(--orange);
}

.c-property-card__fav-button {
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    padding: 0;
    border: none;
    background: none;
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
}

.c-property-card__fav-button .star-icon {
    font-size: 14px;
}

.c-property-card__fav-button.is-active {
    color: var(--orange);
    font-weight: 700;
}

.c-property-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px 16px 16px;
}

.c-property-card__title {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.5;
}

.c-property-card__title a {
    color: var(--text-color);
    text-decoration: none;
}

.c-property-card__title a:hover {
    opacity: 0.7;
}

.c-property-card__location,
.c-property-card__meta {
    margin: 0 0 4px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-color);
}

.c-property-card__footer {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
}

.c-property-card__price {
    margin: 0;
    color: var(--main-color);
    font-weight: 700;
}

.c-property-card__price .price-val {
    font-size: 22px;
    letter-spacing: 0.12em;
}

.c-property-card__price .price-unit {
    color: var(--text-color);
    font-size: 14px;
    margin-left: 2px;
}

.c-property-card__price--rent {
    color: var(--text-color);
    font-weight: 500;
}

.c-property-card__price--rent .price-val {
    font-size: 16px;
}

/* 賃料の数字部分だけ大きく強調（例: 12万円〜15万円） */
.c-property-card__price-num {
    font-size: 22px;
    color: var(--main-color);
    font-weight: 700;
    letter-spacing: 0.05em;
}

.c-property-card__price--rent .price-note {
    display: block;
    font-size: 12px;
    color: var(--text-color);
    font-weight: 500;
}

.c-property-card__details-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-image: url(../../img/property/archive/button_02.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    color: #fff;
    text-decoration: none;
}

.c-property-card__details-btn .arrow {
    width: 12px;
    height: auto;
}

/* =========================================================================
   5. Pagination & Empty State
   ========================================================================= */
.p-property-archive__pagination {
    margin-top: 40px;
    text-align: center;
}

.p-property-archive__pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    margin: 0 4px;
    padding: 0 8px;
    border-radius: 50%;
    color: var(--main-color);
    text-decoration: none;
    font-size: 14px;
}

.p-property-archive__pagination .page-numbers.current,
.p-property-archive__pagination .page-numbers:hover {
    background-color: var(--main-color);
    color: #fff;
}

.p-property-archive__no-posts {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-color);
}

.p-property-archive__contact {
    background-color: #FFFEFA;
}

/* =========================================================================
   6. Desktop (min-width: 769px)
   ========================================================================= */
@media (min-width: 769px) {
    .p-property-archive__filter-panel {
        padding: 30px 40px;
        margin-bottom: 40px;
    }

    .p-property-filter__row {
        flex-direction: row;
        gap: 30px;
    }

    .p-property-filter__group {
        padding-bottom: 0;
        border-bottom: none;
    }

    .p-property-archive__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }

    .c-property-card__title {
        font-size: 18px;
    }

    .c-property-card__location, .c-property-card__meta {
        font-size: 16px;
    }

    .c-property-card__price .price-val { 
        font-size: 28px;
    }

    .c-property-card__price .price-unit {
        color: var(--text-color);
        font-size: 16px;
        margin-left: 2px;
    }

    .c-property-card__price--rent .price-val {
        font-size: 18px;
    }

    .c-property-card__price-num {
        font-size: 26px;
    }

    .c-property-card__price--rent .price-note {
        font-size: 13px;
    }
}
