/* cute-style.css - 棉花糖可愛風格 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #FFF9FB;
    font-family: 'Comic Neue', 'Segoe UI', 'Comic Neue', 'Chalkboard SE', 'Poppins', system-ui, sans-serif;
    color: #6B4E6E;
    line-height: 1.5;
    min-height: 100vh;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="%23FFB7C5"><circle cx="12" cy="12" r="10"/></svg>') 12 12, auto;
}

:root {
    --candy-pink: #FFB7C5;
    --candy-pink-dark: #F28B9D;
    --candy-lavender: #DDBDF2;
    --candy-cream: #FFF5E6;
    --candy-mint: #C5E8D7;
    --candy-yellow: #FFE4A0;
    --shadow-cute: 0 12px 28px rgba(255, 183, 197, 0.25);
    --shadow-bounce: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* 跑馬燈 */
.marquee-bar {
    background: linear-gradient(135deg, #FFE0E8, #FFD9E4);
    color: #C96A7F;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 0;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 3px dotted #FFB7C5;
}
.marquee-track {
    display: inline-block;
    animation: marqueeScroll 20s linear infinite;
    padding-left: 100%;
}
.marquee-track span {
    margin-right: 48px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
@keyframes marqueeScroll {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

/* 導航 - 可愛風格 */
.sticky-header {
    position: sticky;
    top: 0;
    background: rgba(255, 250, 252, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 3px dotted #FFB7C5;
    z-index: 50;
    padding: 10px 20px;
}
.header-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    background: #FFE4EC;
    padding: 8px 20px;
    border-radius: 60px;
    transition: all 0.2s;
}
.brand-logo:hover {
    transform: scale(1.02);
    background: #FFD0DC;
}
.brand-icon {
    font-size: 28px;
}
.brand-name {
    font-weight: 800;
    font-size: 1.3rem;
    color: #D96B82;
    letter-spacing: 1px;
}
.brand-emoji {
    font-size: 18px;
}
.cart-icon {
    position: relative;
    background: #FFE4EC;
    padding: 10px 14px;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.2s;
}
.cart-icon svg {
    width: 24px;
    stroke: #D96B82;
    fill: none;
}
.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #F28B9D;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 20px;
}

/* Hero 可愛區塊 */
.hero-section {
    max-width: 1280px;
    margin: 20px auto 0;
    padding: 0 20px;
}
.hero-card {
    position: relative;
    border-radius: 48px;
    overflow: hidden;
    box-shadow: var(--shadow-cute);
    border: 3px solid white;
}
.hero-img {
    width: 100%;
    height: 360px;
    object-fit: cover;
}
.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(107, 78, 110, 0.5), transparent);
    padding: 28px 24px;
}
.hero-tag {
    background: #FFE4A0;
    color: #C96A7F;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 16px;
    border-radius: 60px;
    display: inline-block;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.hero-title {
    color: white;
    font-size: 2rem;
    font-weight: 800;
    margin: 12px 0 16px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}
.hero-btn {
    background: #FFE4A0;
    border: none;
    padding: 10px 28px;
    border-radius: 60px;
    font-weight: 700;
    color: #D96B82;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    box-shadow: 0 4px 0 #C9A96E;
}
.hero-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #C9A96E;
}

.feature-row {
    display: flex;
    gap: 15px;
    margin: 30px 0 40px;
    flex-wrap: wrap;
}
.feature-item {
    background: #FFFAF0;
    padding: 12px 24px;
    border-radius: 60px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #C96A7F;
    flex: 1;
    justify-content: center;
    border: 2px solid #FFB7C5;
    box-shadow: var(--shadow-bounce);
}
.feature-emoji { font-size: 22px; }

