/* 萬平購物網｜首頁與響應式版面 */


/* ==================================================
   01. 全站色彩變數
================================================== */

:root {
    --red: #e60012;
    --ink: #444;
    --gold: #a19675;
    --muted: #858585;
    --surface: #f8f8f8;
}


/* ==================================================
   02. 基本設定與鍵盤焦點
================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "Noto Sans TC",
  "PingFang TC",
  "Microsoft JhengHei",
  sans-serif;
    font-size: 16px;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button,
a,
input {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

button {
    color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid #a57524;
    outline-offset: 5px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1,
h2,
h3,
p {
    margin: 0;
}


/* ==================================================
   03. 共用圖示與無障礙設定
================================================== */

.icon {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.sr-only,
.skip-link:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.skip-link:focus {
    position: absolute;
    z-index: 20;
    background: #fff;
    padding: 12px;
}


/* ==================================================
   04. 頂部紅色橫條
================================================== */

.topbar {
    background: var(--red);
    color: #fff;
}

.topbar-inner {
    max-width: 1280px;
    margin: auto;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    padding: 8px 20px;
    gap: 20px;
}

.topbar p {
  
    font-size: 18px;
	
	 position: static;
        transform: none;
        margin-right: auto;
}


/* ==================================================
   05. 搜尋、會員與購物車
================================================== */

.tools,
.quick-links {
    display: flex;
    gap: 14px;
    align-items: center;
}

.search {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 30px;
    width: 180px;
    padding: 4px;
    color: var(--red);
}

.search input {
    min-width: 0;
    width: 100%;
    border: 0;
    background: none;
    padding: 3px 10px;
    font-size: 13px;
    outline-offset: 1px;
}

.search button {
    border: 0;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    padding: 4px;
    flex-shrink: 0;
}

.search .icon {
    width: 17px;
    height: 17px;
}

.tool-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    min-height: 36px;
    font-weight: 500;
}

.tool-link>.icon {
    border-radius: 50%;
    padding: 3px;
    width: 34px;
    height: 34px;
    background-color: #FFFFFF;
}


/* ==================================================
   06. LOGO 與主選單
================================================== */

.nav-wrap {
    max-width: 1280px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 7px 20px;
    min-height: 83px;
}

.logo {
    flex: 0 0 136px;
}

.logo img {
    width: 136px;
}

nav {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

nav a {
    font-size: 18px;
    white-space: nowrap;
    padding: 16px 0;
    font-weight: 600;
    color: #444;
}

nav a:hover {
    color: var(--red);
}

.menu-toggle {
    display: none;
}


/* ==================================================
   07. Banner 輪播與控制按鈕
================================================== */

.hero {
    position: relative;
    background: #eee;
}

.hero-slide img {
    width: 100%;
    height: auto;
}

.hero-slide[hidden] {
    display: none;
}

.round {
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(38,38,38,.65);
    color: white;
    width: 46px;
    height: 46px;
    padding: 0;
    transition: background .2s;
}

.round:hover {
    background: var(--red);
}

.round:disabled {
    opacity: .25;
    cursor: default;
}

.hero-prev,
.hero-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity .2s;
}

