﻿/* ========================================
   最新公告 + 促銷輪播 + 快速入口
   命名空間前綴：np-
   ======================================== */
body {
    font-family: 'Noto Serif TC', sans-serif;
}
/* ── 區塊容器 ── */
.np-section {
    padding: 4rem 0 0;
    background-color: white;
}

/* ── 雙欄 layout（電腦版並排） ── */
.np-layout {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
 
}
.np-section .container {
    max-width: 1500px;
}
/* ── 左欄：最新公告 ── */
.np-col-news {
    flex: 1;
}
 /*讓公告列表在窄螢幕時能適應縮放，避免過度寬度導致內容溢出*/
.np-col-news,
.np-col-right {
    min-width: 0;
}

/* ── 右欄：促銷 + 快速入口 ── */
.np-col-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* 推到與公告列表齊平：標籤 + 標題 + 紅線 的高度 */
    padding-top: 68px;
    gap: 12px;
}

/* ── 標題區 ── */
.np-header {
    margin-bottom: 0;
}

.np-label {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.25em;
    color: #c0392b;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
    
    font-weight: 300;
}

.np-title {
    font-family: 'Noto Serif TC', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c1810;
    margin: 0 0 0.7rem 0;
    letter-spacing: 0.02em;
}

    .np-title span {
        font-weight: 300;
        color: #888;
        font-size: 1.3rem;
    }

.np-line {
    width: 40px;
    height: 3px;
    background-color: #c0392b;
    margin-bottom: 0;
}

/* ── 公告列表 ── */
.np-news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.np-news-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 0;
    border-bottom: 0.5px solid #e0d8d0;
    
    font-weight: 300;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
}

    .np-news-item:first-child {
        border-top: 0.5px solid #e0d8d0;
    }

    .np-news-item:hover .np-news-text {
        color: #c0392b;
    }

.np-news-date {
    font-size: 0.9rem;
    color: #aaa;
    white-space: nowrap;
    min-width: 66px;
    padding-top: 2px;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.np-news-badge {
    font-size: 0.9rem;
    padding: 1px 7px;
    border: 0.5px solid #c0392b;
    color: #c0392b;
    white-space: nowrap;
    line-height: 2;
    letter-spacing: 0.04em;
    flex-shrink: 0;
   
}

.np-badge-grey {
    border-color: #bbb;
    color: #999;
}

.np-news-text {
    font-size: 1.2rem;
    color: #2c1810;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.25s;
}

/* ── 促銷輪播 ── */
.np-promo-wrap {
    border: 0.5px solid #e0d8d0;
    border-radius: 4px;
    overflow: hidden;
}

.np-promo-track {
    display: flex;
    transition: transform 0.45s ease;
}

.np-promo-slide {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    background: #ffffff;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
}

    .np-promo-slide:hover {
        background: #fdf8f6;
    }

/* Logo 圖片區 */
.np-promo-logo {
    width: 64px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 2px;
    background: #f4f0eb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.np-promo-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.np-promo-logo-fallback {
    font-size: 0.72rem;
    color: #888;
    
    font-weight: 500;
    letter-spacing: 0.01em;
    text-align: center;
    padding: 0 4px;
    line-height: 1.3;
}

/* 有圖時隱藏 fallback */
.np-promo-logo-img:not([src=""]) + .np-promo-logo-fallback {
    display: none;
}

.np-promo-divider {
    width: 0.5px;
    height: 32px;
    background: #e0d8d0;
    flex-shrink: 0;
}

.np-promo-body {
    flex: 1;
    font-size: 1.2rem;
    line-height: 1.6;
    
    font-weight: 300;
    color: #2c1810;
}

    .np-promo-body b {
        color: #c0392b;
        font-weight: 500;
    }

.np-promo-arrow {
    color: #ccc;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ── 快速入口 ── */
.np-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.np-quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 14px 8px;
    border: 0.5px solid #e0d8d0;
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

    .np-quick-btn:hover {
        border-color: #c0392b;
        background: #fdf8f6;
    }

        .np-quick-btn:hover .np-quick-label {
            color: #c0392b;
        }

.np-quick-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.np-quick-label {
    color: #2c1810;
   
    text-align: center;
    line-height: 1.4;
    transition: color 0.2s;
}

/* ── Fade-in 動畫（配合 IntersectionObserver） ── */
.np-col-news,
.np-col-right {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.np-col-right {
    transition-delay: 0.12s;
}

    .np-col-news.np-visible,
    .np-col-right.np-visible {
        opacity: 1;
        transform: translateY(0);
    }

/* ========================================
   響應式：手機版
   ======================================== */
@media (max-width: 768px) {

    .np-section {
        padding: 2.5rem 0 0;
    }

    /* 手機版改直向堆疊 */
    .np-layout {
        flex-direction: column;
        gap: 2rem;
    }

    .np-col-news {
        flex: none;
        width: 100%;
    }

    .np-col-right {
        flex: none;
        width: 100%;
        /* 手機版不需要 padding-top 對齊 */
        padding-top: 0;
        gap: 12px;
    }

    .np-title {
        font-size: 1.4rem;
    }

        .np-title span {
            font-size: 1rem;
        }

    .np-news-date {
        min-width: 56px;
        font-size: 0.75rem;
    }

    .np-news-badge {
        font-size: 0.75rem;
    }

    .np-news-text {
        font-size: 0.9rem;
    }

    .np-promo-slide {
        padding: 10px 12px;
        gap: 10px;
    }

    .np-promo-logo {
        width: 52px;
        height: 36px;
    }

    .np-promo-body {
        font-size: 0.75rem;
    }

    .np-quick-grid {
        gap: 6px;
    }

    .np-quick-btn {
        padding: 12px 6px;
        gap: 6px;
    }

    .np-quick-label {
        font-size: 0.7rem;
    }
}
