/**
 * Phase 2c · 無框商品卡 + 互動特效（hover／觸控）
 * 首頁 grid／carousel、預購總覽、分類列表共用；不動 cart API
 */
:root {
    --wx-cover-stage-bg: #ffffff;
    --wx-cover-stage-radius: 14px;
    --wx-cover-stage-border: 1px solid rgba(148, 155, 162, 0.28);
    --wx-cover-stage-pad: 0;
    --wx-card-unit-radius: 0;
    --wx-card-unit-pad: 8px;
    --wx-interact-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --wx-interact-duration: 0.42s;
    --wx-interact-shadow: 0 14px 36px rgba(15, 23, 42, 0.14);
    --wx-interact-shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.1);
    --wx-tags-row-min-h: 20px;
    --wx-card-content-inset-x: 8px;
    /* 2026-09-30：CTA 原本整個 inset-x 出血，兩側各 8px，剛好等於 grid 欄距 16px，
       相鄰卡片的按鈕會貼在一起、看起來擠成一條。改成只出血一半，欄距留一半當可見間距。 */
    --wx-card-btn-bleed: calc(var(--wx-card-content-inset-x) / 2);
    --wx-card-media-info-gap: 8px;
    --wx-card-btn-radius: 14px;
    --wx-card-btn-overlay-radius: 0 0 14px 14px;
    --wx-card-price-color: #d1434f;
    --wx-card-inquiry-color: var(--pos-highlight, var(--primary-color, #587493));
    --wx-card-inquiry-border: var(--pos-highlight, var(--primary-color, #587493));
    --wx-card-inquiry-bg: transparent;
    --wx-card-title-block: 2.8em;
    --wx-card-price-row-h: 28px;
    --wx-card-name-price-gap: 2px;
}

/* ── 卡片外殼：無框單元（封面→文字→按鈕） ── */
.preorder-list-container .product-card,
.catalog-theme-page .product-card,
body.store-front-container .product-slider-section-container .product-card,
body.store-front-container .carousel-track .product-card,
body.store-front-container .wm-product-section .product-card,
body.wx-static-body .preorder-list-container .product-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    transform: none !important;
    box-sizing: border-box !important;
    transition: none !important;
}

/* ── 封面＋資訊同欄（收窄對齊 · hover 陰影主體） ── */
body.store-front-container .product-card .wx-card-content-col,
.preorder-list-container .product-card .wx-card-content-col,
.catalog-theme-page .product-card .wx-card-content-col {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
    border-radius: var(--wx-card-unit-radius) !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.store-front-container .product-card .wx-card-content-col .card-img-box,
body.store-front-container .product-card .wx-card-content-col .product-img-wrapper,
body.store-front-container .product-card .wx-card-content-col .product-image-wrapper,
body.store-front-container .product-card .wx-card-content-col .product-info-content,
body.store-front-container .product-card .wx-card-content-col .card-body,
body.store-front-container .product-card .wx-card-content-col .product-card-body,
.preorder-list-container .wx-card-content-col .product-image-wrapper,
.preorder-list-container .wx-card-content-col .product-card-body,
.preorder-list-container .wx-card-content-col .product-info-content,
.preorder-list-container .wx-card-content-col .card-body,
.catalog-theme-page .wx-card-content-col .product-info-content,
.catalog-theme-page .wx-card-content-col .card-body {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* 封面下文字／標籤：左右留白；CTA 另行與封面同寬 */
body.store-front-container .product-card .wx-card-content-col .product-info-content,
    body.store-front-container .product-card .wx-card-content-col .card-body,
.preorder-list-container .product-card .wx-card-content-col .product-card-body,
.preorder-list-container .product-card .wx-card-content-col .product-info-content,
.preorder-list-container .product-card .wx-card-content-col .card-body,
.catalog-theme-page .product-card .wx-card-content-col .product-card-body,
.catalog-theme-page .product-card .wx-card-content-col .product-info-content,
.catalog-theme-page .product-card .wx-card-content-col .card-body {
    padding-left: var(--wx-card-content-inset-x) !important;
    padding-right: var(--wx-card-content-inset-x) !important;
}

body.store-front-container .product-card .wx-card-content-col .product-action-btn-wrap,
.preorder-list-container .product-card .wx-card-content-col .product-card-footer,
.preorder-list-container .product-card .wx-card-content-col .product-action-btn-wrap,
.catalog-theme-page .product-card .wx-card-content-col .product-card-footer,
.catalog-theme-page .product-card .wx-card-content-col .product-action-btn-wrap {
    display: block !important;
    margin-left: calc(-1 * var(--wx-card-btn-bleed)) !important;
    margin-right: calc(-1 * var(--wx-card-btn-bleed)) !important;
    margin-top: 10px !important;
    width: calc(100% + (2 * var(--wx-card-btn-bleed))) !important;
    max-width: calc(100% + (2 * var(--wx-card-btn-bleed))) !important;
    box-sizing: border-box !important;
}

/* 列表卡：封面不要被 carousel 舊規則壓成 150px 窄圖 */
body.store-front-container .carousel-wrapper--4up .swiper-slide .product-card .wx-card-content-col .card-img-box,
body.store-front-container .carousel-wrapper--4up .swiper-slide .product-card .wx-card-content-col .product-img-wrapper,
body.store-front-container .carousel-track .product-card .wx-card-content-col .card-img-box {
    max-height: none !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    width: 100% !important;
}

/* 預購／現貨：商品名稱前 */
.product-title-row,
body.store-front-container .product-card .product-title-row,
.preorder-list-container .product-title-row,
.catalog-theme-page .product-title-row {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 var(--wx-card-name-price-gap, 2px) 0 !important;
    min-height: var(--wx-card-title-block, 2.8em) !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.product-title-row .wx-channel-status-badge,
body.store-front-container .product-title-row .wx-channel-status-badge,
.wx-channel-status-badge.preorder,
.wx-channel-status-badge.instock,
body.store-front-container .product-title-row .wx-channel-status-badge.preorder,
body.store-front-container .product-title-row .wx-channel-status-badge.instock {
    flex: 0 0 auto !important;
    align-self: flex-start !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    padding: 3px 8px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
    margin: 1px 0 0 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.wx-channel-status-badge.preorder,
body.store-front-container .product-title-row .wx-channel-status-badge.preorder {
    color: var(--tag-custom-color, #AD6B4A) !important;
    background:
        linear-gradient(
            color-mix(in srgb, var(--tag-custom-color, #AD6B4A) 16%, transparent),
            color-mix(in srgb, var(--tag-custom-color, #AD6B4A) 16%, transparent)
        ),
        rgba(255, 255, 255, 0.88) !important;
    border: none !important;
}

.wx-channel-status-badge.instock,
body.store-front-container .product-title-row .wx-channel-status-badge.instock {
    color: var(--instock-tag-color, #728B7E) !important;
    background:
        linear-gradient(
            color-mix(in srgb, var(--instock-tag-color, #728B7E) 16%, transparent),
            color-mix(in srgb, var(--instock-tag-color, #728B7E) 16%, transparent)
        ),
        rgba(255, 255, 255, 0.88) !important;
    border: none !important;
}

.product-title-row .product-title,
.product-title-row .card-title,
body.store-front-container .product-title-row .product-title,
body.store-front-container .product-title-row .card-title {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-bottom: none !important;
    white-space: normal !important;
    text-align: center !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.4 !important;
    min-height: var(--wx-card-title-block, 2.8em) !important;
    max-height: var(--wx-card-title-block, 2.8em) !important;
}

.product-title-row .wx-card-detail-link--title,
body.store-front-container .wx-card-detail-link--title,
.preorder-list-container .wx-card-detail-link--title,
.catalog-theme-page .wx-card-detail-link--title {
    color: inherit !important;
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    text-align: center !important;
    width: 100% !important;
    transition: color 0.18s ease !important;
}

.product-title-row .wx-card-detail-link--title:hover,
body.store-front-container .wx-card-detail-link--title:hover,
.preorder-list-container .wx-card-detail-link--title:hover,
.catalog-theme-page .wx-card-detail-link--title:hover {
    color: var(--pos-highlight, var(--button-color, var(--primary-color, #778ca3))) !important;
    text-decoration: none !important;
}

/* 封面 1:1 全寬（壓過 storefront-isolation 20vh／carousel 150px） */
body.store-front-container .wm-product-section .product-card .card-img-box,
body.store-front-container .wm-product-section .product-card .product-img-wrapper,
body.store-front-container .wm-product-section .product-card .product-image-wrapper,
body.store-front-container .carousel-track .product-card .card-img-box,
body.store-front-container .carousel-track .product-card .product-img-wrapper,
body.store-front-container .carousel-wrapper--4up .swiper-slide .product-card .card-img-box,
body.store-front-container .carousel-wrapper--4up .swiper-slide .product-card .product-img-wrapper,
body.store-front-container .product-slider-section-container .product-card .card-img-box,
body.store-front-container .product-slider-section-container .product-card .product-img-wrapper {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 1 / 1 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.store-front-container .wm-product-section .product-card .card-img-box img,
body.store-front-container .wm-product-section .product-card .product-img-wrapper img,
body.store-front-container .carousel-track .product-card .card-img-box img,
body.store-front-container .carousel-wrapper--4up .swiper-slide .product-card .card-img-box img {
    max-height: none !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

body.store-front-container .product-card .wx-card-content-col,
body.store-front-container .wm-product-section .product-card .wx-card-content-col,
body.store-front-container .carousel-track .product-card .wx-card-content-col {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.product-card .card-img-box .badge-status-top-left,
.preorder-list-container .product-card .badge-status-top-left,
.catalog-theme-page .product-card .badge-status-top-left,
body.store-front-container .product-card .card-img-box .badge-status-top-left,
body.store-front-container .product-card .product-img-wrapper .badge-status-top-left {
    display: inline-block !important;
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    z-index: 5 !important;
    pointer-events: none !important;
    padding: 5px 11px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.18em !important;
    line-height: 1 !important;
    border-radius: 6px !important;
    backdrop-filter: blur(12px) saturate(1.25) !important;
    -webkit-backdrop-filter: blur(12px) saturate(1.25) !important;
}

.product-card .badge-status-top-left.preorder,
.preorder-list-container .badge-status-top-left.preorder,
.catalog-theme-page .badge-status-top-left.preorder,
body.store-front-container .product-card .badge-status-top-left.preorder {
    color: var(--tag-custom-color, #AD6B4A) !important;
    -webkit-text-fill-color: var(--tag-custom-color, #AD6B4A) !important;
    background:
        linear-gradient(
            color-mix(in srgb, var(--tag-custom-color, #AD6B4A) 16%, transparent),
            color-mix(in srgb, var(--tag-custom-color, #AD6B4A) 16%, transparent)
        ),
        rgba(255, 255, 255, 0.76) !important;
    border: none !important;
    box-shadow: none !important;
}

.product-card .badge-status-top-left.instock,
.preorder-list-container .badge-status-top-left.instock,
.catalog-theme-page .badge-status-top-left.instock,
body.store-front-container .product-card .badge-status-top-left.instock {
    color: var(--instock-tag-color, #728B7E) !important;
    -webkit-text-fill-color: var(--instock-tag-color, #728B7E) !important;
    background:
        linear-gradient(
            color-mix(in srgb, var(--instock-tag-color, #728B7E) 16%, transparent),
            color-mix(in srgb, var(--instock-tag-color, #728B7E) 16%, transparent)
        ),
        rgba(255, 255, 255, 0.76) !important;
    border: none !important;
    box-shadow: none !important;
}

/* 預購剩餘名額：貼在商品圖右上角，顏色與「現貨」標籤一致 */
.product-card .card-img-box,
.preorder-list-container .product-card .card-img-box {
    position: relative;
}
.product-card .card-img-box .wx-preorder-remain-tag,
.preorder-list-container .product-card .card-img-box .wx-preorder-remain-tag,
.catalog-theme-page .product-card .card-img-box .wx-preorder-remain-tag,
body.store-front-container .product-card .card-img-box .wx-preorder-remain-tag {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    left: auto !important;
    z-index: 5 !important;
    pointer-events: none !important;
    display: inline-block !important;
    margin: 0 !important;
    padding: 5px 11px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    line-height: 1 !important;
    border-radius: 6px !important;
    color: var(--instock-tag-color, #728B7E) !important;
    -webkit-text-fill-color: var(--instock-tag-color, #728B7E) !important;
    background:
        linear-gradient(
            color-mix(in srgb, var(--instock-tag-color, #728B7E) 16%, transparent),
            color-mix(in srgb, var(--instock-tag-color, #728B7E) 16%, transparent)
        ),
        rgba(255, 255, 255, 0.76) !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: blur(12px) saturate(1.25) !important;
    -webkit-backdrop-filter: blur(12px) saturate(1.25) !important;
}
/* 名額已滿：維持紅色警示 */
.product-card .card-img-box .wx-preorder-remain-tag.wx-preorder-remain-tag--full {
    color: #be123c !important;
    -webkit-text-fill-color: #be123c !important;
    background:
        linear-gradient(rgba(190, 18, 60, 0.12), rgba(190, 18, 60, 0.12)),
        rgba(255, 255, 255, 0.76) !important;
}
/* 首頁（body.store-front-container）的通用規則多一個 body 選擇器，上面的紅色會被蓋掉，已滿變成和現貨同色；這裡補上同等級的紅色 */
body.store-front-container .product-card .card-img-box .wx-preorder-remain-tag.wx-preorder-remain-tag--full {
    color: #be123c !important;
    -webkit-text-fill-color: #be123c !important;
    background:
        linear-gradient(rgba(190, 18, 60, 0.12), rgba(190, 18, 60, 0.12)),
        rgba(255, 255, 255, 0.76) !important;
}

.product-card .card-btn,
.product-card .btn-submit-order,
.product-card .btn-preorder,
.preorder-list-container .btn-preorder-submit,
.catalog-theme-page .btn-preorder-submit,
.catalog-theme-page .product-card .card-btn,
.catalog-theme-page .product-card .btn-submit-order,
body.store-front-container .product-card .card-btn,
body.store-front-container .product-card .btn-submit-order,
body.store-front-container .product-card .btn-preorder {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border-radius: var(--wx-card-btn-radius) !important;
}

/* 列表卡隱藏 YouTube 播放鍵（詳情頁保留） */
body.store-front-container .product-card .card-yt-badge-trigger,
body.store-front-container .product-card .card-play-badge-top-right,
body.store-front-container .product-card .wx-play-badge-trigger,
.preorder-list-container .card-yt-badge-trigger,
.preorder-list-container .card-play-badge-top-right,
.catalog-theme-page .card-yt-badge-trigger {
    display: none !important;
}

/* 預購／現貨角標：封面左上角內 */
.preorder-list-container .product-card:hover,
.catalog-theme-page .product-card:hover,
body.store-front-container .product-slider-section-container .product-card:hover,
body.store-front-container .carousel-track .product-card:hover,
body.store-front-container .wm-product-section .product-card:hover {
    transform: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* ── 封面舞台（1:1 · 互動主體） ── */
.preorder-list-container .product-image-wrapper,
.preorder-list-container .product-card .card-img-box,
.catalog-theme-page .product-card .product-image-wrapper,
.catalog-theme-page .product-card .card-img-box,
.catalog-theme-page .product-card .product-img-wrapper,
body.store-front-container .product-slider-section-container .product-card .card-img-box,
body.store-front-container .product-slider-section-container .product-card .product-img-wrapper,
body.store-front-container .product-slider-section-container .product-card .product-image-wrapper,
body.store-front-container .catalog-theme-grid .product-card .card-img-box,
body.store-front-container .catalog-theme-grid .product-card .product-img-wrapper {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    box-sizing: border-box !important;
    display: block !important;
    overflow: hidden !important;
    margin: 0 0 var(--wx-card-media-info-gap, 8px) 0 !important;
    padding: 0 !important;
    background: var(--wx-cover-stage-bg) !important;
    border: var(--wx-cover-stage-border, 1px solid rgba(148, 155, 162, 0.28)) !important;
    border-radius: var(--wx-cover-stage-radius) !important;
    box-shadow: none !important;
}

body.store-front-container .product-slider-section-container .product-card .card-img-box .wx-card-detail-link--media,
body.store-front-container .product-slider-section-container .product-card .product-img-wrapper .wx-card-detail-link--media,
body.store-front-container .catalog-theme-grid .product-card .card-img-box .wx-card-detail-link--media,
.preorder-list-container .product-card .card-img-box .wx-card-detail-link--media,
.preorder-list-container .product-card .product-img-wrapper .wx-card-detail-link--media,
.preorder-list-container .product-card .product-image-wrapper .wx-card-detail-link--media,
.catalog-theme-page .product-card .card-img-box .wx-card-detail-link--media,
.catalog-theme-page .product-card .product-img-wrapper .wx-card-detail-link--media,
.catalog-theme-page .product-card .product-image-wrapper .wx-card-detail-link--media {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1 !important;
}

.product-card .card-img-box.has-hover-img .wx-card-img--hover,
.catalog-theme-page .product-card .card-img-box.has-hover-img .wx-card-img--hover,
body.store-front-container .product-card .card-img-box.has-hover-img .wx-card-img--hover {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    opacity: 0;
    z-index: 2 !important;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

@media (hover: hover) and (pointer: fine) {
    .product-card .card-img-box.has-hover-img:hover .wx-card-img--hover,
    .catalog-theme-page .product-card .card-img-box.has-hover-img:hover .wx-card-img--hover,
    body.store-front-container .product-card .card-img-box.has-hover-img:hover .wx-card-img--hover,
    .product-card:hover .card-img-box.has-hover-img .wx-card-img--hover,
    .catalog-theme-page .product-card:hover .card-img-box.has-hover-img .wx-card-img--hover,
    body.store-front-container .product-card:hover .card-img-box.has-hover-img .wx-card-img--hover {
        opacity: 1;
    }
}

/* ── 桌機：不整卡柔影；照片只換圖、品名只變色、按鈕只自己有效果 ── */
@media (min-width: 768px) {
    .preorder-list-container .product-card:hover,
    .catalog-theme-page .product-card:hover,
    body.store-front-container .product-slider-section-container .product-card:hover,
    body.store-front-container .carousel-track .product-card:hover,
    body.store-front-container .carousel-wrapper--4up .swiper-slide .product-card:hover,
    body.store-front-container .wm-product-section .product-card:hover,
    body.store-front-container .preorder-section .product-card:hover,
    .preorder-list-container .product-card:hover .wx-card-content-col,
    .catalog-theme-page .product-card:hover .wx-card-content-col,
    body.store-front-container .product-card:hover .wx-card-content-col,
    .preorder-list-container .product-card:hover .product-image-wrapper,
    .preorder-list-container .product-card:hover .card-img-box,
    .catalog-theme-page .product-card:hover .product-image-wrapper,
    .catalog-theme-page .product-card:hover .card-img-box,
    body.store-front-container .product-slider-section-container .product-card:hover .card-img-box,
    body.store-front-container .product-slider-section-container .product-card:hover .product-img-wrapper,
    body.store-front-container .catalog-theme-grid .product-card:hover .card-img-box {
        box-shadow: none !important;
        background: transparent !important;
    }
}

/* ── 平板／手機觸控：按 CTA 時不整卡縮放／不額外柔影（避免與全寬直角按鈕打架） ── */
@media (hover: none), (pointer: coarse) {
    .preorder-list-container .product-card:active,
    .preorder-list-container .product-card:focus-within,
    .catalog-theme-page .product-card:active,
    .catalog-theme-page .product-card:focus-within,
    body.store-front-container .product-slider-section-container .product-card:active,
    body.store-front-container .product-slider-section-container .product-card:focus-within,
    body.store-front-container .catalog-theme-grid .product-card:active {
        box-shadow: none !important;
        background: transparent !important;
    }

    .preorder-list-container .product-card:active .wx-card-content-col,
    .preorder-list-container .product-card:focus-within .wx-card-content-col,
    .catalog-theme-page .product-card:active .wx-card-content-col,
    .catalog-theme-page .product-card:focus-within .wx-card-content-col,
    body.store-front-container .product-slider-section-container .product-card:active .wx-card-content-col,
    body.store-front-container .product-slider-section-container .product-card:focus-within .wx-card-content-col,
    body.store-front-container .catalog-theme-grid .product-card:active .wx-card-content-col {
        box-shadow: none !important;
    }

    .preorder-list-container .product-card:active .product-image-wrapper,
    .preorder-list-container .product-card:active .card-img-box,
    body.store-front-container .product-slider-section-container .product-card:active .card-img-box {
        box-shadow: none !important;
    }

    .preorder-list-container .product-card:active .btn-preorder-submit,
    body.store-front-container .product-slider-section-container .product-card:active .card-btn,
    body.store-front-container .product-card .card-btn:active,
    body.store-front-container .product-card .btn-submit-order:active,
    .preorder-list-container .btn-preorder-submit:active {
        transform: none !important;
        filter: none !important;
        background: color-mix(in srgb, var(--pos-highlight, var(--primary-color, #587493)) 74%, #1e293b) !important;
    }
}

.preorder-list-container .product-image-wrapper img,
.preorder-list-container .product-card .card-img-box img,
.catalog-theme-page .product-card .product-image-wrapper img,
.catalog-theme-page .product-card .card-img-box img,
.catalog-theme-page .product-card .product-img-wrapper img,
body.store-front-container .product-slider-section-container .product-card .card-img-box img,
body.store-front-container .product-slider-section-container .product-card .product-img-wrapper img,
body.store-front-container .product-slider-section-container .product-card .product-image-wrapper img,
body.store-front-container .catalog-theme-grid .product-card .card-img-box img,
body.store-front-container .product-slider-section-container .product-card .wx-card-detail-link--media img,
body.store-front-container .product-slider-section-container .product-card .card-img-box .img-fluid {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: var(--wx-cover-stage-radius, 14px) !important;
}

/* ── 資訊區：緊湊堆疊（左右 inset 見 .wx-card-content-col 規則） ── */
.preorder-list-container .product-card-body,
.preorder-list-container .product-card .card-body,
.preorder-list-container .product-card .product-info-content,
.catalog-theme-page .product-card-body,
.catalog-theme-page .product-card .card-body,
.catalog-theme-page .product-card .product-info-content,
body.store-front-container .product-card .product-info-content,
body.store-front-container .product-card .card-body {
    flex: 0 0 auto !important;
    flex-grow: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    overflow: visible !important;
}

body.store-front-container .product-card .product-action-btn-wrap,
.preorder-list-container .product-card-footer,
.preorder-list-container .product-card .product-action-btn-wrap,
.catalog-theme-page .product-card .product-action-btn-wrap,
.catalog-theme-page .product-card .product-card-footer {
    flex: 0 0 auto !important;
    display: block !important;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    margin-left: calc(-1 * var(--wx-card-btn-bleed, 4px)) !important;
    margin-right: calc(-1 * var(--wx-card-btn-bleed, 4px)) !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    width: calc(100% + (2 * var(--wx-card-btn-bleed, 4px))) !important;
    max-width: calc(100% + (2 * var(--wx-card-btn-bleed, 4px))) !important;
    box-sizing: border-box !important;
}

.preorder-list-container .product-title,
.catalog-theme-page .product-title,
body.store-front-container .product-slider-section-container .product-card .card-title,
body.store-front-container .product-slider-section-container .product-card .product-title,
body.store-front-container .carousel-track .product-card .card-title,
body.store-front-container .carousel-track .product-card .product-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    color: #475569 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    text-align: center !important;
    transition: color 0.22s ease !important;
}

.preorder-list-container .product-price-and-badge-line,
.preorder-list-container .card-price-block,
.catalog-theme-page .product-price-and-badge-line,
.catalog-theme-page .card-price-block,
body.store-front-container .product-card .product-price-and-badge-line,
body.store-front-container .product-card .card-price-block {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    margin: 0 !important;
    min-height: var(--wx-card-price-row-h, 28px) !important;
    height: var(--wx-card-price-row-h, 28px) !important;
    max-height: var(--wx-card-price-row-h, 28px) !important;
}

.preorder-list-container .product-card .card-price,
.preorder-list-container .product-card .product-price,
.catalog-theme-page .product-card .card-price,
.catalog-theme-page .product-card .product-price,
body.store-front-container .product-card .card-price,
body.store-front-container .product-card .product-price {
    text-align: center !important;
    justify-content: center !important;
    width: 100% !important;
    flex: 0 0 auto !important;
}

body.store-front-container .product-card .card-price--inquiry,
body.store-front-container .product-card .price-tag--inquiry,
body.store-front-container .product-card .product-price.card-price--inquiry,
.preorder-list-container .product-card .card-price--inquiry,
.preorder-list-container .product-card .product-price.card-price--inquiry,
.catalog-theme-page .product-card .card-price--inquiry,
.catalog-theme-page .product-card .product-price.card-price--inquiry {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    max-width: 100% !important;
    min-height: 22px !important;
    height: 22px !important;
    padding: 0 11px !important;
    border-radius: 999px !important;
    border: 1px solid var(--wx-card-inquiry-border, var(--pos-highlight, #587493)) !important;
    background: var(--wx-card-inquiry-bg, transparent) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--wx-card-inquiry-color, #587493) !important;
    letter-spacing: 0.06em !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}

.preorder-list-container .price-tag:not(.price-tag--inquiry),
.preorder-list-container .product-card .card-price:not(.card-price--inquiry),
.preorder-list-container .product-card .product-price:not(.card-price--inquiry),
.catalog-theme-page .price-tag:not(.price-tag--inquiry),
.catalog-theme-page .product-card .card-price:not(.card-price--inquiry),
.catalog-theme-page .product-card .product-price:not(.card-price--inquiry),
body.store-front-container .product-card .card-price:not(.card-price--inquiry),
body.store-front-container .product-card .product-price:not(.card-price--inquiry) {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: var(--wx-card-price-color, #d1434f) !important;
    letter-spacing: -0.02em !important;
}

/* ── CTA：重點色實心主鈕（相對「查看更多」外框次鈕）── */
.product-card .card-btn,
.product-card .card-btn.instock,
.product-card .btn-submit-order,
.product-card .btn-preorder,
.preorder-list-container .btn-preorder-submit,
.catalog-theme-page .btn-preorder-submit,
.catalog-theme-page .product-card .card-btn,
.catalog-theme-page .product-card .card-btn.instock,
.catalog-theme-page .product-card .btn-submit-order,
body.store-front-container .product-card .card-btn,
body.store-front-container .product-card .card-btn.instock,
body.store-front-container .product-card .btn-submit-order,
body.store-front-container .product-card .btn-preorder {
    min-height: 34px !important;
    height: 34px !important;
    max-height: 34px !important;
    margin: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    border-radius: var(--wx-card-btn-radius) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    border: 1px solid var(--pos-highlight, var(--primary-color, #587493)) !important;
    background: var(--pos-highlight, var(--primary-color, #587493)) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 18px !important;
    line-height: 1 !important;
    box-shadow: none !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease !important;
}

.product-card .card-btn:disabled,
.product-card .btn-submit-order:disabled,
.product-card .btn-preorder:disabled,
.preorder-list-container .btn-preorder-submit:disabled,
.catalog-theme-page .btn-preorder-submit:disabled,
body.store-front-container .product-card .card-btn:disabled,
body.store-front-container .product-card .btn-submit-order:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    filter: none !important;
    box-shadow: none !important;
}

.product-card .card-btn:hover,
.product-card .btn-submit-order:hover,
.product-card .btn-preorder:hover,
.preorder-list-container .btn-preorder-submit:hover,
.catalog-theme-page .btn-preorder-submit:hover,
.catalog-theme-page .product-card .card-btn:hover,
.catalog-theme-page .product-card .btn-submit-order:hover,
body.store-front-container .product-card .card-btn:hover,
body.store-front-container .product-card .btn-submit-order:hover,
body.store-front-container .product-card .btn-preorder:hover,
.product-card .card-btn:focus-visible,
.product-card .btn-submit-order:focus-visible,
.preorder-list-container .btn-preorder-submit:focus-visible,
.catalog-theme-page .btn-preorder-submit:focus-visible,
.catalog-theme-page .product-card .card-btn:focus-visible,
.catalog-theme-page .product-card .btn-submit-order:focus-visible,
body.store-front-container .product-card .card-btn:focus-visible,
body.store-front-container .product-card .btn-submit-order:focus-visible,
body.store-front-container .product-card .btn-preorder:focus-visible {
    background: color-mix(in srgb, var(--pos-highlight, var(--primary-color, #587493)) 82%, #1e293b) !important;
    border-color: color-mix(in srgb, var(--pos-highlight, var(--primary-color, #587493)) 82%, #1e293b) !important;
    color: #ffffff !important;
    border-radius: var(--wx-card-btn-radius) !important;
    box-shadow: none !important;
    filter: none !important;
}

.product-card .card-btn:active,
.product-card .btn-submit-order:active,
.product-card .btn-preorder:active,
.preorder-list-container .btn-preorder-submit:active,
.catalog-theme-page .product-card .card-btn:active,
.catalog-theme-page .product-card .btn-submit-order:active,
body.store-front-container .product-card .card-btn:active,
body.store-front-container .product-card .btn-submit-order:active,
body.store-front-container .product-card .btn-preorder:active {
    transform: none !important;
    filter: none !important;
    border-radius: var(--wx-card-btn-radius) !important;
    box-shadow: none !important;
    background: color-mix(in srgb, var(--pos-highlight, var(--primary-color, #587493)) 74%, #1e293b) !important;
}

/* ── 角標：預購／現貨同一形狀（淡色霧面晶片） ── */
.preorder-list-container .badge-status-top-left.preorder,
.catalog-theme-page .badge-status-top-left.preorder,
body.store-front-container .product-slider-section-container .badge-status-top-left.preorder,
body.store-front-container .catalog-theme-grid .badge-status-top-left.preorder,
body.store-front-container .badge-status-top-left.instock,
.preorder-list-container .badge-status-top-left.instock,
.catalog-theme-page .badge-status-top-left.instock {
    border-radius: 6px !important;
    padding: 5px 11px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.18em !important;
    backdrop-filter: blur(12px) saturate(1.25) !important;
    -webkit-backdrop-filter: blur(12px) saturate(1.25) !important;
    z-index: 5 !important;
}

.preorder-list-container .badge-status-top-left.preorder,
.catalog-theme-page .badge-status-top-left.preorder,
body.store-front-container .product-slider-section-container .badge-status-top-left.preorder,
body.store-front-container .catalog-theme-grid .badge-status-top-left.preorder {
    color: var(--tag-custom-color, #AD6B4A) !important;
    -webkit-text-fill-color: var(--tag-custom-color, #AD6B4A) !important;
    background:
        linear-gradient(
            color-mix(in srgb, var(--tag-custom-color, #AD6B4A) 16%, transparent),
            color-mix(in srgb, var(--tag-custom-color, #AD6B4A) 16%, transparent)
        ),
        rgba(255, 255, 255, 0.76) !important;
    border: none !important;
    box-shadow: none !important;
}

body.store-front-container .badge-status-top-left.instock,
.preorder-list-container .badge-status-top-left.instock,
.catalog-theme-page .badge-status-top-left.instock {
    color: var(--instock-tag-color, #728B7E) !important;
    -webkit-text-fill-color: var(--instock-tag-color, #728B7E) !important;
    background:
        linear-gradient(
            color-mix(in srgb, var(--instock-tag-color, #728B7E) 16%, transparent),
            color-mix(in srgb, var(--instock-tag-color, #728B7E) 16%, transparent)
        ),
        rgba(255, 255, 255, 0.76) !important;
    border: none !important;
    box-shadow: none !important;
}

.preorder-list-container .badge-status-top-left.preorder,
.catalog-theme-page .badge-status-top-left.preorder,
body.store-front-container .product-slider-section-container .badge-status-top-left.preorder,
body.store-front-container .catalog-theme-grid .badge-status-top-left.preorder {
    top: 8px !important;
    left: 8px !important;
}

.preorder-list-container .card-yt-badge,
.preorder-list-container .wx-play-badge,
.catalog-theme-page .card-yt-badge,
body.store-front-container .product-card .card-yt-badge,
body.store-front-container .product-card .wx-play-badge,
body.store-front-container .product-card .youtube-badge {
    background: rgba(15, 23, 42, 0.55) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18) !important;
    z-index: 4 !important;
}

.preorder-list-container .card-play-badge-top-right,
.preorder-list-container .card-yt-badge-trigger,
.catalog-theme-page .card-play-badge-top-right,
.catalog-theme-page .card-yt-badge-trigger,
body.store-front-container .product-slider-section-container .card-play-badge-top-right,
body.store-front-container .product-slider-section-container .card-yt-badge-trigger {
    top: 6px !important;
    right: 6px !important;
    z-index: 4 !important;
    transform: scale(0.9) !important;
    transform-origin: top right !important;
}

.preorder-list-container .platform-badge,
.catalog-theme-page .platform-badge,
body.store-front-container .product-slider-section-container .platform-badge,
body.store-front-container .catalog-theme-grid .platform-badge {
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
    border-radius: 999px !important;
    letter-spacing: 0.02em !important;
    border: none !important;
    box-shadow: none !important;
    opacity: 0.92;
    text-transform: none !important;
}

.platform-badge.default-gray {
    background-color: #f1f3f5 !important;
    color: #495057 !important;
    border: none !important;
}

.platform-badge.tag-blue,
.platform-badge.ps-blue,
.platform-badge.ps5,
.platform-badge.ps4,
.platform-badge.sony,
.platform-badge--ps5 {
    background-color: #00439c !important;
    color: #ffffff !important;
    border: none !important;
}

.platform-badge.tag-red,
.platform-badge.ns-red,
.platform-badge.ns2,
.platform-badge.ns,
.platform-badge.nintendo,
.platform-badge.switch,
.platform-badge--switch {
    background-color: #e60012 !important;
    color: #ffffff !important;
    border: none !important;
}

.platform-badge.tag-green {
    background-color: #16a34a !important;
    color: #ffffff !important;
    border: none !important;
}

.platform-badge.tag-gray {
    background-color: #64748b !important;
    color: #ffffff !important;
    border: none !important;
}

/* 商品卡不顯示免訂金／發售日（詳情頁與彈窗仍保留） */
.product-card .card-no-deposit-badge,
.product-card .deposit-free-badge,
.product-card .deposit-badge,
.product-card .launch-timeline-row,
.product-card .product-release-date,
.product-card .preorder-date,
body.store-front-container .product-card .card-no-deposit-badge,
body.store-front-container .product-card .deposit-free-badge,
body.store-front-container .product-card .launch-timeline-row,
body.store-front-container .product-card .preorder-date,
body.store-front-container .product-card .product-release-date,
.preorder-list-container .deposit-badge,
.preorder-list-container .card-no-deposit-badge,
.preorder-list-container .deposit-free-badge,
.preorder-list-container .launch-timeline-row,
.preorder-list-container .product-release-date,
.preorder-list-container .preorder-date,
.catalog-theme-page .deposit-badge,
.catalog-theme-page .deposit-free-badge,
.catalog-theme-page .card-no-deposit-badge {
    display: none !important;
}

.preorder-list-container .product-tags-row,
.catalog-theme-page .product-tags-row,
body.store-front-container .product-slider-section-container .product-tags-row,
body.store-front-container .catalog-theme-grid .product-tags-row,
body.store-front-container .product-card .product-info-content > .product-tags-row,
body.store-front-container .carousel-track .product-card .product-info-content > .product-tags-row,
body.store-front-container .wm-product-section .product-card .product-info-content > .product-tags-row,
body.store-front-container .product-card .product-info-content > .product-tags-row:empty,
.preorder-list-container .product-tags-row:empty,
.catalog-theme-page .product-tags-row:empty {
    display: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.preorder-list-container .product-price-row,
.preorder-list-container .product-price-and-badge-line,
.catalog-theme-page .product-price-row,
.catalog-theme-page .card-price-block,
body.store-front-container .product-slider-section-container .product-price-and-badge-line,
body.store-front-container .product-slider-section-container .card-price-block,
body.store-front-container .product-card .product-info-content > .product-price-and-badge-line,
body.store-front-container .product-card .card-body > .card-price {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 4px 6px !important;
    margin: 0 0 2px 0 !important;
}

.preorder-list-container .product-card,
.catalog-theme-page .product-card,
.catalog-theme-page .product-card-item-wrap,
.catalog-theme-page .product-card-wrapper {
    min-height: 0 !important;
    margin-bottom: 0 !important;
}

.catalog-theme-page .product-card .card-btn,
.catalog-theme-page .product-card .btn-submit-order {
    margin-bottom: 0 !important;
}

@media (max-width: 767px) {
    :root {
        --wx-cover-stage-pad: 0;
    }

    .preorder-list-container .product-title,
    .catalog-theme-page .product-title,
    .preorder-list-container .product-title-row .product-title,
    .catalog-theme-page .product-title-row .product-title {
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        min-height: var(--wx-card-title-block, 2.8em) !important;
        max-height: var(--wx-card-title-block, 2.8em) !important;
        font-size: 14px !important;
    }

    .preorder-list-container .launch-timeline-row,
    .preorder-list-container .product-release-date,
    .catalog-theme-page .product-release-date,
    body.store-front-container .product-slider-section-container .product-release-date,
    body.store-front-container .product-slider-section-container .preorder-date {
        font-size: 11px !important;
        margin: 0 0 4px 0 !important;
    }
}

@media (min-width: 768px) {
    .preorder-list-container .product-card,
    .catalog-theme-page .product-card {
        min-height: 0 !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .preorder-list-container .product-card .card-img-box,
    .preorder-list-container .product-image-wrapper,
    body.store-front-container .product-card .card-img-box,
    body.store-front-container .product-card .card-img-box img,
    .preorder-list-container .btn-preorder-submit,
    body.store-front-container .product-card .card-btn {
        transition: none !important;
    }
}

/* ── 桌機：CTA 疊在封面底；未 hover 看完整照片（手機仍在封面下） ── */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
    body.store-front-container .product-card .wx-card-content-col,
    .preorder-list-container .product-card .wx-card-content-col,
    .catalog-theme-page .product-card .wx-card-content-col {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-areas: "media" "info" !important;
        row-gap: var(--wx-card-media-info-gap, 8px) !important;
        column-gap: 0 !important;
    }

    body.store-front-container .product-card .wx-card-content-col > .card-img-box,
    body.store-front-container .product-card .wx-card-content-col > .product-img-wrapper,
    body.store-front-container .product-card .wx-card-content-col > .product-image-wrapper,
    .preorder-list-container .product-card .wx-card-content-col > .card-img-box,
    .preorder-list-container .product-card .wx-card-content-col > .product-image-wrapper,
    .catalog-theme-page .product-card .wx-card-content-col > .card-img-box,
    .catalog-theme-page .product-card .wx-card-content-col > .product-img-wrapper,
    .catalog-theme-page .product-card .wx-card-content-col > .product-image-wrapper {
        grid-area: media !important;
        margin-bottom: 0 !important;
    }

    body.store-front-container .product-card .wx-card-content-col > .card-body,
    body.store-front-container .product-card .wx-card-content-col > .product-info-content,
    .preorder-list-container .product-card .wx-card-content-col > .card-body,
    .preorder-list-container .product-card .wx-card-content-col > .product-info-content,
    .catalog-theme-page .product-card .wx-card-content-col > .card-body,
    .catalog-theme-page .product-card .wx-card-content-col > .product-info-content {
        grid-area: info !important;
    }

    body.store-front-container .product-card .wx-card-content-col > .product-action-btn-wrap,
    .preorder-list-container .product-card .wx-card-content-col > .product-action-btn-wrap,
    .catalog-theme-page .product-card .wx-card-content-col > .product-action-btn-wrap {
        grid-area: media !important;
        align-self: end !important;
        justify-self: stretch !important;
        position: relative !important;
        z-index: 4 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transform: none !important;
        transition: opacity 0.2s ease !important;
    }

    body.store-front-container .product-card:hover .wx-card-content-col > .product-action-btn-wrap,
    body.store-front-container .product-card:focus-within .wx-card-content-col > .product-action-btn-wrap,
    .preorder-list-container .product-card:hover .wx-card-content-col > .product-action-btn-wrap,
    .preorder-list-container .product-card:focus-within .wx-card-content-col > .product-action-btn-wrap,
    .catalog-theme-page .product-card:hover .wx-card-content-col > .product-action-btn-wrap,
    .catalog-theme-page .product-card:focus-within .wx-card-content-col > .product-action-btn-wrap {
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    body.store-front-container .product-card .wx-card-content-col > .product-action-btn-wrap .card-btn,
    body.store-front-container .product-card .wx-card-content-col > .product-action-btn-wrap .btn-submit-order,
    body.store-front-container .product-card .wx-card-content-col > .product-action-btn-wrap .btn-preorder,
    .preorder-list-container .product-card .wx-card-content-col > .product-action-btn-wrap .card-btn,
    .preorder-list-container .product-card .wx-card-content-col > .product-action-btn-wrap .btn-submit-order,
    .catalog-theme-page .product-card .wx-card-content-col > .product-action-btn-wrap .card-btn,
    .catalog-theme-page .product-card .wx-card-content-col > .product-action-btn-wrap .btn-submit-order,
    body.store-front-container .product-card .wx-card-content-col > .product-action-btn-wrap .card-btn:hover,
    body.store-front-container .product-card .wx-card-content-col > .product-action-btn-wrap .card-btn:focus-visible,
    body.store-front-container .product-card .wx-card-content-col > .product-action-btn-wrap .card-btn:active,
    .preorder-list-container .product-card .wx-card-content-col > .product-action-btn-wrap .card-btn:hover,
    .preorder-list-container .product-card .wx-card-content-col > .product-action-btn-wrap .card-btn:focus-visible,
    .preorder-list-container .product-card .wx-card-content-col > .product-action-btn-wrap .card-btn:active,
    .catalog-theme-page .product-card .wx-card-content-col > .product-action-btn-wrap .card-btn:hover,
    .catalog-theme-page .product-card .wx-card-content-col > .product-action-btn-wrap .card-btn:focus-visible,
    .catalog-theme-page .product-card .wx-card-content-col > .product-action-btn-wrap .card-btn:active {
        border-radius: var(--wx-card-btn-overlay-radius, 0 0 14px 14px) !important;
    }
}

@media (min-width: 768px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: reduce) {
    body.store-front-container .product-card .wx-card-content-col > .product-action-btn-wrap,
    .preorder-list-container .product-card .wx-card-content-col > .product-action-btn-wrap,
    .catalog-theme-page .product-card .wx-card-content-col > .product-action-btn-wrap {
        transition: none !important;
    }
}
