/* ==========================================================================
   茂森前台版面優化（2026-10）
   只覆寫 style.css，不修改原檔；移除此檔即可還原
   ========================================================================== */

:root{
    --ms-green: #005C23;
    --ms-forest: #0f3a22;
    --ms-paper: #fbfaf6;
    --ms-ink: #232323;
    --ms-muted: #6b6b6b;
    --ms-line: #dfe5df;
    --ms-c: #00a0e9;
    --ms-m: #e4007f;
    --ms-y: #ffe100;
    --ms-k: #232323;
    --ms-ease: cubic-bezier(.22, .61, .36, 1);
}

/* --------------------------------------------------------------------------
   共用：印刷色票條（CMYK color bar）
   -------------------------------------------------------------------------- */
.cmyk-bar{
    height: 8px;
    background-image: repeating-linear-gradient(90deg,
        var(--ms-c) 0 18px,
        var(--ms-m) 18px 36px,
        var(--ms-y) 36px 54px,
        var(--ms-k) 54px 72px,
        transparent 72px 78px);
}

/* --------------------------------------------------------------------------
   共用：按鈕
   -------------------------------------------------------------------------- */
.more a:hover,
.more a:focus{
    background: var(--ms-forest);
}
.more a:focus-visible{
    outline: 3px solid var(--ms-y);
    outline-offset: 3px;
}

/* ==========================================================================
   步驟 1：首頁
   ========================================================================== */

/* 主視覺：目前這張圖慢速放大，標語依序浮現 */
.hero{
    position: relative;
}
/* 進場中的下一張（next / prev）就開始放大，切換完成變成 active 時動畫不會重來，不會跳動 */
.hero .carousel-item-img .img-wrap img{
    animation: none;
}
.hero .carousel-item.active .carousel-item-img .img-wrap img,
.hero .carousel-item-next .carousel-item-img .img-wrap img,
.hero .carousel-item-prev .carousel-item-img .img-wrap img{
    animation: msHeroZoom 6s var(--ms-ease) both;
}
.hero .carousel-item-img .img-wrap{
    overflow: hidden;
}
.hero .carousel-caption > *{
    opacity: 0;
}
.hero .carousel-item.active .carousel-caption > *{
    animation: msRise .9s var(--ms-ease) both;
}
.hero .carousel-item.active .carousel-caption > :nth-child(1){ animation-delay: .25s; }
.hero .carousel-item.active .carousel-caption > :nth-child(2){ animation-delay: .45s; }
.hero .carousel-item.active .carousel-caption > :nth-child(3){ animation-delay: .65s; }

@keyframes msHeroZoom{
    from{ transform: scale(1.08); }
    to{ transform: scale(1); }
}
@keyframes msRise{
    from{ opacity: 0; transform: translateY(18px); }
    to{ opacity: 1; transform: translateY(0); }
}

/* 關於茂森：圖片區高度原本是 80vh，在 1920 以上的高解析螢幕會被拉得太高、圖片分散，
   限制在 1920×1080 時的高度 */
@media (min-width: 1201px){
    .index-about .about-img-wrap{
        min-height: min(80vh, 864px);
    }
}
@media (min-width: 992px) and (max-width: 1200px){
    .index-about .about-img-wrap{
        min-height: min(60vh, 640px);
    }
}

/* 關於茂森：視差圖片（位移由 refresh.js 控制） */
.index-about .about-img-wrap .item{
    transition: transform .5s var(--ms-ease);
    will-change: transform;
}
.index-about .about-img-wrap .item img{
    border-radius: 8px;
}
.index-about .about-content h5{
    font-size: 28px;
    letter-spacing: 3px;
    line-height: 1.4;
}
.index-about .about-content p{
    font-weight: 500;
    line-height: 1.9;
}
.index-about .about-content p strong{
    font-weight: 500;
    color: var(--ms-muted);
}

/* 包裝成品：hover 微放大 */
.index-package .item img{
    border-radius: 6px;
    transition: transform .6s var(--ms-ease), box-shadow .6s var(--ms-ease);
}
.index-package .item:hover img{
    transform: scale(1.02);
    box-shadow: 0 14px 30px rgba(15, 58, 34, .16);
}

