/* --- CSS Design System for Beauty Style 水嫩模式 Landing Page --- */

:root {
    --bg-page: #fdf5f6;           /* Soft baby pink to match the images' water ripple borders */
    --font-primary: 'Outfit', 'Noto Sans TC', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Branding Colors */
    --accent-pink: #e04f77;       /* Premium brand pink/raspberry from the box/packets */
    --accent-pink-hover: #c43c61; /* Darker raspberry for hover states */
    --accent-pink-light: #fef0f3; /* Soft peach pink background for input/tips */
    --accent-pink-border: #fbcad7;/* Delicate border pink */
    --accent-gold: #d9a752;       /* Premium gold for badges/announcements */
    --accent-gold-hover: #c5933f;
    --text-primary: #2d2426;       /* Warm dark slate-gray for readability */
    --text-secondary: #5e4e50;     /* Warm gray for paragraphs */
    --text-muted: #a38f92;         /* Soft muted gray-pink */
    --border-radius: 20px;         /* Smooth rounded card corners */
    --shadow-soft: 0 8px 30px rgba(224, 79, 119, 0.05), 0 2px 10px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 16px 40px rgba(224, 79, 119, 0.1), 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* --- Base & Reset Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-page);
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    background-color: var(--bg-page);
    display: flex;
    justify-content: center;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* Centered content wrapper for both Desktop and Mobile */
