/* === Wizard 各 step 共用樣式補丁 === */

/* 隱藏 _DonateLayout 帶進來的「回到網頁頂端」按鈕 */
#circleGoTopBtn,
#goTopBtn {
    display: none !important;
}

/* 原版的 .webContent.first 底部虛線是要接到 .webContent.last 的。
   只有當 .first 是父層最後一個元素（後面沒接 .last）時，才把它當獨立卡片處理。 */
.webContent.first:last-child {
    border-bottom: none !important;
    border-radius: 16px !important;
    padding-bottom: 32px;
    margin-bottom: 32px;
}
/* 原版 .donateBtnGroup a.donateBtn 只 select <a>。
   Wizard 改用 <button type="submit"> 走 form post，這裡讓 button 一起套到。 */
.donateBtnGroup button.donateBtn {
    border-radius: 6px;
    box-shadow: 3px 5px 10px rgba(0, 0, 0, 0.13);
    color: #fff;
    display: block;
    font-size: 15px;
    font-weight: 500;
    height: 52px;
    line-height: 48px;
    margin-top: 0;
    max-width: 232px;
    opacity: 1;
    text-align: center;
    text-decoration: none;
    transition: all 0.4s ease-in-out 0s;
    width: 100%;
    border: none;
    cursor: pointer;
}

.donateBtnGroup button.donateBtn:hover { opacity: 0.7; }