/* 彩盒格子：浮起＋刀模虛線＋名稱底線 */
.index-products .color-box .color-box-item .white-back{
    position: relative;
    border-radius: 14px;
    transition: transform .4s var(--ms-ease), box-shadow .4s var(--ms-ease), background-color .4s;
}
.index-products .color-box .color-box-item .white-back::after{
    content: '';
    position: absolute;
    inset: 10px;
    border: 1.5px dashed var(--ms-green);
    border-radius: 8px;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity .4s var(--ms-ease), transform .4s var(--ms-ease);
    pointer-events: none;
}
.index-products .color-box .color-box-item img{
    transition: transform .5s var(--ms-ease);
}
.index-products .color-box .color-box-item h3{
    position: relative;
    display: inline-block;
}
.index-products .color-box .color-box-item h3::after{
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px;
    height: 2px;
    background: var(--ms-green);
    transform: scaleX(0);
    transition: transform .4s var(--ms-ease);
}
.index-products .color-box .color-box-item a:hover .white-back,
.index-products .color-box .color-box-item a:focus .white-back{
    background-color: #fff;
    transform: translateY(-6px);
    box-shadow: 0 16px 30px rgba(15, 58, 34, .12);
}
.index-products .color-box .color-box-item a:hover .white-back::after,
.index-products .color-box .color-box-item a:focus .white-back::after{
    opacity: 1;
    transform: scale(1);
}
.index-products .color-box .color-box-item a:hover img,
.index-products .color-box .color-box-item a:focus img{
    transform: translateY(-4px) rotate(-2deg);
}
.index-products .color-box .color-box-item a:hover h3::after,
.index-products .color-box .color-box-item a:focus h3::after{
    transform: scaleX(1);
}
.index-products .color-box .color-box-item a:focus-visible{
    outline: none;
}
.index-products .color-box .color-box-item a:focus-visible .white-back{
    outline: 3px solid var(--ms-green);
    outline-offset: 3px;
}


/* ==========================================================================
   步驟 2：導覽列＋漢堡選單
   ========================================================================== */
.site-nav{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    gap: 24px;
    height: 72px;
    /* 內容最寬 1920px 置中（body 也是 1920），超寬螢幕時選單與內容對齊 */
    padding: 0 calc(max(0px, (100% - 1920px) / 2) + min(5vw, 96px));
    background: rgba(251, 250, 246, .92);
    box-shadow: 0 1px 0 rgba(15, 58, 34, .08);
    transition: height .35s var(--ms-ease), box-shadow .35s var(--ms-ease), background-color .35s;
}
.site-nav.is-scrolled{
    height: 60px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 8px 24px rgba(15, 58, 34, .1);
}
.site-brand{
    flex: 0 0 auto;
}
.site-brand img{
    display: block;
    width: 280px;
    height: auto;
    transition: width .35s var(--ms-ease);
}
.site-nav.is-scrolled .site-brand img{
    width: 240px;
}

/* 全站 style.css 對所有 nav 加了陰影與背景，這裡清掉 */
.site-menu{
    margin-left: auto;
    background: none;
    box-shadow: none;
}
.site-menu ul{
    display: flex;
    margin: 0;
    padding: 0;
}
.site-menu-link{
    position: relative;
    display: block;
    padding: 8px 10px;
    color: var(--ms-ink);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
}
.site-menu-link::after{
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 2px;
    height: 2px;
    background: var(--ms-green);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform .35s var(--ms-ease);
}
.site-menu-link:hover,
.site-menu-link:focus,
.site-menu-link.is-active{
    color: var(--ms-green);
}
.site-menu-link:hover::after,
.site-menu-link:focus::after,
.site-menu-link.is-active::after{
    transform: scaleX(1);
    transform-origin: left center;
}
.site-menu-link:focus-visible,
.site-nav-cta:focus-visible,
.site-burger:focus-visible{
    outline: 3px solid var(--ms-green);
    outline-offset: 2px;
}

