/* ==========================================
   アクセサリーページ固有スタイル
   ========================================== */

/* 車種検索エリア */
.search-area .search-title {
    font-family: var(--font-family-bold);
    font-size: 24px;
    font-weight: var(--font-weight-bold);
    line-height: 1.5;
    letter-spacing: 1.28px;
    color: #222222;
}

/* 検索注釈 */
.search-note {
    font-family: var(--font-family-regular);
    font-size: 14px;
    font-weight: var(--font-weight-regular);
    line-height: 1.5;
    color: #666666;
    margin-top: 15px;
}

/* アンカーメニュー */
.anchor-menu {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 48px;
    padding-bottom: 72px;
}

/* 車種行 */
.car-row {
    padding-top: 72px;
    margin-top: 72px;
    border-top: 1px solid #d9d9d9;
}
.car-row:last-child{
    border-bottom: 1px solid #d9d9d9;
    padding-bottom: 72px;
}

/* 車種グリッド */
.car-grid {
    margin-top: 16px;
}

/* ローカルナビ */
.c-localnavdop {
    margin-top: 24px;
}

/* 検索エリア */
.search-area {
    margin-top: 48px;
}

/* 中古車検索トップへボタンエリア */
.c-contentbasedop:has(.p-btndop) {
    margin-top: 96px;
    margin-bottom: 96px;
}

/* 車種選択モーダル */
.car-modal {
    display: none;
}

.anchor-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-family-bold);
    font-size: 14px;
    font-weight: var(--font-weight-bold);
    line-height: 1.5;
    letter-spacing: 0.64px;
    color: #000000;
    text-decoration: none !important;
}

.anchor-link:hover {
    background-color: #f4f4f4;
    color: #000000;
}

.anchor-link::after {
    content: '';
    display: inline-block;
    width: 5.6px;
    height: 9.3px;
    background-image: url('/pages/contents/dop/image/common/icon_arrow_down.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: rotate(90deg) translateY(-1px) translateX(-2px);
}

/* 行タイトル */
.car-row .row-title {
    font-family: var(--font-family-bold);
    font-size: 32px;
    font-weight: var(--font-weight-bold);
    line-height: 1.5;
    letter-spacing: 1.28px;
    color: #222222;
}

/* 車種グリッド */
.car-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 32px;
}

.car-link {
    display: flex;
    align-items: center;
    width: 270px;
    padding: 20px 8px;
    font-family: var(--font-family-bold);
    font-size: 16px;
    font-weight: var(--font-weight-bold);
    line-height: 1.5;
    letter-spacing: 0.64px;
    color: #222222;
    text-decoration: none !important;
}

.car-link sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    top: -.25em;
    vertical-align: baseline;
}

.car-link span {
    border-bottom: 1px solid #222222;
}

.car-link:hover {
    background-color: #f4f4f4;
    color: #222222;
}

/* レスポンシブ */
@media (max-width: 1023px) {
    .search-area .search-title {
        font-size: 24px;
        letter-spacing: 0.96px;
    }

    .anchor-menu {
        gap: 16px;
    }

    .anchor-link {
        font-size: 14px;
        letter-spacing: 0.56px;
    }

    .car-row .row-title {
        font-size: 24px;
        letter-spacing: 0.96px;
    }

    .car-grid {
        gap: 8px 16px;
    }

    .car-link {
        width: calc(50% - 8px);
        font-size: 14px;
        letter-spacing: 0.56px;
    }

    .p-btndop.-white {
        font-size: 16px !important;
    }
}

/* モーダル */
.car-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12.5px);
}

/* モーダル表示時 */
.car-modal.is-open {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.car-modal-content {
    position: relative;
    width: 100%;
    max-width: 100%;
    max-height: 760px;
    background-color: #FFFFFF;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.car-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 24px 24px 16px 0;
    flex-shrink: 0;
}

.car-modal-close {
    width: 24px;
    height: 24px;
    padding: 0;
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: block;
    flex-shrink: 0;
    transition: opacity 0.3s ease;
    color: #000000;
}

.car-modal-close:hover {
    opacity: 0.7;
}

.car-modal-close svg {
    width: 24px;
    height: 24px;
    display: block;
}

.car-modal-body {
    padding: 0 24px 24px 24px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.car-modal-title-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.car-modal-car-name {
    font-family: var(--font-family-bold);
    font-size: 24px;
    font-weight: var(--font-weight-bold);
    line-height: 1.5;
    letter-spacing: 0.96px;
    color: #222222;
    margin: 0;
}

.car-modal-description {
    font-family: var(--font-family-base);
    font-size: 16px;
    font-weight: var(--font-weight-normal);
    line-height: 1.5;
    letter-spacing: 0.64px;
    color: #222222;
    margin: 0;
}

.car-modal-year-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.car-modal-section-title {
    font-family: var(--font-family-bold);
    font-size: 20px;
    font-weight: var(--font-weight-bold);
    line-height: 1.5;
    letter-spacing: 0.8px;
    color: #222222;
    margin: 0;
}

.car-modal-select-wrapper {
    position: relative;
    width: 100%;
}

.car-modal-select {
    width: 100%;
    padding: 16px 0;
    font-family: var(--font-family-bold);
    font-size: 20px;
    font-weight: var(--font-weight-bold);
    line-height: 1.5;
    letter-spacing: 0.8px;
    color: #666666;
    background-color: #FFFFFF;
    border: none;
    border-bottom: 1px solid #cccccc;
    appearance: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.car-modal-select:hover {
    background-color: #f4f4f4;
}

.car-modal-select:focus {
    outline: none;
    color: #000000;
}

.car-modal-select option[value=""]:disabled {
    color: #666666;
}

.car-modal-select-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    color: #000000;
    pointer-events: none;
}

.car-modal-button-section {
    display: flex;
    justify-content: center;
}

.car-modal-submit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 592px;
    height: 64px;
    padding: 20px 16px;
    font-family: var(--font-family-bold);
    font-size: 16px;
    font-weight: var(--font-weight-bold);
    line-height: 1.5;
    letter-spacing: 0.64px;
    color: #FFFFFF;
    background-color: #000000;
    border: none;
    cursor: pointer;
}

.car-modal-submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.car-modal-submit-button:not(:disabled):hover {
    opacity: 0.7;
}

.car-modal-submit-button svg {
    width: 24px;
    height: 24px;
}

/* モーダル表示時のbodyスクロール無効化 */
body.is-modal-open {
    overflow: hidden;
}

/* モーダル - レスポンシブ (PC版: 1024px以上) */
@media (min-width: 1024px) {
    .car-modal {
        padding: 0;
    }

    .car-modal-content {
        max-width: 1008px;
        max-height: 90vh;
    }

    .car-modal-header {
        padding: 48px 48px 16px 0;
    }

    .car-modal-body {
        padding: 0 96px 48px 96px;
    }
}

/* モーダル - SP版調整 */
@media (max-width: 1023px) {
    .car-modal-body {
        gap: 32px;
    }

    .car-modal-car-name {
        font-size: 20px;
        letter-spacing: 0.8px;
    }

    .car-modal-description {
        font-size: 14px;
        letter-spacing: 0.56px;
    }

    .car-modal-section-title {
        font-size: 16px;
        letter-spacing: 0.64px;
    }

    .car-modal-select {
        font-size: 16px;
        letter-spacing: 0.64px;
        padding: 12px 0;
    }

    .car-modal-submit-button {
        width: 100%;
        font-size: 14px;
        letter-spacing: 0.56px;
    }
}
