@charset "UTF-8";

/*
 * PNS Home Layer
 * 從原 PNS migration monolith 抽出的 Home / Rail / Product Card / Brand Zone 模組層
 */

/* =====================================================================
 * Task 3 — Hero 全寬輪播（Swiper.js）
 * ===================================================================== */
.pns-hero {
    width: 100%;
    max-width: none;
    margin: 0 auto 16px;
    padding: 12px 0 0 0;
    background: rgb(214, 233, 255);
    overflow: hidden;
}

.pns-hero-swiper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 0 40px 44px;
    box-sizing: border-box;
}

@media (min-width: 769px) {
    .pns-hero-swiper {
        overflow: visible;
    }
}

.pns-hero-swiper .swiper-wrapper {
    align-items: center;
}

.pns-hero-swiper .swiper-slide {
    width: 60%;
    max-width: 870px;
    height: auto;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
}

.pns-hero-swiper .swiper-slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* 非活动 slides 与活动 slide 高度一致，无缩放 */
.pns-hero-swiper .swiper-slide:not(.swiper-slide-active) {
    opacity: 1;
}

/* 非活动 slide 半透明遮罩：让中间活动图片更突出 */
.pns-hero-swiper .swiper-slide {
    position: relative;
}

.pns-hero-swiper .swiper-slide:not(.swiper-slide-active)::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    border-radius: 8px;
}

/* 分頁點樣式 — 與 PNS 一致 */
.pns-hero-swiper .swiper-pagination {
    bottom: 10px;
}

.pns-hero-swiper .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: rgba(0,0,0,0.35);
    opacity: 1;
}

.pns-hero-swiper .swiper-pagination-bullet-active {
    background: #555;
    width: 24px;
    border-radius: 4px;
}

/* 箭頭樣式 — 白色半橢圓背景，貼合中間幻燈片邊緣，hover 時顯示 */
.pns-hero-swiper .swiper-button-prev,
.pns-hero-swiper .swiper-button-next {
    color: #555;
    background: #fff;
    width: 37px;
    height: 80px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 禁用 Swiper 預設 ::after（swiper-icons 內嵌字體） */
.pns-hero-swiper .swiper-button-prev::after,
.pns-hero-swiper .swiper-button-next::after {
    display: none;
    content: none;
}

.pns-hero-swiper .swiper-button-prev .icon,
.pns-hero-swiper .swiper-button-next .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 12px;
    color: inherit;
}