.site-nav-cta{
    flex: 0 0 auto;
    display: none;
    padding: 8px 18px;
    border-radius: 50px;
    background: var(--ms-green);
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
}
.site-nav-cta:hover{
    background: var(--ms-forest);
}

/* 漢堡按鈕：三條線 → X */
.site-burger{
    display: none;
    position: relative;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}
.site-burger span{
    position: absolute;
    left: 11px;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--ms-green);
    transition: transform .35s var(--ms-ease), opacity .2s, top .35s var(--ms-ease);
}
.site-burger span:nth-child(1){ top: 15px; }
.site-burger span:nth-child(2){ top: 21px; }
.site-burger span:nth-child(3){ top: 27px; }
.site-burger[aria-expanded="true"] span:nth-child(1){ top: 21px; transform: rotate(45deg); }
.site-burger[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.site-burger[aria-expanded="true"] span:nth-child(3){ top: 21px; transform: rotate(-45deg); }

/* 側邊選單 */
.site-drawer{
    position: fixed;
    inset: 0;
    z-index: 1020;
}
.site-drawer[hidden]{
    display: none;
}
.site-drawer-backdrop{
    position: absolute;
    inset: 0;
    background: rgba(15, 58, 34, .45);
    opacity: 0;
    transition: opacity .35s var(--ms-ease);
}
.site-drawer-panel{
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: min(420px, 88vw);
    padding: 96px 32px 0;
    overflow-y: auto;
    background: var(--ms-forest);
    transform: translateX(100%);
    transition: transform .45s var(--ms-ease);
}
.site-drawer.is-open .site-drawer-backdrop{
    opacity: 1;
}
.site-drawer.is-open .site-drawer-panel{
    transform: translateX(0);
}
.site-drawer-menu{
    margin: 0;
    padding: 0;
}
.site-drawer-menu li{
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    opacity: 0;
    transform: translateX(24px);
    transition: opacity .4s var(--ms-ease), transform .4s var(--ms-ease);
    transition-delay: 0s;
}
.site-drawer.is-open .site-drawer-menu li{
    opacity: 1;
    transform: none;
    transition-delay: calc(.12s + var(--i) * .04s);
}
.site-drawer-menu a{
    display: block;
    padding: 14px 4px;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 3px;
}
/* 黃色只給目前頁面與滑鼠 hover；觸控裝置不套 hover，避免點過的項目一直反黃 */
.site-drawer-menu a.is-active{
    color: var(--ms-y);
}
@media (hover: hover){
    .site-drawer-menu a:hover{
        color: var(--ms-y);
    }
}
.site-drawer-panel:focus{
    outline: none;
}
.site-drawer-contact{
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 32px 0;
}
.site-drawer-line,
.site-drawer-tel{
    display: block;
    padding: 12px;
    border-radius: 50px;
    text-align: center;
    font-weight: 600;
    letter-spacing: 2px;
}
.site-drawer-line{
    background: #06c755;
    color: #fff !important;
}
.site-drawer-tel{
    border: 1px solid rgba(255, 255, 255, .5);
    color: #fff !important;
}
.site-drawer-panel .cmyk-bar{
    margin: auto -32px 0;
}
body.is-drawer-open{
    overflow: hidden;
}
/* 選單打開時隱藏右側浮動按鈕，避免蓋住選單 */
body.is-drawer-open #link,
body.is-drawer-open #gotop{
    display: none;
}
.site-drawer-menu a:focus-visible,
.site-drawer-contact a:focus-visible{
    outline: 2px solid var(--ms-y);
    outline-offset: 2px;
}

/* 舊版導覽列樣式在 header 換掉後已不使用；保留 style.css 原樣 */
@media (min-width: 1300px){
    .site-nav-cta{
        display: inline-block;
    }
}
@media (max-width: 1199px){
    .site-brand img{
        width: 220px;
    }
    .site-nav.is-scrolled .site-brand img{
        width: 200px;
    }
    .site-menu-link{
        padding: 8px 7px;
        font-size: 15px;
        letter-spacing: 1px;
    }
    .site-menu-link::after{
        left: 7px;
        right: 7px;
    }
}
@media (max-width: 991px){
    .site-nav,
    .site-nav.is-scrolled{
        height: 64px;
        padding: 0 16px;
    }
    .site-menu{
        display: none;
    }
    .site-burger{
        display: block;
    }
}
@media (min-width: 992px){
    .site-drawer{
        display: none !important;
    }
}

