@charset "utf-8";

/* =====================================================
        基本カラー（修理＝青 / 校正＝緑 に切り替える変数）
    ===================================================== */
:root {
    --white: #fff;
    --gray_border: #c5c5c5;
    --gray_border_light: #e9e9e9;
    --gray-bg: #f1f1f1;
    --radius-m: 10px;
}

/* 修理のとき（青テーマ） */
.theme-blue {
    --accent-color: #3d68cc;
    --accent-bg: #eaf0ff;
    --accent-hover-bg: #e8efff;
}

/* 校正のとき（緑テーマ） */
.theme-green {
    --accent-color: #0c8a4d;
    --accent-bg: #e9faf1;
    --accent-hover-bg: #e9faf1;
}

.main_content {
    width: 92%;
    max-width: 1260px;
    margin-block: 2.5rem 0;
    margin-inline: auto;

    & img {
        max-width: 100%;
    }
}

.section_area {
    padding: 5rem 0 0;
    margin: 5rem auto 0;
    border-block-start: 1px solid var(--gray_border_lighter);

    & h2 {
        font-size: 18px;
        font-weight: bold;
        color: #333;
    }
}

/* ================== 製品 ここから ================== */
.product {
    display: flex;
    gap: 3%;
    align-items: flex-start;
    justify-content: space-between;

    .product__img {
        width: 29%;
        max-width: 397px;
    }

    .product__end--text {
        padding-block: 0.4rem;
        margin-block: 3rem 0;
        color: #fff;
        text-align: center;
        background-color: #666;
        border-radius: 10px;
    }

    .product__form {
        width: 66%;
    }

    .product__name {
        padding-inline: 1rem 0;
        border-inline-start: 7px solid var(--accent-color);
    }

    .product__name--inner {
        display: grid;
        grid-template-rows: auto;
        grid-template-columns: auto auto auto;
        gap: 0 1rem;
        align-items: baseline;
        width: fit-content;
        padding-block: 0 0.2rem;
        font-size: 20px;
    }

    .product__name--model {
        font-weight: bold;
    }

    .product__name--catno {
        font-size: 75%;
    }

    .product__comment {
        padding-block: 3rem 0;
        margin-block: 3rem 0;
        font-size: 14px;
        border-block-start: 1px solid var(--gray_border_lighter);
    }
}

/* ======================== 画像 ここから ======================== */
#slide-thumbnail .slick-track {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    width: 100% !important;
    padding-block: 1px;
    padding-inline: 1px;
    transform: unset !important;
}

.slick-track::before,
.slick-track::after {
    display: none !important;
}

#slide-thumbnail .product-under-image {
    display: flex;
    align-items: center;
    width: auto !important;
    aspect-ratio: 1/1;
    padding-block: 3px;
    padding-inline: 3px;
    border: 1px solid var(--gray_border_lighter);
    border-radius: 5px;
    opacity: 0.6;

    &:hover {
        cursor: pointer;
    }
}

#slide-thumbnail .slick-current {
    border: 1px solid #3d68cc;
    box-shadow: 0 0 0 1px #3d68cc;
    opacity: 1;
}

.slick-slide img {
    height: auto;
}

.slick-initialized .slick-slide {
    aspect-ratio: 1/1.27;
}

#slide-images {
    .product-top-image {
        display: flex;
        align-items: center;
        justify-content: center;
        height: calc(100% - 6rem);
    }
}

#slide-images .slider-num {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    height: 26px;
    padding: 0 1em;
    font-size: 12px;
    line-height: 26px;
    color: var(--white);
    background-color: var(--gray_slider);
    border-radius: 18px;
    transform: translate(-50%, 50%);
}

#slide-images::before {
    position: absolute;
    right: 12px;
    bottom: 3rem;
    z-index: 1;
    width: 34px;
    height: 34px;
    font-family: FontAwesome;
    font-size: 18px;
    line-height: 34px;
    color: var(--white);
    text-align: center;
    content: "\f002";
    background-color: var(--gray_slider);
    border-radius: 50%;
    transform: translate(0, 50%);
}

