/* Where to Buy 頁面專用樣式 */

/* Article-top 響應式設計 */
.article-top {
    margin: 10px 0;
    padding: 0 20px;
}

.article-title {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    position: relative;
}

.article-title-decoration {
    width: 450px;
    max-width: 80vw;
    height: auto;
    margin-bottom: 5px;
    transform: translate(0, 0);
    transition: transform 0.3s ease-out;
}

/* 中央裝飾圖片滾動錯位特效 - 較小的移位效果 */
.article-title-decoration.scroll-parallax {
    transform: translate(0, var(--scroll-offset-center, 0px));
}

.article-title-side-image {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 120px;
    height: auto;
    z-index: 5;
    transition: transform 0.3s ease-out;
}

/* 滾動錯位特效 */
.article-title-side-image.scroll-parallax {
    transform: translateY(calc(-50% + var(--scroll-offset, 0px)));
}

/* 左邊圖片樣式 */
.article-title-left-image {
    position: absolute;
    left: 10px;
    top: 40%;
    transform: translateY(-50%);
    width: 96px; /* 120px * 0.8 = 96px (縮小20%) */
    height: auto;
    z-index: 1; /* 調整為在 article-title-decoration 底下 */
    transition: transform 0.3s ease-out;
}

/* 左邊圖片滾動錯位特效 - 增加錯位比例 */
.article-title-left-image.scroll-parallax {
    transform: translateY(calc(-50% + var(--scroll-offset-left, 0px)));
}

/* 左上方重疊圖片樣式 */
.article-title-left-overlay {
    position: absolute;
    left: 60px; /* 在左邊圖片的右上方 */
    top: 25%; /* 比左邊圖片更靠上 */
    transform: translateY(-50%);
    width: 80px; /* 比左邊圖片稍小 */
    height: auto;
    z-index: 2; /* 在左邊圖片之上 */
    transition: transform 0.3s ease-out;
}

/* 左上方重疊圖片滾動錯位特效 */
.article-title-left-overlay.scroll-parallax {
    transform: translateY(calc(-50% + var(--scroll-offset-overlay, 0px)));
}

.article-title h1 {
    font-size: 32px;
    margin: 0;
    padding-bottom: 20px;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
    line-height: 1.2;
}

/* Article-top 響應式調整 */
@media (max-width: 1200px) {
    .article-title-decoration {
        width: 400px;
        max-width: 75vw;
        transform: translate(0, 0);
    }
    
    .article-title h1 {
        font-size: 28px;
    }
    
    .article-title-side-image {
        width: 100px;
        right: 15px;
    }
    
    .article-title-left-image {
        width: 80px; /* 100px * 0.8 = 80px (縮小20%) */
        left: 8px;
        top: 35%;
    }
    
    .article-title-left-overlay {
        width: 64px; /* 80px * 0.8 = 64px (縮小20%) */
        left: 50px;
        top: 20%;
    }
}

@media (max-width: 768px) {
    .article-top {
        padding: 0 15px;
    }
    
    .article-title {
        padding: 15px 0;
    }
    
    .article-title-decoration {
        width: 300px;
        max-width: 70vw;
        transform: translate(0, 0);
        margin-bottom: 10px;
    }
    
    .article-title h1 {
        font-size: 24px;
        padding-bottom: 15px;
    }
    
    .article-title-side-image {
        width: 80px;
        right: 10px;
    }
    
    .article-title-left-image {
        width: 64px; /* 80px * 0.8 = 64px (縮小20%) */
        left: 5px;
        top: 30%;
    }
    
    .article-title-left-overlay {
        width: 51px; /* 64px * 0.8 = 51px (縮小20%) */
        left: 40px;
        top: 15%;
    }
}

@media (max-width: 480px) {
    .article-top {
        padding: 0 10px;
    }
    
    .article-title {
        padding: 10px 0;
    }
    
    .article-title-decoration {
        width: 250px;
        max-width: 80vw;
        transform: translate(0, 0); /* 在小螢幕上取消水平偏移 */
        margin-bottom: 15px;
    }
    
    .article-title h1 {
        font-size: 20px;
        padding-bottom: 10px;
    }
    
    .article-title-side-image {
        width: 60px;
        right: 5px;
    }
    
    .article-title-left-image {
        width: 48px; /* 60px * 0.8 = 48px (縮小20%) */
        left: 3px;
        top: 25%;
    }
    
    .article-title-left-overlay {
        width: 38px; /* 48px * 0.8 = 38px (縮小20%) */
        left: 30px;
        top: 10%;
    }
}

/* Article spacing 響應式設計 */
.article-spacing {
    height: 60px;
}

@media (max-width: 768px) {
    .article-spacing {
        height: 40px;
    }
}