/* ==========================================================================
   步驟 2：頁尾
   ========================================================================== */
.site-footer{
    position: relative;
    background: var(--ms-forest);
    color: rgba(255, 255, 255, .82);
}
.site-footer > .cmyk-bar{
    transform-origin: left center;
}
.site-footer > .cmyk-bar[data-reveal]{
    transform: scaleX(0);
    transition: transform 1.2s var(--ms-ease);
}
.site-footer > .cmyk-bar.is-in{
    transform: scaleX(1);
}
.site-footer .container{
    max-width: 1200px;
    padding-left: 24px;
    padding-right: 24px;
}
.site-footer-main{
    padding: 64px 0 48px;
}
.site-footer a{
    color: #fff;
    letter-spacing: 1px;
}
.site-footer a:hover,
.site-footer a:focus{
    color: var(--ms-y);
}
.site-footer h3{
    margin: 0 0 18px;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 3px;
    line-height: 1.4;
}
.site-footer-logo img{
    display: block;
    width: 96px;
    height: auto;
    filter: brightness(0) invert(1);
}
.site-footer-motto{
    margin: 16px 0 8px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 4px;
}
.site-footer-keywords{
    margin: 0 0 20px;
    color: rgba(255, 255, 255, .6);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.8;
    letter-spacing: 1px;
}
.site-footer-badge{
    display: block;
    width: 120px;
    height: auto;
    padding: 6px;
    border-radius: 6px;
    background: #fff;
}
.site-footer-contact{
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 14px;
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
}
.site-footer-contact dt{
    color: rgba(255, 255, 255, .55);
    font-weight: 400;
}
.site-footer-contact dd{
    margin: 0;
    overflow-wrap: anywhere;
}
.site-footer-map{
    display: inline-block;
    margin-top: 6px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .4);
}
.site-footer-links{
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: 16px;
}
.site-footer-links li{
    margin: 0 0 10px;
    break-inside: avoid;
}
.site-footer-links a{
    font-size: 15px;
}
.site-footer-social{
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}
.site-footer-social img{
    display: block;
    width: 40px;
    height: 40px;
    transition: transform .3s var(--ms-ease);
}
.site-footer-social a:hover img,
.site-footer-social a:focus img{
    transform: translateY(-3px);
}
.site-footer-cta{
    display: inline-block;
    padding: 10px 20px;
    border-radius: 50px;
    background: #06c755;
    font-size: 15px;
    font-weight: 600;
}
.site-footer-cta:hover,
.site-footer-cta:focus{
    background: #05a648;
    color: #fff !important;
}
.site-footer-bottom{
    border-top: 1px solid rgba(255, 255, 255, .12);
}
.site-footer-bottom .container{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 16px;
    padding-top: 18px;
    padding-bottom: 18px;
}
.site-footer-bottom p{
    margin: 0;
    color: rgba(255, 255, 255, .55);
    font-size: 13px;
    letter-spacing: 1px;
}
.site-footer-bottom a{
    color: rgba(255, 255, 255, .8);
}
@media (max-width: 991px){
    .site-footer-main{
        padding: 48px 0 24px;
    }
    .site-footer-brand,
    .site-footer-col{
        margin-bottom: 36px;
    }
}
@media (max-width: 767px){
    .site-footer-col:nth-child(2){
        order: 0;
    }
    .site-footer-bottom .container{
        flex-direction: column;
        padding-bottom: 90px; /* 避開右下角浮動按鈕 */
    }
    /* 手機：網站地圖、追蹤我們改為整列寬，連結加大點擊範圍 */
    .site-footer-links{
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        column-gap: 16px;
        columns: auto;
    }
    .site-footer-links li{
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .1);
    }
    .site-footer-links a{
        display: block;
        padding: 10px 0;
        font-size: 16px;
    }
    .site-footer-follow{
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 16px 20px;
    }
    .site-footer-follow h3{
        flex: 0 0 100%;
        margin-bottom: 0;
    }
    .site-footer-follow .site-footer-social{
        margin-bottom: 0;
        gap: 14px;
    }
    .site-footer-follow .site-footer-social img{
        width: 44px;
        height: 44px;
    }
}