html[data-lc-type="image"] #lightcase-content,
html[data-lc-type="video"] #lightcase-content {
    box-sizing: border-box;
    background-color: #fff !important;
    border-radius: 2px;
    box-shadow: 0 0 0 30px var(--white) !important;
}

html.lightcase-open {
    overflow-y: scroll;
}

html.lightcase-open body {
    height: 100vh;
    overflow: hidden;
}
/* ======================== 画像 ここまで ======================== */

/* ======================== 注意 ここから ======================== */
.repcal__notation {
    margin-block: 1.5rem 0;
    font-size: 14px;

    &:not(:has(*)) {
        margin-block: 0;
    }

    .repcal__notation--box {
        display: flex;
        gap: 2%;

        & + & {
            margin-block: 1rem 0;
        }
    }

    .condition {
        position: relative;
        padding-inline: 1.5rem 0;
        font-weight: bold;
        color: #c98a00;

        &::before {
            position: absolute;
            top: 6px;
            left: 0;
            font-family: FontAwesome;
            font-size: 120%;
            line-height: 1;
            content: "\f071";
        }
    }
}

/* ================== ご依頼内容全体 ここから ================== */
.repcal {
    padding-block: 2.5rem;
    padding-inline: 3.5rem;
    margin-block: 1.5rem 0;
    counter-reset: number 0;
    background-color: var(--gray-bg);
    border-radius: var(--radius-m);

    .repcal__section {
        margin-block-start: 2.6rem;

        &:is(details) {
            border-block-start: 1px solid var(--gray_border);
            border-block-end: 1px solid var(--gray_border);
        }
    }

    & #repcal_type {
        margin-block: 0;
    }
}

/* ================== それぞれの見出し ここから ================== */
.repcal__title {
    font-size: 14px;
    font-weight: bold;

    &::before {
        margin-inline: 0 0.6rem;
        color: var(--accent-color);
        content: counter(number) " ";
        counter-increment: number 1;
    }
}

.repcal__title--accordion {
    position: relative;
    display: grid;
    grid-template-columns: 1fr calc(24px + 0.5rem);
    padding-block: 1.4rem;
    cursor: pointer;
    list-style-type: none;
}