@media (max-width: 480px) {
    .article-spacing {
        height: 30px;
    }
}

/* 強制修復所有可能影響 sticky 的父容器 */
.news-page .shopMain,
.news-page .stW,
.news-page .stWf,
.news-page .stWf.article,
.news-page .sMr,
.news-page .sMr.main,
.news-page .sMr.main.news,
.news-page .article-wrap {
    overflow: visible !important;
    position: static !important;
    transform: none !important;
}

/* 確保 body 和 html 不會影響 sticky */
body.news-page {
    overflow-x: visible !important;
    overflow-y: auto !important;
}

html {
    overflow-x: visible !important;
}

.physical-stores{
    position: relative;
    width: 100%;
    height: 300vh;
    text-align: center;
    margin-bottom: 20px;
    overflow: visible !important;
}

.physical-stores-image{
    position: sticky;
    top: 50vh;
    /* left 和 transform 完全由 JavaScript 控制 */
    width: 10%;
    height: 500px;
    overflow: hidden;
    z-index: 10;
    transition: width 0.3s ease, left 0.3s ease, height 0.3s ease;
    margin-top: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 確保在所有情況下都置中 */
    margin-left: 0;
    margin-right: 0;
    /* 強制置中，不受寬度變化影響 */
    box-sizing: border-box;
}
.physical-stores-image img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* 確保圖片在容器中完美置中 */
    display: block;
    margin: 0 auto;
}
/* 響應式設計調整 */
@media (max-width: 1200px) {
    .physical-stores-image{
        height: 400px;
        margin-top: 35vh;
        /* left 和 transform 完全由 JavaScript 控制 */
    }
}

@media (max-width: 768px) {
    .physical-stores-image{
        height: 350px;
        margin-top: 30vh;
        /* left 和 transform 完全由 JavaScript 控制 */
    }
    
    .physical-stores{
        height: 250vh; /* 在手機上減少高度 */
    }
}

@media (max-width: 480px) {
    .physical-stores-image{
        height: 250px;
        margin-top: 25vh;
        /* left 和 transform 完全由 JavaScript 控制 */
    }
    
    .physical-stores{
        height: 200vh; /* 在小螢幕上進一步減少高度 */
    }
    
}

.article-content-image{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.05);
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    opacity: 0;
}

.article-content-image.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.article-content-image.image-1 {
    z-index: 3;
}

.article-content-image.image-2 {
    z-index: 2;
}

.article-content-image.image-3 {
    z-index: 1;
}

/* 響應式圖片優化 */
@media (max-width: 480px) {
    .article-content-image {
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    }
    
}

@media (max-width: 768px) {
    .article-content-image {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    }
}

/* 確保圖片在容器中正確填充 */
.physical-stores-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 0 auto;
}

/* 橫向螢幕優化 */
@media (orientation: landscape) and (max-height: 600px) {
    .physical-stores-image {
        height: 80vh !important;
        max-height: 500px;
    }
    
    .physical-stores {
        height: 200vh;
    }
}

