.main-content {
    display: flex;
    justify-content: center;
    width: 100%;
}

.property-list-container {
    color: var(--text-label);
    width: 100%;
    max-width: 1082px;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.page-title {
    color: var(--Text-Label, #222);
    font-family: "Noto Sans JP";
    font-size: 2rem;
    font-style: normal;
    font-weight: 700;
    line-height: 100%; /* 2rem */
    margin: 0;
    margin-bottom: 2.5rem;
}

/* フィルター */
.filter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 2rem;
}

.filter-top-row, .filter-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-group label {
    color: var(--Text-Sub, #666);
    font-family: "Noto Sans JP";
    font-size: 1rem;
    font-style: normal;
    font-weight: 400;
    line-height: 100%; /* 1rem */
}

.filter-group select {
    display: flex;
    padding: 0.75rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 0.3125rem;
    border: 1px solid var(--Gray-20, #DDD);
    background: var(--Gray-0, #FFF);
    height: 2.5rem;
}

.section-divider {
    width: 100%;
    border: none;
    border-top: 1px solid #EEEEEE;
    margin: 0;
}

.sort-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--Text-Main, #333);
    text-align: right;
    font-family: "Noto Sans JP";
    font-size: 1rem;
    font-style: normal;
    font-weight: 400;
    line-height: 100%; /* 1rem */
}

.category-buttons {
    display: flex;
    gap: 0.5rem;
}

.category-button {
    display: flex;
    padding: 0.375rem 0.75rem;
    align-items: flex-start;
    gap: 0.5rem;
    background: transparent;
    border-radius: 1.5rem;
    border: 1px solid var(--Gray-20, #DDD);
    color: var(--Text-Sub2, #999);
    font-family: "Noto Sans JP";
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 400;
    line-height: 100%; /* 0.875rem */
    cursor: pointer;
}

.category-button.active {
    background: var(--Gray-10, #EEE);
    color: var(--Text-Main, #333);
    border: 1px solid var(--Gray-20, #EEE);
}

.filter-bottom-row {
    justify-content: flex-start;
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
}

.search-button {
    border: none;
    border-radius: 6px;
    background: #333;
    color: #fff;
    padding: 0.65rem 1.25rem;
    font-family: "Noto Sans JP";
    font-size: 0.95rem;
    cursor: pointer;
}

.search-button:hover {
    opacity: 0.9;
}

.vertical-divider {
    width: 1px;
    background-color: #ccc;
    height: 20px;
    margin: 0 1rem;
}

.affiliate-video-ad {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 1rem;
    background: #fafafa;
}

.affiliate-video-title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.affiliate-video-frame-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}

.affiliate-video-frame-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.affiliate-video-placeholder {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.affiliate-reward-help {
    margin: 0.75rem 0 0;
    color: #333;
    font-size: 0.9rem;
}

.affiliate-reward-actions {
    margin-top: 0.75rem;
}

.affiliate-reward-unlock-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    background: #333;
    color: #fff;
    padding: 0.65rem 1.25rem;
    font-family: "Noto Sans JP";
    font-size: 0.95rem;
}

.affiliate-reward-unlock-button:hover {
    opacity: 0.9;
}

/* 物件グリッド */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 16px 13px;
}

.no-properties {
    grid-column: 1 / -1; /* 全カラムにまたがる */
    text-align: center;
    color: #666;
    padding: 4rem 0;
}

/* カード (top.cssから引用・調整) */
.card {
    display: flex;
    flex-direction: column;
    border-radius: var(--br-5xs);
    border: 1px solid var(--gray-10);
    background: var(--gray-0);
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.affiliate-inline-ad-card {
    border-radius: var(--br-5xs);
    border: 1px solid #d9e6eb;
    background: #f7fbfd;
    overflow: hidden;
    box-sizing: border-box;
}

.affiliate-inline-ad-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.affiliate-inline-ad-media {
    width: 100%;
    height: 181px;
    background: #dbe9ef;
    display: flex;
    align-items: center;
    justify-content: center;
}

.affiliate-inline-ad-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.affiliate-inline-ad-content {
    padding: var(--padding-xl) var(--padding-base);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.affiliate-inline-ad-badge {
    align-self: flex-start;
    border: 1px solid #1f7a8c;
    color: #1f7a8c;
    border-radius: 999px;
    padding: 0.12rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.affiliate-inline-ad-title {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.45;
    color: #1e2d33;
}

.affiliate-inline-ad-description {
    margin: 0;
    color: #425259;
    font-size: 0.88rem;
    line-height: 1.55;
}

.card .thumbnail {
    height: 181px;
    width: 100%;
    overflow: hidden;
    border-radius: var(--br-5xs) var(--br-5xs) 0 0;
    background-color: var(--gray-10);
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.thumbnail-placeholder {
    background-color: var(--gray-10);
}

.card .property-info {
    padding: var(--padding-xl) var(--padding-base);
    display: flex;
    flex-direction: column;
    gap: var(--gap-base);
    flex-grow: 1;
}

.card .property-title {
    font-size: 1.125rem;
    line-height: 1.4;
    font-weight: 700;
    margin: 0;
    color: var(--text-label);
    display: block;
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card .property-size,
.card .property-address {
    font-size: 0.875rem;
    color: var(--text-main);
}

.card .floor-space {
    font-size: 0.75rem;
    color: var(--text-sub);
}

.card .property-address {
    display: block;
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card .property-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-5xs);
}

.card .property-tag {
    border-radius: var(--br-xs);
    background-color: var(--gray-10);
    padding: var(--padding-7xs) var(--padding-xs);
    font-size: 0.75rem;
    color: var(--text-sub);
}

.card .property-price {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 0.25rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

.card .property-price-yen {
    font-size: 1.25rem;
    font-weight: 700;
}

.card .property-price-tax {
    font-size: 0.75rem;
    color: var(--text-sub);
}

.card .property-seller {
    display: flex;
    align-items: center;
    gap: var(--gap-9xs);
    padding-top: 0.75rem;
    color: var(--text-sub);
    font-size: 0.75rem;
}

.card .seller-icon {
    width: 20px;
    height: 20px;
    border-radius: var(--br-11xs);
    background-color: var(--color-gainsboro-100);
    overflow: hidden;
    flex-shrink: 0;
}

.seller-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card .seller-name {
    font-size: 0.875rem;
    color: var(--text-sub);
}

/* ページネーション */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    padding-top: 2rem;
}

.property-pagination-nav {
    width: 100%;
}

.property-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.property-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.95rem;
    border: 1px solid var(--gray-20);
    border-radius: 999px;
    background: #fff;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1;
    box-sizing: border-box;
    transition: all 0.15s ease;
}

.property-pagination-link:hover {
    background: #fff4e8;
    border-color: #f4be83;
    color: #9a4f00;
}

.property-pagination-item.is-active .property-pagination-link {
    border-color: var(--main);
    background: var(--main);
    color: #fff;
    box-shadow: 0 3px 10px rgba(240, 140, 30, 0.25);
}

.property-pagination-item.is-disabled .property-pagination-link {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
    background: #fafafa;
}

@media screen and (max-width: 1024px) {
    .property-list-container {
        padding-left: var(--padding-base);
        padding-right: var(--padding-base);
    }

    .filter-top-row {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .filter-group select {
        width: 200px;
    }

    .sort-link {
        align-self: flex-end;
    }
}

@media screen and (max-width: 768px) {
    .filter-top-row,
    .filter-bottom-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bottom-row {
        gap: 1rem;
    }

    .filter-group,
    .category-buttons {
        width: 100%;
    }

    .filter-group select {
        width: 100%;
    }

    .vertical-divider {
        display: none;
    }

    .category-buttons {
        flex-wrap: wrap;
    }

    .category-button {
        flex: 1 1 calc(50% - 0.5rem);
        text-align: center;
    }
}

@media screen and (max-width: 540px) {
    .category-button {
        flex: 1 1 100%;
    }

    .property-grid {
        grid-template-columns: 1fr;
    }

    .card {
        max-width: 100%;
    }
}