.hero:hover .round,
.hero:focus-within .round {
    opacity: 1;
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

.hero-controls {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    align-items: center;
}

.dots {
    display: flex;
    gap: 2px;
}

.dots button {
    border: 0;
    background: none;
    width: 28px;
    height: 30px;
    padding: 9px;
}

.dots button:after {
    content: "";
    display: block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ffffff80;
    border: 1px solid white;
}

.dots button[aria-pressed=true]:after {
    background: var(--red);
}

.hero-pause {
    background: #0005;
    color: white;
    border: 0;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
}

.hero-pause .icon {
    width: 16px;
    height: 16px;
}


/* ==================================================
   08. 共用內容寬度與區塊標題
================================================== */

.container {
    max-width: 1320px;
    margin: auto;
    padding: 0 16px;
}

.section {
    padding: 80px 0 82px;
}

.bulk,
.gift,
.spicy {
    background: var(--surface);
}

.section-title {
    text-align: center;
    margin-bottom: 36px;
}

.section-title>p {
    font-family: Georgia,"Times New Roman",serif;
    color: var(--gold);
    font-size: 24px;
}

.section-title h2 {
    font-size: 46px;
    color: #111;
    font-weight: 500;
    letter-spacing: 5px;
    line-height: 1.4;
}

.section-title>div {
    font-size: 23px;
    color: var(--muted);
    letter-spacing: 1px;
    font-weight:400;
	
    font-family: Georgia,"Times New Roman",serif;
}


/* ==================================================
   09. 商品區：聰明箱購／新品登場／禮盒首選
================================================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 18px;
}

.product {
    background: #fff;
    min-width: 0;
}

.product img,
.series-card img {
    width: 100%;
    aspect-ratio: 173/115;
    object-fit: cover;
}

.product-copy {
    padding: 25px 8px 16px;
    text-align: center;
    line-height: 1.65;
}

.product h3 {
    font-size: 19px;
    font-weight: 600;
}

.product p {
    font-size: 18px;
}

.price-line strong {
    color: #e60012;
    font-size: 30px;
    font-weight: 500;
    white-space: nowrap;
}


/* ==================================================
   10. 品牌形象橫幅
================================================== */

.brand {
    padding: 50px max(24px,5.3vw) 60px;
    background: white;
}

.brand a {
    display: block;
    max-width: 1200px;
    margin: auto;
}

.brand img {
    width: 100%;
}


/* ==================================================
   11. 辣味精選滑動區
================================================== */

.series-wrap {
    position: relative;
}

.series-track {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.series-track::-webkit-scrollbar {
    display: none;
}

.series-card {
    flex: 0 0 calc((100% - 36px)/3);
    min-width: 0;
    scroll-snap-align: start;
    background: white;
}

.series-card>a {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.series-copy {
    padding-top: 12px;
    padding-right: 20px;
    padding-left: 20px;
    padding-bottom: 24px;
    display: flex;
    flex: 1;
    flex-direction: column;
}

.series-copy h3 {
    font-size: 26px;
    font-weight: 500;
}

.series-copy p {
    font-size: 16px;
    color: #666;
    line-height: 1.7;
    min-height: 48px;
}

.outline-link {
    border: 1px solid #e60012;
    color:#e60012;
    border-radius: 30px;
    font-size: 16px;
    align-self: flex-end;
    text-align: center;
    width: 175px;
    margin-top: 22px;
    padding: 3px 15px;
}

.series-prev,
.series-next {
    position: absolute;
    top: 36%;
    transform: translateY(-50%);
}

.series-prev {
    left: 2px;
}

.series-next {
    right: 2px;
}


/* ==================================================
   12. 底部辣椒圖片與訂購專線
================================================== */

.contact-banner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--red);
    color: white;
}

.contact-banner>img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 35px 20px;
    text-align: center;
}

.contact-copy>.icon {
    width: 80px;
    height: 80px;
    stroke-width: 1.1;
    margin-bottom: 14px;
}

.contact-copy h2 {
    font-size:40px;
    font-weight: 500;
    letter-spacing: 2px;
}

.contact-copy p {
    background: white;
    color: var(--red);
    font-size: 15px;
    padding: 0 8px;
    margin-top: 8px;
}

.contact-copy>a {
    font-size: 62px;
    line-height: 1.3;
}


/* ==================================================
   13. Footer：LOGO 與社群連結
================================================== */

.footer-main {
    background: var(--surface);
    padding: 36px max(24px,6.5vw);
    display: flex;
    justify-content: space-between;
    gap: 35px;
}

.footer-brand img {
    width: 140px;
}

.footer-brand p {
    font-size: 16px;
    margin-top: 10px;
}

.socials {
    display: flex;
    gap: 8px;
    margin-top: 40px;
}

.socials a {
    background: #aaa;
    color: #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    font-size: 19px;
    font-family: Arial;
    font-weight: bold;
}

.socials a:nth-child(2) {
    font-size: 8px;
}


/* ==================================================
   14. Footer：選單連結
================================================== */

.footer-links {
    display: flex;
    gap: 60px;
    padding-top: 10px;
}

