/* =========================================
   Shops Page Specific Styles
   ========================================= */

/* 【追加】このページだけ全体をクリーム色にする */
body {
    background-color: var(--background-color);
}

/* =========================================
   ハイライト（赤く光る）アニメーション
   ========================================= */

@keyframes flash-highlight {
    0% { 
        background-color: #ffffff; 
    }
    15% { 
        background-color: #fff0f0; /* 薄い赤 */
        border-color: #E1241E;     /* 山河の赤 */
        box-shadow: 0 0 15px rgba(225, 36, 30, 0.2); 
    }
    100% { 
        background-color: #ffffff; 
        border-color: #e0d8cc;     /* 元の境界線の色 */
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04); 
    }
}

.highlight-target {
    /* 3秒かけて1回だけアニメーションを実行 */
    animation: flash-highlight 3.0s ease-out forwards;
}

/* JavaScriptでリスト生成が終わるまで適用されるスタイル */
body.is.loading footer {
    opacity: 0;           
    pointer-events: none; 
}

body.is-loading .shops-container {
    min-height: 120vh; 
    opacity: 0;
    transition: opacity 0.2s ease-in; /* 0.2秒くらいでパッと出す */  
}


.shops-container {
    min-height: 100vh;
}

:root {
    --brand-red: #E1241E;
    --brand-bg: #fffcf5;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-sub: #666666;
    --border-color: #e0d8cc;
}

.shops-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 30px;
    min-height: 80vh;
    font-family: 'Noto Sans JP', sans-serif;
}

.shops-header {
    text-align: center;
    margin-bottom: 40px;
}

.shops-header h1 {
    font-size: 2.6rem;
    margin-bottom: 15px;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 900;
    line-height: 1.3;
    color: var(--text-main);
}

.shops-header p {
    font-size: 1.1rem;
    color: var(--text-sub);
    line-height: 1.8;
    font-weight: 500;
}

/* Filters */
.area-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-tab {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    height: 48px;
    padding: 0 28px;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 40px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s;
    color: var(--text-sub);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    width: auto;
}

.filter-tab.active,
.filter-tab:hover {
    background: var(--brand-red);
    color: #fff;
    border-color: var(--brand-red);
    box-shadow: 0 4px 10px rgba(225, 36, 30, 0.3);
}

.city-tags-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    min-height: 40px;
}

.city-tag {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    height: 38px;
    padding: 0 18px;
    background: #fff;
    border-radius: 6px;
    color: var(--text-sub);
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: background 0.2s;
    font-weight: 500;
}

.city-tag:hover {
    background: #fdf5e6;
    border-color: var(--brand-red);
    color: var(--brand-red);
}

.city-tag.active {
    background: var(--brand-red);
    color: #fff;
    border-color: var(--brand-red);
}

/* Shop Card Styling */
.shop-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
    transition: display 0s;
    scroll-margin-top: 80px; 
}

.shop-card.hidden {
    display: none !important;
}

/* Card Header */
.shop-header {
    background: #fff;
    padding: 20px 25px;

}