.pns-hero-swiper .swiper-button-prev .icon:before,
.pns-hero-swiper .swiper-button-next .icon:before {
    font-family: "fontello" !important;
    font-weight: normal !important;
    font-style: normal;
    line-height: 1;
    color: inherit;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 左箭頭 — 在中間幻燈片左邊緣，圓弧朝左（外側），直邊朝右（貼片） */
.pns-hero-swiper .swiper-button-prev {
    left: calc(20% - 13px);
    border-radius: 20px 0 0 20px;
}

/* 右箭頭 — 在中間幻燈片右邊緣，圓弧朝右（外側），直邊朝左（貼片） */
.pns-hero-swiper .swiper-button-next {
    right: calc(20% - 13px);
    border-radius: 0 20px 20px 0;
}

/* hover 轮播区域时显示箭头 */
.pns-hero:hover .swiper-button-prev,
.pns-hero:hover .swiper-button-next {
    opacity: 1;
}

/* 暫停/播放按鈕 — 中間圖片左上角 */
.pns-hero-autoplay-btn {
    position: absolute;
    top: 16px;
    left: calc(20% + 40px);
    z-index: 20;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(2px) brightness(1.1);
    -webkit-backdrop-filter: blur(2px) brightness(1.1);
    color: rgba(255,255,255,0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
}

.pns-hero-autoplay-btn:hover {
    background: rgba(255,255,255,0.4);
}

.pns-hero-autoplay-btn.is-paused .pns-hero-pause-icon {
    display: none;
}

.pns-hero-autoplay-btn.is-paused .pns-hero-play-icon {
    display: block !important;
}

/* =====================================================================
 * Task 4 — 限時搶購（Flash Sale）：紅黃配色 + 倒計時
 * ===================================================================== */
.pns-flash-sale {
    max-width: 1280px;
    margin: 16px auto 0;
    padding: 0 24px;
}
.pns-flash-sale-card {
    background: linear-gradient(90deg, var(--pns-red) 0%, #FF3B0F 60%, var(--pns-orange) 100%);
    border-radius: 2px;
    padding: 18px 22px;
    color: #fff;
    overflow: hidden;
}
.pns-flash-sale-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 12px;
}
.pns-flash-sale-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.pns-flash-sale-title::before {
    content: "限";
    background: var(--pns-yellow);
    color: var(--pns-red);
    font-size: 14px;
    font-weight: 800;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pns-countdown {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,0.18);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}
.pns-countdown .pns-cd-cell {
    background: #fff;
    color: var(--pns-red);
    padding: 2px 8px;
    border-radius: 4px;
    min-width: 28px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.pns-countdown .pns-cd-sep { color: #fff; opacity: 0.85; }
.pns-flash-sale-body {
    background: #fff;
    border-radius: 2px;
    padding: 14px;
}
.pns-flash-sale-body .pns-rail-list { padding: 0; }

/* pns-main-body: 與 PDP / 分類列表同一套版心與左右边距（桌面）；移動端通欄見 @media ≤768 */
.pns-main-body {
    width: 100%;
    max-width: var(--ulive-content-max, 1280px);
    margin: 0 auto;
    padding: 0 var(--ulive-content-gutter, 50px);
    box-sizing: border-box;
}

.pns-main-body > .pns-rail {
    background: #fff;
}
.pns-main-body > .pns-rail--featured {
    background: transparent;
    border-radius: 0;
    overflow: visible;
}
.pns-rail--featured .pns-rail-inner {
    padding-left: 0;
    padding-right: 0;
}

/* 序号主图横滑（原站：大号蓝字序号叠在图左下 + 主图横滑 + 右侧箭头） */
.pns-main-body > .pns-rail--hot-buy {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.pns-rail--hot-buy .pns-rail-inner {
    padding: 20px 24px 24px;
}
.pns-rail--hot-buy .pns-rail-header {
    margin-bottom: 14px;
}
.pns-rail--hot-buy .pns-rail-title {
    font-size: 30px;
    font-weight: 700;
    color: #3e3e3e;
    line-height: 1.2;
}
.pns-rail--hot-buy .pns-rail-list {
    position: relative;
    padding-right: 8px;
}
.pns-rail--hot-buy .owl-item {
    overflow: visible;
}
.pns-rail--hot-buy .owl-stage-outer {
    padding-bottom: 2px;
}
.pns-rail--hot-buy .owl-item .pns-hot-buy-card {
    margin: 0 auto;
}
.pns-rail--hot-buy .pns-rail-carousel:not(.owl-loaded) > .pns-hot-buy-card,
.pns-rail--hot-buy .owl-item .pns-hot-buy-card {
    flex: 0 0 auto;
}
.pns-hot-buy-card {
    display: block;
    color: inherit;
    min-width: 0;
    width: 175px;
    max-width: 100%;
    padding: 0 3px 8px;
    text-align: center;
    border: none;
    box-shadow: none;
}
.pns-hot-buy-card :is(a, button, [role="button"]):focus {
    outline: none;
}
body.ulive-keyboard-nav .pns-hot-buy-card :is(a, button, [role="button"]):focus-visible {
    outline: 2px solid var(--pns-primary, #2a7de1);
    outline-offset: 2px;
}
.pns-hot-buy-image-wrap {
    position: relative;
    width: 175px;
    height: 175px;
    max-width: 100%;
    margin: 0 auto;
    overflow: visible;
}
/* 移动端整卡跳转详情；桌面端由 hover 按钮承担 */
.pns-hot-buy-card-link {
    display: none;
}
.pns-hot-buy-card-hover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
    background: rgba(255, 255, 255, 0.82);
    border-radius: 0;
    border: none;
    box-shadow: none;
    z-index: 4;
}
.pns-hot-buy-card:hover .pns-hot-buy-card-hover {
    opacity: 1;
}
.pns-hot-buy-card-hover .pns-preview-btn {
    width: 82%;
    min-width: 0;
    max-width: 140px;
    padding: 7px 0;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.pns-hot-buy-card-hover .pns-preview-btn:hover {
    background: #3fa7f3;
    color: #fff;
}
.pns-hot-buy-rank {
    position: absolute;
    left: 4px;
    bottom: 10px;
    z-index: 3;
    display: inline-block;
    font-family: var(--font-primary);
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
    color: #5ea8f8;
    -webkit-text-stroke: 4px #fff;
    paint-order: stroke fill;
    text-shadow: 0 0 10px rgba(110, 175, 250, 0.38);
    pointer-events: none;
    letter-spacing: -0.04em;
}
/* 原站：数字下方留白 + 灰蓝椭圆投影，营造悬浮立体感 */
.pns-hot-buy-rank::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -0.48em;
    z-index: -1;
    width: 1.12em;
    height: 0.19em;
    min-width: 56px;
    min-height: 12px;
    transform: translateX(-50%);
    background: radial-gradient(
        ellipse 100% 100% at 50% 50%,
        rgba(120, 138, 162, 0.55) 0%,
        rgba(120, 138, 162, 0.32) 42%,
        rgba(120, 138, 162, 0) 72%
    );
    border-radius: 50%;
    filter: blur(4px);
    opacity: 0.95;
}
.pns-hot-buy-image {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    border: none;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
}
.pns-hot-buy-image img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: none;
    box-shadow: none;
}
.pns-hot-buy-image__placeholder {
    font-size: 11px;
    color: #999;
}
.pns-rail--hot-buy .pns-rail-carousel:not(.owl-loaded) {
    display: flex !important;
    gap: 6px;
    overflow-x: auto;
    align-items: flex-end;
}
.pns-rail--hot-buy .pns-rail-carousel:not(.owl-loaded) > .pns-hot-buy-card {
    flex: 0 0 175px;
    min-width: 175px;
}
/* 原站：桌面端左右圆形箭头翻页 */
@media (min-width: 1281px) {
    .pns-rail--hot-buy .pns-rail-list .owl-nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        width: 100%;
        margin: 0;
        padding: 0 2px;
        box-sizing: border-box;
        transform: translateY(-50%);
        z-index: 5;
        pointer-events: none;
    }
    .pns-rail--hot-buy .pns-rail-list .owl-nav button {
        pointer-events: auto;
        margin: 0;
        flex: 0 0 auto;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.92) !important;
        color: #666 !important;
        border: none !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
        font-size: 22px !important;
        line-height: 40px !important;
    }
    .pns-rail--hot-buy .pns-rail-list .owl-nav button:hover {
        background: #fff !important;
        color: #3879ff !important;
    }
    .pns-rail--hot-buy .pns-rail-list .owl-nav .owl-prev,
    .pns-rail--hot-buy .pns-rail-list .owl-nav .owl-next {
        display: block;
    }
    /* 首尾页隐藏箭头（非半透明禁用态） */
    .pns-rail--hot-buy .pns-rail-list .owl-nav .owl-prev.disabled,
    .pns-rail--hot-buy .pns-rail-list .owl-nav .owl-next.disabled {
        display: none !important;
    }
    .pns-rail--hot-buy .pns-rail-list .owl-nav.is-single-page {
        display: none !important;
    }
    /* 仅一侧有箭头时靠右/靠左，对齐原站 */
    .pns-rail--hot-buy .pns-rail-list .owl-nav.is-at-start:not(.is-at-end) {
        justify-content: flex-end;
    }
    .pns-rail--hot-buy .pns-rail-list .owl-nav.is-at-end:not(.is-at-start) {
        justify-content: flex-start;
    }
    .pns-hot-buy-card-link {
        display: none !important;
    }
}

@media (hover: none), (pointer: coarse), (max-width: 1280px) {
    .pns-hot-buy-card {
        width: 140px;
    }
    .pns-hot-buy-card-hover {
        display: none !important;
    }
    .pns-hot-buy-card-link {
        display: block;
        position: absolute;
        inset: 0;
        z-index: 6;
        text-decoration: none;
        color: transparent;
        -webkit-tap-highlight-color: transparent;
    }
    .pns-hot-buy-image-wrap {
        width: 140px;
        height: 140px;
    }
    .pns-hot-buy-rank {
        font-size: 48px;
        -webkit-text-stroke: 3px #fff;
        left: 2px;
        bottom: 6px;
        text-shadow: 0 0 8px rgba(110, 175, 250, 0.34);
    }
    .pns-hot-buy-rank::after {
        bottom: -0.44em;
        min-width: 42px;
        min-height: 10px;
        filter: blur(3px);
    }
    .pns-rail--hot-buy .pns-rail-carousel:not(.owl-loaded) > .pns-hot-buy-card {
        flex: 0 0 140px;
        min-width: 140px;
    }
}

/* =====================================================================
 * 今日特價 + 新貨上架 並列預覽區
 * ===================================================================== */
.pns-preview-row {
    max-width: none;
    margin: 16px 0;
    padding: 0;
    display: flex;
    gap: 12px;
}

.pns-preview-col {
    flex: 1;
    max-width: calc(50% - 6px);
    background: #fff;
    border-radius: 8px;
    padding: 15px 15px 10px;
    min-width: 0;
}

.pns-preview-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 0;
}

.pns-preview-title {
    font-size: 20px;
    font-weight: 700;
    color: #1E388C;
    margin: 0;
}

.pns-preview-more {
    color: #3E3E3E;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    background: #f0f0f0;
    border: 1px solid #f0f0f0;
    border-radius: 20px;
    padding: 6px 16px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pns-preview-more:hover {
    background: #fff;
    border-color: #7bbcf7;
    color: #3E3E3E;
}

.pns-preview-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    align-items: stretch;
}

.pns-preview-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: stretch;
    height: 100%;
    width: 100%;
    min-height: 0;
    text-decoration: none;
    padding: 0 8px 8px;
    border-radius: 6px;
    transition: background 0.2s;
    box-sizing: border-box;
}

