/* =========================
   NAV (Desktop base)
========================= */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__menu {
    display: flex;
    gap: 24px;
}

/* =========================
   HAMBURGER (Mobile)
   - spans -> X animation
========================= */
.nav__hamburger {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    cursor: pointer;
    position: relative;
    z-index: 12000;
    /* must be above mega / overlay */
    -webkit-tap-highlight-color: transparent;
}

/* use absolute lines for morphing */
.nav__hamburger span {
    position: absolute;
    left: 50%;
    width: 22px;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transform: translateX(-50%);
    transition: transform .28s ease, opacity .18s ease, top .28s ease, filter .25s ease;
    filter: blur(0);
}

.nav__hamburger span:nth-child(1) {
    top: 14px;
}

.nav__hamburger span:nth-child(2) {
    top: 21px;
}

.nav__hamburger span:nth-child(3) {
    top: 28px;
}

/* open -> X + slight fog */
.nav__hamburger.is-active span {
    filter: blur(1.2px);
}

.nav__hamburger.is-active span:nth-child(1) {
    top: 21px;
    transform: translateX(-50%) rotate(45deg);
    filter: blur(0);
}

.nav__hamburger.is-active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-50%) scaleX(.6);
    filter: blur(6px);
}

.nav__hamburger.is-active span:nth-child(3) {
    top: 21px;
    transform: translateX(-50%) rotate(-45deg);
    filter: blur(0);
}

/* =========================
   MOBILE FULLSCREEN MENU
   - uses [hidden] + .active
========================= */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
}

.mobile-menu[hidden] {
    display: none !important;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: auto;
}

/* fog glass backdrop */
.mobile-glass {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .42);
    backdrop-filter: blur(26px) saturate(1.2) contrast(.95);
    -webkit-backdrop-filter: blur(26px) saturate(1.2) contrast(.95);
}

/* floating fog */
.mobile-glass::before {
    content: "";
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(closest-side at 20% 30%, rgba(255, 255, 255, .65), transparent 60%),
        radial-gradient(closest-side at 75% 20%, rgba(255, 255, 255, .45), transparent 55%),
        radial-gradient(closest-side at 60% 80%, rgba(255, 255, 255, .55), transparent 60%),
        radial-gradient(closest-side at 30% 75%, rgba(255, 255, 255, .35), transparent 55%);
    filter: blur(34px);
    opacity: .85;
    animation: fogDrift 14s ease-in-out infinite alternate;
}

@keyframes fogDrift {
    from {
        transform: translate3d(-2%, -1%, 0) scale(1.03);
    }

    to {
        transform: translate3d(2%, 1%, 0) scale(1.07);
    }
}

/* subtle grain */
.mobile-glass::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, rgba(0, 0, 0, .025) 0 1px, transparent 1px 3px),
        repeating-linear-gradient(90deg, rgba(0, 0, 0, .02) 0 1px, transparent 1px 4px);
    opacity: .08;
    mix-blend-mode: soft-light;
    pointer-events: none;
}

.mobile-stage {
    position: relative;
    width: 100%;
    height: 100%;
}

/* view switching */
.mobile-view {
    position: absolute;
    inset: 0;
    padding: 80px 32px 32px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .4s ease, transform .4s ease;
    pointer-events: none;
}


.mobile-view h2 {
    margin-top: 6%;
    font-size: 3vw;
    letter-spacing: 2px;
    color: #707070;
    font-weight: 200;
}

.mobile-view.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* root menu typography */
.mobile-root-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mobile-root-list li {
    margin: 4% 0 14%;
    /* fog item start */
    opacity: 0;
    transform: translateY(14px);
    filter: blur(10px);
}

.mobile-root-list a,
.mobile-enter {
    font-size: 26px;
    font-weight: 500;
    background: none;
    border: 0;
    text-align: left;
    cursor: pointer;
    color: #111;
    text-decoration: none;
    display: inline-block;
    padding: 0;
}

.mobile-root-list span {
    display: block;
    font-size: 12px;
    letter-spacing: .2em;
    opacity: .6;
}

/* fog item reveal (stagger) */
.mobile-menu.active .mobile-view.active .mobile-root-list li {
    animation: fogItemIn .6s ease forwards;
}

.mobile-menu.active .mobile-view.active .mobile-root-list li:nth-child(1) {
    animation-delay: .06s;
}

.mobile-menu.active .mobile-view.active .mobile-root-list li:nth-child(2) {
    animation-delay: .12s;
}

.mobile-menu.active .mobile-view.active .mobile-root-list li:nth-child(3) {
    animation-delay: .18s;
}

.mobile-menu.active .mobile-view.active .mobile-root-list li:nth-child(4) {
    animation-delay: .24s;
}