.shop-title-row {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.shop-name {
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1.2;
    color: var(--text-main);
}

.shop-area-badge {
    font-size: 0.9rem;
    background: #f4f4f4;
    color: var(--text-sub);
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    font-weight: 700;
}

.shop-station {
    font-size: 1.1rem;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

/* Action Area */
.shop-actions {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    gap: 20px;
    padding: 10px 20px 25px;
}

@media (min-width: 769px) {
    .shop-actions {
        flex-direction: row;
    }

    .action-section {
        flex: 1;
        border: 1px solid var(--border-color) !important;
        padding: 30px;
    }

    .action-section:last-child {
        border-right: 1px solid var(--border-color);
    }
}

.action-section {
    padding: 25px;
    border: none;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
}

/* 開店準備中のエリアもカードデザインに統一 */
.opening-full-width {
    width: 100%;
    text-align: center;
    padding: 35px 20px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.opening-title {
    font-weight: bold;
    color: var(--text-sub);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.opening-date {
    color: var(--brand-red);
    font-weight: bold;
    font-size: 1.3rem;
    display: inline-block;
}

.walk-in-only {
    text-align: center;
    color: var(--text-sub);
    font-size: 1rem;
    background: #fcfcfc;
    border: 1px dashed #ccc;
    padding: 16px;
    border-radius: 8px;
    width: 100%;
    font-weight: bold;
}

@media (max-width: 768px) {

    .shop-actions {
        padding: 15px;
        gap: 15px;
    }

    .action-section {
        padding: 20px;
    }

}

/* Buttons */
.btn-reserve {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 16px;
    text-align: center;
    text-decoration: none;
    font-weight: 800;
    border-radius: 8px;
    margin-top: 12px;
    transition: opacity 0.2s, transform 0.1s, background-color 0.2s;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1.4;
}

.btn-reserve:hover {
    opacity: 0.95;
    transform: translateY(-2px);
}

/* --- 追加: Web予約ボタンコンテナ --- */
.reserve-btn-container {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 12px;
}

/* PC: 横並びで均等幅 */
@media (min-width: 769px) {
    .reserve-btn-container .btn-reserve {
        flex: 1;
        margin-top: 0;
    }
}

/* SP: 縦並び */
@media (max-width: 768px) {
    .reserve-btn-container {
        flex-direction: column;
        gap: 10px;
    }

    .reserve-btn-container .btn-reserve {
        margin-top: 0;
        width: 100%;
    }
}

/* --- HotPepper Button --- */
.btn-hotpepper {
    background-color: var(--brand-red);
    color: #fff;
    border: 2px solid var(--brand-red);
}

.btn-hotpepper:hover {
    background-color: #c41e19;
    border-color: #c41e19;
    opacity: 1;
}

/* ---Gurunavi Button --- */
.btn-gnavi {
    background-color: #fff;
    color: var(--brand-red);
    border: 2px solid var(--brand-red);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-gnavi:hover {
    background-color: #fff5f5;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* --- Phone Buttons --- */
.btn-phone,
.btn-phone-cond {
    background-color: #fff;
    color: var(--brand-red);
    border: 1px solid var(--brand-red);
}

.btn-phone:hover,
.btn-phone-cond:hover {
    background-color: #fff5f5;
}

.reserve-note-box {
    background: #fafafa;
    color: var(--text-main);
    padding: 15px;
    border-radius: 4px;
    font-size: 0.95rem;
    margin-bottom: 12px;
    line-height: 1.6;
}

.reserve-note-box strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--brand-red);
    font-weight: bold;
}

/* Details Accordion */
.shop-details-toggle {
    width: 100%;
    background: #fff;
    border: none;
    padding: 18px;
    text-align: center;
    color: var(--text-sub);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
    position: relative;
}

.shop-details-toggle:hover {
    background: #fafafa;
}

.shop-details-toggle::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border-right: 3px solid var(--text-sub);
    border-bottom: 3px solid var(--text-sub);
    transform: rotate(45deg);
    transition: transform 0.3s ease;
    margin-top: -6px;
}

.shop-details-toggle.open::after {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.shop-details-content {
    display: none;
    padding: 25px;
    background: #fff;
    border-top: 1px solid var(--border-color);
}

.shop-details-content.open {
    display: block;
}

.details-flex-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.shop-detail-image-container {
    text-align: center;
    width: 100%;
    margin-bottom: 20px;
}

.shop-detail-image-container img {
    max-width: 100%;
    height: auto;
}

@media (min-width: 769px) {
    .details-flex-container {
        flex-direction: row;
        align-items: flex-start;
    }

    .details-table-wrapper {
        flex: 1;
    }

    .details-image-wrapper {
        width: 450px;
        flex-shrink: 0;
    }
}

.detail-row {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px dotted #ccc;
    padding-bottom: 10px;
    font-size: 1rem;
    line-height: 1.6;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    width: 110px;
    font-weight: bold;
    flex-shrink: 0;
    color: var(--text-main);
}

.detail-data {
    flex: 1;
    color: var(--text-main);
}

.tabelog-link {
    display: inline-block;
    color: #FF6C00;
    text-decoration: underline;
    font-weight: bold;
    margin-top: 4px;
}

.map-link-text {
    display: inline-block;
    color: var(--text-sub);
    text-decoration: underline;
    font-size: 0.95rem;
    margin-top: 6px;
    cursor: pointer;
}

.map-link-text:hover {
    color: var(--text-main);
}

/* ★★★ 画像最適化（アスペクト比固定＆ガタつき防止） ★★★ */
.shop-img {
    width: 100%;
    height: auto;
    aspect-ratio: 768 / 512;
    object-fit: cover;
    object-position: center;
    background-color: #f0f0f0;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.shop-img.img-vertical {
    aspect-ratio: 768 / 1020;
}

/* Responsive */
@media (max-width: 768px) {
    .shops-container {
        padding-top: calc(80px + env(safe-area-inset-top)) !important;
        padding-bottom: 30px;
    }

    .shops-header h1 {
        font-size: 1.8rem;
    }

    .shops-header p {
        font-size: 0.9rem;
    }

    .area-filter {
        gap: 6px;
        flex-wrap: nowrap !important;
        justify-content: center;
    }

    .filter-tab {
        padding: 6px 16px;
        height: 35px;
        font-size: 0.95rem;
        white-space: nowrap;
        flex-shrink: 1;
    }

    .city-tag {
        font-size: 0.9rem;
        padding: 6px 14px;
    }

    .shop-header {
        padding: 18px;
    }

    .shop-name {
        font-size: 1.5rem;
    }

    .shop-station {
        font-size: 0.95rem;
    }

    .action-section {
        padding: 20px;
    }

    .section-title {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .btn-reserve {
        padding: 12px;
        font-size: 0.95rem;
    }

    .reserve-note-box {
        font-size: 0.85rem;
        padding: 12px;
    }

    .shop-details-toggle {
        font-size: 1.0rem;
        padding: 14px;
    }

    .shop-details-content {
        padding: 20px;
    }

    .detail-row {
        font-size: 0.9rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 375px) {
    .shops-container {
        padding: 20px 10px;
    }

    .shop-header,
    .action-section,
    .shop-details-content,
    .shop-details-toggle {
        padding: 12px;
    }

    .shop-name {
        font-size: 1.3rem;
    }

    .shop-area-badge {
        font-size: 0.7rem;
        padding: 2px 6px;
    }

    .section-title {
        font-size: 0.9rem;
        gap: 5px;
    }

    .btn-reserve {
        font-size: 0.85rem;
        padding: 10px;
    }
}


/* =========================================
   EPARKウィジェット
   ========================================= */

@media screen and (max-width: 768px) {

    /* 1. 親枠：ボタンを下の段に落とすための「折り返し」だけ許可 */
    [data-epark-widget] {
        display: flex !important;
        flex-wrap: wrap !important;
    }

    /* 2. ボタンが入っている箱：強制的に「改行」させる */
    [data-epark-shop-button] {
        flex: 1 0 70% !important;
        width: 100% !important;
        text-align: center !important;
        margin-top: 10px !important;
        display: block !important;
    }

    /* ボタン本体の設定を少しだけ「プロ仕様」に変更 */
    [data-epark-shop-button] a {
        display: inline-block !important;
        width: 170px !important;
        max-width: 100% !important;
        min-height: 45px !important;
        padding: 10px 0 !important;
        line-height: 1.4 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }
}