﻿@charset "UTF-8";


body {
    background-image: url("images/bg.jpg");
    background-position: center top;
		background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}


.header {
		display:none;
}

/* =====================================================
   02. Hero 主視覺
===================================================== */

.hero {
    height:550px;
}

.hero-title {
    width: 1280px;
    position: relative;
		margin-top:-20px;

}
.hero-title-sale {
    width: 800px;
		margin-top:-90px;
		z-index:999;
}

.hero .header {
		display:block;
}

.logo_M{
		display:none;
}


/* 熱氣球定位區域 */
.balloon-area {
    width:1280px;
    height: auto;
    pointer-events: none;
    z-index: 2;
    margin:0 auto;
}

/* 熱氣球共同設定 */
.balloon {
    position: absolute;
    display: block;
    height: auto;

    /* 預設直接顯示在最終位置 */
    opacity: 1;
    transform: translateY(0);
}
/* 第一次進入才播放動畫 */
.balloon.balloon-animate {
    animation: balloonUp 2.5s ease-out both;
}



/* 左側熱氣球 */
.balloon-left {
    width: 200px;
    margin-left: 70px;
    top: 90px;
    animation-delay: 0.2s;
}

/* 右側熱氣球 */
.balloon-right {
    width: 190px;
    margin-left: 1070px;
    top: 260px;
    animation-delay: 0.6s;
}

/* 左右動畫時間錯開 */
.balloon-left.balloon-animate {
    animation-delay: 0.2s;
}

.balloon-right.balloon-animate {
    animation-delay: 0.6s;
}