.footer-links h3 {
    font-size: 17px;
    font-weight:600;
    margin-bottom: 6px;
}

.footer-links a {
    display: block;
    font-size: 15px;
    color: #666;
    line-height: 1.9;
}


/* ==================================================
   15. Footer：紅色版權列
================================================== */

.footer-bottom {
    background: var(--red);
    color: white;
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
    padding: 8px 20px;
}

.footer-bottom p+p {
    margin-top: 10px;
    padding-top: 6px;
    border-top: 1px solid #ffffff40;
}


/* ==================================================
   16. 暫時連結頁
================================================== */

.placeholder {
    max-width: 640px;
    margin: 80px auto;
    padding: 24px;
    line-height: 2;
}

.placeholder>a:last-child {
    color: var(--red);
    text-decoration: underline;
}


/* ==================================================
   17. 大螢幕：1600px 以上
================================================== */

@media (min-width: 1600px) {
    .topbar-inner,
    .nav-wrap {
        max-width: 1500px;
    }

    .container {
        max-width: 1600px;
    }

    .section {
        padding: 100px 0;
    }

    .brand a {
        max-width: 1440px;
    }

}


/* ==================================================
   18. 平板與小桌機：1100px 以下
================================================== */

@media (768px <= width <= 1100px) {
    .tools,
    .quick-links {
        gap: 10px;
    }

    .search {
        width: clamp(120px, 17vw, 180px);
    }

    .account-status,
    .tool-link {
        font-size: 14px;
        white-space: nowrap;
    }

    .topbar-inner .shipping-notice {
        font-size: 14px;
    }
}

@media (max-width: 1100px) {
    .topbar p {
        position: static;
        transform: none;
        margin-right: auto;
    }

    .nav-wrap {
        gap: 25px;
    }

    nav {
        gap: 12px;
    }

    nav a {
        font-size: 12px;
    }

    .logo {
        flex-basis: 115px;
    }

    .section {
        padding: 60px 0;
    }

    .section-title h2 {
        font-size: 38px;
    }

    .section-title>p {
        font-size: 20px;
    }

    .section-title>div {
        font-size: 18px;
    }

    .product h3 {
        font-size: 15px;
    }

    .product p {
        font-size: 14px;
    }

    .price-line strong {
        font-size: 24px;
    }

    .contact-copy h2 {
        font-size: 25px;
    }

    .contact-copy>a {
        font-size: 40px;
    }

    .contact-copy>.icon {
        width: 60px;
        height: 60px;
    }

    .series-copy h3 {
        font-size: 21px;
    }

}


/* ==================================================
   19. 手機版：767px 以下
================================================== */

@media (max-width: 767px) {
    .menu-toggle {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        background: none;
        border: 1px solid #ddd;
        border-radius: 3px;
    }

    nav a {
        padding: 12px 0;
        font-size: 18px;
        border-bottom: 1px solid #eee;
    }

    .hero .round {
        display: none;
    }

    .hero-controls {
        bottom: 2px;
    }

    .hero-pause {
        width: 26px;
        height: 26px;
    }

    .section {
        padding: 45px 0 48px;
    }

    .section-title {
        margin-bottom: 26px;
        padding: 0 16px;
    }

    .section-title>p {
        font-size: 16px;
        line-height: 20px;
    }

    .section-title h2 {
        font-size: 28px;
        line-height: 36px;
        letter-spacing: 3px;
    }

    .section-title>div {
        font-size: 15px;
        line-height: 22px;
        letter-spacing: 0;
    }

    .container {
        padding: 0 20px;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        max-width: 520px;
        padding-inline: 18px;
    }

    .product-copy {
        padding: 18px 10px 22px;
    }

    .product h3 {
        font-size: 17px;
    }

    .product p {
        font-size: 15px;
    }

    .price-line strong {
        font-size: 27px;
    }

    .brand {
        padding: 32px 20px;
    }

    .series-track {
        gap: 14px;
        scroll-padding-left: 0;
    }

    .series-card {
        flex-basis: 86%;
    }

    .series-wrap {
        padding-right: 0;
    }

    .series-track:after {
        content: "";
        flex: 0 0 6px;
    }

    .series-copy {
        padding: 14px 12px 20px;
    }

    .series-copy h3 {
        font-size: 23px;
    }

    .series-copy p {
        font-size: 14px;
    }

    .outline-link {
        margin-top: 16px;
        min-height: 30px;
        display: grid;
        place-items: center;
    }

    .series-prev,
    .series-next {
        width: 36px;
        height: 36px;
        top: 34%;
    }

    .series-prev {
        left: 7px;
    }

    .series-next {
        right: 7px;
    }

    .contact-banner {
        grid-template-columns: 1fr;
    }

    .contact-banner>img {
        aspect-ratio: 276/151;
        max-height: 300px;
    }

    .contact-copy {
        padding: 32px 20px 36px;
    }

    .contact-copy h2 {
        font-size: 27px;
    }

    .contact-copy>a {
        font-size: 40px;
    }

    .footer-main {
        flex-direction: column;
        padding: 32px 24px;
        gap: 30px;
    }

    .footer-brand img {
        width: 125px;
    }

    .socials {
        margin-top: 20px;
    }

    .footer-links {
        justify-content: space-between;
        gap: 16px;
    }

    .footer-links h3 {
        margin-bottom: 12px;
    }

    .footer-bottom {
        font-size: 14px;
    }

    .round .icon {
        width: 18px;
        height: 18px;
    }

}


