/**
 * 全站版型稽核修正（2026-08-21 oc-page-audit 全頁掃描）
 * 由 form_fix.php 全站載入；不動 Journal3 原檔。
 */

/* 1) 桌機全站可橫向捲動 6px：swiper 輪播的畫面外 slide 撐開 html 捲動寬度
      （body 已 overflow-x:hidden 但 html 沒有 → window.scrollX 可到 6） */
html {
    overflow-x: hidden;
}

/* 2) 刪除線舊價對比不足（#bbb = 1.92:1，WCAG AA 小字需 4.5:1）
      del = 商品卡/商品頁原價；.ymbs-orig = 加購套組原價 */
del,
.price-old {
    color: #767676 !important;
}
.ymbs-orig {
    color: #6f6f6f !important;
}

/* 3) 「加入購物車」外框鈕文字淺粉 #FE929F（2.14:1）看不清 → 深珊瑚紅（≈4.7:1），
      不動底色與 hover（J3 hover 反白仍生效） */
.btn-cart,
.btn-cart .btn-text {
    color: #c9404a !important;
}

/* 4) 桌機商品頁：左欄活動 banner 讓位（視覺雜且把人帶離商品頁；
      活動入口已有主選單「限時促銷」與優惠活動/special-offers），內容全寬 */
@media (min-width: 768px) {
    #product-product #column-left {
        display: none !important;
    }
    #product-product #content {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
    }
}

/* 5) 商品頁折扣活動訊息卡：商品同時掛多個活動時（防颱+絕版好物），
      一行一活動、活動名在左、折扣條件靠右，資訊不打架 */
.clearance-activity-notice .clearance-activity-link {
    display: flex !important;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    text-decoration: none;
}
.clearance-activity-notice .activity-title {
    font-weight: 600;
}
.clearance-activity-notice .activity-hint {
    margin-left: auto;
    color: #555 !important;
    font-size: 13px !important;
    white-space: nowrap;
}

/* 6) 規格選項的每檔實際售價（product_option_price.js 換算）用品牌紅粗體 */
.product-options .option-price {
    color: #c9404a;
    font-weight: 600;
}

/* 7) 商品頁資訊區重排（2026-08-21 用戶回饋「排版很亂」）
      原順序：標題→促銷4條→庫存→貨號→評價→價格→規格→按鈕，價格被推到第五層。
      重排為購買決策順序：標題→價格(含活動tag)→規格→庫存貨號→促銷訊息→按鈕。
      .product-details 原生就是 flex column，用 order 重排不動模板。 */
/* J3 skin 自帶 order（title=-100/blocks=0/stats=1/options=1/price=2/buttons=3），
   用 !important 蓋過並插入其尺度 */
.product-info .product-details > .title.page-title { order: -100 !important; }
.product-info .product-details > .product-price-group { order: -50 !important; }
.product-info .product-details > .product-options { order: -40 !important; }
.product-info .product-details > .product-stats { order: -30 !important; }
.product-info .product-details > .product-blocks { order: -20 !important; }
.product-info .product-details > .button-group-page { order: 3 !important; }

/* 標題左對齊、字級收斂（原置中大字三行像海報，資訊頁應左對齊好掃讀） */
.product-info .product-details > .title.page-title {
    text-align: left !important;
    font-size: 21px !important;
    line-height: 1.45 !important;
}
@media (min-width: 768px) {
    .product-info .product-details > .title.page-title {
        font-size: 24px !important;
    }
}

/* 零評價列＝噪音（站上未經營評價），整列隱藏 */
.product-info .product-details > .rating-page {
    display: none !important;
}

/* 庫存/貨號併成一行小字（li 內層元素也要 inline，否則標籤與數值斷行） */
.product-info .product-stats {
    font-size: 13px !important;
    color: #555;
    margin: 6px 0 !important;
}
.product-info .product-stats ul {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
}
.product-info .product-stats li {
    display: inline-block !important;
    white-space: nowrap;
    margin: 0 16px 0 0 !important;
    padding: 0 !important;
}
.product-info .product-stats li * {
    display: inline !important;
}

/* 促銷訊息收斂：整組左對齊、每條獨立一行、小字前綴圓點對齊 */
.product-info .product-blocks .module-info_blocks,
.product-info .product-blocks .module-body {
    display: block !important;
    text-align: left !important;
}
.product-info .product-blocks .module-item {
    display: block !important;
    margin: 3px 0 !important;
    text-align: left !important;
}
.module-info_blocks-337 .module-item.module-item-1 .info-block-title {
    display: inline-block;
}
.module-info_blocks-337 .module-item:not(.module-item-1) .info-block-title::before {
    content: '· ';
    color: #b8434e;
}

/* 8) 登入頁手機版：兩欄被強制並排（新會員欄 130px 一字一行）→
      堆疊為單欄，登入表單在前、新會員介紹在後 */
@media (max-width: 767px) {
    .login-box {
        display: flex !important;
        flex-direction: column !important;
    }
    .login-box > .col-sm-6 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
    }
    .login-box > .col-sm-6:last-child {
        order: -1; /* 會員登入（含快速登入）優先 */
    }
}