/* 區塊標題 */
.section-header {
    max-width: 1280px;
    margin: 20px auto 16px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.section-header h3 {
    font-size: 1.7rem;
    font-weight: 800;
    color: #D96B82;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FFE4EC;
    padding: 8px 24px;
    border-radius: 60px;
}
.header-emoji { font-size: 26px; }
.badge-cute {
    background: #FFE4A0;
    padding: 6px 20px;
    border-radius: 60px;
    font-size: 13px;
    font-weight: 700;
    color: #C96A7F;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* 商品網格 - 可愛卡片 */
.recommend-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}
.product-card {
    background: white;
    border-radius: 32px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #FFD9E4;
    box-shadow: var(--shadow-bounce);
    position: relative;
}
.product-card::before {
    content: "🧸";
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 30px;
    opacity: 0;
    transition: 0.2s;
}
.product-card:hover {
    transform: translateY(-8px) rotate(1deg);
    border-color: #FFB7C5;
    box-shadow: 0 20px 30px rgba(255, 183, 197, 0.3);
}
.product-card:hover::before {
    opacity: 1;
}
.product-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}
.product-card h4 {
    font-weight: 800;
    margin: 14px 16px 4px;
    font-size: 1rem;
    color: #6B4E6E;
}
.product-card p {
    margin: 0 16px 20px;
    color: #F28B9D;
    font-weight: 700;
    font-size: 1.2rem;
}

/* 品牌故事 - 可愛版 */
.story-card {
    max-width: 1280px;
    margin: 20px auto 50px;
    padding: 40px 32px;
    background: linear-gradient(135deg, #FFE4EC, #FFFAF0);
    border-radius: 60px;
    text-align: center;
    border: 3px solid #FFB7C5;
    position: relative;
    overflow: hidden;
}
.story-card::before {
    content: "🌸 🎀 🧸 🍬 🎈";
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    font-size: 40px;
    opacity: 0.15;
    white-space: nowrap;
}
.story-icon {
    font-size: 56px;
    margin-bottom: 12px;
    display: inline-block;
    animation: bounce 1s ease infinite;
}
@keyframes bounce {
    0%,100%{ transform: translateY(0); }
    50%{ transform: translateY(-8px); }
}
.story-card h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #D96B82;
    margin-bottom: 16px;
}
.story-card p {
    color: #9B7BA8;
    max-width: 600px;
    margin: 0 auto;
}
.story-deco {
    margin-top: 20px;
    font-size: 20px;
    letter-spacing: 8px;
}

