/* =========================================
   Reset & Base Styles
   ========================================= */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 65px; /* 避開置頂導覽列的高度，以免遮擋錨點標題 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f7f7f7;
    -webkit-font-smoothing: antialiased;
}

/* 上方置頂橫向滑動導覽列 */
.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(220, 220, 220, 0.4);
    width: 100%;
}

.nav-scroll-container {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 15px;
    gap: 10px;
    -webkit-overflow-scrolling: touch; /* iOS 滑動流暢 */
    scrollbar-width: none; /* Firefox 隱藏滾動條 */
}

/* Chrome, Safari, Opera 隱藏滾動條 */
.nav-scroll-container::-webkit-scrollbar {
    display: none;
}

.nav-item {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    background: #f5f5f5;
    border-radius: 20px;
    border: 1px solid #eaeaea;
    transition: all 0.3s ease;
}

.nav-item:hover, .nav-item.active {
    color: #fff !important;
    background: linear-gradient(135deg, #d4af37 0%, #b5952f 100%) !important;
    border-color: #b5952f !important;
    box-shadow: 0 3px 8px rgba(212, 175, 55, 0.2);
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    position: relative;
    padding-bottom: 80px; /* For sticky CTA */
}

/* =========================================
   Image Sections
   ========================================= */
.image-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.full-img {
    width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   Typography & Common
   ========================================= */
.section-title {
    font-size: 22px; /* Slightly smaller title for space saving */
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px; /* Reduced margin */
    color: #222;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 32px; /* Marginally narrower line */
    height: 2.5px;
    background-color: #d4af37; /* Gold accent */
    margin: 4px auto 0; /* Tighter line */
    border-radius: 2px;
}

/* =========================================
   Checkout Section & Unlock Box
   ========================================= */
.checkout-section {
    padding: 15px 0 24px 20px; /* Reduced top padding to 15px to bring title up */
    background-color: #fafafa;
    overflow: hidden;
}

.checkout-section .section-title {
    padding-right: 20px; /* Compensate for wrapper padding */
}

.unlock-container {
    padding-right: 20px;
    margin-bottom: 8px; /* Extremely tight margin */
}

.unlock-box {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    padding: 8px 12px; /* Ultra compressed vertical padding */
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.unlock-desc {
    font-size: 13.5px; /* Slightly larger for main call to action */
    font-weight: 700;
    color: #d23232; /* Rich red title color */
    margin-bottom: 6px; /* Reduced gap to input group */
}

.code-highlight {
    background-color: #fce8e6;
    color: #d23232;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 13.5px;
    border: 1px dashed rgba(210, 50, 50, 0.3);
    margin: 0 1px;
}



.unlock-input-group {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.unlock-input-group input {
    flex: 1;
    max-width: 180px;
    padding: 6px 12px; /* Slimmer inputs */
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.unlock-input-group input:focus {
    border-color: #222;
}

.btn-unlock {
    background-color: #111;
    color: #fff;
    border: none;
    padding: 6px 16px; /* Slimmer button */
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    font-size: 14px;
}

/* =========================================
   Horizontal Scroll Plans
   ========================================= */
.plans-horizontal-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding-bottom: 20px; /* For shadow and scrollbar */
    padding-right: 20px;
    -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
}

/* Elegant micro scrollbar to ensure PC/Mac desktop users can easily scroll/drag to select */
.plans-horizontal-wrapper::-webkit-scrollbar {
    height: 6px;
    display: block; /* Show scrollbar on PC/Mac desktop */
}

.plans-horizontal-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.plans-horizontal-wrapper::-webkit-scrollbar-thumb {
    background: #d4af37; /* Elegant gold scrollbar thumb */
    border-radius: 10px;
}

.plans-horizontal-wrapper::-webkit-scrollbar-thumb:hover {
    background: #b5952f;
}

.plan-card {
    flex: 0 0 85%; /* Card width relative to container */
    max-width: 320px;
    scroll-snap-align: center;
    background: #fff;
    border: 2px solid #eaeaea;
    border-radius: 16px;
    padding: 15px 16px 12px 16px; /* Compressed card padding */
    box-shadow: 0 5px 20px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.plan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.plan-card.recommended {
    border-color: #eaeaea; /* Remove blue border, match others */
}

/* Selected Card Highlight - No blue border */
.plan-card.is-selected {
    border-color: #eaeaea; 
}

/* Tags */
.card-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.card-tags span {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.tag-primary {
    background: #e8f0fe;
    color: #1a73e8;
}

.tag-secondary {
    background: #f1f3f4;
    color: #5f6368;
}

.tag-danger {
    background: #fce8e6;
    color: #d93025;
}

.card-title {
    font-size: 20px; /* Slightly smaller for compactness */
    font-weight: 900;
    color: #222;
    margin-bottom: 4px;
}

.card-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.product-subtext {
    font-size: 13px;
    font-weight: 500;
    color: #b5952f; /* 優雅的灰金色彩 */
    margin-top: -6px; /* 緊貼上一行描述文 */
    margin-bottom: 10px; /* 與下方的產品圖片保持舒適間距 */
}

/* Image Placeholder */
.card-image-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background-color: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 1px dashed #ddd;
}

.placeholder-text {
    color: #999;
    font-weight: 700;
}

/* Plan Card Image */
.plan-card-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 10px;
    display: block;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    border: 1px solid #eee;
}

/* Price Lock Area */
.price-lock-area {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px 10px; /* Slimmer price area */
    text-align: center;
    margin-bottom: 10px;
}

.locked-text {
    font-size: 13px;
    color: #555;
    display: block; /* Shown by default */
}

.unlocked-price {
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* When unlocked via JS */
.is-unlocked .locked-text {
    display: none;
}
.is-unlocked .unlocked-price {
    display: flex;
}

.original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.sale-price {
    font-size: 24px;
    font-weight: 900;
    color: #d23232;
}

.discount-tag-mini {
    background-color: #d93025; /* 強烈紅底 */
    color: #ffffff; /* 亮白文字 */
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    display: inline-block;
    align-self: center;
    box-shadow: 0 2px 5px rgba(217, 48, 37, 0.2);
    animation: tag-pulse 1.8s infinite ease-in-out;
}

@keyframes tag-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.06); }
    100% { transform: scale(1); }
}

/* Features */
.card-features {
    margin-bottom: 12px;
    flex-grow: 1;
}

.feature-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 6px;
    color: #222;
}

.card-features ul {
    list-style: none;
}

.card-features li {
    font-size: 13.5px;
    color: #444;
    margin-bottom: 4px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.check-icon {
    color: #0f9d58; /* Green checkmark */
    font-weight: 700;
}

/* Checkout Button (Default White State) */
.btn-direct-checkout {
    width: 100%;
    background-color: #ffffff;
    color: #333333;
    border: 1.5px solid #cccccc;
    padding: 10px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    text-align: center;
}

/* Selected Card Button State (Blue State代表選中) */
.plan-card.is-selected .btn-direct-checkout {
    background-color: #1a73e8 !important;
    color: #ffffff !important;
    border-color: #1a73e8 !important;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.25) !important;
}

.btn-direct-checkout:hover {
    opacity: 0.95;
}

/* =========================================
   FAQ Section
   ========================================= */
.faq-section {
    padding: 50px 20px;
    background-color: #fff;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 18px 20px;
    background: #fff;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #222;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.faq-question:hover {
    background: #fdfdfd;
}

.faq-question .icon {
    font-size: 20px;
    font-weight: 300;
    color: #d4af37;
    transition: transform 0.3s;
}

.faq-question.active .icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: #fafafa;
}

.faq-answer p {
    padding: 0 20px 15px;
    color: #555;
    font-size: 14.5px;
    line-height: 1.6;
}

.faq-answer p:last-child {
    padding-bottom: 20px;
}

.faq-answer-subtitle {
    font-weight: 700;
    color: #222;
    padding: 5px 20px 5px !important;
}

.faq-answer-list {
    list-style: none;
    padding: 0 20px 15px 20px;
}

.faq-answer-list li {
    position: relative;
    padding-left: 15px;
    font-size: 14px;
    color: #555;
    margin-bottom: 6px;
    line-height: 1.5;
}

.faq-answer-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #d4af37; /* 金色小點 */
    font-weight: bold;
    font-size: 16px;
    top: -2px;
}