/* ==================================================
   20. 無障礙：減少動態效果
================================================== */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition: none!important;
    }

}


/* 明確設定底色，避免嵌入預覽時透出外層背景 */

body {
    background: #fff;
}

.socials .icon {
    width: 19px;
    height: 19px;
    stroke-width: 1.5;
}


/* 背景滿版；僅 LOGO 與選單所在的內層與頁首選單同寬。 */

footer {
    background: var(--surface);
}

.footer-main {
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: 20px;
}

@media (min-width: 1600px) {
    .footer-main {
        max-width: 1500px;
    }

}


/* 右下角 TOP；SVG 可直接以同名檔替換。 */

.back-to-top {
    position: fixed;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(24px, env(safe-area-inset-bottom));
    z-index: 30;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    box-shadow: 0 3px 14px #0002;
    transition: transform .2s;
}

.back-to-top[hidden] {
    display: none;
}

.back-to-top img {
    width: 100%;
    height: 100%;
}

.back-to-top:hover {
    transform: translateY(-3px);
}

@media (max-width: 767px) {
    .back-to-top {
        width: 46px;
        height: 46px;
        right: max(14px, env(safe-area-inset-right));
        bottom: calc(var(--mobile-help-bottom) + var(--mobile-help-height) + 10px);
    }

}


/* 手機選單：柔順下拉／收合，保留原本雙欄排列。 */

@media (max-width: 767px) {
    .nav-wrap nav {
        position: absolute;
        top: 100%;
        inset-inline: 0;
        z-index: 10;
        background: #fff;
        padding: 12px 24px;
        box-shadow: 0 10px 20px #0001;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 20px;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        clip-path: inset(0 0 100% 0);
        transform: translateY(-8px);
        transition: clip-path .36s cubic-bezier(.22, 1, .36, 1), transform .36s cubic-bezier(.22, 1, .36, 1), opacity .24s ease, visibility 0s linear .36s;
    }

    .nav-wrap nav.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        clip-path: inset(0 0 0 0);
        transform: translateY(0);
        transition-delay: 0s;
    }

    .nav-wrap nav a {
        opacity: 0;
        transform: translateY(-5px);
        transition: opacity .24s ease, transform .32s ease;
    }

    .nav-wrap nav.is-open a {
        opacity: 1;
        transform: translateY(0);
        transition-delay: .06s;
    }

}


/* 漢堡圖示與選單狀態同步：三條線 ⇄ X。 */

.menu-toggle .menu-line {
    transform-origin: 12px 12px;
    transition: transform .32s cubic-bezier(.22, 1, .36, 1), opacity .18s ease;
}

.menu-toggle .menu-line-top {
    transform: translateY(-6px);
}