.pns-preview-card:hover {
    background: #f5f5f5;
}

.pns-preview-card-img {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
}

.pns-preview-card-img img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.pns-preview-card-hover {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.25s;
    background: rgba(255,255,255,0.75);
}

.pns-preview-card:hover .pns-preview-card-hover {
    opacity: 1;
}

.pns-preview-btn {
    display: block;
    width: 80%;
    text-align: center;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    background: rgba(255,255,255,0.92);
    border: none;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.pns-preview-btn:hover {
    background: #3FA7F3;
    color: #fff;
}

.pns-preview-card-title {
    display: none;
}

.pns-preview-card-price {
    text-align: center;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    flex: 0 0 auto;
    min-height: 42px;
    box-sizing: border-box;
}
/* 無原價時保留第二行高度，避免「加入購物車」高低不齐 */
.pns-preview-card-price:not(:has(.pns-preview-price-original))::after {
    content: '\00a0';
    display: block;
    width: 100%;
    height: 14px;
    margin-top: 2px;
    visibility: hidden;
    pointer-events: none;
}
.pns-preview-price {
    color: var(--pns-red, #E53935);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
}
.pns-preview-price-original {
    color: var(--pns-muted, #999);
    font-size: 12px;
    text-decoration: line-through;
    margin-top: 2px;
    line-height: 1.2;
    min-height: 14px;
}

/* 桌面端（有 hover 且寬屏）：底部按钮隐藏，由 hover 覆蓋層提供 */
.pns-preview-card-actions {
    display: none;
}

/* 觸屏 / 平板（≤1280 含 Nest Hub Max、或無 hover / 粗指针）：底部常駐「加入購物車」 */
@media (hover: none), (pointer: coarse), (max-width: 1280px) {
    .pns-preview-card-hover {
        display: none !important;
    }
    .pns-preview-card-actions {
        display: block !important;
        width: 100%;
        margin-top: auto;
        padding-top: 6px;
        flex-shrink: 0;
        visibility: visible !important;
        opacity: 1 !important;
    }
    .pns-preview-card-actions .pns-preview-btn-cart {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 44px;
        text-align: center;
        padding: 8px 12px;
        font-size: 13px;
        font-weight: 500;
        color: #333;
        background: #f0f0f0;
        border: none;
        border-radius: 22px;
        text-decoration: none;
        cursor: pointer;
        transition: background 0.15s, color 0.15s;
        -webkit-appearance: none;
        appearance: none;
        font-family: var(--font-primary);
        line-height: 1.35;
        box-sizing: border-box;
    }
    .pns-preview-card-actions .pns-preview-btn-cart:hover {
        background: #e8e8e8;
        color: #333;
    }
}

/* 預覽商品卡：移除瀏覽器默認虛線焦點框（PC/手機通用）；Tab 鍵導航見 body.ulive-keyboard-nav */
.pns-preview-card :is(a, button),
.pns-preview-more {
    -webkit-tap-highlight-color: transparent;
}
.pns-preview-card:focus-within,
.pns-preview-card :is(a, button):focus,
.pns-preview-card :is(a, button):focus-visible,
.pns-preview-card img:focus,
.pns-preview-more:focus,
.pns-preview-more:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}
.pns-preview-card :is(a, button)::-moz-focus-inner {
    border: 0;
}
body.ulive-keyboard-nav .pns-preview-card :is(a, button):focus-visible,
body.ulive-keyboard-nav .pns-preview-more:focus-visible {
    outline: 2px solid var(--pns-primary, #2a7de1) !important;
    outline-offset: 2px;
}

/* =====================================================================
 * Task 5 — 橫向滑動 Rail 商品組件
 * ===================================================================== */
.pns-rail {
    max-width: none;
    margin: 0 0 30px;
    background: transparent;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
}
.pns-rail-inner {
    padding: 20px;
}
.pns-rail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    border-bottom: none;
    padding-bottom: 0;
}
.pns-rail-title {
    font-size: 30px;
    font-weight: 700;
    color: #3E3E3E;
    margin: 0;
}
.pns-rail-more {
    color: #3E3E3E;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 6px 16px;
    transition: border-color 0.15s, color 0.15s;
}
.pns-rail-more:hover {
    background: #3FA7F3;
    border-color: #3FA7F3;
    color: #fff;
}
/* Rail Banner */
.pns-rail-banner {
    width: 100%;
    max-width: 100%;
    height: 213px;
    margin-bottom: 0;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    box-sizing: border-box;
}
.pns-rail-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* 当没有标题时，"查看所有"按钮靠右 */
.pns-rail-header .pns-rail-more:only-child {
    margin-left: auto;
}
.pns-rail-list {
    position: relative;
}
/* 全局後備：Owl Carousel 未初始化時防止 display:none 隱藏產品 */
.pns-rail-carousel:not(.owl-loaded) {
    display: flex !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 5px;
    flex-wrap: nowrap;
    max-width: 100%;
    scrollbar-width: none;
}
.pns-rail-carousel:not(.owl-loaded)::-webkit-scrollbar { display: none; }
.pns-rail-carousel:not(.owl-loaded) > .pns-product-card {
    flex: 0 0 180px;
    min-width: 160px;
}
/* Owl Carousel 安全网：确保 stage 不会推宽页面（即使 CDN CSS 加载失败） */
.owl-stage-outer {
    overflow: hidden;
}
.pns-rail-list .owl-nav {
    display: none;
}
.pns-rail-list .owl-nav button {
    pointer-events: auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff !important;
    color: var(--pns-text) !important;
    border: 1px solid var(--pns-line) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    font-size: 18px !important;
    line-height: 1 !important;
}
.pns-rail-list .owl-nav button.disabled { opacity: 0.4; }
.pns-rail-list .owl-nav button:hover { background: var(--pns-primary) !important; color: #fff !important; }

/* =====================================================================
 * Task 6 — 商品卡片升級（PNS 風：圖、標題、會員價、− 1 + 數量、加購）
 * ===================================================================== */
.pns-product-card {
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    border: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
    height: 100%;
    text-align: left;
}
.pns-product-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.pns-product-card-media {
    position: relative;
}
.pns-product-card .pns-product-image {
    display: block;
    aspect-ratio: 1;
    background: var(--pns-bg-soft);
    overflow: hidden;
}
.pns-product-card-wishlist {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    padding: 4px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.pns-product-card-wishlist .icon:before {
    font-size: 22px;
    line-height: 1;
    color: #c8c8c8;
    transition: color 0.15s ease;
}
/* PC：卡片 hover 顯示圖標；已登入且已在清單則常駐顯示 */
.pns-product-card:hover .pns-product-card-wishlist,
.pns-product-card-wishlist:focus-visible,
.pns-product-card-wishlist.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
/* 滑鼠移到圖標：實心灰 → 紅 */
.pns-product-card-wishlist:hover .icon:before,
.pns-product-card-wishlist:focus-visible .icon:before {
    color: #e31837;
}
/* 已在購物清單：PC / 手機常駐、紅色實心 */
.pns-product-card-wishlist.is-active .icon:before {
    color: #e31837;
}
.pns-product-card-wishlist:disabled {
    opacity: 0.6;
    cursor: wait;
}
.pns-product-card .pns-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.pns-product-card .pns-product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--pns-yellow);
    color: var(--pns-red);
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 3px;
    line-height: 1.2;
}

/* Rank Crown Badge（焦點推介 · 原站 icon icon-crown gold） */
.pns-rank-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    pointer-events: none;
}
.pns-rank-badge .icon-crown {
    grid-area: 1 / 1;
    display: block;
    font-size: 40px;
    line-height: 1;
}
.pns-rank-badge .icon-crown.gold { color: #e2b228; }
.pns-rank-badge .icon-crown.silver { color: #9b9b9b; }
.pns-rank-badge .icon-crown.bronze { color: #ae7e40; }
.pns-rank-badge .icon-crown.grey { color: #ccc; }
.pns-rank-num {
    grid-area: 1 / 1;
    position: relative;
    margin-top: 7px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    z-index: 1;
}
.pns-product-card .pns-product-info {
    padding: 10px 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 auto;
}
.pns-product-card .pns-product-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--pns-text);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(14px * 1.4 * 2);
}
.pns-product-card .pns-product-title a {
    color: inherit !important;
    text-decoration: none;
}
.pns-product-card .pns-product-title a:hover { color: var(--pns-primary) !important; }
.pns-product-card .ulive-card-spec {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    min-height: 1.3em;
    color: var(--pns-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pns-product-card .ulive-card-spec.is-empty {
    visibility: hidden;
}
.pns-product-card .ulive-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-height: 16px;
}
.pns-product-card .ulive-card-meta.is-empty {
    visibility: hidden;
}
.pns-product-card .ulive-card-rating {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    flex: 1 1 auto;
}
.pns-product-card .ulive-card-stars {
    display: inline-flex;
    gap: 1px;
    align-items: center;
    line-height: 1;
    flex-shrink: 0;
}
.pns-product-card .ulive-card-stars .icon-star {
    font-size: 12px;
    color: #ddd;
}
.pns-product-card .ulive-card-stars .icon-star:before {
    color: #ddd;
}
.pns-product-card .ulive-card-stars .icon-star.active,
.pns-product-card .ulive-card-stars .icon-star.active:before {
    color: var(--ulive-star-color);
}
.pns-product-card .ulive-card-review-count {
    font-size: 11px;
    color: var(--pns-muted);
    white-space: nowrap;
}
.pns-product-card .ulive-card-sales {
    flex-shrink: 0;
    font-size: 11px;
    color: var(--pns-muted);
    white-space: nowrap;
}
.pns-product-card .pns-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: nowrap;
}
.pns-product-card .pns-price {
    color: var(--pns-red);
    font-size: 20px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.pns-product-card .pns-price-original {
    color: var(--pns-muted);
    font-size: 13px;
    text-decoration: line-through;
}
.pns-product-card .pns-member-tag {
    display: inline-block;
    background: var(--pns-red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    line-height: 1.2;
    margin-left: auto;
}
.pns-product-card .pns-card-actions {
    margin-top: auto;
    padding-top: 8px;
}
.pns-product-card .pns-qty {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--pns-line);
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}
.pns-product-card .pns-qty button {
    width: 28px;
    height: 32px;
    background: #fff;
    color: var(--pns-text);
    border: none;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
}
.pns-product-card .pns-qty button:hover { background: var(--pns-bg-soft); color: var(--pns-primary); }
.pns-product-card .pns-qty input {
    width: 36px;
    height: 32px;
    border: none;
    border-left: 1px solid var(--pns-line);
    border-right: 1px solid var(--pns-line);
    text-align: center;
    font-size: 14px;
    font-family: var(--font-primary);
    color: var(--pns-text);
    background: #fff;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}
.pns-product-card .pns-qty input::-webkit-outer-spin-button,
.pns-product-card .pns-qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.pns-product-card .pns-add-cart {
    display: block;
    width: 100%;
    background: #f0f0f0;
    color: #333;
    border: none;
    border-radius: 22px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    line-height: 1;
    white-space: nowrap;
}
.pns-product-card:hover .pns-add-cart {
    background: #3FA7F3;
    color: #fff;
}
.pns-product-card .pns-add-cart:hover {
    background: #3FA7F3;
    color: #fff;
}
.pns-product-card .pns-add-cart .icon { font-size: 14px; }
.pns-product-card .pns-add-cart.loading { opacity: 0.6; cursor: wait; }

/* =====================================================================
 * Task 7 — 品牌 / 專題入口區（促銷Banner + 分類入口 + 品牌Logo）
 * ===================================================================== */

/* 三個區塊共同基礎 */
.pns-promotion-banner,
.pns-product-category,
.pns-brand-zone {
    max-width: none;
    margin: 0 0 30px;
    padding: 0;
}

/* ── 宽图横幅（PNS：3 列横图） ── */
.pns-bank-promo-banner {
    max-width: none;
    margin: 0 0 20px;
    padding: 0;
}
.pns-bank-promo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
}
.pns-bank-promo-tile {
    display: block;
    border-radius: 0;
    overflow: hidden;
    aspect-ratio: 390 / 160;
    min-width: 0;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pns-bank-promo-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.pns-bank-promo-tile img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    display: block;
}

/* ── 四格入口方格（PNS：4 列，样式复用分类入口） ── */
.pns-cross-category-tiles {
    max-width: none;
    margin: 0 0 24px;
    padding: 0;
}
.pns-cross-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

/* ── 區塊1：促銷 Banner（PNS：約 4 列方格，286×286） ── */
.pns-promotion-banner-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
}
.pns-promo-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    min-width: 0;
    position: relative;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.pns-promo-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}
.pns-promo-tile-title {
    position: absolute;
    top: 12px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    padding: 0 8px;
    z-index: 2;
    /* 白色描邊效果：多層 text-shadow 模擬 */
    text-shadow:
        -1px -1px 0 #333,
         1px -1px 0 #333,
        -1px  1px 0 #333,
         1px  1px 0 #333,
        -2px  0   0 #333,
         2px  0   0 #333,
         0   -2px 0 #333,
         0    2px 0 #333;
}
.pns-promo-tile img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    object-position: center;
    display: block;
    z-index: 1;
}

/* ── 區塊2：商品分類入口（PNS：206×260 合成圖或淺藍對角底 + 標籤左上 + 產品右下） ── */
.pns-product-category-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 6px;
}
.pns-cat-group {
    width: calc(25% - 4px);
    height: 181px;
    display: flex;
    flex-direction: row;
    gap: 5px;
}
.pns-cat-tile {
    display: block;
    position: relative;
    aspect-ratio: 206 / 260;
    min-height: 0;
    border-radius: 0;
    overflow: hidden;
    text-decoration: none;
    background: transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pns-cat-tile::before,
.pns-cat-tile::after {
    content: none;
}
.pns-cat-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(44, 74, 110, 0.16);
}
/* 首頁精選分類：保留圓角 */
.pns-product-category-grid .pns-cat-tile {
    border-radius: 12px;
}
/* L1 方格 / 跨品類入口：直角 */
.pns-cross-category-grid .pns-cat-tile {
    border-radius: 0;
}
.pns-cat-tile-label {
    position: absolute;
    top: 18px;
    left: 16px;
    right: 8%;
    margin: 0;
    padding: 0;
    color: var(--pns-text, #333);
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: normal;
    z-index: 2;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
    text-shadow: 0 0 6px rgba(191, 227, 247, 0.85);
}
.pns-cat-tile-media {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    pointer-events: none;
}
.pns-cat-tile-media img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center bottom;
    display: block;
}