/* ==========================================================================
   步驟 3：公司簡介
   ========================================================================== */
.ab{
    padding: 40px 0 0;
    color: var(--ms-ink);
}
.ab-wrap{
    max-width: 1200px;
    padding-left: 24px;
    padding-right: 24px;
}
.ab p{
    color: var(--ms-ink);
    font-size: 17px;
    line-height: 1.9;
    letter-spacing: 1px;
}
.ab h1,
.ab h2,
.ab h3{
    line-height: 1.4;
}

/* 開場 */
.ab-intro{
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 48px;
    align-items: end;
    padding: 24px 0 72px;
    border-bottom: 1px solid var(--ms-line);
}
.ab-intro h1{
    margin: 0 0 18px;
    color: var(--ms-muted);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 4px;
}
.ab-motto{
    margin: 0;
    color: var(--ms-green) !important;
    font-size: clamp(40px, 5vw, 64px) !important;
    font-weight: 900;
    line-height: 1.3 !important;
    letter-spacing: 10px !important;
}
.ab-intro-text p{
    margin: 0 0 16px;
}
.ab-intro-text p:last-child{
    margin-bottom: 0;
}

/* 圖文 */
.ab-story{
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 56px;
    align-items: center;
    padding: 72px 0 0;
}
.ab-story-reverse{
    grid-template-columns: 5fr 7fr;
}
.ab-story-reverse .ab-story-img{
    order: 2;
}
.ab-story-img{
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 3 / 1.6;
}
.ab-story-img img{
    position: absolute;
    left: 0;
    top: -10%;
    width: 100%;
    height: 120%;
    max-width: none;
    object-fit: cover;
    transition: transform .4s var(--ms-ease);
    will-change: transform;
}
.ab-story-text h2{
    margin: 0 0 14px;
    color: var(--ms-green);
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 3px;
}
.ab-story-text p{
    margin: 0;
}

/* 照片牆 */
.ab-section-title{
    margin: 0 0 32px;
    color: var(--ms-green);
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 4px;
}
.ab-gallery{
    padding: 96px 0 24px;
}
.ab-gallery-group{
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
    padding: 28px 0;
    border-top: 1px solid var(--ms-line);
}
.ab-gallery-head h3{
    margin: 0 0 6px;
    color: var(--ms-ink);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
}
.ab-gallery-head p{
    margin: 0;
    color: var(--ms-muted);
    font-size: 15px;
    line-height: 1.7;
}
.ab-gallery-grid{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.ab-photo{
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 6px;
    aspect-ratio: 16 / 10;
    background: var(--ms-line);
}
.ab-photo img{
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ms-ease);
}
.ab-photo::after{
    content: '+';
    position: absolute;
    right: 10px;
    bottom: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--ms-green);
    font-size: 22px;
    line-height: 28px;
    text-align: center;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .3s var(--ms-ease), transform .3s var(--ms-ease);
}
.ab-photo:hover img,
.ab-photo:focus img{
    transform: scale(1.06);
}
.ab-photo:hover::after,
.ab-photo:focus::after{
    opacity: 1;
    transform: none;
}
.ab-photo:focus-visible{
    outline: 3px solid var(--ms-green);
    outline-offset: 3px;
}

/* 經營理念 */
.ab-values{
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1920px;
    margin: 72px auto 0;
    background: var(--ms-forest);
}
.ab-values-img{
    position: relative;
    overflow: hidden;
    min-height: 520px;
}
.ab-values-img img{
    position: absolute;
    left: 0;
    top: -10%;
    width: 100%;
    height: 120%;
    max-width: none;
    object-fit: cover;
    transition: transform .4s var(--ms-ease);
    will-change: transform;
}
.ab-values-text{
    padding: 72px 6vw;
}
.ab-values-text .ab-section-title{
    color: #fff;
}
.ab-values dl{
    margin: 0;
}
.ab-value{
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, .14);
}
.ab-value dt{
    color: var(--ms-y);
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 4px;
}
.ab-value dd{
    margin: 0;
    color: rgba(255, 255, 255, .86);
    font-size: 16px;
    line-height: 1.8;
    letter-spacing: 1px;
}