/* 頁腳 */
.site-footer {
    background: #6B4E6E;
    color: #FFE0E8;
    padding: 48px 24px 24px;
    margin-top: 20px;
    border-radius: 40px 40px 0 0;
}
.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    justify-content: space-between;
}
.footer-brand-icon {
    font-size: 48px;
}
.footer-brand-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #FFD9E4;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 48px; }
.footer-col h4 { color: #FFB7C5; margin-bottom: 16px; font-size: 1rem; }
.footer-col li, .footer-col a { font-size: 13px; color: #DDC4E0; text-decoration: none; line-height: 1.8; cursor: pointer; }
.footer-copyright { width: 100%; text-align: center; border-top: 1px solid #8B6E8E; margin-top: 32px; padding-top: 24px; font-size: 12px; }

/* 彈窗 */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(107, 78, 110, 0.6); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.hidden { display: none; }
.modal-card {
    background: white; border-radius: 48px; max-width: 520px; width: 90%; max-height: 80vh;
    border: 3px solid #FFB7C5;
}
.modal-header { padding: 18px 24px; border-bottom: 2px dotted #FFD9E4; display: flex; justify-content: space-between; }
.modal-close { background: none; border: none; font-size: 28px; cursor: pointer; color: #D96B82; }
.modal-body { padding: 24px; overflow-y: auto; }

/* 浮動按鈕 - 可愛 */
.floating-social-icons {
    position: fixed; bottom: 28px; right: 20px; display: flex; flex-direction: column; gap: 12px; z-index: 99;
}
.social-icon {
    background: white; width: 52px; height: 52px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    box-shadow: 0 6px 14px rgba(0,0,0,0.12); transition: 0.2s;
    border: 2px solid #FFB7C5;
}
.icon-emoji { font-size: 24px; }
.social-icon:hover { transform: scale(1.08) rotate(5deg); background: #FFE4EC; }
#back-to-top { opacity: 0; visibility: hidden; transition: 0.2s; }
#back-to-top.show { opacity: 1; visibility: visible; }

/* 商品頁共用元件 */
.product-container { max-width: 860px; margin: 0 auto; padding: 20px 20px 40px; }
.back-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: #FFE4EC; border-radius: 60px; padding: 10px 24px;
    color: #D96B82; font-weight: 700; margin-bottom: 20px; cursor: pointer;
    border: 2px solid #FFB7C5; transition: 0.2s;
}
.back-btn:hover { background: #FFD0DC; transform: translateX(-3px); }
.product-image-card { background: white; border-radius: 40px; overflow: hidden; margin-bottom: 20px; }
.product-info-card { background: white; border-radius: 40px; padding: 24px; margin-bottom: 20px; border: 2px solid #FFD9E4; }
.price-current { font-size: 32px; font-weight: 800; color: #F28B9D; }
.price-origin { text-decoration: line-through; color: #ccc; font-size: 14px; margin-left: 8px; }
.section-card { background: white; border-radius: 40px; padding: 24px; margin-bottom: 20px; border: 2px solid #FFE0E8; }
.input-field, .select-field {
    background: #FFFAF5; border: 2px solid #FFD9E4; border-radius: 60px;
    padding: 14px 20px; width: 100%; font-family: inherit;
    margin-bottom: 10px;
}
.submit-btn {
    background: linear-gradient(135deg, #FFB7C5, #F28B9D); color: white;
    font-weight: 800; border-radius: 60px; padding: 14px; width: 100%;
    border: none; cursor: pointer; margin-top: 20px; font-size: 1rem;
}
.delivery-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.plan-card {
    border: 2px solid #FFD9E4; border-radius: 28px; padding: 16px;
    margin-bottom: 12px; cursor: pointer; transition: 0.2s;
}
.plan-card.active-plan { border-color: #F28B9D; background: #FFF5F7; }
.tag { display: inline-block; padding: 5px 14px; border-radius: 60px; font-size: 12px; margin-right: 8px; background: #FFE4EC; color: #D96B82; font-weight: 600; }
.success-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: 0.2s; z-index: 2000;
}
.success-modal-overlay.show { opacity: 1; visibility: visible; }
.success-toast { background: white; border-radius: 48px; padding: 32px; text-align: center; max-width: 360px; border: 3px solid #FFB7C5; }
.success-icon { font-size: 56px; margin-bottom: 12px; }
.sku-pill { padding: 8px 20px; border-radius: 60px; background: #FFF5F0; cursor: pointer; display: inline-block; margin: 5px; transition: 0.2s; }
.sku-pill.active { background: #F28B9D; color: white; }
.buy-now-wrapper { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); width: calc(100% - 40px); max-width: 400px; z-index: 100; }
.buy-now-btn { width: 100%; background: #F28B9D; color: white; font-weight: 800; border-radius: 60px; padding: 16px; border: none; font-size: 1.1rem; cursor: pointer; box-shadow: 0 6px 0 #C96A7F; transition: 0.05s linear; }
.buy-now-btn:active { transform: translateY(3px); box-shadow: 0 3px 0 #C96A7F; }
.detail-img img{
    width: 100%;
    display: block;
}

/* 配送方式選中樣式 */
.delivery-opt {
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 60px;
    background: #FFF5F0;
    text-align: center;
    transition: all 0.2s;
    border: 2px solid #FFD9E4;
}

.delivery-opt.active-delivery {
    background: #F28B9D;
    color: white;
    border-color: #F28B9D;
    box-shadow: 0 2px 8px rgba(242,139,157,0.3);
}

.delivery-opt:hover:not(.disabled) {
    background: #FFE4EC;
    transform: translateY(-2px);
}

/* 彈窗 - 修復滾動問題 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(107, 78, 110, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.hidden {
    display: none;
}

.modal-card {
    background: white;
    border-radius: 48px;
    max-width: 520px;
    width: 90%;
    max-height: 80vh;
    border: 3px solid #FFB7C5;
    display: flex;
    flex-direction: column;
    overflow: hidden;  /* 確保內容不會溢出圓角 */
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 2px dotted #FFD9E4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;  /* 防止 header 被壓縮 */
    background: white;
    border-radius: 48px 48px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #D96B82;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #D96B82;
    line-height: 1;
    padding: 0 8px;
}

.modal-close:hover {
    color: #F28B9D;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;  /* 佔據剩餘空間 */
    max-height: calc(80vh - 70px);  /* 減去 header 高度 */
}

/* 彈窗內文字樣式 */
.modal-body h4 {
    color: #D96B82;
    font-size: 1rem;
    margin: 0 0 12px 0;
}

.modal-body p {
    color: #6B4E6E;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.modal-body br {
    display: block;
    margin: 4px 0;
}