.faq-alert-box {
    margin: 5px 20px 15px 20px;
    font-size: 13.5px;
    color: #d93025;
    background: #fce8e6;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #d93025;
    line-height: 1.5;
}

.faq-alert-box strong {
    color: #d93025;
}

.faq-code-box {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 11.5px !important;
    word-break: break-all;
    background: #f8f9fa;
    padding: 12px 15px !important;
    border-radius: 6px;
    color: #666 !important;
    border: 1px solid #eee;
    margin: 5px 20px 15px 20px;
}

.faq-footer-note {
    margin-top: 30px;
    font-size: 12.5px;
    color: #777;
    line-height: 1.7;
    background: #fafafa;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    padding: 16px 20px;
    text-align: justify;
}

/* =========================================
   Footer
   ========================================= */
footer {
    text-align: center;
    padding: 30px 20px;
    background: #222;
    color: #888;
    font-size: 14px;
}

/* =========================================
   Sticky CTA
   ========================================= */
.sticky-bottom-cta {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    padding: 15px 20px;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
    z-index: 100;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.sticky-bottom-cta.is-hidden {
    transform: translate(-50%, 100%);
    opacity: 0;
    pointer-events: none;
}

.btn-sticky {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #d4af37 0%, #b5952f 100%);
    color: #fff;
    text-align: center;
    padding: 16px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}
