/* ==============================
   萬界巡味
   Desktop 首頁基礎樣式
   ============================== */


/* ==============================
   全域設定
   ============================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        Arial,
        "Noto Sans TC",
        "Microsoft JhengHei",
        sans-serif;

    background-color: #ffffff;
    color: #222222;

    line-height: 1.5;
}


/* ==============================
   Header
   ============================== */

.site-header {
    width: 100%;
    height: 72px;

    padding: 0 40px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background-color: #ffffff;

    border-bottom: 1px solid #eeeeee;
}


/* ---------- 品牌名稱 ---------- */

.brand {
    font-size: 24px;
    font-weight: 700;

    color: #222222;

    white-space: nowrap;
}


/* ==============================
   主導覽列
   ============================== */

.main-nav {
    display: flex;
    align-items: center;

    gap: 32px;
}

.main-nav a {
    position: relative;

    color: #333333;

    font-size: 15px;
    font-weight: 500;

    text-decoration: none;

    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: #000000;
}


/* ---------- 導覽列滑鼠效果 ---------- */

.main-nav a::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -6px;

    width: 0;
    height: 2px;

    background-color: #222222;

    transition: width 0.2s ease;
}

.main-nav a:hover::after {
    width: 100%;
}


/* ==============================
   Main
   ============================== */

main {
    width: 100%;
}


/* ==============================
   Hero 主視覺
   ============================== */

.hero {
    position: relative;

    width: 100%;

    overflow: hidden;

    background-color: #ffffff;
}


/*
   Hero 圖片本體

   width: 100%
   → 圖片永遠跟著網頁寬度縮放

   height: auto
   → 高度依照圖片原本比例自動計算

   因此：
   不裁切
   不變形
   不固定高度
*/

.hero-image {
    display: block;

    width: 100%;
    height: auto;
}


/* ==============================
   Hero 搜尋區
   ============================== */

.hero-content {
    position: absolute;

    /*
       搜尋欄放在 Hero 約 67% 高度的位置。
       之後可以依實際畫面再微調。
    */
    top: 67%;
    left: 50%;

    transform: translate(-50%, -50%);

    z-index: 2;

    width: min(600px, calc(100% - 40px));
}


/* ==============================
   搜尋欄
   ============================== */

.hero input[type="search"] {
    width: 100%;
    height: 56px;

    padding: 0 26px;

    border:
        1px solid
        rgba(0, 0, 0, 0.14);

    border-radius: 30px;

    background-color:
        rgba(255, 255, 255, 0.94);

    color: #222222;

    font-size: 16px;

    outline: none;

    box-shadow:
        0 5px 20px
        rgba(0, 0, 0, 0.16);

    backdrop-filter: blur(6px);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}


/* ---------- 搜尋欄提示文字 ---------- */

.hero input[type="search"]::placeholder {
    color: #777777;
}


/* ---------- 點擊搜尋欄 ---------- */

.hero input[type="search"]:focus {
    background-color: #ffffff;

    border-color:
        rgba(0, 0, 0, 0.35);

    box-shadow:
        0 6px 24px
        rgba(0, 0, 0, 0.20);
}


/* ==============================
   一般筆電尺寸保護
   ============================== */

@media (max-width: 1100px) {

    .site-header {
        padding: 0 30px;
    }

    .main-nav {
        gap: 24px;
    }

    .hero-content {
        width: min(
            560px,
            calc(100% - 40px)
        );
    }
}


/* ==============================
   較小畫面基礎保護

   現階段仍以 Desktop 為主，
   這裡只是避免畫面縮小時破版。
   ============================== */

@media (max-width: 700px) {

    .site-header {
        height: auto;

        padding: 16px 20px;

        flex-direction: column;
        align-items: flex-start;

        gap: 14px;
    }

    .brand {
        font-size: 22px;
    }

    .main-nav {
        width: 100%;

        gap: 16px;

        flex-wrap: wrap;
    }

    .main-nav a {
        font-size: 14px;
    }

    .hero-content {
        top: 67%;

        width: calc(100% - 40px);
    }

    .hero input[type="search"] {
        height: 52px;

        padding: 0 22px;

        font-size: 15px;
    }
}