/* 從下方飄上來 */
@keyframes balloonUp {
    0% {
        opacity: 1;
        transform: translateY(650px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 手機版 */
@media (max-width: 768px) {
.balloon-area{
display:none;
}
}

@media (prefers-reduced-motion: reduce) {
    .balloon {
        animation: none;
        opacity: 1;
    }
}

/* ===============================
   左右側邊選單 - 共用設定
================================ */

.event-side-menu {
    position: fixed;
    top: 120px;
    width: 100px;
    z-index: 100;
    box-shadow: 0 5px 18px rgba(0, 45, 95, .18);
}

.event-side-left {
    left:0;
}

.event-side-right {
    right: 0;
}

/* 標題共用 */
.event-side-title {
    padding: 16px 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 1px;
}

/* 選單排列 */
.event-side-list {
    display: flex;
    flex-direction: column;
}

/* 按鈕 */
.event-side-link {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 30px;
    padding: 10px 12px;

    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;

    transition:
        background .25s ease,
        color .25s ease,
        padding .25s ease;
}


/* ===============================
   左側選單 - 紫色系列
================================ */

.event-side-left .event-side-title {
    background: #591168;
}

.event-side-left .event-side-link {
    color: #fff;

    background: linear-gradient(
        135deg,
        #6836d1,
        #4520a8
    );

    border-bottom: 1px solid
        rgba(255,255,255,.25);
}

.event-side-left .event-side-link:hover {
    background: #8454e8;
}

.event-side-left .event-side-link.active {
    background: #8b5cf6;
    color: #fff;
    box-shadow: inset 4px 0 0 #ffde57;
}


/* ===============================
   右側選單 - 藍色活動風格
================================ */

.event-side-right .event-side-title {
    background: #07579b;
}

.event-side-right .event-side-link {
    color: #15518c;
    background: #e8f5ff;
    border-bottom: 1px solid #bcdcf4;
}

.event-side-right .event-side-link:hover {
    background: #fff0b2;
    color: #a45200;
}

.event-side-right .event-side-link.active {
    background: #ffd45c;
    color: #754000;
    box-shadow: inset -4px 0 0 #f29420;
}

/* 滿額抽獎專屬按鈕 */
.event-side-right .event-lottery-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;

    padding: 15px 8px;
    overflow: hidden;

    background: linear-gradient(
        135deg,
        #fff1b5 0%,
        #ffd66c 50%,
        #ffc44d 100%
    );

    color: #884400;
    border: 2px solid #f5af2d;
    border-radius: 8px;

    box-shadow:
        0 3px 0 #d78d20,
        0 5px 15px rgba(255,194,55,.35);

    animation: lotteryGlow 2.5s ease-in-out infinite;
      text-decoration: none;
}

/* 禮物圖示 */
.lottery-icon {
    font-size: 27px;
    line-height: 1;
    animation: giftBounce 2s ease-in-out infinite;
}

/* 文字 */
.lottery-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.lottery-text strong {
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 1px;
}

.lottery-text small {
    font-size: 10px;
    font-weight: 500;
    color: #9b570b;
    white-space: nowrap;
}

/* 右上角星星 */
.lottery-sparkle {
    position: absolute;
    top: 5px;
    right: 9px;
    color: #fff;
    font-size: 19px;
    animation: sparkle 1.8s ease-in-out infinite;
}

/* 柔和發光 */
@keyframes lotteryGlow {
    0%, 100% {
        box-shadow:
            0 3px 0 #d78d20,
            0 5px 12px rgba(255,194,55,.25);
    }
    50% {
        box-shadow:
            0 3px 0 #d78d20,
            0 5px 22px rgba(255,210,70,.75);
    }
}

/* 禮物輕輕跳動 */
@keyframes giftBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

/* 星星閃爍 */
@keyframes sparkle {
    0%, 100% {
        opacity: .3;
        transform: scale(.7) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.3) rotate(25deg);
    }
}

/* 滑鼠移入 */
.event-side-right .event-lottery-btn:hover {
    background: linear-gradient(
        135deg,
        #ffe17c,
        #ffbd35
    );
    color: #763500;
    transform: translateY(-3px);
    
    padding-right: 8px;
    
}

/* 手機版 */
@media (max-width: 768px) {

    .event-side-right .event-lottery-btn {
        flex-direction: row;
        gap: 6px;
        padding: 8px 14px;
        border-radius: 25px;
    }

    .lottery-icon {
        font-size: 20px;
    }

    .lottery-text strong {
        font-size: 13px;
    }

    .lottery-text small,
    .lottery-sparkle {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .event-side-right .event-lottery-btn,
    .lottery-icon,
    .lottery-sparkle {
        animation: none;
    }
}


/* ===============================
   平板尺寸
================================ */

@media (max-width: 1200px) {

    .event-side-menu {
        width: 125px;
    }

    .event-side-link {
        font-size: 13px;
        padding: 9px 6px;
    }

    .event-side-title {
        font-size: 16px;
    }
}


/* ===============================
   手機版 - 改為橫向滑動
================================ */

@media (max-width: 768px) {

    .event-side-menu {
        position: relative;
        top: auto;
        left: auto;
        right: auto;

        width: 100%;
        margin: 12px 0;
        box-shadow: none;
    }

    .event-side-title {
        padding: 10px;
        font-size: 15px;
        text-align: left;
    }

    .event-side-list {
        flex-direction: row;
        overflow-x: auto;
        gap: 8px;
        padding: 10px;

        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .event-side-list::-webkit-scrollbar {
        display: none;
    }

    .event-side-link {
        flex: 0 0 auto;

        min-height: 40px;
        padding: 8px 14px;

        border-radius: 20px;
        font-size: 13px;
        white-space: nowrap;
    }

    .event-side-left .event-side-link:hover,
    .event-side-right .event-side-link:hover {
        padding-left: 14px;
        padding-right: 14px;
    }
}


/* =====================================================
   05. Section Title
===================================================== */



.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    margin: 0 auto;
}

.section-title h2 {
    margin: 0;
    color: #fff;
    font-size: 32px;
    font-weight: 800;
    font-style: italic;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
}

/* 左右橫線 */
.section-title::before,
.section-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background: rgba(255,255,255,.9);
    flex-shrink: 0;
}



/* =====================================================
   06. 商品活動配色
===================================================== */

.book-item figcaption {
    color: #173d72;
}

.book-grid {
    display: grid;

    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    background:#eff4f8;
    padding:15px;
}

.book-item {
    margin: 0;

    padding: 0 10px 15px;

    text-align: center;

    box-shadow:
        0 8px 28px rgba(0, 0, 0, .08);
}

.book-item img {
    display: block;

    width: 100%;

    aspect-ratio: 1 / 1;

    padding: 15px;

    object-fit: contain;

    transition: .25s;
}

.book-item figcaption {
    display: -webkit-box;

    min-height: 50px;

    margin: 0 0 5px;

    overflow: hidden;

    font-size: .95rem;
    font-weight: 600;
    line-height: 1.45;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;

    align-content: center;
}

/* =====================================================
   10. Tablet
===================================================== */

@media screen and (min-width: 769px) and (max-width: 1024px) {

    .header {
        background: #3d464d;
    }

    .main-content {
        background-image: url("../images/bg1.png");

        background-position: center top;
        background-size: 100% auto;
    }
.logo_M{
		display:block;
	position: absolute;
  top: 3px;
  left: 10px;
  width:30%;
}

}


/* =====================================================
   11. Mobile
===================================================== */

@media screen and (max-width: 768px) {

    .header {
        background: #3d464d;
    }
.logo_M{
		display:block;
	position: absolute;
  top: 3px;
  left: 5px;
  width:30%;
}

.hero-title-sale {
display:none;
}

    /* 選單外層 */
    .mobile-menu-wrap {
        position: sticky !important;
        top: 0;
        z-index: 9;

        width: 100%;
        margin: 0;

        background: #fff;
        box-shadow: 0 3px 12px rgba(0,0,0,.12);
    }

    /* 取消原本左右側邊定位 */
    .mobile-menu-wrap .event-side-menu {
        position: relative !important;

        top: auto !important;
        left: auto !important;
        right: auto !important;

        width: 100%;
        margin: 0;
        transform: none !important;
        box-shadow: none;
    }

    /* 原本的標題 */
    .mobile-menu-wrap .event-side-title {
        display: block;
        padding: 9px 14px;

        font-size: 14px;
        font-weight: 800;
    }

    /* 分類選單 */
    .mobile-menu-wrap .event-side-list {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;

        padding: 8px 12px;
        overflow-x: auto;

        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-menu-wrap .event-side-list::-webkit-scrollbar {
        display: none;
    }

    .mobile-menu-wrap .event-side-link {
        flex: 0 0 auto;

        min-height: 36px;
        padding: 7px 14px;

        border-radius: 20px;
        font-size: 13px;
        white-space: nowrap;
    }

    /* =================================
       選單固定後
    ================================= */

    .mobile-menu-wrap.is-sticky {
        box-shadow: 0 4px 16px rgba(0,0,0,.18);
    }

    /* 固定後隱藏大標 */
    .mobile-menu-wrap.is-sticky .event-side-title {
        display: none;
    }

    /* 固定後縮小選單高度 */
    .mobile-menu-wrap.is-sticky .event-side-list {
        padding: 6px 10px;
    }

    .mobile-menu-wrap.is-sticky .event-side-link {
        min-height: 32px;
        padding: 5px 12px;
        font-size: 12px;
    }


    
    .section-title {
        gap: 10px;
        margin: 0 auto 0 auto;
    }

    .section-title h2 {
        font-size: 22px;
    }

    .section-title::before,
    .section-title::after {
        width: 25px;
        height: 1px;
    }

.book-grid {

    grid-template-columns: repeat(2, 1fr);
}


}