/* ======================== セレクトの外側 ここから ======================== */
.select__wrap {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-block: 0.8rem 0;

    details & {
        padding-block: 0 2.2rem;
        margin-block: 0;
    }

    &.select__wrap--repcal {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ======================== アコーディオン ここから ======================== */
.acd__icon {
    position: relative;
    display: block;
    margin-inline: 0 0.5rem;
    transform-origin: center 50%;
    transition: transform 0.4s;

    &::before,
    &::after {
        position: absolute;
        top: 50%;
        display: block;
        width: 15px;
        height: 3px;
        content: "";
        background-color: var(--gray_main);
        border-radius: 100vmax;
    }

    &::before {
        left: 0;
        transform: rotate(45deg);
    }

    &::after {
        right: 0;
        transform: rotate(-45deg);
    }

    :is(.repacl__details[open]) & {
        transform: rotate(180deg);
    }
}

.repcal__section {
    &::details-content {
        height: 0;
        overflow: clip;
        opacity: 0;
        transition:
            height 0.3s,
            opacity 0.3s,
            content-visibility 0.3s allow-discrete;
    }

    &[open]::details-content {
        height: auto;
        opacity: 1;
    }
}

@supports (interpolate-size: allow-keywords) {
    :root {
        interpolate-size: allow-keywords;
        /* height:0（数値型） → auto（文字型） のアニメーションを可能にするための指定 */
    }
}

/* ======================== ラジオボタン ここから ======================== */
.radio__label--icon {
    width: 32px;
    aspect-ratio: 1/1;
    fill: #aaa;
}

.radio__input {
    display: none;

    &:checked + .radio__label {
        /* ボックス選択時（色は変数） */
        font-weight: bold;
        color: var(--accent-color);
        background-color: var(--accent-bg);
        border-color: var(--accent-color);

        /* 選択時の丸（色は変数で切替） */
        &::after {
            position: absolute;
            top: 50%;
            left: calc(1rem + 4px);
            width: 10px;
            aspect-ratio: 1/1;
            content: "";
            background-color: var(--accent-color);
            border-radius: 50%;
            transform: translateY(-50%);
        }

        .radio__label--icon {
            fill: var(--accent-color);
        }
    }

    /* ============= 修理・校正・点検 ご依頼内容を選択してください ============= */
    &.radio__input--repcal {
        &:checked + .radio__label::after {
            display: none;
        }
    }
}

.radio__label {
    position: relative;
    display: block;
    width: 100%;
    padding-block: 0.8rem;
    padding-inline: 3.2rem 0.4rem;
    font-size: 14px;
    color: #888;
    cursor: pointer;
    background-color: var(--white);
    border: 2px solid var(--gray_border_light);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow_weak);

    &::before {
        position: absolute;
        top: 50%;
        left: 1rem;
        width: 16px;
        aspect-ratio: 1/1;
        content: "";
        background: var(--white);
        border: 1px solid var(--gray_border);
        border-radius: 50%;
        transform: translateY(-50%);
    }

    /* ============= 修理・校正・点検 ご依頼内容を選択してください ============= */
    &.radio__label--repcal {
        display: flex;
        gap: 1rem;
        align-items: center;
        justify-content: center;
        padding-block: 1.5rem;
        padding-inline: 0.4rem 0.8rem;
        font-size: 16px;
        border-width: 3px;

        &::before {
            display: none;
        }

        & p {
            font-size: 22px;
            font-weight: bold;
        }

        /* ============= 修理 ============= */
        &.radio__label--repair {
            &:hover {
                background-color: #e8efff;
            }
        }

        /* ============= 点検 ============= */
        &.radio__label--overhaul {
            &:hover {
                background-color: #e9faf1;
            }
        }

        /* ============= 校正 ============= */
        &.radio__label--calibration {
            &:hover {
                background-color: #e9faf1;
            }
        }

        /* ============= 不可 ============= */
        &.radio__label--disabled {
            color: #888;
            cursor: auto;
            background-color: #e3e5e5;
            border: 2px solid #e3e5e5;
            box-shadow: none;

            & p {
                font-size: 16px;
                font-weight: normal;
            }
        }
    }
}

/* ======================== チェックボックス ここから ======================== */
.option__select--input {
    display: none;

    /* チェック時：色は accent に追随 */
    &:checked + .option__select--label {
        font-weight: bold;
        color: var(--accent-color);
        background-color: var(--accent-bg);
        border-color: var(--accent-color);

        &::before {
            background-color: var(--accent-color);
            border-color: var(--accent-color);
        }

        &::after {
            position: absolute;
            top: 47%;
            left: 21px;
            width: 5px;
            height: 9px;
            content: "";
            border: solid #fff;
            border-width: 0 3px 3px 0;
            transform: rotate(44deg);
            translate: 0 -50%;
        }
    }
}

.option__select--label {
    position: relative;
    display: block;
    padding-block: 0.8rem;
    padding-inline: 3.2rem 0.4rem;
    font-size: 14px;
    color: #888;
    cursor: pointer;
    background: var(--white);
    border: 2px solid var(--gray_border_light);
    border-radius: 5px;
    box-shadow: 1px 1px 2px 0 rgb(0 0 0 / 10%);

    &::before {
        position: absolute;
        top: 50%;
        left: 1rem;
        width: 14px;
        aspect-ratio: 1/1;
        content: "";
        background-color: var(--white);
        border: 2px solid var(--gray_border_light);
        transform: translateY(-50%);
    }
}

/* ======================== 送信ボタン ここから ======================== */
.goinput__button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 65px;
    height: 100%;
    padding-block: 1.4rem;
    margin-block: 3rem 0;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    background-color: var(--accent-color);
    border: none;
    border-radius: 100vmax;
    box-shadow: var(--shadow_weak);

    &::before,
    &::after {
        position: absolute;
        top: calc(50% - 2px);
        right: 30px;
        width: 18px;
        height: 5px;
        content: "";
        background-color: #fff;
        border-radius: 100vmax;
        transform-origin: calc(100% - 2px) 50%;
    }

    &::before {
        transform: rotate(45deg);
    }

    &::after {
        transform: rotate(-45deg);
    }

    &:hover {
        opacity: 0.7;
    }
}

