/**
 * 結帳流程 UX（2026-08-21）— 購物車排版 + 商品頁 CTA/角標降噪，桌機手機共用
 * 由 form_fix.php 全站載入；不改 Journal3 原檔（主題更新會覆蓋）。
 */

/* 1) 購物車：商品明細優先。cart_addon 加購區由 OCMOD 注入在 form 頂部
      （改注入點要 rebuild，禁），用 flex order 把明細表拉到最上面。 */
.cart-page .cart-table {
    display: flex;
    flex-direction: column;
}
.cart-page .cart-table .table-responsive {
    order: -1;
}

/* 2) 購物車按鈕：手機直排時「結帳」用 flex order 排到最上、兩顆都全寬好按。
      （runtime twig 是 storage/modification 版=cart_addon OCMOD 產物、不在 git，
      所以不靠 DOM 順序，靠 order；桌機浮動排版不受影響。） */
@media (max-width: 767px) {
    .cart-page .buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .cart-page .buttons .pull-left,
    .cart-page .buttons .pull-right {
        float: none !important;
        width: 100%;
    }
    .cart-page .buttons .pull-right {
        order: -1; /* 結帳鈕在上 */
    }
    .cart-page .buttons .btn {
        width: 100%;
        padding-top: 12px;
        padding-bottom: 12px;
    }
}

/* 3) 購物車折疊區：只留「使用折價券」。預估運費（799免運+固定運費下是噪音）、
      禮券（幾乎沒人用）與「下一步您想要做什麼？」冗長標題全部收起。
      :has() 舊瀏覽器不支援時優雅退化為照舊顯示。 */
.cart-page .cart-panels > .title,
.cart-page .cart-panels > p {
    display: none !important;
}
.cart-panels .panel:has(#collapse-shipping),
.cart-panels .panel:has(#collapse-voucher) {
    display: none;
}

/* 4) 商品頁促銷角標降噪：4 個紅底標籤互相稀釋，只留第一個（今日95折）紅底，
      其餘轉為淡色小字一行帶過。模組 id 337 = 商品頁優惠 info-blocks。 */
.module-info_blocks-337 .module-item:not(.module-item-1) .info-block,
.module-info_blocks-337 .module-item:not(.module-item-1) .info-block-title {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #b8434e !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1.7 !important;
}

/* 5) 「加LINE下單」降為次要樣式：綠底改綠字透明底，保留可點但不與主 CTA 搶眼 */
.product-info a.btn-extra[href*="lin.ee"],
.product-info a.btn-extra[href*="line.me"] {
    background: transparent !important;
    border-color: transparent !important;
    color: #06c755 !important;
    box-shadow: none !important;
    text-decoration: underline;
}
