/* ============================================================================
 * coupon-slide.css
 * 割引情報カード（クーポン登録店舗）の共通スタイル
 * 使用箇所: トップページ（横スライド）/ クーポン一覧ページ（グリッド）
 * ========================================================================== */

/* --- 横スライド（トップページ） --- */
.coupon-swipe-wrapper { position: relative; margin-bottom: 8px; }
.coupon-swipe-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding: 4px 10px 16px;
    -webkit-overflow-scrolling: touch;
}
.coupon-swipe-grid::-webkit-scrollbar { display: none; }
.coupon-swipe-grid { -ms-overflow-style: none; scrollbar-width: none; }

/* --- カード本体（共通） --- */
.coupon-slide-card {
    flex: 0 0 240px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(135deg, #fffcfc 0%, #fff0f0 100%); /* クーポンと同じ薄ピンク */
    border: 3px solid #d12a2a;                                    /* クーポンと同じ赤枠 */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(209,42,42,0.18);
}
.coupon-slide-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background:#f2f2f2; }
.coupon-slide-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.coupon-slide-badge {
    position: absolute; left: 8px; bottom: 8px;
    background: #d12a2a;
    color: #fff; font-size: 0.72rem; font-weight: 800;
    padding: 5px 12px; border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.25);
}
.coupon-slide-badge i { margin-right: 3px; }
.coupon-slide-station {
    position: absolute; right: 7px; bottom: 8px;
    display: inline-flex; align-items: center;
    background: rgba(0,0,0,0.62);
    color: #fff; font-size: 0.66rem; font-weight: 700;
    padding: 3px 8px 3px 6px; border-radius: 999px;
    max-width: 50%;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    backdrop-filter: blur(2px);
}
.coupon-slide-station i { font-size: 0.68rem; margin-right: 2px; color:#9be7ff; }
.coupon-slide-body {
    padding: 9px 11px 11px;
    height: 122px;              /* 枠の縦を常に固定（中身の長短に関わらず一定） */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.coupon-slide-name {
    flex: 0 0 auto;
    font-size: 0.9rem; font-weight: 700; color:#333;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.coupon-slide-price {
    flex: 0 0 auto;
    margin-top: 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.coupon-slide-detail {
    position: relative;
    flex: 1 1 auto;
    overflow: hidden;            /* はみ出しは隠して下端をフェード */
    margin: 5px 0 0;
    font-size: 0.74rem; line-height: 1.5;
    color: #d12a2a;              /* 割引内容は赤字 */
    font-weight: 600;
    white-space: pre-wrap;
    word-break: break-word;
}
.coupon-slide-detail::after {    /* 続きがあることを示す下端フェード */
    content: "";
    position: absolute; left: 0; right: 0; bottom: 0; height: 1.5em;
    background: linear-gradient(to bottom, rgba(255,240,240,0) 0%, #fff0f0 85%);
    pointer-events: none;
}
.coupon-slide-yen { font-size: 0.82rem; font-weight: 800; color:#ff4d6d; }
.coupon-slide-min { font-size: 0.68rem; font-weight: 600; color:#999; margin-left: 2px; }

/* --- 横スライドのナビゲーションボタン（トップページ） --- */
.coupon-nav-btn {
    position: absolute; top: calc(50% - 14px);
    transform: translateY(-50%);
    background: rgba(255,255,255,0.95);
    border: 1px solid #eee; color: #333;
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer; z-index: 10;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}
.coupon-nav-btn:hover { background:#ff4d6d; color:#fff; border-color:#ff4d6d; }
.coupon-nav-btn.coupon-prev { left: 6px; }
.coupon-nav-btn.coupon-next { right: 6px; }
@media (min-width: 768px) {
    .coupon-nav-btn { display: none !important; }
}
@media (max-width: 767px) {
    .coupon-swipe-grid { padding: 4px 18vw 16px; gap: 14px; } /* 両端に次カードがチラ見えする幅 */
    .coupon-swipe-grid .coupon-slide-card { flex: 0 0 64vw; }
}

/* --- グリッド（クーポン一覧ページ） --- */
.coupon-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 6px 10px 28px;
}
.coupon-grid .coupon-slide-card { flex: none; width: 100%; }
.coupon-grid .coupon-slide-card.is-hidden { display: none; }
@media (min-width: 768px) {
    .coupon-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 6px 0 32px; }
}

/* --- エリアフィルター（クーポン一覧ページ） --- */
.coupon-filter { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 10px 4px; }
.coupon-filter-btn {
    background: #fff; border: 1px solid #ddd; color: #555;
    font-size: 0.82rem; font-weight: 700;
    padding: 6px 14px; border-radius: 999px;
    cursor: pointer; transition: all 0.15s ease;
}
.coupon-filter-btn:hover { border-color: #d12a2a; color: #d12a2a; }
.coupon-filter-btn.is-active {
    background: #d12a2a; border-color: #d12a2a; color: #fff;
    box-shadow: 0 2px 6px rgba(209,42,42,0.3);
}
.coupon-empty { text-align: center; color: #888; font-size: 0.9rem; padding: 30px 0; }