/* 淡入效果樣式 */
.fade-in-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 文字內容淡入效果 */
.fade-in-text {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 圖片淡入效果 */
.fade-in-image {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in-image.visible {
    opacity: 1;
    transform: scale(1);
}

/* SVG 裝飾元素淡入效果 */
.fade-in-svg {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.fade-in-svg.visible {
    opacity: 1;
    transform: translateX(0);
}

/* 延遲動畫效果 */
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }
.fade-in-delay-6 { transition-delay: 0.6s; }
.where-to-buy{
    margin: 20px 0 80px 0;
    padding: 20px 0;
}
.where-to-buy-content{
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.where-to-buy .article-content {
    font-size: 16px;
    font-weight: 400;
    line-height: 2;
    color: #333;
}

.where-to-buy h3 {
    font-size: 20px;
    display: flex;
    align-items: center;
    padding: 0 0 4px;
    margin: 20px 0 16px 0;
    color: var(--primary-color);
    font-weight: 600;
}

.where-to-buy h3:first-child {
    margin-top: 0;
}

.where-to-buy h3 span {
    margin-right: 8px;
    color: var(--primary-color);
}

.where-to-buy p {
    margin: 16px 0;
    line-height: 1.8;
    color: #555;
}

.where-to-buy p a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.where-to-buy p a:hover {
    color: var(--secondary-color);
}

.where-to-buy .h3-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 20px 0 10px 0;
}

.where-to-buy .arrow-icon {
    width: 18px;
    height: 18px;
}

.where-to-buy .store-address {
    font-size: 16px;
    color: var(--secondary-color);
    text-align: center;
    margin: 8px 0 0 0;
    font-style: italic;
}

.where-to-buy .store-address a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.where-to-buy .store-address a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.where-to-buy .article-imgbox {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 16px 0;
    margin: 16px 0;
    height: 400px;
    overflow: hidden;
    position: relative;
}

.where-to-buy .article-imgbox img {
    width: 100%;
    max-width: 500px;
    height: 150%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .where-to-buy {
        margin: 15px 0 60px 0;
        padding: 15px 0;
    }
    
    .where-to-buy-content {
        padding: 0 15px;
    }
    
    .where-to-buy h3 {
        font-size: 18px;
        margin: 20px 0 12px 0;
    }
    
    .where-to-buy .h3-subtitle {
        font-size: 16px;
        margin: 16px 0 8px 0;
    }
    
    .where-to-buy .store-address {
        font-size: 13px;
    }
    
    .where-to-buy .article-imgbox {
        padding: 12px 0;
        margin: 12px 0;
        height: 250px;
    }
    
    .where-to-buy .article-imgbox img {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .where-to-buy {
        margin: 10px 0 40px 0;
        padding: 10px 0;
    }
    
    .where-to-buy-content {
        padding: 0 10px;
    }
    
    .where-to-buy h3 {
        font-size: 16px;
        margin: 16px 0 10px 0;
    }
    
    .where-to-buy .h3-subtitle {
        font-size: 14px;
        margin: 12px 0 6px 0;
    }
    
    .where-to-buy .store-address {
        font-size: 12px;
    }
    
    .where-to-buy p {
        font-size: 14px;
        margin: 12px 0;
    }
    
    .where-to-buy .article-imgbox {
        height: 200px;
    }
}

/* 線上商店卡片樣式 */
.online-stores-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 30px 0;
    padding: 0;
}

.store-card {
    background: #fff;
    border-radius: 0; /* 符合網站風格，不使用圓角 */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.store-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

.store-card-header {
    padding: 25px 20px 20px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
}

.store-icon {
    width: 240px;
    height: 240px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.store-logo {
    width: 160px;
    height: 160px;
    object-fit: contain;
}

.store-icon.pinkoi {
    background: transparent;
}

.store-icon.marais {
    background: transparent;
}

.store-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.3;
}

.store-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.store-description {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.store-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.feature-tag {
    background: #f8f9fa;
    color: #495057;
    padding: 4px 12px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #e9ecef;
}

.store-card-footer {
    padding: 0 20px 25px;
    text-align: center;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-radius: 0;
    transition: all 0.3s ease;
    border: .5px solid;
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
}

.store-btn.primary {
    background: #51628f ;
    color: white;
    border-color: #51628f;
}

.store-btn.primary:hover {
    background: white;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.store-btn.secondary {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.store-btn.secondary:hover {
    background: white;
    color: #ff6b6b;
    border-color: #ff6b6b;
}

.store-btn.tertiary {
    background: #4ecdc4;
    color: white;
    border-color: #4ecdc4;
}

.store-btn.tertiary:hover {
    background: white;
    color: #4ecdc4;
    border-color: #4ecdc4;
}

.btn-arrow {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.store-btn:hover .btn-arrow {
    transform: translateX(3px);
}

/* 響應式設計 */
@media (max-width: 1024px) {
    .online-stores-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .store-card-header {
        padding: 20px 15px 15px;
    }
    
    .store-card-content {
        padding: 15px;
    }
    
    .store-card-footer {
        padding: 0 15px 20px;
    }
}

@media (max-width: 768px) {
    .online-stores-cards {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 20px 0;
    }
    
    .store-card {
        width: 100%;
        max-width: none;
        margin: 0;
    }
    
    .store-card-header {
        padding: 20px 15px;
    }
    
    .store-icon {
        width: 200px;
        height: 200px;
        margin-bottom: 12px;
    }
    
    .store-logo {
        width: 140px;
        height: 140px;
    }
    
    .store-title {
        font-size: 16px;
    }
    
    .store-description {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .feature-tag {
        padding: 3px 10px;
        font-size: 11px;
    }
    
    .store-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .online-stores-cards {
        gap: 15px;
        margin: 15px 0;
    }
    
    .store-card-header {
        padding: 15px 12px;
    }
    
    .store-card-content {
        padding: 12px;
    }
    
    .store-card-footer {
        padding: 0 12px 15px;
    }
    
    .store-icon {
        width: 180px;
        height: 180px;
        margin-bottom: 10px;
    }
    
    .store-logo {
        width: 120px;
        height: 120px;
    }
    
    .store-title {
        font-size: 15px;
    }
    
    .store-description {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .feature-tag {
        padding: 2px 8px;
        font-size: 10px;
    }
    
    .store-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
}
