/* ================================
   全体的なセリフ体フォント定義
   ================================ */

:root {
  --serif-font: 'Noto Serif JP', 'ヒラギノ明朝 ProN', 'Hiragino Mincho ProN', 'Georgia', serif;
  --sans-serif-font: 'Arial', 'Helvetica Neue', sans-serif;
}

/* ================================
   リセット・基本スタイル
   ================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans-serif-font);
    color: #333;
    line-height: 1.6;
    background-color: #f9f9f9;
}

img {
    display: block;
    width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: inherit;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ================================
   特集ページ共通スタイル
   ================================ */

.feature-page {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 20px;
}

.feature-block {
    margin-bottom: 120px;
    background-color: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    margin-left: 60px;
    margin-right: 60px;
}

.feature-block:last-child {
    margin-bottom: 0;
}

/* 1ブロック目の下マージン */
.feature-block--left-long {
    margin-bottom: 150px;
}

/* 2ブロック目の下マージン */
.feature-block--right-long {
    margin-bottom: 150px;
}

.feature-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 0;
}

/* 反転レイアウト用 */
.feature-container--reversed {
    grid-template-columns: 1fr 1fr;
}

/* シンプル2カラムレイアウト（下ぞろえ） */
.feature-container--simple {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 0;
    align-items: flex-end;
}

/* シンプル反転レイアウト（下ぞろえ） */
.feature-container--simple-reversed {
    grid-template-columns: 1fr 1fr;
    align-items: flex-end;
}

/* ================================
   カラムのレイアウト
   ================================ */

.feature-column {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* ================================
   画像ラッパー
   ================================ */

.feature-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    background-color: #e8e8e8;
    margin-bottom: 20px;
}

/* 左カラム：2:3の縦長画像 */
.feature-image-wrapper--left-tall {
    aspect-ratio: 2 / 3;
    margin-bottom: 0;
}

/* 右カラム：4:5の縦長画像 */
.feature-image-wrapper--right-tall {
    aspect-ratio: 4 / 5;
    margin-bottom: 40px;
}

/* シンプル：4:5の縦長画像 */
.feature-image-wrapper--simple {
    aspect-ratio: 4 / 5;
    margin-bottom: 0;
}

.feature-image-wrapper--secondary {
    margin-bottom: 40px;
}

/* ホバー画像切り替え用の特別な設定 */
.feature-image-wrapper--hover {
    overflow: hidden;
}

.feature-image--hover-primary {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
    z-index: 1;
}

.feature-image--hover-secondary {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    z-index: 0;
}

.feature-image-wrapper--hover:hover .feature-image--hover-primary {
    opacity: 0;
}

.feature-image-wrapper--hover:hover .feature-image--hover-secondary {
    opacity: 1;
}

.feature-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease-out;
}

/* ========================
   MORE アイコン
   ======================== */