@keyframes fogItemIn {
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* submenu list */
.mobile-sub-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mobile-sub-list li {
    margin: 12% 0 8%;
}

.mobile-sub-list a {
    display: inline-block;
    padding-bottom: 2%;
    border-bottom: 4px #ca8e22 solid;
    font-size: 5vw;
    letter-spacing: 2px;
    font-weight: 500;
    color: #3b3b3b;
    text-decoration: none;
}

/* back button (if you keep it) */
.mobile-back {
    position: absolute;
    top: 8%;
    left: 6%;
    background: none;
    border: 0;
    color: #ea8f0e;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
}

/* body lock */
body.no-scroll {
    overflow: hidden;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {

    .site-header {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0 4%;
        height: 6vh;
    }

    .nav__menu {
        display: none;
    }

    .nav__hamburger {
        display: block;
    }

    .mega-menu {
        display: none;
    }
}



























/* ========== Mobile TOC：手機隱藏側欄 TOC ========== */
@media (max-width: 768px) {

    /* 依你現在 TOC 容器 class 調整：常見是 .toc-sidebar */
    .toc-sidebar {
        display: none !important;
    }
}

/* ========== Floating Button ========== */
.toc-fab {
    position: fixed;
    right: 16px;
    bottom: 18px;
    z-index: 2400;
    /* 要高於文章內容，但低於 mobile-menu(你是 3000) */
    border: 0;
    padding: 12px 14px;
    border-radius: 999px;
    font-size: 14px;
    letter-spacing: .12em;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    display: none;
    /* 桌機不顯示 */
}

@media (max-width: 768px) {
    .toc-fab {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }
}

/* ========== Bottom Sheet ========== */
.toc-sheet {
    position: fixed;
    inset: 0;
    z-index: 2350;
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s ease;
}

.toc-sheet.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* 玻璃迷霧背景 */
.toc-sheet__glass {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .35);
    backdrop-filter: blur(24px) saturate(1.1);
    -webkit-backdrop-filter: blur(24px) saturate(1.1);
}

.toc-sheet__glass::before {
    content: "";
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(closest-side at 20% 30%, rgba(255, 255, 255, .65), transparent 60%),
        radial-gradient(closest-side at 75% 20%, rgba(255, 255, 255, .45), transparent 55%),
        radial-gradient(closest-side at 60% 80%, rgba(255, 255, 255, .55), transparent 60%),
        radial-gradient(closest-side at 30% 75%, rgba(255, 255, 255, .35), transparent 55%);
    filter: blur(34px);
    opacity: .9;
    animation: tocFogDrift 14s ease-in-out infinite alternate;
}

@keyframes tocFogDrift {
    from {
        transform: translate3d(-2%, -1%, 0) scale(1.03);
    }

    to {
        transform: translate3d(2%, 1%, 0) scale(1.07);
    }
}

/* 面板：從底部上滑 */
.toc-sheet__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 78vh;
    border-radius: 18px 18px 0 0;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
    transform: translateY(16px);
    opacity: 0;
    transition: transform .32s ease, opacity .32s ease;
    padding: 10px 18px 22px;
    overflow: hidden;
}

.toc-sheet.is-open .toc-sheet__panel {
    transform: translateY(0);
    opacity: 1;
}

.toc-sheet__handle {
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .14);
    margin: 6px auto 10px;
}

.toc-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 2px 10px;
}

.toc-sheet__head h3 {
    margin: 0;
    font-size: 16px;
    letter-spacing: .08em;
}

.toc-sheet__close {
    border: 0;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    padding: 8px 10px;
}

/* TOC list */
.toc-sheet__nav {
    overflow: auto;
    max-height: calc(78vh - 64px);
    padding-right: 4px;
}