/* 結尾詢價：估價單樣式
   紙張底色、右側存根用撕線（虛線）分開，撕線上下各一個刀模半圓缺口 */
.quote-slip{
    --slip-notch: 14px;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 300px;
    margin: 72px 0 96px;
    background: #fff;
    border: 1px solid var(--ms-line);
    border-radius: 4px;
    filter: drop-shadow(0 10px 22px rgba(15, 58, 34, .08));
}
.quote-slip-main{
    padding: 36px 40px 32px;
}
.quote-slip-main h2{
    margin: 0 0 24px;
    color: var(--ms-ink);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.5;
}
.quote-slip-fields{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 0;
}
.quote-slip-fields dt{
    margin-bottom: 6px;
    color: var(--ms-green);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 4px;
}
/* 填寫欄：底線＋淡灰示範字，像手寫估價單的空格 */
.quote-slip-fields dd{
    margin: 0;
    padding: 4px 0 8px;
    border-bottom: 1.5px solid var(--ms-ink);
    color: #9a9a9a;
    font-size: 15px;
    letter-spacing: 1px;
}
.ab .quote-slip-note{
    margin: 20px 0 0;
    color: var(--ms-muted);
    font-size: 14px;
}
.quote-slip-stub{
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: 32px;
    border-left: 2px dashed #c9d2c9;
    background: var(--ms-paper);
}
/* 刀模缺口：撕線上下兩端的半圓，填頁面底色、外框沿用卡片框線色 */
.quote-slip-stub{
    position: relative;
}
.quote-slip-stub::before,
.quote-slip-stub::after{
    content: '';
    position: absolute;
    left: calc(-1 * var(--slip-notch) - 1px);
    width: calc(var(--slip-notch) * 2);
    height: var(--slip-notch);
    border: 1px solid var(--ms-line);
    background: url('../images/nav-back.png') var(--ms-paper);
}
.quote-slip-stub::before{
    top: -1px;
    border-top: 0;
    border-radius: 0 0 var(--slip-notch) var(--slip-notch);
}
.quote-slip-stub::after{
    bottom: -1px;
    border-bottom: 0;
    border-radius: var(--slip-notch) var(--slip-notch) 0 0;
}
.quote-slip-line{
    display: block;
    padding: 14px 16px;
    border-radius: 4px;
    background: #06c755;
    color: #fff !important;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
    transition: background-color .25s, transform .25s var(--ms-ease);
}
.quote-slip-line:hover,
.quote-slip-line:focus{
    background: #05a648;
    transform: translateY(-2px);
}
.quote-slip-tel{
    color: var(--ms-ink) !important;
    font-size: 15px;
    letter-spacing: 1px;
    text-align: center;
}
.quote-slip-tel:hover,
.quote-slip-tel:focus{
    color: var(--ms-green) !important;
    text-decoration: underline !important;
}
.quote-slip a:focus-visible{
    outline: 3px solid var(--ms-green);
    outline-offset: 3px;
}

/* 燈箱 */
.ms-lightbox{
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 72px;
    background: rgba(10, 30, 18, .92);
    opacity: 0;
    transition: opacity .25s var(--ms-ease);
}
.ms-lightbox[hidden]{
    display: none;
}
.ms-lightbox.is-open{
    opacity: 1;
}
.ms-lightbox figure{
    margin: 0;
    text-align: center;
}
.ms-lightbox img{
    max-width: 100%;
    max-height: calc(100vh - 140px);
    border-radius: 4px;
}
.ms-lightbox figcaption{
    margin-top: 12px;
    color: rgba(255, 255, 255, .8);
    font-size: 15px;
    letter-spacing: 2px;
}
.ms-lightbox button{
    position: absolute;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 32px;
    line-height: 44px;
    cursor: pointer;
}
.ms-lightbox button:hover,
.ms-lightbox button:focus-visible{
    background: rgba(255, 255, 255, .25);
    outline: none;
}
.ms-lb-close{ top: 16px; right: 16px; }
.ms-lb-prev{ left: 16px; top: 50%; margin-top: -24px; }
.ms-lb-next{ right: 16px; top: 50%; margin-top: -24px; }