.menu-toggle .menu-line-bottom {
    transform: translateY(6px);
}

.menu-toggle[aria-expanded="true"] .menu-line-top {
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-line-middle {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle[aria-expanded="true"] .menu-line-bottom {
    transform: rotate(-45deg);
}


/* 帳戶狀態與捷徑 */
.account-status {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.account-status > .icon {
    width: 34px;
    height: 34px;
    padding: 3px;
    border-radius: 50%;
    background: #fff;
}

.member-logout {
    flex-shrink: 0;
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 1px;
}

.member-greeting {
    overflow-wrap: anywhere;
}

.tool-link:hover,
.tool-link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 5px;
}

.member-mobile-label,
.mobile-help-link,
.account-status[hidden],
.login-link[hidden] {
    display: none;
}

@media (max-width: 767px) {
    :root {
        --mobile-help-height: 45px;
        --mobile-help-bottom: max(18px, env(safe-area-inset-bottom));
    }

    .site-header {
        position: relative;
        display: grid;
        grid-template-columns: clamp(96px, 33.25vw, 128px) minmax(0, 1fr) auto;
        grid-template-areas:
            "notice notice notice"
            "logo shortcuts menu"
            "account search search";
        grid-template-rows: 44px minmax(77px, auto) minmax(53px, auto);
        align-items: center;
        background: #fff;
        box-shadow: inset 0 -1px #ededed;
    }

    .topbar,
    .topbar-inner,
    .tools,
    .nav-wrap {
        display: contents;
    }

    .topbar-inner .shipping-notice {
        grid-area: notice;
        align-self: stretch;
        display: grid;
        place-items: center;
        margin: 0;
        padding: 0 10px;
        background: var(--red);
        color: #fff;
        font-size: 14px;
        font-weight: 700;
        text-align: center;
    }

    .site-header::before {
        content: "";
        grid-row: 2;
        grid-column: 1 / -1;
        align-self: end;
        border-bottom: 1px solid #ededed;
        pointer-events: none;
    }

    .logo {
        grid-area: logo;
        margin-inline-start: 8px;
        translate: 0 -3px;
    }

    .logo img {
        width: min(120px, 100%);
    }

    .quick-links {
        grid-area: shortcuts;
        justify-self: end;
        display: grid;
        grid-template-columns: repeat(3, minmax(44px, 1fr));
        width: min(100%, 190px);
        gap: 0;
        padding-inline-end: 4px;
        color: #555;
    }

    .quick-links .tool-link {
        flex-direction: column;
        justify-content: center;
        gap: 0;
        min-height: 52px;
        font-size: 14px;
        font-weight: 500;
        white-space: nowrap;
    }

    .quick-links .icon {
        display: block;
        width: 38px;
        height: 38px;
        padding: 0;
        border-radius: 0;
        background: transparent;
        filter: grayscale(1) brightness(2.5);
    }

    .member-desktop-label {
        display: none;
    }

    .member-mobile-label {
        display: inline;
    }

    .menu-toggle {
        grid-area: menu;
        margin-inline: 6px 18px;
        translate: 0 2px;
    }

    .menu-toggle .menu-line-top {
        transform: translateY(-5px);
    }

    .menu-toggle .menu-line-bottom {
        transform: translateY(5px);
    }

    .account-status,
    .login-link {
        grid-area: account;
        margin-inline: 18px 4px;
        translate: 0 4px;
        color: #555;
        font-size: 14px;
    }

    .account-status {
        gap: 4px;
    }

    .account-status > .icon {
        display: none;
    }

    .search {
        grid-area: search;
        width: auto;
        min-width: 0;
        min-height: 34px;
        margin-inline-end: 18px;
        translate: 0 4px;
        border: 1px solid #e4e4e4;
        background: #f8f8f8;
        padding: 3px 7px 3px 4px;
    }

    .search input {
        font-size: 16px;
        line-height: 1.35;
        padding: 2px 8px;
    }

    .search input::placeholder {
        font-size: 13px;
        color: #737373;
    }

    .search button {
        width: 24px;
        height: 24px;
    }

    .search .icon {
        width: 14px;
        height: 14px;
    }

    .mobile-help-link {
        position: fixed;
        z-index: 25;
        right: max(23px, env(safe-area-inset-right));
        bottom: var(--mobile-help-bottom);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        min-height: var(--mobile-help-height);
        padding: 0 11px;
        border: 1px solid currentColor;
        border-radius: 99px;
        background: #fff;
        color: var(--red);
        font-size: 16px;
    }

    .mobile-help-link:hover {
        background: #fff3f4;
    }

    .mobile-help-link .icon {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 359px) {
    .menu-toggle {
        margin-inline: 4px 10px;
    }

    .account-status,
    .login-link {
        margin-inline-start: 8px;
    }

    .search {
        margin-inline-end: 10px;
    }

    .quick-links {
        padding-inline-end: 0;
    }
}


/* 2026-11-23：RWD Banner 桌機／手機獨立圖片，不放大、不裁切 */
.hero, .hero-track, .hero-slide, .hero-slide picture { width: 100%; }
.hero-slide picture { display: block; }
.hero-slide img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    transform: none !important;
    animation: none !important;
    filter: none;
}
.hero-slide:hover img, .hero-slide:focus img { transform: none !important; }


/* 2026-11-23 修正：Banner 交疊淡入淡出（crossfade），非直接切換 */
.hero-track {
    position: relative;
    width: 100%;
    aspect-ratio: 1920 / 920;
    overflow: hidden;
}
.hero-track > .hero-slide {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    visibility: hidden;
    z-index: 0;
    pointer-events: none;
    transition: opacity 1.15s ease-in-out, visibility 0s linear 1.15s;
}
.hero-track > .hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
    pointer-events: auto;
    transition: opacity 1.15s ease-in-out, visibility 0s;
}
.hero-track > .hero-slide picture,
.hero-track > .hero-slide img {
    display: block;
    width: 100%;
    height: 100%;
}
.hero-track > .hero-slide img {
    object-fit: contain;
    object-position: center;
    transform: none !important;
    animation: none !important;
}
.hero-prev, .hero-next, .hero-controls { z-index: 3; }
@media (max-width: 767px) {
    .hero-track { aspect-ratio: 1 / 1; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-track > .hero-slide,
    .hero-track > .hero-slide.is-active { transition: none; }
}

/* 移除搜尋框的咖啡色焦點外框 */
.search input:focus,
.search input:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* 電腦版：會員中心、購物車、萬平官網 */
@media (min-width: 768px) {

    .quick-links .tool-link:hover,
    .quick-links .tool-link:focus-visible {
        text-decoration: none;
    }

    .quick-links .tool-link > span {
        position: relative;
        display: inline-block;
    }

    .quick-links .tool-link > span::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -5px;
        width: 100%;
        height: 1px;
        background-color: #fff;
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.35s ease;
    }

    .quick-links .tool-link:hover > span::after,
    .quick-links .tool-link:focus-visible > span::after {
        transform: scaleX(1);
    }
}

/* 電腦版：登出底線反向動畫 */
@media (min-width: 768px) {

    .member-logout {
        position: relative;
        display: inline-block;
        text-decoration: none !important;
    }

    .member-logout::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -5px;
        width: 100%;
        height: 1px;
        background-color: #fff;
        transform: scaleX(1);
        transform-origin: left;
        transition: transform 0.35s ease;
    }

    .member-logout:hover::after,
    .member-logout:focus-visible::after {
        transform: scaleX(0);
    }
}

