    /* ==========================================
   IQOS加熱菸 浮動卡片區塊樣式
   ========================================== */

.science-intro-section {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* 雙欄重疊容器 */
.science-intro-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* 左側圖片區塊 (佔寬度約 65%~70%) */
.science-intro-image {
    width: 68%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.science-intro-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* 右側重疊浮動卡片 (佔寬度約 45%，向左重疊蓋住圖片) */
.science-intro-content-wrapper {
    position: relative;
    width: 55%;
    margin-left: -13%; /* 關鍵：向左重疊 */
    z-index: 2;
}

/* 白色卡片主體 */
.science-intro-content {
    background-color: #ffffff;
    padding: 40px 45px;
    border-radius: 6px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.science-intro-content h2 {
    font-size: 26px;
    font-weight: 700;
    color: #111111;
    margin: 0 0 18px 0;
    letter-spacing: 0.5px;
}

.science-intro-content p {
    font-size: 14px;
    line-height: 1.8;
    color: #555555;
    margin: 0 0 28px 0;
    text-align: justify;
}

/* 藍色按鈕樣式 (對齊圖片中的滿版長條藍鈕) */
.science-intro-action .btn-buy {
    display: block;
    width: 100%;
    text-align: center;
    padding: 13px 0;
    background-color: #007bff;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.science-intro-action .btn-buy:hover {
    background-color: #0069d9;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

/* ==========================================
   RWD 手機端自適應排版 (低於 768px 時改為上下堆疊)
   ========================================== */
@media (max-width: 768px) {
    .science-intro-container {
        flex-direction: column;
    }

    .science-intro-image {
        width: 100%;
        border-radius: 8px 8px 0 0;
    }

    .science-intro-content-wrapper {
        width: 100%;
        margin-left: 0;
        margin-top: -20px; /* 手機端稍微壓上一點，增加層次感 */
    }

    .science-intro-content {
        padding: 25px 20px;
        border-radius: 0 0 8px 8px;
    }

    .science-intro-content h2 {
        font-size: 22px;
    }

    .science-intro-content p {
        font-size: 13.5px;
    }
}
@media screen and (max-width: 768px) {
    /* 手機端強制將整個容器改為直向排列 */
    .terea-grid-wrapper {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }
    /* 強制圖片區塊排在第一位 */
    .terea-image-right {
        order: 1 !important;
    }
    /* 強制文字介紹區塊排在第二位 */
    .terea-content-left {
        order: 2 !important;
    }
}

 /* 僅在手機與平版端（小於 768px）生效：強制改為一行 2 列 */
@media screen and (max-width: 768px) {
    .product-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important; /* 手機端網格間距 */
        padding: 0 4px !important;
    }

    /* 手機端卡片與字體細節優化，確保雙欄排版整齊美觀 */
    .product-grid .product-card {
        margin-bottom: 0 !important;
        box-sizing: border-box;
    }

    .product-grid .product-image {
        width: 100% !important;
    }

    .product-grid .product-image img {
       
        object-fit: cover !important;
    }

    .product-grid .product-info {
        padding: 8px 8px !important;
    }

    .product-grid .product-name {
        font-size: 0.85rem !important;
        line-height: 1.35 !important;
        height: 2.7em; /* 限制大約兩行的高度 */
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* 超出兩行顯示省略號 */
        -webkit-box-orient: vertical;
    }

    .product-grid .product-price {
        font-size: 0.9rem !important;
        margin: 4px 0 !important;
    }

    .product-grid .product-action {
        margin-top: 8px !important;
    }

    .product-grid .btn-buy {
        padding: 6px 2px !important;
        font-size: 0.8rem !important;
    }
}

.banner-slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.banner-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.banner-slide {
    min-width: 100%;
    box-sizing: border-box;
}

.banner-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    object-fit: cover;
    
}

/* 左右箭頭按鈕樣式 */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    font-size: 18px;
    padding: 12px 16px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.slider-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.prev-btn { left: 15px; }
.next-btn { right: 15px; }

/* 底部圓點指示器 */
.slider-dots {
    position: absolute;
    bottom: 15px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.dot {
    cursor: pointer;
    height: 10px;
    width: 10px;
    margin: 0 2px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s, transform 0.3s;
}

.dot.active, .dot:hover {
    background-color: #ffffff;
    transform: scale(1.2);
}

/* RWD 手機端微調 */
@media (max-width: 768px) {
    .slider-btn {
        padding: 8px;
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .prev-btn { left: 8px; }
    .next-btn { right: 8px; }
}
.disabled {display: none;}
/* ==========================================================================
   精簡合併後的完整樣式
   ========================================================================== */
.product-grid-section {
    padding: 40px 0;
 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.product-grid-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.section-title-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.section-title-link h2 {
    font-size: 1.85rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
}

.section-title-link h2::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background-color: #dc2626;
    border-radius: 2px;
}

.category-intro {
    margin-bottom: 1.75rem;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.7;
    background: #ffffff;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

.product-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: #cbd5e1;
    box-shadow: 0 12px 20px -4px rgba(0, 0, 0, 0.08);
}

.product-image-wrapper {
    position: relative;
    padding: 24px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
}

.product-image-wrapper.bg-pink-light { background-color: #fdf2f8; }
.product-image-wrapper.bg-purple-light { background-color: #faf5ff; }

.product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.badge {
    font-size: 0.725rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    color: #ffffff;
    line-height: 1.2;
}

.badge-red { background-color: #ef4444; }
.badge-purple { background-color: #a855f7; }

.image-box {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .image-box img {
    transform: scale(1.05);
}

.product-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin: 4px 0 8px 0;
}

.original-price {
    font-size: 0.85rem;
    color: #94a3b8;
    text-decoration: line-through;
    margin-left: 6px;
    font-weight: 400;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.stars {
    color: #f59e0b;
    font-size: 0.9rem;
    letter-spacing: -1px;
}

.rating-score {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

.btn-add-cart {
    width: 100%;
    padding: 10px 0;
    background-color: #dc2626;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-add-cart:hover { background-color: #b91c1c; }
.btn-add-cart:active { transform: scale(0.98); }

.no-product-tip {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
    color: #64748b;
    background: #ffffff;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
}

/* 規格彈窗樣式 */
.gift-spec-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.gift-spec-modal {
    background: #ffffff;
    width: 100%;
    max-width: 480px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.gift-spec-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gift-spec-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.gift-spec-modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
}

.gift-spec-modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.gift-spec-product {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

.gift-spec-product-image {
    width: 70px;
    height: 70px;
    object-fit: contain;
    background-color: #f7eff1;
    border-radius: 6px;
    padding: 5px;
}

.gift-spec-product-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gift-spec-product-name {
    font-size: 15px;
    font-weight: 600;
    color: #222222;
    margin: 0;
}

.gift-spec-product-price {
    font-size: 16px;
    font-weight: 700;
    color: #e53935;
    margin: 0;
}

.gift-spec-section { margin-bottom: 20px; }
.gift-spec-title { font-size: 14px; font-weight: 600; color: #444444; margin: 0 0 10px 0; }
.gift-spec-options { display: flex; flex-wrap: wrap; gap: 10px; }

.gift-spec-option {
    background-color: #f8f9fa;
    border: 1px solid #dcdcdc;
    color: #333333;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13.5px;
    cursor: pointer;
}

.gift-spec-option:hover:not(.disabled) { border-color: #36323e; }
.gift-spec-option.selected { background-color: #36323e; color: #ffffff; border-color: #36323e; font-weight: 600; }
.gift-spec-option.disabled { background-color: #f1f1f1; color: #b0b0b0; border-color: #e0e0e0; cursor: not-allowed; opacity: 0.6; }

.gift-spec-quantity-section { margin-bottom: 20px; }
.gift-spec-quantity-title { font-size: 14px; font-weight: 600; color: #444444; margin: 0 0 10px 0; }
.gift-spec-quantity-box { display: flex; align-items: center; justify-content: space-between; }
.gift-spec-quantity-control { display: inline-flex; border: 1px solid #dcdcdc; border-radius: 6px; overflow: hidden; background-color: #f8f9fa; }

.gift-spec-quantity-btn {
    background: transparent; border: none; width: 36px; height: 38px;
    font-size: 16px; font-weight: 600; color: #333333; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

.gift-spec-quantity-btn:hover { background-color: #eaeaea; }

.gift-spec-quantity-input {
    width: 50px; height: 38px; border: none;
    border-left: 1px solid #dcdcdc; border-right: 1px solid #dcdcdc;
    text-align: center; font-size: 14px; font-weight: 600; outline: none;
}

.gift-spec-quantity-label { font-size: 13px; color: #666666; }

.gift-spec-price-info {
    background-color: #f8f9fa; padding: 12px 15px; border-radius: 6px;
    margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center;
}

.gift-spec-price-info .price { font-size: 16px; font-weight: 700; color: #e53935; margin: 0; }
.gift-spec-price-info .stock { font-size: 13px; color: #666666; margin: 0; }
.gift-spec-actions { padding-top: 10px; }

.gift-spec-confirm-btn {
    width: 100%; height: 46px; background-color: #36323e; color: #ffffff;
    border: none; border-radius: 23px; font-size: 15px; font-weight: 600; cursor: pointer;
}

.gift-spec-confirm-btn:hover:not(:disabled) { background-color: #1e1b24; }
.gift-spec-confirm-btn:disabled { background-color: #cccccc; cursor: not-allowed; opacity: 0.7; }

/* ==========================================
   懸浮按鈕群組容器 (統一固定在右下角)
   ========================================== */
.iqos-floating-actions {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: flex;
    flex-direction: column; /* 順向排列：購物車在最上，客服居中，回頂部在最下 */
    align-items: flex-end;
    gap: 12px;
    z-index: 9999;
}


/* ==========================================
   懸浮小購物車按鈕樣式
   ========================================== */
.iqos-float-cart {
    position: relative !important;
    right: auto !important;
    bottom: auto !important;

    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    margin: 0;

    background: #36323e;
    color: #fff;

    border: 0;
    border-radius: 50%;

    box-shadow: 0 4px 16px rgba(0,0,0,.18);
    cursor: pointer;
    z-index: 9999;

    transition: transform .25s ease, background-color .25s ease, box-shadow .25s ease;
}

/* 購物車 SVG 圖標 */
.iqos-cart-svg {
    display: block;
    stroke: #ffffff;
    stroke-width: 2;
    fill: none;
}

/* 商品數量紅點 */
.floating-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: #e53935;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid #ffffff;
    line-height: 1;
}

/* 購物車滑鼠懸停效果 */
@media (hover:hover){
    .iqos-float-cart:hover {
        background: #1e1b24;
        transform: translateY(-3px);
        box-shadow: 0 7px 20px rgba(0,0,0,.22);
    }
}


/* ==========================================
   回到頂部按鈕
   ========================================== */
.iqos-back-top {
    position: static !important;
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    margin: 0;

    background: #198754;
    color: #fff;

    border: 0;
    border-radius: 50%;

    box-shadow: 0 4px 16px rgba(0,0,0,.18);
    cursor: pointer;
    z-index: 9999;

    /* 預設隱藏 */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);

    transition: opacity .25s ease, visibility .25s ease, transform .25s ease, background-color .25s ease;
}

.iqos-back-top span {
    display: block;
    color: #fff;
    font-size: 25px;
    font-weight: 600;
    line-height: 1;
    transform: translateY(-1px);
}

.iqos-back-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

@media (hover:hover){
    .iqos-back-top:hover {
        background: #146c43;
        transform: translateY(-3px);
    }
}

.iqos-back-top:focus-visible {
    outline: 3px solid rgba(25,135,84,.35);
    outline-offset: 3px;
}


/* ==========================================
   懸浮線上客服按鈕
   ========================================== */
.iqos-float-service {
    position: static !important;
    min-width: 120px;
    height: 48px;
    padding: 0 18px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    background: #06c755;
    color: #fff !important;
    border-radius: 30px;
    text-decoration: none !important;

    font-size: 14px;
    font-weight: 600;
    line-height: 1;

    box-shadow: 0 4px 16px rgba(0,0,0,.18);
    z-index: 9999;

    transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease;
}

.iqos-service-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    line-height: 1;
}

.iqos-service-text {
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

@media (hover:hover){
    .iqos-float-service:hover {
        background: #05b94e;
        color: #fff !important;
        transform: translateY(-3px);
        box-shadow: 0 7px 20px rgba(0,0,0,.22);
    }
}

.iqos-float-service:focus-visible {
    outline: 3px solid rgba(6,199,85,.3);
    outline-offset: 3px;
}


/* ==========================================
   手機版適應
   ========================================== */
@media(max-width: 768px){
    .iqos-floating-actions {
        right: 15px;
        bottom: 18px;
    }

    .iqos-float-cart,
    .iqos-back-top {
        width: 44px;
        height: 44px;
    }

    .iqos-back-top span {
        font-size: 22px;
    }

    .iqos-float-service {
        min-width: 108px;
        height: 44px;
        padding: 0 14px;
        font-size: 13px;
    }

    .iqos-service-icon {
        font-size: 17px;
    }

    .iqos-service-text {
        font-size: 13px;
    }
}


/* 尊重使用者減少動畫設定 */
@media(prefers-reduced-motion: reduce){
    .iqos-back-top,
    .iqos-float-service,
    .iqos-float-cart {
        transition: none;
    }
}