.toc-sheet__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-sheet__list li {
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.toc-sheet__list a {
    display: block;
    padding: 14px 4px;
    text-decoration: none;
    color: rgba(0, 0, 0, .82);
    letter-spacing: .06em;
    line-height: 1.35;
}

/* 開啟時：禁捲 */
body.no-scroll {
    overflow: hidden;
}


@media (max-width: 1024px) {


    .breadcrumb {
        width: 90vw;
        margin-left: 5vw;
        margin-top: 18%;
    }

    .breadcrumb-item {
        font-size: 12px;
    }

    section .product-card--main {
        width: 86%;
    }

    section .product-card__description ul {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 16px;
    }

    section .product-card__description ul li {
        margin: 0;
        padding: 12px 14px;
        border-radius: 10px;
    }

    section .product-card__title {
        font-size: clamp(26px, 3.2vw, 40px);
    }

    section .product-card__subtitle {
        font-size: clamp(13px, 1.4vw, 16px);
        line-height: 1.7;
    }

    section .product-feature__title {
        font-size: clamp(18px, 2.2vw, 28px);
    }

    section .product-feature__description p {
        font-size: clamp(14px, 1.6vw, 16px);
    }

    .sop-block>h3 {
        font-size: clamp(16px, 1.8vw, 20px);
        padding: 10px 14px;
        border-radius: 10px;
    }

    .sop-list li {
        font-size: clamp(14px, 1.4vw, 16px);
        padding: 14px 14px;
        border-radius: 12px;
    }

    .note {
        font-size: 13px;
        letter-spacing: 0.5px;
    }

    .cleaning-tutorial__article-title {
        font-size: 16px;
    }

    .cleaning-tutorial__description {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    section {
        flex-direction: column;
        width: 100%;
    }

    section .product-display {
        position: static;
        width: 100%;
        height: auto;
        top: auto;
        padding: 0 5vw;
        margin-bottom: 16px;
    }

    section .product-card {
        width: 100%;
        margin: 0 auto 6vh;
        padding: 0 5vw;
    }

    section .product-card--main {
        width: 100%;
        padding: 22px 18px;
        border-radius: 20px;
    }

    section .product-card__description h3 {
        font-size: 15px;
        letter-spacing: 1px;
    }

    section .product-feature__description h3 {
        width: 100%;
        font-size: 14px;
        padding: 10px 12px;
    }

    section .product-card .product-specifications {
        flex-wrap: wrap;
        gap: 10px;
    }

    section .product-index {
        position: sticky;
        top: 12vh;
        right: auto;
        left: 0;
        width: 100%;
        padding: 10px 5vw;
        flex-direction: row;
        gap: 5px;
        z-index: 5;
    }

    section .product-index a {
        writing-mode: horizontal-tb;
        text-orientation: mixed;
        font-size: 13px;
        padding: 10px 2%;
        margin: 0;
        letter-spacing: 1px;
        white-space: nowrap;
        border-radius: 10px;
    }

    section .product-comparison--main {
        width: 90vw;
        padding: 18px 16px;
        border-radius: 20px;
    }

    section .product-figures--img {
        flex-direction: column;
    }

    section .product-figure {
        margin: 12px 0;
    }

    .product-articles {
        flex-direction: column;
        gap: 22px;
        padding: 0 5vw;
    }

    .cleaning-tutorial__article {
        width: 100%;
    }

    .cleaning-tutorial__article img {
        height: auto;
        max-height: 320px;
    }

    .product-relative {
        width: 90vw;
        padding: 28px 18px;
        border-radius: 20px;
    }

    .product-relative__title {
        margin: 0 0 14px;
        font-size: 22px;
    }

    .product-list {
        flex-direction: column;
        gap: 16px;
    }

    .product__image {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .product__number {
        font-size: 14px;
    }

    .product__description h5 {
        font-size: 16px;
    }

    .product__description h6 {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    section .product-display {
        padding: 6% 0 0;
    }

    section .product-card {
        padding: 0 4vw;
    }

    section .product-card--main {
        padding: 18px 14px;
        border-radius: 16px;
    }

    section .product-card__title {
        font-size: 26px;
    }

    .sop-video {
        border-radius: 14px;
    }

    section .product-index {
        top: 8.5vh;
        padding: 8px 4vw;
    }
}

/* =============== Responsive =============== */
@media (max-width: 768px) {
    .pollution-section {
        width: 92vw;
        padding: 3rem 1.5rem;
    }

    .pollution-section .pollution-title {
        font-size: 1.8rem;
    }
}


@media (max-width:768px) {
    .footer {
        height: 100vh;
        width: 100vw;
        display: flex;
        flex-direction: column;
        background-color: #444;
    }

    .footer a {
        color: #f8f8f8;
    }

    .footer__info {
        height: 100%;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        color: #f8f8f8;
    }

    .footer__nav {
        width: 100%;
        margin-bottom: 5vh;
    }

    .footer__nav ul {
        display: flex;
        flex-direction: column;
        margin: 0 auto;
        width: 100%;
    }

    .footer__nav ul li {
        margin: 2vh auto;
        font-size: 20px;
        letter-spacing: 4px;
    }

    .footer__nav ul li img {
        margin: 5vh auto;
        width: 36vw;
    }

    .footer__contact {
        display: flex;
        flex-direction: column;
        text-align: center;
        border-left: none;
    }

    .footer__company {
        margin: 3vh 0;
    }

    .footer__company--ch {
        font-size: 28px;
        margin: 0 0 4vh;
        letter-spacing: 5px;
    }

    .footer__company--en {
        font-size: 20px;
        letter-spacing: 8px;
    }

    .footer__address {
        margin: 3vh 0 0vh;
        font-size: 10px;
        letter-spacing: 2px;
    }

    .footer__address p {
        margin: 2vh 0 0;
    }

    .Yuuhakuchi {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100vw;
        font-size: 12px;
        height: 6vh;
        text-align: center;
        letter-spacing: 0.6px;
        background-color: #f8f8f8;
    }
}