/**
 * 立即選購獨立頁：全螢幕規格面板（沿用 #specModal 樣式，無遮罩疊層）
 * body 沿用整站背景（storefront-site-background），不覆寫為白底
 */
body.spec-standalone-page {
    margin: 0;
    padding-top: 80px;
    padding-bottom: calc(85px + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
}

body.spec-standalone-page #specModal.spec-modal--standalone {
    position: relative !important;
    display: flex !important;
    inset: auto !important;
    z-index: 1 !important;
    min-height: auto;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    padding: 0 !important;
    overflow: visible !important;
}

body.spec-standalone-page #specModal.spec-modal--standalone .spec-content {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    opacity: 1 !important;
    transform: none !important;
    background: var(--storefront-pspec-panel-bg, transparent) !important;
    background-color: var(--storefront-pspec-panel-bg, transparent) !important;
    background-image: none !important;
}

@media (max-width: 768px) {
    body.spec-standalone-page {
        padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
    }
}

@media (min-width: 769px) {
    body.spec-standalone-page #specModal.spec-modal--standalone {
        min-height: auto;
        padding: clamp(16px, 3vh, 40px) clamp(12px, 2vw, 32px) !important;
        background: transparent !important;
        align-items: center !important;
        justify-content: center !important;
    }

    body.spec-standalone-page #specModal.spec-modal--standalone .spec-content {
        width: min(96vw, 1120px) !important;
        max-width: 1120px !important;
        min-height: 0 !important;
        max-height: min(calc(100vh - 80px - 100px), 1000px) !important;
        border-radius: 22px !important;
        border: 1px solid var(--storefront-pspec-border-color, #c9c9c9) !important;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08) !important;
        overflow-y: auto !important;
    }

    body.spec-standalone-page #specModal.storefront-pspec--appearance.storefront-pspec--panel-transparent.spec-modal--standalone .spec-content {
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
}

/* 獨立商品頁：往下捲動時收起頂部列（手機／桌面皆適用） */
body.spec-standalone-page .header.storefront-header {
    transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s ease;
    will-change: transform, opacity;
}

body.spec-standalone-page .header.storefront-header.is-scroll-collapsed {
    transform: translateY(calc(-1 * var(--storefront-header-h-mobile, 80px)));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@media (min-width: 769px) {
    body.spec-standalone-page .header.storefront-header.is-scroll-collapsed {
        transform: translateY(calc(-1 * var(--storefront-header-h-desktop, 96px)));
    }
}