/* 手機版：TOP 與按此發問右側對齊 */
@media (max-width: 767px) {

    .back-to-top,
    .mobile-help-link {
        right: max(14px, env(safe-area-inset-right));
    }

    /* 按此發問增加柔和陰影 */
    .mobile-help-link {
        box-shadow: 0 3px 14px #0002;
    }

}

/* 手機版 Footer：LOGO、選單置中 */
@media (max-width: 767px) {

    .footer-main {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 35px;
        padding: 40px 20px;
    }

    /* LOGO 與社群圖示置中 */
    .footer-brand {
        width: 100%;
        text-align: center;
    }

    .footer-brand img {
        display: block;
        width: 140px;
        height: auto;
        margin: 0 auto;
    }

    .socials {
        justify-content: center;
        margin-top: 20px;
    }

    /* 選單改為單欄置中 */
    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 30px;
        width: 100%;
        padding-top: 0;
        text-align: center;
    }

    .footer-links > div {
        width: 100%;
    }

    /* 選單標題 */
    .footer-links h3 {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 12px;
    }

    /* 選單連結 */
    .footer-links a {
        display: block;
        font-size: 18px;
        line-height: 1.6;
        padding: 6px 0;
        text-align: center;
    }

}

/* 手機版：只縮短搜尋框，不影響上方選單 */
@media (max-width: 767px) {

    .site-header {
        grid-template-columns: clamp(96px, 33.25vw, 128px) minmax(0, 1fr) auto;
    }

    .search {
        margin-left:20px;
    }

}