@media (max-width: 991px){
    .ab-intro,
    .ab-story,
    .ab-values{
        grid-template-columns: 1fr;
    }
    .ab-intro{
        gap: 24px;
        padding-bottom: 48px;
    }
    .ab-story{
        gap: 24px;
        padding-top: 48px;
    }
    .ab-story-reverse .ab-story-img{
        order: 0;
    }
    .ab-gallery{
        padding-top: 64px;
    }
    .ab-gallery-group{
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .ab-values-img{
        min-height: 280px;
    }
    .ab-values-text{
        padding: 48px 24px;
    }
}
@media (max-width: 767px){
    .ab p{
        font-size: 16px;
    }
    .ab-motto{
        letter-spacing: 6px !important;
    }
    .ab-story-text h2{
        font-size: 24px;
    }
    .ab-section-title{
        font-size: 26px;
    }
    .ab-gallery-grid{
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .ab-value{
        grid-template-columns: 56px 1fr;
    }
    /* 估價單直排：撕線改成橫向，缺口在左右兩側 */
    .quote-slip{
        grid-template-columns: 1fr;
        margin: 48px 0 64px;
    }
    .quote-slip-main{
        padding: 28px 22px 24px;
    }
    .quote-slip-main h2{
        font-size: 19px;
    }
    .quote-slip-fields{
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .quote-slip-stub{
        height: 140px;
        padding: 0 22px;
        border-left: 0;
        border-top: 2px dashed #c9d2c9;
    }
    .quote-slip-stub::before,
    .quote-slip-stub::after{
        top: calc(-1 * var(--slip-notch) - 1px);
        bottom: auto;
        width: var(--slip-notch);
        height: calc(var(--slip-notch) * 2);
        border: 1px solid var(--ms-line);
    }
    .quote-slip-stub::before{
        left: -1px;
        border-left: 0;
        border-radius: 0 var(--slip-notch) var(--slip-notch) 0;
    }
    .quote-slip-stub::after{
        left: auto;
        right: -1px;
        border-right: 0;
        border-radius: var(--slip-notch) 0 0 var(--slip-notch);
    }
    .ms-lightbox{
        padding: 56px 12px;
    }
    .ms-lb-prev,
    .ms-lb-next{
        top: auto;
        bottom: 16px;
        margin-top: 0;
    }
}

/* ==========================================================================
   減少動態：關閉所有動畫與視差
   ========================================================================== */
@media (prefers-reduced-motion: reduce){
    .hero .carousel-item.active .carousel-item-img .img-wrap img,
    .hero .carousel-item-next .carousel-item-img .img-wrap img,
    .hero .carousel-item-prev .carousel-item-img .img-wrap img,
    .hero .carousel-item.active .carousel-caption > *{
        animation: none;
    }
    .hero .carousel-caption > *{
        opacity: 1;
    }
    .index-about .about-img-wrap .item{
        transform: none !important;
    }
    .site-footer > .cmyk-bar[data-reveal]{
        transform: none;
    }
    .ab-story-img img,
    .ab-values-img img,
    .ab-photo img,
    .ab-photo::after,
    .ms-lightbox{
        transition: none;
    }
    .site-nav,
    .site-brand img,
    .site-menu-link::after,
    .site-burger span,
    .site-drawer-backdrop,
    .site-drawer-panel,
    .site-drawer-menu li,
    .index-package .item img,
    .index-products .color-box .color-box-item .white-back,
    .index-products .color-box .color-box-item .white-back::after,
    .index-products .color-box .color-box-item img,
    .index-products .color-box .color-box-item h3::after{
        transition: none;
    }
}