.donateBtnGroup button.green {
    background: linear-gradient(0deg, #6da72c 0%, #86bb3f 100%);
}

.donateBtnGroup button.blue {
    background: linear-gradient(-180deg, #0c6374 0%, #0c515f 100%);
}

.donateBtnGroup button.black {
    background: linear-gradient(-180deg, #646a68 0%, #2b312f 100%);
}

/* 補上原版 style.css 只給 a.donateBtn 的 RWD 規則，讓 button.donateBtn 也跟著縮放置中 */
@media (max-width: 1199px) {
    .chooseCash .donateBtnGroup button.donateBtn {
        font-size: 14px;
        height: 48px;
        line-height: 44px;
    }
}
@media (max-width: 991px) {
    .chooseCash .donateBtnGroup button.donateBtn {
        font-size: 14px;
        height: 46px;
        line-height: 40px;
    }
    .donateArea .donateBtnGroup button.donateBtn {
        margin: 0 auto;
        max-width: 160px;
    }
    .donateBtnGroup button.donateBtn {
        height: 46px;
        line-height: 40px;
    }
}
@media (max-width: 767px) {
    .chooseCash .donateBtnGroup {
        display: block;
    }
    .chooseCash .donateBtnGroup li {
        margin-right: 0;
        margin-bottom: 10px;
        width: 100%;
    }
    .chooseCash .donateBtnGroup button.donateBtn,
    .chooseCash .donateBtnGroup a.donateBtn {
        margin: 0 auto;
        max-width: none;
        width: 100%;
        font-size: 15px;
        height: 48px;
        line-height: 44px;
    }
}

/* 確認頁的 .donateActionBtn 也沿用 button */
.donateActionBar button.donateActionBtn {
    border: none;
    cursor: pointer;
    font: inherit;
}

/* === 以下從舊 Pages/Index.cshtml inline <style> 搬出，給 Confirm / Logistics 頁使用 === */

/* === 付款資訊區 === */
.paymentInfoBox {
    border: 2px dashed #07913b;
    border-radius: 12px;
    padding: 24px 28px;
    background: #fafafa;
    max-width: 720px;
    margin: 0 auto 24px;
}
.paymentInfoTitle {
    font-size: 20px;
    font-weight: 600;
    color: #07913b;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}
.paymentGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 20px;
}
.paymentField { display: flex; flex-direction: column; }
.paymentField.fullRow { grid-column: 1 / -1; }
.paymentField label {
    font-size: 15px;
    font-weight: 600;
    color: #353b39;
    margin-bottom: 8px;
}
.paymentField label .mustUI {
    color: #ed4327;
    font-weight: 600;
    margin-left: 4px;
}
.paymentInput {
    height: 48px;
    border: 1px solid #cbcbcb;
    border-radius: 6px;
    background: #ffffff;
    padding: 0 12px;
    font-size: 15px;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}
.paymentInput:focus { border-color: #07913b; }

@media (max-width: 600px) {
    .paymentGrid { grid-template-columns: 1fr; }
    .paymentField.fullRow { grid-column: auto; }
    .paymentInfoBox { padding: 18px 16px; }
}

/* === 捐款內容確認區 === */
.donateSummaryBox {
    border: 1px solid #d0d0d0;
    border-radius: 12px;
    overflow: hidden;
    max-width: 720px;
    margin: 24px auto 16px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.donateSummaryHeader {
    background: linear-gradient(90deg, #07913b 0%, #4cce83 100%);
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    padding: 14px 24px;
    letter-spacing: 0.5px;
}
.donateSummaryBody { padding: 20px 24px; }
.summaryGrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 32px;
}
.summaryItem {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px dashed #eaeaea;
    padding-bottom: 8px;
    gap: 16px;
}
.summaryLabel {
    color: #707070;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}
.summaryValue {
    color: #353b39;
    font-size: 15px;
    font-weight: 500;
    text-align: right;
    word-break: break-all;
}
.summaryValue.strong {
    color: #07913b;
    font-weight: 700;
    font-size: 17px;
}

/* 總金額合計 bar */
.donateTotalBar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 720px;
    margin: 16px auto;
    padding: 14px 24px;
    background: #f5fbf6;
    border: 1px solid #c9e7d2;
    border-radius: 10px;
}
.donateTotalBar .totalLabel { font-size: 16px; font-weight: 600; color: #353b39; }
.donateTotalBar .totalValue { font-size: 24px; font-weight: 700; color: #07913b; }

/* 動作按鈕 */
.donateActionBar {
    display: flex;
    justify-content: center;
    gap: 16px;
    max-width: 720px;
    margin: 24px auto 32px;
}
.donateActionBtn {
    min-width: 160px;
    height: 52px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-align: center;
    line-height: 52px;
    text-decoration: none;
    transition: all 0.2s;
}
.donateActionBtn.ghost {
    background: #ffffff;
    color: #07913b;
    border: 2px solid #07913b;
}
.donateActionBtn.ghost:hover { background: #f5fbf6; }
.donateActionBtn.primary {
    background: linear-gradient(90deg, #07913b 0%, #4cce83 100%);
    color: #ffffff;
}
.donateActionBtn.primary:hover { opacity: 0.9; }

@media (max-width: 600px) {
    .summaryGrid { grid-template-columns: 1fr; gap: 10px; }
    .donateActionBar { flex-direction: column; }
    .donateActionBtn { width: 100%; }
}

/* === 配送方式區塊（Logistics 頁用） === */
.deliveryRow {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
}
.deliveryRow select {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 12px;
    line-height: normal;
    box-sizing: border-box;
}
.form-select {
    height: 44px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: normal !important;
}
.storePickBlock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    width: 116px;
    background-color: #fff;
    border: 2px solid #cbcbcb;
    border-radius: 6px;
    cursor: pointer;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #353b39;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-shrink: 0;
    position: relative;
    top: 1px;
}
.form li { overflow: hidden; }
.form-control.last { width: 100%; box-sizing: border-box; }

/* 手機板：具名表單欄位改成單欄。原版 style.css 只處理了 .noNameDonateForm，這裡補上 .nameDonateForm */
@media screen and (max-width: 767px) {
    .nameDonateForm ul.form {
        display: block;
    }
    .nameDonateForm ul.form li {
        width: 100%;
        margin-right: 0;
    }
}

/* === Confirm 頁付款前注意事項區 === */
.confirmNoticeBox {
    background: #fff8e8;
    border: 1px solid #f1d9a0;
    border-radius: 10px;
    margin: 18px auto;
    max-width: 720px;
    padding: 18px 22px;
    color: #5b4a1f;
    font-size: 14px;
    line-height: 1.75;
}
.confirmNoticeBox h4 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #b67500;
    font-weight: 700;
}
.confirmNoticeBox h5 {
    margin: 14px 0 6px;
    font-size: 14px;
    color: #b67500;
    font-weight: 700;
}
.confirmNoticeBox p { margin: 4px 0; }
.confirmNoticeBox ol,
.confirmNoticeBox ul {
    margin: 4px 0 4px 4px;
    padding-left: 18px;
}
.confirmNoticeBox li { margin: 2px 0; }
.confirmNoticeBox .highlight { color: #c0392b; font-weight: 600; }

.confirmAgreeBox {
    max-width: 720px;
    margin: 14px auto 4px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: #444;
    line-height: 1.6;
}
.confirmAgreeBox input[type="checkbox"] {
    margin-top: 4px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
}
.confirmAgreeBox label { cursor: pointer; }
.confirmAgreeBox a { color: #07913b; text-decoration: underline; }
.confirmAgreeBox a:hover { color: #056e2c; }

/* === Goods 頁小物選擇卡片 === */
.goodsGrid {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1080px;
}
.goodsCard {
    background: #ffffff;
    border: 1px solid #e3eee7;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.goodsCard:hover {
    box-shadow: 0 6px 20px rgba(7, 145, 59, 0.12);
    transform: translateY(-2px);
}
.goodsCard.selected {
    border-color: #07913b;
    box-shadow: 0 4px 16px rgba(7, 145, 59, 0.18);
}
.goodsCardImageBox {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 */
    background: #f5f5f5;
    overflow: hidden;
}
.goodsCardImage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.goodsCardStockBadge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
}
.goodsCardBody {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.goodsCardName {
    font-size: 17px;
    font-weight: 700;
    color: #2a2a2a;
    margin: 0;
    word-break: break-word;
}
.goodsCardPrice {
    font-size: 20px;
    font-weight: 700;
    color: #07913b;
}
.goodsCardPrice .currency { font-size: 14px; margin-right: 2px; }
.goodsCardPrice .unit { font-size: 13px; color: #777; font-weight: 400; margin-left: 4px; }
.goodsCardDesc {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    flex: 1;
    word-break: break-word;
}
.goodsCardQty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed #e3eee7;
}
.goodsCardQty label {
    font-size: 13px;
    color: #555;
    margin: 0;
}
/* 蓋掉 style.css 的 .chooseGoods .quantity 絕對定位 */
.chooseGoods .goodsCardQty select.quantity {
    position: static;
    bottom: auto;
    box-shadow: none;
    max-width: none;
    flex: 1;
    height: 40px;
    border: 1px solid #d6e2da;
    border-radius: 8px;
    padding: 0 10px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    margin: 0;
}
.goodsCardQty select:focus {
    outline: none;
    border-color: #07913b;
}
@media (max-width: 900px) {
    .goodsGrid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 560px) {
    .goodsGrid { grid-template-columns: 1fr; }
    .goodsCardName { font-size: 16px; }
    .goodsCardPrice { font-size: 18px; }
}

/* === Confirm 頁小物清單卡片 === */
.confirmGoodsBox {
    background: #ffffff;
    border: 1px solid #e3eee7;
    border-radius: 12px;
    margin: 16px auto;
    max-width: 720px;
    overflow: hidden;
}
.confirmGoodsHeader {
    background: #07913b;
    color: #ffffff;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 16px;
}
.confirmGoodsList {
    list-style: none;
    margin: 0;
    padding: 8px 16px;
}
.confirmGoodsItem {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 4px;
    border-bottom: 1px dashed #e3eee7;
}
.confirmGoodsItem:last-child { border-bottom: none; }
.confirmGoodsThumb {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 8px;
    object-fit: cover;
    background: #f5f5f5;
    border: 1px solid #eee;
}
.confirmGoodsInfo {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.confirmGoodsName {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    word-break: break-word;
}
.confirmGoodsMeta {
    font-size: 13px;
    color: #777;
}
.confirmGoodsSubtotal {
    flex-shrink: 0;
    font-size: 16px;
    font-weight: 700;
    color: #07913b;
    min-width: 90px;
    text-align: right;
}
@media (max-width: 600px) {
    .confirmGoodsItem { gap: 12px; }
    .confirmGoodsThumb { width: 60px; height: 60px; }
    .confirmGoodsSubtotal { min-width: 70px; font-size: 15px; }
}

/* 地圖 / 影片 iframe 撐滿外框（Google embed 預設 width="600" 會被卡住）。
   原版 .mapFrame iframe.map 要求 .map class，但使用者貼的嵌入碼通常沒有，這裡放寬。 */
.mapFrame iframe,
.video iframe {
    width: 100%;
    height: 100%;
    border: none;
}