.feature-more-icon {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #fff;
    color: #999;
    padding: 8px 14px;
    border-radius: 24px;
    z-index: 5;
    opacity: 1;
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.feature-more-icon:hover {
    background-color: #f5f5f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.feature-more-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
    flex-shrink: 0;
    color: #999;
}

.feature-more-icon span {
    white-space: nowrap;
}

/* ホバー時にMOREアイコンをフェードアウト */
.feature-image-wrapper:hover .feature-more-icon {
    opacity: 0;
    pointer-events: none;
}

/* ========================
   PC用：ホバー商品詳細
   ======================== */

.feature-detail--pc {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.feature-image-wrapper:hover .feature-detail--pc {
    opacity: 1;
    visibility: visible;
}

.feature-detail__content {
    text-align: center;
    color: #fff;
    transform: translateY(20px);
    transition: transform 0.4s ease-out;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.feature-image-wrapper:hover .feature-detail__content {
    transform: translateY(0);
}

/* 品番アイテムリスト */
.feature-detail__items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
}

/* 個別の品番アイテム（横並び） */
.feature-detail__item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 8px 0;
}

.feature-detail__sku {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    min-width: auto;
    text-align: left;
    order: 1;
}

.feature-detail__price {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    min-width: auto;
    text-align: right;
    margin-left: auto;
    order: 2;
}

/* 小さいボタン（各品番用） - button と a タグ両対応 */
.feature-detail__button-small {
    background-color: #fff;
    color: #333;
    padding: 6px 16px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-block;
    text-decoration: none;
    border: none;
    cursor: pointer;
    order: 3;
    margin-left: 8px;
}

.feature-detail__button-small:hover {
    background-color: #f0f0f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.feature-detail__button-small:active {
    transform: translateY(0);
}

/* ========================
   テキストブロック
   ======================== */

.feature-text-block {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.feature-text-block__title {
    font-family: var(--serif-font);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.4;
    color: #222;
}

.feature-text-block__description {
    font-family: var(--serif-font);
    font-size: 15px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 0;
}

/* PC表示：3・4ブロックの文章下余白 */
.feature-block--simple-left .feature-column--right .feature-text-block {
    padding-bottom: 80px;
}

.feature-block--simple-right .feature-column--left .feature-text-block {
    padding-bottom: 80px;
}

/* ========================
   モーダル（SP用）
   ======================== */

.feature-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.feature-modal.is-active {
    display: flex;
}

.feature-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

.feature-modal.is-active .feature-modal__overlay {
    opacity: 1;
}

.feature-modal__content {
    position: relative;
    background-color: rgba(0, 0, 0, 0.7);
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    padding: 24px;
    animation: slideUp 0.3s ease-out;
    max-height: 70vh;
    overflow-y: auto;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.feature-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    cursor: pointer;
    z-index: 10;
}

.feature-modal__close:active {
    background-color: rgba(255, 255, 255, 0.2);
}

.feature-modal__close svg {
    width: 24px;
    height: 24px;
    color: #fff;
    stroke-width: 2;
}

.feature-modal__body {
    padding-top: 20px;
    padding-bottom: 20px;
}

.feature-modal__body h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

.feature-modal__body p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #fff;
}

.feature-modal__body .feature-modal__items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.feature-modal__body .feature-modal__item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 0;
    background-color: transparent;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-modal__body .feature-modal__item:last-child {
    border-bottom: none;
}

.feature-modal__body .feature-modal__sku {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    min-width: auto;
    text-align: left;
    order: 1;
}

.feature-modal__body .feature-modal__price {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    min-width: auto;
    text-align: right;
    margin-left: auto;
    order: 2;
}

.feature-modal__body .feature-detail__button-small {
    background-color: #fff;
    color: #333;
    padding: 6px 14px;
    font-size: 12px;
    display: inline-block;
    text-decoration: none;
    border: none;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    order: 3;
}

.feature-modal__body .feature-detail__button-small:hover {
    background-color: #f0f0f0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.feature-modal__body .feature-detail__button-small:active {
    transform: translateY(0);
}

/* ========================
   ホバー商品詳細キャプション
   ======================== */

.feature-detail__caption {
    text-align: right;
    font-size: 11px;
    color: #fff;
    opacity: 0.8;
    margin: 8px 0 0 0;
    padding: 0;
    line-height: 1.4;
}

/* SP用タップアイコン */
.feature-icon-button {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 48px;
    height: 48px;
    background-color: #fff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 10;
}

.feature-icon-button--sp {
    display: none;
}

.feature-icon-button:active {
    transform: scale(0.95);
}

.feature-icon {
    width: 24px;
    height: 24px;
    color: #333;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ================================
   レスポンシブ対応：タブレット
   ================================ */

@media (max-width: 1024px) {
    .feature-page {
        padding: 40px 16px;
    }

    .feature-block {
        margin-left: 40px;
        margin-right: 40px;
    }

    .feature-container {
        gap: 30px;
    }

    .feature-container--simple {
        gap: 30px;
    }

    .feature-text-block__title {
        font-size: 24px;
    }

    .feature-text-block__description {
        font-size: 14px;
    }

    .feature-detail__sku {
        font-size: 12px;
        min-width: 70px;
    }

    .feature-detail__price {
        font-size: 12px;
        min-width: 65px;
    }

    .feature-detail__button-small {
        padding: 5px 12px;
        font-size: 11px;
    }

    .feature-detail__item {
        padding: 6px 0;
        gap: 8px;
    }

    .feature-more-icon {
        padding: 6px 12px;
        font-size: 11px;
        bottom: 12px;
        right: 12px;
    }

    .feature-more-icon svg {
        width: 14px;
        height: 14px;
    }

    .feature-block--left-long {
        margin-bottom: 100px;
    }

    .feature-block--right-long {
        margin-bottom: 100px;
    }
}

/* ================================
   レスポンシブ対応：スマートフォン
   ================================ */

@media (max-width: 768px) {
    .feature-page {
        padding: 40px 16px;
        max-width: 100%;
    }

    .feature-block {
        margin-bottom: 80px;
        margin-left: 0;
        margin-right: 0;
    }

    .feature-block--left-long {
        margin-bottom: 80px;
    }

    .feature-block--right-long {
        margin-bottom: 80px;
    }

    .feature-block--simple-left {
        margin-bottom: 80px;
    }

    .feature-block--simple-right {
        margin-bottom: 80px;
    }

    .feature-container {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .feature-container--reversed {
        flex-direction: column;
    }

    .feature-container--simple {
        display: flex;
        flex-direction: column;
        gap: 24px;
        align-items: stretch;
    }

    .feature-container--simple-reversed {
        flex-direction: column;
        align-items: stretch;
    }

    .feature-column {
        width: 100%;
    }

    /* ブロック1：右カラムを上に表示 */
    .feature-block--left-long .feature-column--right {
        order: -1;
    }

    /* ブロック2：左カラムを上に表示 */
    .feature-block--right-long .feature-column--left {
        order: -1;
    }

    /* ブロック3：左カラムが画像なので、順序そのまま */
    .feature-block--simple-left .feature-column--left {
        order: unset;
    }

    .feature-block--simple-left .feature-column--right {
        order: unset;
    }

    /* ブロック4：右カラムが画像なので、上に持ってくる */
    .feature-block--simple-right .feature-column--right {
        order: -1;
    }

    /* SP時の画像比率調整 */
    .feature-image-wrapper--left-tall {
        aspect-ratio: 2 / 3;
        margin-bottom: 20px;
    }

    .feature-image-wrapper--right-tall {
        aspect-ratio: 4 / 5;
        margin-bottom: 24px;
    }

    .feature-image-wrapper--simple {
        aspect-ratio: 4 / 5;
        margin-bottom: 20px;
    }

    /* PC用ホバーを非表示 */
    .feature-detail--pc {
        display: none;
    }

    /* SP用アイコンを表示 */
    .feature-icon-button--sp {
        display: flex;
    }

    /* MORE アイコンをSPで非表示 */
    .feature-more-icon {
        display: none;
    }

    /* SP時はホバー画像切り替えを無効化 */
    .feature-image-wrapper--hover:hover .feature-image--hover-primary {
        opacity: 1;
    }

    .feature-image-wrapper--hover:hover .feature-image--hover-secondary {
        opacity: 0;
    }

    .feature-text-block {
        padding: 0;
    }

    .feature-text-block__title {
        font-size: 22px;
        margin-bottom: 12px;
    }

    .feature-text-block__description {
        font-size: 14px;
        line-height: 1.7;
    }

    /* SP版でのキャプション色変更 */
    .feature-detail__caption {
        color: #333;
        opacity: 1;
    }

    .feature-modal {
        padding: 16px;
        align-items: center;
    }

    .feature-modal__content {
        border-radius: 12px;
        padding: 20px;
        max-height: 75vh;
        margin-bottom: 0;
    }

    .feature-modal__body {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .feature-modal__body h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .feature-modal__body .feature-modal__item {
        padding: 10px 0;
        gap: 8px;
    }

    .feature-modal__body .feature-modal__sku {
        font-size: 13px;
        min-width: auto;
    }

    .feature-modal__body .feature-modal__price {
        font-size: 13px;
        min-width: auto;
    }

    .feature-modal__body .feature-detail__button-small {
        padding: 5px 12px;
        font-size: 11px;
    }

    .feature-modal__body .feature-detail__caption {
        color: #fff;
        opacity: 1;
    }

    .feature-detail__sku {
        font-size: 12px;
        min-width: 70px;
    }

    .feature-detail__price {
        font-size: 12px;
        min-width: 60px;
    }
}

@media (max-width: 480px) {
    .feature-text-block__title {
        font-size: 20px;
    }

    .feature-text-block__description {
        font-size: 13px;
    }

    .feature-icon-button--sp {
        width: 44px;
        height: 44px;
        bottom: 10px;
        right: 10px;
    }

    .feature-icon {
        width: 20px;
        height: 20px;
    }

    .feature-modal__content {
        padding: 20px;
    }

    .feature-modal__body {
        padding-top: 16px;
    }

    .feature-modal__body .feature-modal__item {
        padding: 10px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .feature-modal__body .feature-modal__sku {
        font-size: 13px;
        min-width: 50px;
        text-align: left;
    }

    .feature-modal__body .feature-modal__price {
        font-size: 13px;
        min-width: 60px;
        text-align: right;
    }

    .feature-detail__sku {
        font-size: 12px;
        min-width: 70px;
    }

    .feature-detail__price {
        font-size: 12px;
        min-width: 60px;
    }
}