/* ======================== 修理・校正の流れ ここから ======================== */
.info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 5%;
    align-items: start;
}

.flow {
    .flow__link {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem 1.5rem;
        margin-block: 1rem 0;

        & a {
            color: #3d68cc;
        }
    }

    .flow__link--box {
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
        align-items: center;
        justify-content: center;
        padding-block: 1.2rem 0.8rem;
        padding-inline: 1rem;
        font-size: 16px;
        font-weight: bold;
        text-align: center;
        text-decoration: none;
        border: 2px solid;
        border-radius: 10px;
        box-shadow: var(--shadow_weak);
    }

    .flow__link--faq {
        grid-column: -1 / 1;
        padding-block: 1.2rem 1rem;
        padding-inline: 2rem;

        &:hover {
            background-color: #eaf0ff;
        }
    }

    & a.flow__link--rep {
        color: #3d68cc;

        &:hover {
            background-color: #eaf0ff;
        }
    }

    & a.flow__link--cal {
        color: #0c8a4d;

        &:hover {
            background-color: #e9faf1;
        }
    }
}

/* ======================== 校正付属品 ここから ======================== */
.acce {
    h2 {
        & span {
            margin-inline: 0.5rem 0;
            font-size: 80%;
        }
    }

    .acce__box {
        margin-block: 4rem 0;

        &:first-child {
            margin-block: 0;
        }
    }

    .acce__box--caption {
        margin-block: 0.5rem 0;
        font-size: 14px;
        color: #666;
    }

    .acce__list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-block: 1rem 0;
    }

    .acce__item {
        padding-block: 1rem;
        padding-inline: 2rem;
        font-weight: bold;
        color: #0c8a4d;
        background-color: #e9faf1;
        border: 1px solid #c8ead8;
        border-radius: 5px;
    }

    .acce__link {
        position: relative;
        display: inline-block;
        width: calc(50% - 1rem / 2);
        max-width: 433px;
        padding-block: 0 0.5rem;
        padding-inline: 0 1rem;
        margin-block: 5rem 0;
        font-weight: bold;
        color: #0c8a4d;
        text-decoration: none;
        border-block-end: 2px solid;

        &::before,
        &::after {
            position: absolute;
            top: calc(50% - 3px);
            right: 2px;
            width: 11px;
            height: 3px;
            content: "";
            background-color: #0c8a4d;
            border-radius: 100vmax;
            transform-origin: calc(100% - 1px) 50%;
        }

        &::before {
            transform: rotate(42deg);
        }

        &::after {
            transform: rotate(-42deg);
        }

        &:hover {
            opacity: 0.7;
        }
    }
}

/* ======================== 標準液・パーツ ここから ======================== */
.option__area {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 1rem 20px;
    align-items: start;
    margin-block: 2rem 0;

    .option__box {
        font-size: 12px;
        color: #333;
        text-decoration: none;

        &:hover {
            .option__image {
                opacity: 0.7;
            }

            .option__name {
                color: var(--orange_deeper);
                text-decoration: underline;
            }
        }
    }

    .option__image {
        display: block;
        padding: 15%;
        border: 1px solid var(--gray_border_lighter);
        border-radius: 5px;
    }

    .option__name {
        margin-block: 1rem 0;
    }

    .option__price {
        font-size: 14px;
        color: var(--red_price);
    }

    .zei-text {
        margin-inline: 0 0.2rem;
        font-size: 80%;
    }

    .option__name--bold {
        font-weight: bold;
    }
}