.landing-container {
    width: 100%;
    max-width: 750px; /* Centered column matching vertical image slices */
    background-color: #ffffff;
    box-shadow: 0 0 50px rgba(224, 79, 119, 0.08);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* --- Announcement Bar --- */
.announcement-bar {
    background: linear-gradient(90deg, #f88a9e, #e04f77, #f88a9e);
    color: #ffffff;
    font-size: 0.85rem;
    padding: 8px 16px;
    z-index: 1001;
    position: relative;
    font-weight: 700;
}

.announcement-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.countdown {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
}

.time-box {
    background-color: #ffffff;
    color: var(--accent-pink);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.9rem;
}

/* --- Image Sections (Slice Images) --- */
.img-section {
    width: 100%;
    overflow: hidden;
}

.img-section img {
    width: 100%;
    display: block; /* Removes baseline spacing gaps between stacked images */
    height: auto;
}

/* --- Scroll Offset --- */
.img-section, .coded-plans-section {
    scroll-margin-top: 55px; /* Offset for the sticky nav bar */
}

/* --- Sticky Header --- */
.sticky-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 10000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(224, 79, 119, 0.12);
    box-shadow: 0 4px 18px rgba(224, 79, 119, 0.02);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    width: 100%;
}

.nav-links-scroll {
    display: flex;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    margin-right: 8px;
    /* Fading mask on the right edge to visually indicate scrollable text */
    mask-image: linear-gradient(to right, #000 82%, transparent 98%);
    -webkit-mask-image: linear-gradient(to right, #000 82%, transparent 98%);
}

.nav-links-scroll::-webkit-scrollbar {
    display: none;
}
.nav-links-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.nav-link {
    font-family: var(--font-primary);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 8px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-pink);
    background-color: rgba(224, 79, 119, 0.08);
}

.nav-link.active {
    font-weight: 800;
    color: var(--accent-pink);
}

.nav-btn-order {
    font-family: var(--font-primary);
    text-decoration: none;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 9999px;
    background-color: var(--accent-pink) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(224, 79, 119, 0.2);
    transition: all 0.2s ease;
    margin-left: 6px;
    flex-shrink: 0;
}

.nav-btn-order:hover {
    background-color: var(--accent-pink-hover) !important;
    box-shadow: 0 6px 14px rgba(224, 79, 119, 0.35);
}

/* --- Interactive Coded Pricing Plans (Scrollable Carousel) --- */
.coded-plans-section {
    background-color: #ffffff;
    padding: 32px 20px 48px;
    width: 100%;
}

/* Elegant Coupon Card Box */
.plans-coupon-container {
    max-width: 520px;
    margin: 0 auto 24px;
    background-color: #ffffff;
    border: 1.5px solid var(--accent-pink-border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plans-coupon-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--accent-pink);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
    text-align: left;
}

.plans-coupon-box {
    display: flex;
    width: 100%;
    gap: 10px;
}

.plans-coupon-box input {
    flex: 1;
    border: 1.5px solid #cbd5e1;
    outline: none;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    background: #ffffff;
    transition: all 0.2s ease;
}

.plans-coupon-box input:focus {
    border-color: var(--accent-pink);
    box-shadow: 0 0 0 3px rgba(224, 79, 119, 0.12);
}

.plans-coupon-box input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.plans-coupon-box button {
    padding: 10px 24px;
    font-size: 0.95rem;
    border-radius: 12px;
    font-weight: 800;
    background-color: var(--text-primary);
    color: #ffffff;
    border: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.plans-coupon-box button:hover {
    background-color: #1a1516;
}

.plans-coupon-box button.applied {
    background-color: #16a34a !important; /* Green success state */
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.2);
    cursor: default;
}

.plans-coupon-tip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background-color: var(--accent-pink-light);
    border-left: 3px solid var(--accent-pink);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
    text-align: left;
}

.coupon-badge {
    background-color: var(--accent-pink);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.coupon-tip-text {
    line-height: 1.5;
}

.copy-code-btn {
    background-color: #fff0f3;
    border: 1px dashed var(--accent-pink);
    color: var(--accent-pink);
    font-weight: 800;
    font-size: 0.82rem;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 4px;
    display: inline-block;
    transition: all 0.15s ease;
    user-select: none;
}

.copy-code-btn:hover {
    background-color: #ffdce4;
    transform: scale(1.05);
}

.copy-code-btn:active {
    transform: scale(0.95);
}

.plans-coupon-msg {
    font-size: 0.8rem;
    font-weight: 700;
    min-height: 18px;
    text-align: left;
}

.plans-coupon-msg.success {
    color: #16a34a;
}

.plans-coupon-msg.error {
    color: #dc2626;
}

/* --- Single Product Selector Component --- */
.product-selector-wrapper {
    width: 100%;
    background-color: #ffffff;
    border-radius: 20px;
    border: 1px solid var(--accent-pink-border);
    box-shadow: var(--shadow-soft);
    padding: 24px;
    transition: all 0.3s ease;
}

.product-selector-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 600px) {
    .product-selector-container {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .product-image-column {
        flex: 0 0 45%;
        max-width: 45%;
        align-self: flex-start;
    }
    
    .product-details-column {
        flex: 1;
    }
}

/* Image column styling - aspect ratio matching the 1122x1402 image layout */
.product-image-column {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.25;
    background-color: #fff8f9;
    border-radius: var(--border-radius);
    border: 1px solid var(--accent-pink-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(224, 79, 119, 0.02);
}

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

.product-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease, transform 0.3s ease;
}

.product-image-box img.switching {
    opacity: 0.2;
    transform: scale(0.98);
}

/* Floating Badge */
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1.5px solid var(--accent-pink-border);
    color: var(--accent-pink);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 4px 10px rgba(224, 79, 119, 0.08);
    z-index: 5;
    transition: all 0.2s ease;
}

.product-badge.popular-badge {
    background: linear-gradient(135deg, var(--accent-pink), #f2668b);
    border: 1.5px solid #ffffff;
    color: #ffffff;
    font-weight: 800;
    width: 64px;
    height: 64px;
    top: 8px;
    left: 8px;
    font-size: 0.76rem;
    line-height: 1.2;
    box-shadow: 0 4px 14px rgba(224, 79, 119, 0.3), 0 0 10px rgba(224, 79, 119, 0.15);
}

/* Details Column */
.product-header {
    margin-bottom: 16px;
    text-align: left;
}

.product-name-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: 0.02em;
}

.product-subtitle {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Price Section */
.product-price-section {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
    text-align: left;
}

.product-price-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-align: left;
}

.product-price-label.strike {
    text-decoration: line-through;
    color: #d1d5db;
}

.product-current-price-row {
    display: flex;
    align-items: baseline;
    color: var(--accent-pink);
    font-weight: 800;
}

.product-current-price-row .currency-symbol {
    font-size: 1.2rem;
    margin-right: 4px;
}

.product-current-price-row .price-amount {
    font-size: 2.2rem;
}

/* Divider */
.product-divider {
    border: none;
    border-top: 1px solid var(--accent-pink-light);
    margin: 16px 0;
}

/* Spec Selector */
.spec-section {
    margin-bottom: 20px;
    text-align: left;
}

.spec-title, .qty-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
    text-align: left;
}

.spec-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.spec-btn {
    border-radius: 9999px;
    border: 1.5px solid #cbd5e1;
    background-color: #f8fafc;
    color: var(--text-secondary);
    font-weight: 700;
    padding: 8px 18px;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
    outline: none;
    flex: 1;
    min-width: 90px;
}

.spec-btn:hover {
    background-color: #f1f5f9;
    border-color: var(--accent-pink-border);
    color: var(--accent-pink);
}

.spec-btn.active {
    background-color: var(--accent-pink);
    color: #ffffff;
    border: 1.5px solid transparent;
    box-shadow: 0 4px 12px rgba(224, 79, 119, 0.25);
}

/* Description Block */
.product-desc-block {
    background-color: var(--accent-pink-light);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    border-left: 3px solid var(--accent-pink);
    text-align: left;
}

.product-desc-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--accent-pink);
    margin-bottom: 4px;
}

