/**
 * 倉庫賃貸ページ専用スタイル
 */

/* 検索フォーム */
.rental-search-form {
    width: 100%;
    background: #2DAE38;
    padding: 30px 0;
    margin-bottom: 40px;
}

.rental-search-form .search-controls {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
}

.rental-search-form select {
    flex: 1;
    max-width: 300px;
    padding: 12px 15px;
    border: none;
    font-size: 14px;
    background: #fff;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 35px;
}

.rental-search-form select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(45, 174, 55, 0.3);
}

/* 物件一覧ヘッダー */
.rental-list-header {
    text-align: center;
    margin: 0 auto 40px;
    border-bottom: 5px solid #f4f3f3;
    position: relative;
    padding-bottom: 15px;
}

.rental-list-header h2 {
    font-size: 32px;
    color: #000;
    font-weight: bold;
    margin: 0;
    line-height: 1.4;
}

.rental-list-header::after {
    content: "";
    width: 250px;
    height: 5px;
    display: block;
    margin: 15px auto 0;
    background: #2dae37;
}

/* 物件一覧グリッド（1ブロック幅 340px 固定、列数はウィンドウ幅に応じて自動） */
.rental-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 340px);
    gap: 30px;
    margin-bottom: 40px;
    justify-content: center;
}

.rental-item {
    width: 340px;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    transition: box-shadow 0.3s;
    background: white;
    display: flex;
    flex-direction: column;
    position: relative;
}

.rental-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.rental-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
    flex: 1;
}

.rental-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.rental-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 15px 0;
    color: #333;
    line-height: 1.4;
    order: 1;
}

.rental-image {
    width: 100%;
    height: auto;
    overflow: hidden;
    background: #f0f0f0;
    margin-bottom: 15px;
    order: 2;
    position: relative;
    flex-shrink: 0;
}

.rental-thumb {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: top;
}

.rental-thumb.no-image {
    min-height: 120px;
}

.rental-info {
    margin: 0;
    padding: 0;
    order: 3;
    flex-shrink: 0;
}

.rental-info-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #2DAE38;
}

.rental-info-row:last-child {
    border-bottom: none;
}

.rental-info dt {
    font-weight: bold;
    color: #666;
    font-size: 14px;
    margin: 0;
    padding-right: 10px;
    flex-shrink: 0;
    min-width: 80px;
}

.rental-info dd {
    margin: 0;
    color: #333;
    font-size: 14px;
    flex: 1;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* 詳細ページ */
.rental-detail-block {
    margin-bottom: 40px;
}

.rental-detail-title {
    font-size: 24px;
    margin: 0 0 30px 0;
    color: #333;
    font-weight: bold;
    line-height: 1.4;
    border-bottom: 5px solid #2DAE38;
    padding-bottom: 15px;
}

.rental-detail-content {
    margin-bottom: 40px;
    gap: 40px;
    align-items: flex-start;
}

.rental-main-image {
    flex: 1;
}

.main-img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.rental-info {
    flex: 1;
}

.rental-details {
    margin: 0;
    padding: 0;
}

.rental-detail-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #2DAE38;
}

.rental-detail-row.first-row {
    border-top: 1px solid #2DAE38;
}

.rental-detail-row.last-row {
    border-bottom: 1px solid #2DAE38;
}

.rental-details dt {
    font-weight: bold;
    color: #666;
    margin: 0;
    padding-right: 15px;
    flex-shrink: 0;
    min-width: 100px;
    font-size: 14px;
}

.rental-details dd {
    margin: 0;
    padding: 0;
    color: #333;
    flex: 1;
    font-size: 14px;
}

.inquiry-btn-wrapper {
    margin-top: 30px;
}

.inquiry-btn {
    display: inline-block;
    padding: 15px 30px;
    background: #2dae37;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.inquiry-btn:hover {
    background: #25992d;
}

.rental-sub-images {
    margin-top: 20px;
}

.sub-images-grid {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.sub-image-item {
    flex: 1;
    min-width: 0;
    max-width: calc(33.333% - 10px);
}

.sub-image-item img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    object-fit: cover;
}

.back-link {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #2DAE38;
}

.back-link a {
    color: #2dae37;
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

/* 問い合わせフォーム */
#inquiry-form .cntBox {
    margin-top: 0;
}

.property-detail-info {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 3px;
}

.property-detail-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.property-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.property-label {
    font-weight: bold;
    color: #666;
    font-size: 14px;
    flex-shrink: 0;
    min-width: 80px;
}

.property-value {
    color: #333;
    font-size: 14px;
    flex: 1;
}

#inquiry-form table {
    width: 100%;
    margin-top: 0;
}

#inquiry-form th {
    width: 200px;
    font-weight: bold;
    vertical-align: top;
    padding: 1em 0;
    line-height: 1.6;
}

#inquiry-form th span {
    color: red;
    font-size: 12px;
    margin-left: 5px;
}

