@charset "utf-8";
/* ========================================================================================
- File: z-css/coupon.css
- Role: フロント画面用クーポンカード表示スタイル（連動型レイアウト対応）
- ====================================================================================== */

/* 左右分割のレイアウトコンテナ */
.cp-interactive-container {
    display: flex;
    gap: 10px; /* 30pxの約1/3に変更 */
    max-width: 1050px;
    margin: 0 auto;
    padding: 20px;
    align-items: flex-start;
    justify-content: center; /* 余白をなくして中央に密着させる */
    flex-wrap: wrap; /* スマホで落ちるように念のため */
}

.cp-left-panel {
    flex: 0 1 500px; /* 1から変更し、余分に広がらないようにする */
    width: 100%;
}

.cp-right-panel {
    flex: 0 1 500px; /* 1から変更し、余分に広がらないようにする */
    width: 100%;
    height: 700px; /* LINEボタン追加による左サイドの高さ増分に合わせて微調整（740→700） */
    overflow-y: auto;
    padding-top: 15px; /* 上にあがった時に見切れないように余白追加 */
    padding-right: 15px;
}

/* スクロールバーのカスタム（右サイド用） */
.cp-right-panel::-webkit-scrollbar {
    width: 6px;
}
.cp-right-panel::-webkit-scrollbar-track {
    background: #fdfafd;
    border-radius: 4px;
}
.cp-right-panel::-webkit-scrollbar-thumb {
    background: #e1cee1;
    border-radius: 4px;
}

/* カード共通：リンク対応 & ふわっと浮き上がるホバー */
.cp-card-large,
.cp-card-small {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    background: #fff;
    line-height: 1.4;
}

.cp-card-large:hover,
.cp-card-small:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(207, 160, 205, 0.4) !important;
}

/* 小さいカードはセレクター（ボタン）のような扱いなのでホバー演出を強めに */
.cp-card-small:hover {
    border-color: #CFA0CD;
}

/* パターン1：大きい写真（縦型） */
.cp-card-large {
    max-width: 500px;
    margin: 0 auto;
    border: 1px solid #e8e0e8;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    font-family: sans-serif;
}

.cp-large-catch {
    background: #CFA0CD;
    color: #fff;
    font-weight: bold;
    padding: 12px 18px;
    font-size: 15px;
    text-align: left;
}

.cp-large-img {
    width: 100% !important;
    height: auto;
    display: block;
    border: none;
    margin: 0;
}

.cp-large-body {
    padding: 20px;
    text-align: left;
}

.cp-large-title {
    font-weight: bold;
    font-size: 18px;
    color: #5a4a5a;
    margin-bottom: 12px;
}

.cp-large-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 18px;
    line-height: 1.6;
}

.cp-large-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed #e1cee1;
    padding-top: 15px;
}

.cp-large-cat {
    background: #f3e5f5;
    color: #8e24aa;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: bold;
}

.cp-large-price {
    color: #b05eb0;
    font-size: 24px;
    font-weight: bold;
}

.cp-large-price span {
    font-size: 13px;
    margin-left: 2px;
}

.cp-large-date {
    font-size: 12px;
    color: #a191a1;
    margin-top: 12px;
    text-align: right;
}

/* パターン2：小さい写真（横型リスト） */
.cp-card-small {
    max-width: 500px;
    margin: 0 auto 15px; /* 下に15px余白 */
    display: flex;
    position: relative;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 15px;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    text-align: left;
}

/* 一番最後の小クーポンの下余白をなくす（スクロールの見た目綺麗化） */
.cp-card-small:last-child {
    margin-bottom: 2px;
}

/* 現在選択されている小クーポンを目立たせる */
.cp-card-small.active-selector {
    border-color: #CFA0CD;
    background: #fdfafd; /* うっすら色をつける */
    box-shadow: 0 4px 20px rgba(207, 160, 205, 0.3);
}

.cp-small-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.cp-small-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cp-small-catch {
    color: #CFA0CD;
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 5px;
    padding-right: 60px;
}

.cp-small-desc {
    font-size: 14px;
    color: #444;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.4;
    padding-right: 60px;
}

.cp-small-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    gap: 10px;
}

.cp-small-date {
    font-size: 11px;
    color: #999;
}

.cp-small-price-time {
    color: #b05eb0;
    font-size: 14px;
    font-weight: bold;
    text-align: right;
    margin-left: auto;
}

.cp-small-cat-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #fdf5fd;
    color: #CFA0CD;
    border: 1px solid #CFA0CD;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: bold;
}

/* ========================================================
   スマホ専用オーバーライド：クーポンのスワイプ化
======================================================== */
@media (max-width: 767px) {
    .cp-interactive-container {
        padding: 5px 10px;
    }
    .cp-left-panel-wrapper {
        width: 100%;
        position: relative;
    }
    /* スワイプヒントのツールチップ */
    .swipe-hint-mobile {
        display: block;
        text-align: center;
        font-size: 15px;
        color: #CFA0CD;
        font-weight: 900;
        margin-bottom: 12px;
        animation: swipeBounce 2s infinite;
    }
    @keyframes swipeBounce {
        0%, 100% { transform: translateX(0); }
        50% { transform: translateX(-6px); }
    }
    /* 横スクロール枠 */
    .cp-left-panel {
        display: flex !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 15px;
        padding-bottom: 20px; /* スクロールバーや影の見切れ防止 */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox用 */
    }
    .cp-left-panel::-webkit-scrollbar {
        display: none; /* Chrome/Safariのスクロールバー非表示 */
    }
    /* 大きなカードアイテム */
    .cp-large-item {
        display: block !important; /* PC版のjQueryフェード処理を上書き */
        opacity: 1 !important;     /* 上記に同じ */
        flex: 0 0 88%; /* ここを88%にすることで次のクーポンがチラ見えする */
        scroll-snap-align: center; /* 画面の中央でピタッと止まる */
        margin: 0;
    }
    /* スマホ時は右の小パネルを非表示にする */
    .cp-right-panel {
        display: none !important;
    }
}

/* PC等ではスワイプヒントを出さない */
@media (min-width: 768px) {
    .swipe-hint-mobile {
        display: none !important;
    }
}