.product-desc-text {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

/* Quantity Selector */
.qty-section {
    margin-bottom: 24px;
    text-align: left;
}

.qty-selector {
    display: flex;
    align-items: center;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    width: fit-content;
    overflow: hidden;
    background: #ffffff;
}

.qty-btn {
    border: none;
    background: #f8fafc;
    color: var(--text-primary);
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s ease;
    outline: none;
}

.qty-btn:hover {
    background: #e2e8f0;
}

.qty-input {
    border: none;
    border-left: 1.5px solid #cbd5e1;
    border-right: 1.5px solid #cbd5e1;
    width: 50px;
    height: 38px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    outline: none;
}

/* Purchase Actions */
.purchase-actions {
    width: 100%;
}

.checkout-btn {
    width: 100%;
    padding: 14px 20px;
    background-color: var(--accent-pink);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 9999px;
    box-shadow: 0 4px 14px rgba(224, 79, 119, 0.3);
    border: none;
    text-align: center;
    display: block;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    outline: none;
}

.checkout-btn:hover {
    background-color: var(--accent-pink-hover);
    box-shadow: 0 6px 18px rgba(224, 79, 119, 0.45);
}

/* --- Footer Section --- */
.footer-sec {
    background-color: var(--accent-pink-light); /* Soft brand pink/peach */
    padding: 32px 24px;
    text-align: center;
    border-top: 1px solid var(--accent-pink-border);
}

.footer-sec p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* --- Back to Top Button --- */
.floating-nav-group {
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 1000;
}

.btn-top-simple {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(224, 79, 119, 0.2);
    border-radius: 50%;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--accent-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8) translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.btn-top-simple.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

.btn-top-simple:hover {
    background-color: var(--accent-pink);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(224, 79, 119, 0.3);
}

@media (min-width: 790px) {
    .floating-nav-group {
        right: calc(50% - 375px + 20px);
    }
}

/* --- Floating Dynamic Purchase Notification --- */
.purchase-notification {
    position: fixed;
    bottom: 24px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(224, 79, 119, 0.2);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    max-width: 320px;
}

.purchase-notification.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.notification-avatar {
    width: 36px;
    height: 36px;
    background-color: var(--accent-pink-light);
    color: var(--accent-pink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    text-align: left;
}

.notification-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 2px;
}

.notification-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.notification-close {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    align-self: flex-start;
    margin-top: -2px;
    margin-right: -4px;
    line-height: 1;
    transition: color 0.2s ease;
    outline: none;
}

.notification-close:hover {
    color: var(--text-primary);
}

@media (min-width: 790px) {
    .purchase-notification {
        left: calc(50% - 375px + 20px);
    }
}

/* --- Checkout Success Modal Dialog --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(45, 36, 38, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background-color: #ffffff;
    width: 90%;
    max-width: 480px;
    border-radius: var(--border-radius);
    padding: 30px 24px;
    box-shadow: 0 20px 50px rgba(45, 36, 38, 0.15);
    border: 1px solid var(--accent-pink-border);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    text-align: center;
}

.modal-overlay.show .modal-box {
    transform: scale(1);
}

.success-icon-wrapper {
    width: 64px;
    height: 64px;
    background-color: #f0fdf4;
    color: #15803d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin: 0 auto 16px;
    box-shadow: inset 0 2px 8px rgba(22, 163, 74, 0.05);
}

.modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.receipt-box {
    background-color: #faf8f8;
    border: 1px solid #f0eae9;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.receipt-row:last-of-type {
    margin-bottom: 0;
}

.receipt-divider {
    border: none;
    border-top: 1px dashed #d1c8c7;
    margin: 12px 0;
}

.receipt-total {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
}

.modal-btn {
    width: 100%;
    padding: 12px 20px;
    background-color: var(--accent-pink);
    color: #ffffff;
    font-weight: 800;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.2s ease;
    outline: none;
}

.modal-btn:hover {
    background-color: var(--accent-pink-hover);
}

/* Coupon success coloring for pricing block */
.coupon-active .product-current-price-row {
    color: #16a34a; /* Green for discount */
}
.coupon-active .product-original-price {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Sticky bottom bar for mobile screens */
.floating-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--accent-pink-border);
    padding: 12px 16px;
    z-index: 998;
    display: none; /* Managed by JS/CSS */
    box-shadow: 0 -8px 24px rgba(224, 79, 119, 0.05);
}

.floating-cta-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
}

.floating-cta-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.floating-p-name {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-secondary);
}

.floating-p-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--accent-pink);
}

.floating-buy-btn {
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 800;
    border-radius: 9999px;
    background-color: var(--accent-pink);
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(224, 79, 119, 0.2);
}

@media (max-width: 600px) {
    .floating-cta-bar.show {
        display: block;
    }
    
    /* Extra padding at bottom of container so content isn't hidden behind the floating bar */
    .landing-container {
        padding-bottom: 70px;
    }
}
