/* =========================================
   Reset & Variables
   ========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 大地色系變數 */
    --color-bg-light: #F7DABA;
    /* 整體亮色背景 */
    --color-bg-wave: #F4E4CE;
    /* 波浪區塊背景 */
    --color-text-main: #7f4e21;
    /* 主文字深棕色 */
    --color-text-light: #8B7355;
    /* 次要文字淺棕色 */
    --color-accent: #D4A373;
    /* 按鈕/強調色 */
    --color-badge: #A07855;
    /* 徽章深咖啡色 */
    --color-footer-bar: #b28246;
    /* Footer 底部橫條 */
    --font-main: 'Helvetica Neue', Arial, 'PingFang TC', 'Heiti TC', 'Microsoft JhengHei', sans-serif;
    --color-primary-brown: #7f4e21;
    --color-accent-brown: #8B7355;
    --text-main: #8A6033;
    --text-sub: #876d54;
    --border-light: #d8c3af;
    --box-bg: #FDF6EE;
    
}
html {
  scroll-behavior: smooth;
}
body {
    font-family: var(--font-main);
    color: var(--color-text-main);
    background-color: var(--color-bg-light);
    line-height: 1.6;
    overflow-x: hidden;
    background: #F7DABA url('./images/nav/background-texture.png') repeat scroll ;
    /* background-size: cover; */
    /* 建議單獨設定 */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
}


/* =========================================
   Header (頁首)
   ========================================= */

.header {
    padding: 20px 40px;
}

.header__container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header__logo-img {
    width: auto;
    height: 160px;
}


/* =========================================
   導航列基礎佈局
========================================= */

.cat-nav {
    padding: 20px 40px;
}

.nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 15px;
    /* 項目與分隔線之間的間距 */
}


/* =========================================
   立體質感分隔線 (保留原先純CSS寫法)
========================================= */

.separator {
    width: 4px;
    height: 24px;
    /* 根據圖片按鈕高度微調 */
    border-radius: 3px;
    background: linear-gradient(90deg, var(--sep-light) 0%, var(--sep-mid) 50%, var(--sep-dark) 100%);
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    margin: 0 5px;
}


/* =========================================
   圖片按鈕容器與切換特效
========================================= */

.nav-item {
    position: relative;
    display: flex;
    justify-content: center;
}

.nav-link {
    display: block;
    position: relative;
    height: 35px;
    /* 可根據實際圖片大小微調高度，寬度會自適應 */
    cursor: pointer;
}

.nav-link img {
    height: 100%;
    width: auto;
    display: block;
}


/* 預設圖片 */

.btn-default {
    transition: opacity 0.3s ease;
}


/* 懸停圖片：絕對定位蓋在預設圖片上方，初始為透明 */

.btn-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}


/* 懸停時的圖片切換：隱藏 default，顯示 hover */

.nav-item:hover .btn-default {
    opacity: 0;
}

.nav-item:hover .btn-hover {
    opacity: 1;
}


/* =========================================
   貓掌圖片與互動動畫
========================================= */

.paw-icon {
    position: absolute;
    top: -26px;
    /* 定位在文字正上方 */
    height: 28px;
    /* 設定貓掌圖片大小 */
    z-index: 10;
    /* 初始狀態：透明且微幅向下、向左旋轉 */
    opacity: 0;
    transform: translateY(10px) rotate(-30deg) scale(0.8);
    pointer-events: none;
    /* 避免擋住滑鼠點擊 */
    /* Q彈動畫曲線 */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}


/* 當滑鼠懸停時貓掌浮現 */

.nav-item:hover .paw-icon {
    opacity: 1;
    transform: translateY(0) rotate(-15deg) scale(1);
}


/* nav-end*/


/* =========================================
   Hero Section (主視覺區)
   ========================================= */

.hero {
    max-width: 1200px;
    margin: 40px auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: relative;
}

.hero__nav-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #D3C3B1;
    cursor: pointer;
}

.hero__content {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.hero__text-area {
    flex: 1;
    max-width: 300px;
}

.hero__poem {
    font-family: serif;
    font-size: 1.1rem;
    color: var(--color-text-main);
    letter-spacing: 1.5px;
}

.hero__image-area {
    flex: 2;
    display: flex;
    justify-content: flex-end;
}


/* 核心：不規則遮罩模擬貓咪主視覺的有機邊緣 */

.hero__blob-mask {
    width: 600px;
    height: 450px;
    position: relative;
    /* 運用高階 border-radius 創造有機形狀 */
    border-radius: 43% 57% 41% 59% / 46% 39% 61% 54%;
    overflow: hidden;
    box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.05);
}

.hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__image-text {
    position: absolute;
    bottom: 40px;
    left: 40px;
    color: white;
    font-family: sans-serif;
    font-weight: bold;
    font-size: 2rem;
    line-height: 1.2;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
}


/* =========================================
   Section: Specialty Coffee
   ========================================= */

.specialty {
    position: relative;
    padding: 80px 20px;
    overflow: hidden;
}


/* === 核心修正：頂部波浪圖片 === */

.specialty__wave-wrapper {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 0;
}

.specialty__wave {
    width: 100%;
    height: auto;
    display: block;
}


/* 主容器 */

.specialty__container {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    padding-top: 60px;
    /* 避開頂部的波浪圖片 */
}


/* === 核心修正：左側視覺區 (咖啡圖) === */

.specialty__visual-wrapper {
    flex: 0 0 40%;
    /* 桌面端固定佔 40% 寬度，絕不巨型 */
    max-width: 450px;
}