/* ── 區塊3：品牌入口（每格一品牌；避免奇數時最後一組 flex 撐滿兩格寬） ── */
.pns-brand-zone-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 5px;
}
.pns-brand-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    height: 178px;
    min-width: 0;
    position: relative;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 0;
}
.pns-brand-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}
.pns-brand-tile img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* =====================================================================
 * Responsive Home Extracts
 * 從原 PNS migration monolith 響應式段落抽出的 Home / Rail / Category / Brand 適配
 * ===================================================================== */
@media (min-width: 1441px) {
    .pns-hero-swiper {
        max-width: 1440px;
        margin: 0 auto;
    }
}

@media (max-width: 1024px) {
    /* Hero */
    .pns-hero-swiper {
        padding: 0 24px 40px;
    }
    .pns-hero-swiper .swiper-slide {
        width: 70%;
    }
    .pns-hero-swiper .swiper-button-prev {
        left: calc(15% - 13px);
    }
    .pns-hero-swiper .swiper-button-next {
        right: calc(15% - 13px);
    }
    .pns-hero-autoplay-btn {
        left: calc(15% + 24px);
    }

    /* Preview：平板不再左右各塞 3 列（過窄），改上下堆疊 + 全寬 4 列網格 */
    .pns-preview-row {
        flex-direction: column;
        gap: 12px;
    }
    .pns-preview-col {
        max-width: 100%;
        padding: 14px 16px 12px;
    }
    .pns-preview-products {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        align-items: stretch;
    }
    .pns-preview-card {
        padding-left: 6px;
        padding-right: 6px;
    }
    .pns-preview-card-img img {
        width: 100%;
        max-width: 96px;
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: contain;
    }
    .pns-preview-card-actions .pns-preview-btn-cart {
        padding: 8px 10px;
        font-size: 12px;
    }

    /* Brand / Category */
    .pns-brand-zone-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .pns-product-category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }

    /* Rail banner */
    .pns-rail-banner {
        height: 160px;
    }
}