/* Footer 社群 ICON */
.socials a {
    display: flex;
    align-items: center;
    justify-content: center;
}

.socials a img {
    display: block;
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* ==================================================
   11/24 購物車下拉清單：桌機／手機共用
   不影響原有 Logo、Banner、會員、footer 配置
================================================== */
.topbar { position: relative; z-index: 40; }
.cart-menu { position: relative; display: flex; align-items: center; min-width: 0; }
.cart-toggle {
    appearance: none;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}
/* 只移除購物車原生按鈕底線，保留之前的 1px 動畫。 */
.cart-toggle:hover, .cart-toggle:focus-visible { text-decoration: none; }
.cart-dropdown[hidden] { display: none !important; }
.cart-dropdown {
    position: absolute;
    z-index: 1000;
    top: calc(100% + 13px);
    right: 0;
    width: 340px;
    max-width: calc(100vw - 24px);
    max-height: min(560px, calc(100dvh - 24px));
    overflow-y: auto;
    padding: 20px;
    background: #fff;
    color: #444;
    text-align: left;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    box-shadow: 0 10px 32px rgba(0,0,0,.18);
    animation: cart-dropdown-in .25s ease both;
}
.cart-dropdown-heading, .cart-dropdown-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.cart-dropdown-heading { padding-bottom: 14px; border-bottom: 1px solid #eee; }
.cart-dropdown-heading strong { font-size: 17px; }
.cart-count { color: #777; font-size: 13px; white-space: nowrap; }
.cart-empty { text-align: center; padding: 30px 4px; }
.cart-empty-icon { width: 38px; height: 38px; margin: 0 auto 12px; fill: none; stroke: #aaa; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cart-empty p { font-size: 15px; margin: 0 0 6px; }
.cart-empty small { color: #777; font-size: 13px; }
.cart-dropdown-total { padding: 16px 0; border-top: 1px solid #eee; font-size: 15px; }
.cart-subtotal { color: #e60012; font-size: 17px; }
.cart-dropdown-action {
    display: block;
    border-radius: 5px;
    padding: 13px;
    color: #fff;
    background: #e60012;
    text-align: center;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
}
.cart-dropdown-action:hover { background: #c9000f; color: #fff; }
@keyframes cart-dropdown-in {
    from { opacity: 0; transform: translateY(-7px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 767px) {
    .site-header { z-index: 40; }
    .cart-menu { justify-content: center; }
    .cart-menu .cart-toggle { width: 100%; }
    /* 固定定位，不會被手機版 Header 的 Grid 欄位裁掉。 */
    .cart-dropdown {
        position: fixed;
        top: var(--cart-dropdown-top, 128px);
        right: 12px;
        width: min(340px, calc(100vw - 24px));
        max-height: calc(100dvh - var(--cart-dropdown-top, 128px) - 12px);
        padding: 18px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .cart-dropdown { animation: none; }
}

/* 11/24 購物車：有商品清單、示範切換（保持原 Header 位置） */
.cart-checkout-action[hidden], .cart-shop-action[hidden] { display: none !important; }
.cart-checkout-action { width: 100%; border: 0; font-family: inherit; cursor: pointer; }
.cart-checkout-action:disabled { opacity: .75; cursor: not-allowed; }
.cart-items { max-height: 310px; overflow-y: auto; overscroll-behavior: contain; }
.cart-item { display: grid; grid-template-columns: 76px minmax(0,1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid #ededed; }
.cart-item-img { width: 76px; height: 76px; border-radius: 4px; object-fit: cover; background: #f7f7f7; }
.cart-item-name { font-size: 14px; font-weight: 600; line-height: 1.45; color: #333; margin: 0 0 7px; }
.cart-item-meta { font-size: 13px; line-height: 1.6; color: #666; }
.cart-item-price { color: #e60012; font-weight: 600; }
.cart-item-remove { border: 0; background: none; color: #777; padding: 6px 0 0; font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.cart-item-remove:hover, .cart-item-remove:focus-visible { color: #c60010; }
.cart-preview-controls { border-top: 1px dashed #e6e6e6; margin-top: 14px; padding-top: 12px; text-align: center; }
.cart-preview-button { border: 1px solid #ddd; border-radius: 5px; background: #fafafa; color: #666; font-size: 13px; padding: 7px 12px; cursor: pointer; }
.cart-preview-controls small { display: block; margin-top: 7px; color: #888; font-size: 11px; line-height: 1.5; }
@media (max-width: 767px) { .cart-item { grid-template-columns: 66px minmax(0,1fr); gap: 10px; } .cart-item-img { width: 66px; height: 66px; } .cart-items { max-height: min(310px, 38dvh); } }

/* 空購物車 ICON 左右翻轉 */
.cart-empty-icon {
    transform: scaleX(-1);
}


/* Footer social links */
.footer-socials { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.footer-line { display: inline-flex; align-items: center; gap: 10px; color: #333; font-size: 16px; text-decoration: none; }
.footer-line svg { flex-shrink: 0; }
.footer-facebook { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.footer-facebook iframe { display: block; max-width: 100%; }
.footer-fb-link { color: #555; font-size: 14px; text-decoration: none; }
.footer-line:hover span, .footer-fb-link:hover { text-decoration: underline; }
@media (max-width: 767px) {
    .footer-socials, .footer-facebook { align-items: center; }
    .footer-line { font-size: 17px; }
}

.footer-socials { margin-top: 16px; }

/* Footer 定稿：品牌／購物服務／社群 */
.footer-main {display:grid;grid-template-columns: 25% minmax(0,1fr) 224px;gap:44px;align-items:start;max-width: none;padding:44px 7.5% 20px;min-height:348px;}
.footer-brand {text-align:center;min-width:0;}
.footer-brand img {width:140px;height:auto;}
.footer-brand .footer-registration {display:inline-block;background:#ddd;border-radius:30px;padding:5px 10px;font-size:13px;color:#555;margin-top:16px;line-height:1.4;}
.footer-links {border-left:1px solid #ddd;padding:0 0 0 44px;min-height:278px;gap:clamp(20px,2.5vw,50px);justify-content:flex-start;}
.footer-links a::before {content:'– ';color:#999;}
.footer-socials {margin:0;align-items:center;gap:30px;}
.footer-line {display:flex;flex-direction:column;gap:10px;font-size:14px;}
.footer-line .footer-qr {width:100px;height:100px;display:block;}
.footer-line span {display:flex;align-items:center;gap:10px;}
.footer-line svg {width:24px;height:24px;}
.footer-facebook {display:block;width:100%;}
.footer-facebook img {display:block;width:100%;height:auto;border-radius:15px;}
@media (min-width: 768px) and (max-width: 1100px) { .footer-main {padding:35px 24px;grid-template-columns: 24% minmax(0,1fr) 170px;gap:20px;} .footer-links {padding-left:20px;gap:16px;} .footer-links a {font-size:13px;} }
@media (max-width:767px) { .footer-main {display:flex;flex-direction:column;align-items:center;padding:40px 20px;gap:35px;min-height:0;} .footer-links {border-left:0;border-top:1px solid #ddd;padding:30px 0 0;min-height:0;gap:30px;} .footer-socials {border-top:1px solid #ddd;padding-top:30px;width:100%;gap:24px;} .footer-facebook {width:224px;max-width:100%;} }