@media (max-width: 960px) {
    .main_content {
        margin-block: 1.5rem 0;
    }

    .section_area {
        padding: 4rem 0 0;
        margin: 4rem auto 0;
        border-block-start: 1px solid var(--gray_border_lighter);
    }

    /* ================== 製品 ここから ================== */
    .product {
        flex-direction: column;
        align-items: center;

        .product__img {
            width: 100%;
        }

        .product__form {
            width: 100%;
            margin-block: 2rem 0;
        }

        .product__name--inner {
            grid-template-rows: auto auto;
            grid-template-columns: auto;
            font-size: 18px;
        }

        .product__name--model {
            grid-row: 1/2;
        }

        .product__name--catno {
            grid-row: 2/3;
        }
    }

    #slide-images {
        .product-top-image {
            width: 55%;
            height: calc(100% - 3rem);
            margin-inline: auto;
        }
    }

    .slick-initialized .slick-slide {
        aspect-ratio: 1 / 0.69;
    }

    #slide-images .slider-num {
        bottom: 1.6rem;
    }

    #slide-images::before {
        bottom: 1.6rem;
    }

    /* ======================== 注意 ここから ======================== */
    .repcal__notation {
        .repcal__notation--box {
            flex-direction: column;
        }

        .condition {
            width: 100%;
        }
    }

    /* ================== ご依頼内容全体 ここから ================== */
    .repcal {
        padding-block: 1.5rem;
        padding-inline: 1.2rem;
    }

    /* ======================== セレクトの外側 ここから ======================== */
    .select__wrap {
        grid-template-columns: repeat(1, 1fr);

        &.select__wrap--repcal {
            gap: 0.6rem;
        }
    }

    /* ======================== ラジオボタン ここから ======================== */
    .radio__label--icon {
        width: 24px;
    }

    .radio__label {
        &.radio__label--repcal {
            flex-direction: column;
            gap: 0.2rem;
            justify-content: center;
            padding-block: 1rem 0.6rem;
            padding-inline: 0.2rem;

            & p {
                font-size: 16px;
            }

            /* ============= 不可 ============= */
            &.radio__label--disabled {
                gap: 5px;

                & p {
                    font-size: 14px;
                }
            }
        }
    }

    /* ======================== 修理・校正の流れ ここから ======================== */
    .info {
        grid-template-columns: repeat(1, 1fr);
    }

    .flow {
        .flow__link {
            gap: 1rem;
        }

        .flow__link--box {
            padding-block: 1rem 0.6rem;
            padding-inline: 0.2rem;
            font-size: 14px;

            &.flow__link--faq {
                gap: 1rem;
            }
        }

        .flow__link--faq {
            & img {
                width: 55px;
            }
        }
    }

    /* ======================== 校正付属品 ここから ======================== */
    .acce {
        margin-block: 4rem 0;

        .acce__box {
            margin-block: 2rem 0;
        }

        .acce__list {
            gap: 0.5rem;
            margin-block: 0.5rem 0;
        }

        .acce__item {
            padding-block: 0.6rem;
            padding-inline: 1.2rem;
            font-size: 12px;
        }

        .acce__link {
            width: 100%;
            padding-block: 0 0.2rem;
            margin-block: 3rem 0;
            font-size: 14px;
        }
    }

    /* ======================== 標準液・パーツ ここから ======================== */
    .option__area {
        display: flex;
        gap: 12px;
        padding-block: 0 1rem;
        margin-block: 1rem 0;
        overflow-x: auto;
        overflow-y: hidden;

        .option__box {
            flex: 0 0 120px;
        }
    }
}