/* 矮屏横屏（Nest Hub 1024×600 等）：4 件商品一行排滿，避免 3+1 孤行 */
@media (max-width: 1024px) and (max-height: 700px) {
    .pns-preview-products {
        grid-template-columns: repeat(4, 1fr);
    }
    .pns-hero-swiper .swiper-slide {
        width: 85%;
    }
}

@media (max-width: 768px) {
    /* === 全局防溢出（核弹级约束） === */
    /* 勿對 .pns-header-wrapper 設 overflow:hidden，否則 position:sticky 在 iOS 上會失效 */
    .site-main,
    .pns-hero,
    .pns-main-body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* 主體：全寬 + 小幅 gutter，並裁剪橫向溢出 */
    .pns-main-body {
        margin-left: 0;
        margin-right: 0;
        padding-left: var(--ulive-content-gutter, 12px);
        padding-right: var(--ulive-content-gutter, 12px);
        box-sizing: border-box;
        overflow-x: hidden;
    }

    /* 主體所有直接子塊：強制不超過屏幕寬度 */
    .pns-main-body > * {
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    /* 任何使用固定寬度的內部元素，移動端一律降為 100% */
    .pns-main-body .pns-rail-banner,
    .pns-main-body .pns-cat-group,
    .pns-main-body .pns-rail-list,
    .pns-main-body .pns-rail-carousel,
    .pns-main-body .pns-rail-inner,
    .pns-main-body .pns-preview-row,
    .pns-main-body .pns-preview-col,
    .pns-main-body .pns-preview-products {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    /* 預覽欄（今日特價 / 新貨上架）：內部橫滑，外部裁切 */
    .pns-main-body .pns-preview-col {
        overflow: hidden;
    }
    .pns-hero {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .pns-hero-swiper {
        width: 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
        overflow: hidden !important;
        box-sizing: border-box;
    }

    .pns-hero-swiper .swiper-wrapper {
        max-width: 100%;
    }

    .pns-flash-sale {
        max-width: 100%;
        box-sizing: border-box;
    }

    .pns-preview-row {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .pns-preview-col {
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }

    /* === Hero 輪播（原站移動端：近全寬、圓角、含分頁點） === */
    .pns-hero {
        margin-bottom: 8px;
        padding-top: 8px;
        background: rgb(214, 233, 255);
    }
    .pns-hero-swiper {
        padding: 0 0 32px;
        overflow: hidden !important;
    }
    .pns-hero-swiper .swiper-slide {
        width: 100%;
        max-width: none;
        border-radius: 8px;
    }
    .pns-hero-swiper .swiper-slide img {
        border-radius: 8px;
    }
    .pns-hero-swiper .swiper-slide:not(.swiper-slide-active)::after {
        display: none;
    }
    .pns-hero-swiper .swiper-button-prev,
    .pns-hero-swiper .swiper-button-next {
        width: 28px;
        height: 56px;
        display: none;
    }
    .pns-hero-swiper .swiper-button-prev {
        left: calc(7.5% - 8px);
        border-radius: 14px 0 0 14px;
    }
    .pns-hero-swiper .swiper-button-next {
        right: calc(7.5% - 8px);
        border-radius: 0 14px 14px 0;
    }
    .pns-hero-autoplay-btn {
        left: calc(7.5% + 12px);
        top: 10px;
        width: 18px;
        height: 18px;
    }
    .pns-hero-swiper .swiper-pagination {
        bottom: 6px;
    }

    /* === Preview Row（今日特價 + 新貨上架）=== */
    .pns-preview-row {
        flex-direction: column;
        gap: 12px;
        padding: 0;
    }
    .pns-preview-col {
        max-width: 100%;
        padding: 12px;
    }
    .pns-preview-products {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 12px;
        scrollbar-width: none;
        gap: 10px;
        padding: 2px 2px 8px;
    }
    .pns-preview-products::-webkit-scrollbar {
        display: none;
    }
    .pns-preview-products .pns-preview-card {
        flex: 0 0 124px;
        width: 124px;
        align-self: stretch;
        height: auto;
        box-sizing: border-box;
        padding: 0 4px 6px;
        scroll-snap-align: start;
    }
    .pns-preview-card-img img {
        width: 88px;
        height: 88px;
        max-width: 100%;
    }
    .pns-preview-price { font-size: 14px; }
    .pns-preview-price-original { font-size: 11px; }

    /* ≤768 手機：加購按鈕略加大 */
    .pns-preview-card-actions .pns-preview-btn-cart {
        padding: 10px 16px;
        font-size: 14px;
    }

    /* === Flash sale === */
    .pns-flash-sale { padding: 0; }
    .pns-flash-sale-title { font-size: 18px; }
    .pns-countdown { font-size: 12px; padding: 4px 8px; }

    /* === Rails === */
    .pns-rail,
    .pns-rail--featured {
        margin-bottom: 20px;
        border-radius: 8px;
        overflow: hidden;
    }
    .pns-rail--has-banner {
        overflow: hidden;
    }
    .pns-rail-inner {
        padding: 14px 12px;
    }
    .pns-rail-title {
        font-size: 22px;
    }
    .pns-rail-banner {
        width: 100%;
        height: auto;
        border-radius: 8px 8px 0 0;
        overflow: hidden;
    }
    .pns-rail-banner img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }
    .pns-rail-list .owl-nav { display: none; }
    /* 橫向輪播須裁切在版心內，不可 overflow:visible 撐破視口 */
    .pns-rail,
    .pns-rail--featured,
    .pns-rail--has-banner {
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }
    .pns-rail-list {
        max-width: 100%;
        overflow: hidden;
    }
    .pns-rail-carousel {
        max-width: 100%;
        overflow: hidden;
    }
    .pns-rail-carousel .owl-stage-outer {
        overflow: hidden;
        max-width: 100%;
    }
    /* Owl Carousel 未初始化時的後備顯示：防止 display:none 隱藏全部內容 */
    .pns-rail-carousel:not(.owl-loaded) {
        display: flex !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        scrollbar-width: none;
    }
    .pns-rail-carousel:not(.owl-loaded)::-webkit-scrollbar { display: none; }
    .pns-rail-carousel:not(.owl-loaded) > .pns-product-card {
        flex: 0 0 42%;
        min-width: 140px;
        max-width: 180px;
    }

    /* === Product card：手機版 === */
    .pns-product-card .pns-product-title { font-size: 13px; min-height: calc(13px * 1.4 * 2); }
    .pns-product-card .pns-price { font-size: 16px; }
    .pns-product-card .pns-product-info { padding: 8px 6px 10px; }

    /* === 促銷 / 方格 / 宽图 Banner（移动端：横向滑动，不挤网格换行） === */
    .pns-bank-promo-banner,
    .pns-cross-category-tiles,
    .pns-promotion-banner,
    .pns-product-category,
    .pns-brand-zone {
        margin-bottom: 20px;
        overflow: visible;
    }
    .pns-promotion-banner-grid,
    .pns-cross-category-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 12px;
        scrollbar-width: none;
        gap: 6px;
        padding: 2px 2px 8px;
    }
    .pns-promotion-banner-grid::-webkit-scrollbar,
    .pns-cross-category-grid::-webkit-scrollbar {
        display: none;
    }
    .pns-promotion-banner-grid .pns-promo-tile {
        flex: 0 0 42%;
        width: 42%;
        min-width: 140px;
        max-width: 180px;
        scroll-snap-align: start;
    }
    .pns-cross-category-grid .pns-cat-tile {
        flex: 0 0 42%;
        width: 42%;
        min-width: 120px;
        max-width: 160px;
        scroll-snap-align: start;
    }
    .pns-bank-promo-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 12px;
        scrollbar-width: none;
        gap: 8px;
        padding: 2px 2px 8px;
    }
    .pns-bank-promo-grid::-webkit-scrollbar {
        display: none;
    }
    .pns-bank-promo-tile {
        flex: 0 0 calc(100vw - 24px);
        width: calc(100vw - 24px);
        min-width: 0;
        max-width: calc(100vw - 24px);
        aspect-ratio: 390 / 160;
        scroll-snap-align: start;
    }

    /* === 分類入口 — 移動端 4 列網格（2 行 × 4 列） === */
    .pns-product-category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }
    .pns-product-category-grid .pns-cat-tile {
        border-radius: 10px;
    }
    .pns-cross-category-grid .pns-cat-tile {
        border-radius: 0;
    }
    .pns-cat-tile-label {
        top: 14px;
        left: 12px;
        right: 6%;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.2;
    }
    /* === 品牌入口：移動端 2×4 網格 === */
    .pns-brand-zone-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        overflow: hidden;
        max-height: calc(2 * 80px + 6px); /* 2 行 + 1 個間距 */
    }
    .pns-brand-zone-grid .pns-brand-tile {
        height: 80px;
        border-radius: 8px;
    }

}