#inquiry-form td {
    padding: 1em 0;
    line-height: 1.6;
}

#inquiry-form tr+tr {
    border-top: 1px solid #2DAE38;
}

#inquiry-form input[type="text"],
#inquiry-form input[type="email"],
#inquiry-form input[type="tel"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
}

#inquiry-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
    resize: vertical;
    min-height: 120px;
}

.form-submit-wrapper {
    margin-top: 30px;
    text-align: center;
}

.form-submit-wrapper label {
    font-weight: normal;
    cursor: pointer;
}

.form-submit-wrapper input[type="checkbox"] {
    margin-right: 5px;
}

#inquiry-form button[type="submit"] {
    margin-top: 20px;
    padding: 15px 40px;
    background: #2dae37;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

#inquiry-form button[type="submit"]:disabled {
    background: #cccccc;
    color: #666666;
    cursor: not-allowed;
    opacity: 0.6;
}

#inquiry-form button[type="submit"]:hover:not(:disabled) {
    background: #25992d;
}

#inquiry-form button[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#inquiry-message-area {
    margin-top: 20px;
}

.success-message {
    padding: 15px;
    background: #d4edda;
    color: #155724;
    border-radius: 5px;
    border: 1px solid #c3e6cb;
}

.error-message {
    padding: 15px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .rental-search-form {
        padding: 20px 0;
    }
    
    .rental-search-form .search-controls {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }
    
    .rental-search-form select {
        width: 100%;
        max-width: 100%;
    }
    
    .rental-list-header {
        margin-bottom: 30px;
        border-bottom-width: 3px;
    }
    
    .rental-list-header h2 {
        font-size: 24px;
    }
    
    .rental-list-header::after {
        width: 200px;
        height: 3px;
    }
    
    #rental-list .inner {
        width: 95%;
        max-width: 100%;
    }
    
    .rental-content {
        padding: 15px;
        display: flex;
        flex-direction: column;
    }
    
    .rental-title {
        margin-bottom: 12px;
        font-size: 16px;
        order: 1;
    }
    
    .rental-image {
        height: auto;
        margin-bottom: 12px;
        order: 2;
        width: 100%;
        position: relative;
        flex-shrink: 0;
    }
    
    .rental-info {
        order: 3;
        margin-top: 0;
        flex-shrink: 0;
    }
    
    .rental-info-row {
        padding: 6px 0;
    }
    
    .rental-info dt {
        min-width: 70px;
        font-size: 13px;
    }
    
    .rental-info dd {
        font-size: 13px;
    }
    
    .rental-detail-content {
        flex-direction: column;
        align-items: center;
    }
    
    #rental-detail .rental-main-image {
        width: 100%;
        max-width: 100%;
    }
    
    #rental-detail .rental-info {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    #rental-detail .rental-details {
        width: 100%;
        max-width: 480px;
    }
    
    #rental-detail .inquiry-btn-wrapper {
        width: 100%;
        max-width: 480px;
        text-align: center;
    }
    
    .sub-image-item {
        max-width: calc(50% - 7.5px);
    }
    
    .sub-image-item:last-child {
        max-width: 100%;
    }
}

/* より小さい画面用のメディアクエリ */
@media screen and (max-width: 480px) {
    .rental-content {
        padding: 12px;
    }
    
    .rental-title {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .rental-image {
        height: auto;
        margin-bottom: 10px;
    }
    
    .rental-info-row {
        padding: 5px 0;
        flex-wrap: wrap;
    }
    
    .rental-info dt {
        min-width: 60px;
        font-size: 12px;
        width: 100%;
        margin-bottom: 2px;
    }
    
    .rental-info dd {
        font-size: 12px;
        width: 100%;
    }
    
    #rental-detail .rental-details,
    #rental-detail .inquiry-btn-wrapper {
        max-width: 100%;
    }
}

/* 340px が収まらない幅のときは1列でブロック幅を可変に */
@media screen and (max-width: 420px) {
    .rental-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .rental-item {
        width: auto;
        max-width: 100%;
    }
}

/* 小画面: フッターの SANSHO ロゴ・QR 表示、ロゴは小さく、全体は中央揃え */
@media screen and (max-width: 780px) {
    footer .ftrLogo {
        display: block !important;
    }
    footer .ftrLogo img {
        max-width: 100px;
        width: auto;
        height: auto;
    }
    footer .ftrLeft+div img {
        display: block !important;
        max-width: 80px;
        width: auto;
        height: auto;
    }
    footer>.inner {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
    footer>.inner .fx {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    footer .ftrLeft {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        margin-left: auto;
        margin-right: auto;
    }
    footer .ftrLeft+div {
        align-items: center !important;
        justify-content: center !important;
        margin-left: auto;
        margin-right: auto;
    }
    footer .ftrLeft+div figure {
        margin-left: auto;
        margin-right: auto;
    }
    footer small {
        text-align: center;
    }
}