.specialty__coffee-img {
    width: 100%;
    height: auto;
    display: block;
    /* 雖然圖片被裁切過，但如果仍有細微黑框，可選用：mix-blend-mode: screen; */
}


/* === 右側內容區 === */

.specialty__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}


/* === 核心修正：標題與推薦單品圖容器 === */

.specialty__title-wrapper {
    width: 100%;
    max-width: 500px;
    /* 桌面端限制最大寬度，避免過大 */
    height: auto;
    /* 關鍵：將黑色背景轉為透明 */
    mix-blend-mode: screen;
}

.specialty__title-img {
    width: 100%;
    height: auto;
    display: block;
}


/* === 核心修正：英文與手沖單品副標題圖容器 === */

.specialty__subtitle-wrapper {
    width: 100%;
    max-width: 380px;
    /* 桌面端限制最大寬度 */
    height: auto;
    margin-bottom: 10px;
    /* 即使這張圖有透明背景，加上 screen 模式可選，對黑色素材更安全 */
}

.specialty__subtitle-img {
    width: 100%;
    height: auto;
    display: block;
}


/* === 單一菜單品項 (純文字) === */

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0 10px;
    /* 增加邊距 */
}

.menu-item__name {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 5px 0;
}

.menu-item__en {
    font-size: 13px;
    color: var(--color-accent-brown);
    margin: 0 0 0 16px;
    letter-spacing: 1px;
}

.menu-item__price {
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 1px;
}


/* === 按鈕 === */

.specialty__action {
    text-align: right;
    /* 桌面端右對齊，完美還原 */
    margin-top: 10px;
    padding: 0 10px;
}

.btn--outline {
    display: inline-block;
    padding: 8px 24px;
    border: 1px solid var(--color-primary-brown);
    border-radius: 50px;
    color: var(--color-primary-brown);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn--outline:hover {
    background-color: var(--color-primary-brown);
    color: #fff;
}


/* =========================================
   Gallery Nav Section (圖文導覽區)
   ========================================= */

.gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    width: 100%;
    margin-top: 40px;
}

.gallery__item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: block;
    text-decoration: none;
}

.gallery__img {
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease;
}

.gallery__item:hover .gallery__img {
    transform: scale(1.05);
}

.gallery__title {
    position: absolute;
    bottom: 15px;
    left: 15px;
    color: var(--color-text-main);
    font-weight: 800;
    font-size: 1.1rem;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8);
}


/* =========================================
   Footer (頁尾)
   ========================================= */

.footer {
    margin-top: 40px;
}

.footer__top {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 40px;
}

.footer__slogan {
    font-weight: bold;
    color: var(--color-badge);
    display: flex;
    gap: 15px;
    align-items: center;
    z-index: 1;
}
.footer__slogan2{
   color: var(--color-accent);
}

.footer__divider {
    color: #ccc;
}

.footer__logo-img {
    height: 110px;
    object-fit: contain;
}

.footer__bottom {
    background-color: var(--color-footer-bar);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 60px;
}

.footer__socials {
    display: flex;
    gap: 15px;
}

.footer__social-icon {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    object-fit: cover;
}

.footer__contact {
    display: flex;
    gap: 30px;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.footer__paw-img{
    position:absolute;
    width:130px;
    left:0;
    margin-bottom:10% ;
    pointer-events: none;
    
}

/* =========================================
   Responsive (RWD 響應式基礎)
   ========================================= */

@media (max-width: 992px) {
    .hero__content,
    .product__container {
        flex-direction: column;
        text-align: center;
    }
    .hero__image-area,
    .product__visual {
        justify-content: center;
    }
    .product__specs {
        flex-direction: column;
        border-left: none;
        border-top: 2px solid var(--color-text-light);
        padding-top: 10px;
        align-items: center;
    }

    .specialty {
        padding: 48px 16px 56px;
    }

    .specialty__container {
        flex-direction: column;
        align-items: center;
        gap: 32px;
        padding-top: 36px;
    }

    .specialty__visual-wrapper {
        flex: 0 1 auto;
        width: 100%;
        max-width: min(360px, 88vw);
        margin: 0 auto;
    }

    .specialty__content {
        align-items: center;
        width: 100%;
        max-width: 520px;
        margin: 0 auto;
        text-align: center;
    }

    .specialty__title-wrapper,
    .specialty__subtitle-wrapper {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .menu-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px;
        padding: 0 8px;
    }

    .menu-item__en {
        margin-left: 0;
    }

    .specialty__action {
        text-align: center;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .header__nav-list {
        display: none;
    }
    /* 行動版可改作漢堡選單 */
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 24px;
    }
    .footer__top,
    .footer__bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer__top {
        padding: 24px 20px;
    }

    .footer__slogan {
        flex-direction: column;
        flex-wrap: wrap;
        gap: 8px;
        max-width: 100%;
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .footer__divider {
        display: none;
    }

    .footer__logo-img {
        height: 88px;
    }

    .footer__bottom {
        padding: 18px 20px;
    }

    .footer__contact {
        flex-direction: column;
        gap: 10px;
        font-size: 0.85rem;
    }
    .specialty__coffee-img {
    width: 70%;
    height: auto;
    margin-top:60px;
    margin-left: 60px;
    margin-bottom: -30px;
    }
    .footer__paw-img{
    width:90px;
    pointer-events: none;
    }
}

@media (max-width: 420px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}