/* ─── ≤600px：大手機 — 預覽卡略加寬、易點 ─── */
@media (max-width: 600px) {
    .pns-preview-products .pns-preview-card {
        flex: 0 0 132px;
        width: 132px;
    }
    .pns-preview-card-img img {
        width: 92px;
        height: 92px;
    }
    .pns-preview-title { font-size: 16px; }
    .pns-preview-more { font-size: 12px; padding: 5px 12px; }

    /* Category: 保持 4 列網格 */
    .pns-cat-tile-label {
        font-size: 14px;
        font-weight: 500;
    }
    .pns-brand-zone-grid {
        max-height: calc(2 * 70px + 6px);
    }
    .pns-brand-zone-grid .pns-brand-tile {
        height: 70px;
    }

    /* Rail 標題 */
    .pns-rail-title { font-size: 20px; }
    .pns-rail-banner { height: auto; }
}

@media (max-width: 480px) {
    /* Hero */
    .pns-hero-swiper {
        padding: 0 6px 28px;
    }

    .pns-main-body {
        padding-left: var(--ulive-content-gutter, 12px);
        padding-right: var(--ulive-content-gutter, 12px);
    }

    /* Preview */
    .pns-preview-col {
        padding: 10px 8px;
    }

    /* Product card */
    .pns-product-card {
        padding: 8px;
        border-radius: 8px;
    }
    .pns-product-card-wishlist {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .pns-product-card .pns-card-actions { flex-wrap: wrap; gap: 6px; }
    .pns-product-card .pns-qty { width: 100%; justify-content: center; }
    .pns-product-card .pns-add-cart { width: 100%; height: 36px; }
    .pns-preview-card-actions .pns-preview-btn-cart {
        min-height: 44px;
        height: auto;
        padding: 10px 12px;
    }
    .pns-product-card .pns-product-title { font-size: 12px; min-height: calc(12px * 1.4 * 2); }
    .pns-product-card .pns-price { font-size: 15px; }
    .pns-preview-products { gap: 10px; }
    /* Category / Brand */
    .pns-cat-tile-label {
        font-size: 15px;
        font-weight: 500;
        top: 16px;
        left: 14px;
        right: 6%;
    }
}

@media (max-width: 375px) {
    .pns-hero-swiper { padding: 0 4px 24px; }
    .pns-hero { padding-top: 8px; }

    .pns-preview-row { gap: 8px; }
    .pns-preview-col { padding: 8px 6px; }
    .pns-preview-title { font-size: 14px; }
    .pns-preview-more { font-size: 11px; padding: 4px 10px; }
    .pns-preview-products { gap: 6px; }
    .pns-preview-card-img img { width: 60px; height: 60px; }
    .pns-preview-price { font-size: 13px; }
    .pns-preview-products .pns-preview-card {
        flex: 0 0 120px;
        width: 120px;
    }

    .pns-rail-inner { padding: 10px 8px; }
    .pns-rail-title { font-size: 18px; }
    .pns-rail-more { font-size: 12px; padding: 4px 12px; }

    .pns-promotion-banner-grid,
    .pns-cross-category-grid,
    .pns-bank-promo-grid {
        gap: 4px;
    }
    .pns-product-category-grid { gap: 4px; }
    .pns-product-category-grid .pns-cat-tile { border-radius: 8px; }
    .pns-cross-category-grid .pns-cat-tile { border-radius: 0; }
    .pns-cat-tile-label {
        top: 12px;
        left: 10px;
        right: 4%;
        font-size: 12px;
        font-weight: 500;
        line-height: 1.2;
    }
    .pns-brand-zone-grid { gap: 4px; max-height: calc(2 * 64px + 4px); }
    .pns-brand-zone-grid .pns-brand-tile {
        height: 64px;
        border-radius: 8px;
    }
}
