/* ==========================================================================
   合作銀行專區 /partner-banks
   ========================================================================== */

.container {
    max-width: 920px;
}
/* ---------- Hero ---------- */
#partner-hero {
    position: relative;
    background-image: url("../images/partner_banks.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    padding: 110px 0 0 0;
}

#partner-hero .hero-inner {
    text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}

#partner-hero .hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #ffffff;
    padding: 3em 0;
}

#partner-hero .hero-title {
    font-size: 2em;
    font-weight: 700;
    letter-spacing: .05em;
    margin: 0 0 1em 0;
    color: #ffffff;
}

#partner-hero .hero-desc {
    max-width: 900px;
    margin: 0 auto 1.5em auto;
    font-size: 1em;
    line-height: 2;
    color: #ffffff;
    letter-spacing: 1px;
}

#partner-hero .hero-desc:last-child {
    margin-bottom: 0;
}

/* ---------- 區塊標題（左右橫線） ---------- */
.partner-section {
    padding: 3.5em 0;
}

.partner-section .section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1em;
    font-size: 1.5em;
    font-weight: 700;
    margin: 0 0 2em 0;
    color: var(--main-color);
    letter-spacing: 2px;
}

.partner-section .section-title::before,
.partner-section .section-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 1px;
    background-color: var(--main-color);
}

/* ---------- 合作銀行卡片 ---------- */
.bank-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2em;
    padding: 0 1rem;
}

.bank-card {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    background-color: #ffffff;
    border: none;
    border-radius: 2em;
    box-shadow: 0px 2px 8px 0px #00000029;
    padding: .3em;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.bank-card:hover,
.bank-card:focus-visible {
    transform: scale(1.03);
    outline: none;
}

/* 銀行數量為單數時補的佔位按鈕，不可點擊 */
.bank-card.is-upcoming {
    background-color: var(--light-grey);
    box-shadow: none;
    color: var(--dark-grey);
    font-size: 1.2em;
    font-weight: 700;
    letter-spacing: .1em;
    cursor: default;
    pointer-events: none;
}

.bank-card.is-upcoming:hover {
    transform: none;
}

/* logo 長寬比不一，固定顯示框並以 contain 置中，避免撐高按鈕 */
.bank-card img {
    width: 60%;
    height: 70px;
    object-fit: contain;
    object-position: center;
}

.partner-note {
    color: #6A6A6A;
    font-size: .9rem;
    text-align: center;
    margin-top: 4em;
    padding: 0 1em;
}

/* ---------- 其他加購服務 ---------- */
.addon-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5em;
    padding: 0 1rem;
}

.addon-card {
    position: relative;
    display: flex;
    text-decoration: none;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    border-radius: 1.5em;
    overflow: hidden;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.addon-card:hover {
    transform: scale(1.03);
}

.addon-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.addon-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, .7);
    filter: contrast(0.6);
}

.addon-card .addon-name {
    position: relative;
    z-index: 1;
    padding: 0 .5em;
    color: #ffffff;
    font-size: 1.25em;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}

/* ---------- 銀行資訊彈窗 ---------- */
#bankModal {
    z-index: 99999;
}

#bankModal .modal-dialog {
    max-width: 660px;
}

#bankModal .modal-content {
    border: none;
    border-radius: 1em;
    padding: 1.5em;
}

#bankModal .modal-header {
    position: relative;
    display: block;
    border-bottom: none;
    padding: .5em 0 0;
    text-align: center;
}

#bankModal .modal-header .bank-logo {
    max-width: 200px;
    max-height: 60px;
    object-fit: contain;
}

#bankModal .btn-close {
    /* 沿用 Bootstrap 的關閉圖示，只把叉叉換成白色（灰底圓形另外設定） */
    --bs-btn-close-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
    position: absolute;
    top: -.5em;
    right: -.5em;
    width: 1.5em;
    height: 1.5em;
    padding: 0;
    border-radius: 50%;
    background-color: var(--mid-grey);
    background-size: .75em;
    opacity: 1;
}

#bankModal .modal-body {
    padding: 0 .7em;
    margin: 1.3em 0;
    /* 自訂捲軸樣式，讓捲軸持續顯示，而非 macOS 預設只在捲動時淡入的浮動捲軸。
       注意：不可加 scrollbar-width / scrollbar-color，Chrome 一旦看到這兩個標準屬性
       就會忽略下方的 ::-webkit-scrollbar 設定，退回會自動隱藏的浮動捲軸 */
    overflow-y: auto;
}

#bankModal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#bankModal .modal-body::-webkit-scrollbar-track {
    background-color: #F9F9F9;
    border-radius: 4px;
}

#bankModal .modal-body::-webkit-scrollbar-thumb {
    background-color: var(--mid-grey);
    border-radius: 4px;
}

/* ---------- 銀行權益表格 ---------- */
.bank-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: .85rem;
}

.bank-table th,
.bank-table td {
    /* 分隔線用白色，讓灰底儲存格之間留出白線 */
    border: 2px solid #ffffff;
    padding: .7em .5em;
    text-align: center;
    vertical-align: middle;
    word-break: break-word;
}

.bank-table thead th {
    position: sticky;
    top: -1px;
    z-index: 1;
    background-color: var(--main-color);
    color: #ffffff;
    font-weight: 700;
}

.bank-table tbody td {
    background-color: #F9F9F9;
    color: #515151;
}

#bankModal .modal-footer {
    justify-content: center;
    border-top: none;
    padding: 0;
    text-align: center;
}

#bankModal .modal-footer .reserve-note {
    width: 100%;
    margin: 0;
    color: var(--dark-grey);
    font-size: .9rem;
}

#bankModal .btn-reserve {
    min-width: 160px;
    padding: .5em 2em;
    border: none;
    border-radius: .9em;
    background-color: var(--accent);
    color: #ffffff;
    font-size: 1.05em;
    font-weight: 700;
}


/* ---------- RWD ---------- */
@media screen and (max-width: 1060px) {
    #partner-hero {
        padding-top: 80px;
    }
}

@media screen and (max-width: 915px) {
    #partner-hero {
        padding-top: 50px;
    }

}

@media screen and (max-width: 767px) {
    #partner-hero .hero-inner {
        min-height: 260px;
    }

    #partner-hero .hero-title {
        font-size: 1.5em;
    }

    #partner-hero .hero-desc {
        font-size: .85em;
        line-height: 1.6;
    }

    .partner-section {
        padding: 2.5em 0;
    }

    .partner-section .section-title {
        font-size: 1.25em;
        margin: 0 0 1.4em 0;
    }

    .partner-section .section-title::before,
    .partner-section .section-title::after {
        width: 36px;
    }

    .bank-grid {
        gap: 1em;
        padding: 0;
    }

    .bank-card {
        height: 54px;
        padding: .1em;
        border-radius: 1.2em;
    }

    .bank-card.is-upcoming {
        font-size: .85em;
    }

    .bank-table {
        font-size: .78rem;
    }

    .bank-table th,
    .bank-table td {
        padding: .5em .3em;
    }

    .bank-card img {
        width: 80%;
        height: 56px;
        max-height: 85%;
    }

    .partner-note {
        font-size: .8rem;
    }

    .addon-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .addon-card .addon-name {
        font-size: .9em;
    }

    #bankModal .modal-content {
        padding: 1em .5em;
    }

    #bankModal .btn-close {
        top: 5px;
        right: 10px;
    }
    #bankModal .modal-header .bank-logo {
        max-width: 180px;
    }

}