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

html {
    font-size: 62.5%;
    /* 1rem = 10px */
}

:root {
    --hero-red: #a90b08;
    --hero-dark: #5e0004;
    --ink: #1a1a1a;
    /* --paper: #fff8f0; */
    --paper: #fff;
    --border: #111111;
    --accent: #0d3c61;

    /* Typography Scale */
    --fs-body: clamp(1.6rem, 1.4rem + 0.5vw, 1.8rem);
    --fs-small: clamp(1.4rem, 1.2rem + 0.4vw, 1.6rem);
    --fs-h1: clamp(3.2rem, 2.5rem + 2.5vw, 5rem);
    --fs-h2: clamp(2.4rem, 2rem + 1.5vw, 3.2rem);
    --fs-h3: clamp(2rem, 1.6rem + 1vw, 2.8rem);
    --fs-hero-sub: clamp(2.8rem, 2rem + 2.5vw, 5.4rem);
    --fs-slogan: clamp(1.6rem, 1.2rem + 1vw, 2.8rem);

    /* Spacing */
    --section-padding: clamp(4rem, 3rem + 3vw, 8rem);
    --content-padding: clamp(1.6rem, 1rem + 1vw, 2.4rem);
}

body {
    font-family: 'Noto Sans TC', 'Segoe UI', sans-serif;
    background: var(--paper);
    color: var(--ink);
    font-size: var(--fs-body);
    line-height: 1.7;
    overflow-x: hidden;
}

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

/* ==================== HERO SECTION ==================== */
.hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    color: #fff;
    background: linear-gradient(90deg, var(--hero-red) 0%, var(--hero-red) 65%, #000 65%, #000 100%);
    min-height: clamp(36rem, 37.65vw, 51.2rem);
}

.hero-visual {
    position: absolute;
    bottom: -17%;
    left: 65%;
    transform: translateX(-50%);
    /* 與 hero 高度 (37.65vw) 成正比，圖片約為 hero 高度的 80% */
    width: clamp(27rem, 30vw, 40rem);
    pointer-events: none;
}

.hero-visual img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.hero-content {
    position: relative;
    padding: 1rem;
    z-index: 1;
    opacity: 0;
    animation: riseUp 0.9s 0.6s forwards ease-out;
    max-width: 72rem;
    display: flex;
    flex-direction: column;
    margin-left: clamp(2rem, 10vw, 20rem);
    gap: 0.8rem;
}

.hero-sub {
    letter-spacing: 0.2rem;
    font-size: var(--fs-hero-sub);
    color: #ffbd59;
    font-weight: 700;
    margin: 0 0 0.8rem;
    line-height: 1.1;
}

.hero h1 {
    font-size: var(--fs-h1);
    letter-spacing: 0.1rem;
    margin: 0 0 0.8rem;
    line-height: 1.1;
}

.slogan {
    font-size: var(--fs-slogan);
    color: #fff;
    letter-spacing: 0.1rem;
    margin: 0;
}

.hero-actions {
    display: none;
}

.hero-cta {
    position: absolute;
    transform: translateX(-45%);
    left: 82.5%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.4rem 3.2rem;
    border-radius: 0.2rem;
    border: 0.2rem solid #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: var(--fs-body);
    letter-spacing: 0.2rem;
    color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.btn.primary {
    background: #fff;
    color: var(--hero-red);
    border-color: #fff;
}

.hero-cta .btn {
    pointer-events: auto;
    background: #ffffff;
    border-color: #ffffff;
    color: #a90b08;
    font-weight: 700;
    /* 與 hero 高度 (37.65vw) 同步縮放 */
    font-size: clamp(1.4rem, 1.4vw, 2rem);
    padding: clamp(1rem, 1.2vw, 1.6rem) clamp(2rem, 2.8vw, 3.6rem);
    letter-spacing: clamp(0.1rem, 0.15vw, 0.25rem);
}

.btn.outline {
    color: var(--hero-red);
    border-color: var(--hero-red);
}

.btn:hover {
    transform: translateY(-0.2rem);
    box-shadow: 0 1.2rem 2.4rem rgba(0, 0, 0, 0.25);
}

/* ==================== SECTIONS ==================== */
section {
    padding: var(--section-padding) var(--content-padding);
}

/* ==================== BRAND INTRO ==================== */
.brand-intro {
    position: relative;
    background-image: url('img/brand-introbg.jpg');
    background-size: cover;
    background-position: center;
    padding: clamp(4rem, 5vw, 8rem) 0;
    overflow: hidden;
}

.brand-intro-content {
    position: relative;
    z-index: 1;
    max-width: 75%;
    margin: 0 auto;
    padding: clamp(2rem, 3vw, 4rem) clamp(2rem, 4vw, 5rem);
    background: rgba(255, 255, 255, 0.85);
    text-align: center;
    backdrop-filter: blur(4px);
}

.brand-intro-title {
    font-size: clamp(1.8rem, 1.5rem + 1.2vw, 2.8rem);
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    position: relative;
    display: inline-block;
}


.brand-intro-text {
    font-size: clamp(1.4rem, 1.2rem + 0.4vw, 1.6rem);
    color: var(--ink);
    line-height: 1.9;
    margin-bottom: 2rem;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
}

.brand-intro-btn {
    background: transparent;
    color: var(--hero-red);
    border: 2px solid var(--hero-red);
    font-size: clamp(1.4rem, 1.2rem + 0.3vw, 1.6rem);
}

.brand-intro-btn:hover {
    background: var(--hero-red);
    color: #fff;
}

.section-corner-img {
    position: absolute;
    bottom: 0;
    right: 3rem;
    width: clamp(12rem, 15vw, 20rem);
    height: auto;
    opacity: 0.9;
    pointer-events: none;
}

.feature,
.products,
.pillars,
.story-inner {
    max-width: 120rem;
    margin: 0 auto;
    width: 100%;
}

.section-head {
    text-align: center;
    margin-bottom: 2rem;
}

.section-head h2 {
    font-size: var(--fs-h2);
    margin-top: 1.2rem;
}

.feature-text .tag,
.section-head .tag {
    letter-spacing: 0.4rem;
    color: var(--accent);
    font-size: var(--fs-small);
}

/* ==================== FEATURE ==================== */
.feature {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(32rem, 1fr));
    gap: 3.2rem;
    align-items: center;
    margin-top: 2.4rem;
}

.feature-media {
    position: relative;
}

.feature-media img {
    width: 100%;
    display: block;
    border-radius: 1.8rem;
    box-shadow: 0 2rem 3.5rem rgba(0, 0, 0, 0.18);
}

.feature-text h2 {
    font-size: var(--fs-h3);
    margin: 1rem 0;
}

.feature-text p {
    margin: 1rem 0 0 0;
    line-height: 1.8;
}

/* ==================== STORY ==================== */
.story {
    padding: 7.2rem 0;
}

.story-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
    max-width: none;
    width: 100%;
    margin: 0;
}

.story-block {
    padding: 3.2rem 3.2rem 3.2rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.4rem;
    background: #fff;
}

.story-gallery {
    min-height: 38rem;
    background: #000;
}

.story-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

.story p {
    word-break: break-word;
}

.artisan-line {
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.2rem;
    margin-top: clamp(4rem, 3rem + 3vw, 8rem);
    line-height: 1.6;
    font-size: clamp(2rem, 1.5rem + 2vw, 3.6rem);
    padding: 0 var(--content-padding);
}

/* ==================== PRODUCTS ==================== */
.products {
    display: flex;
    flex-direction: column;
    gap: 8rem;
}

.product-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(28rem, 40rem) 1fr;
    gap: clamp(2.4rem, 2rem + 2vw, 4.8rem);
    margin-bottom: 6rem;
    align-items: start;
    background: #fff;
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.08);
    padding: 2.4rem;
    border-radius: 0.2rem;
}

.product-corner-img {
    position: absolute;
    top: 0;
    right: 0;
    width: clamp(12rem, 15vw, 20rem);
    height: auto;
    opacity: 0.85;
    pointer-events: none;
}

.product-image-area {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.product-main-image {
    width: 100%;
    border-radius: 0;
    overflow: hidden;
    aspect-ratio: 1/1;
    background: transparent;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.product-thumbnails {
    display: flex;
    flex-direction: row;
    gap: 0.8rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
}

.thumb {
    width: 6rem;
    height: 6rem;
    flex-shrink: 0;
    border-radius: 0;
    border: 0.2rem solid transparent;
    background-color: #f2f2f2;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.thumb.active {
    opacity: 1;
    border-color: var(--hero-red);
}

.product-description ul {
    padding-left: 0;
    margin: 0.5rem 0 0 0;
    list-style-position: inside;
}

.product-description li {
    margin-bottom: 0.4rem;
}

.product-details {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.product-price {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: var(--fs-body);
    font-weight: 600;
}

.original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 0.9em;
}

.discount-price {
    color: var(--hero-red);
    font-weight: 700;
    font-size: 1.2em;
}

.product-name {
    font-size: var(--fs-h1);
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.product-subtitle {
    font-size: var(--fs-body);
    color: var(--hero-red);
    font-weight: 600;
    letter-spacing: 0.1rem;
}

.product-description {
    line-height: 1.8;
    color: var(--ink);
    word-break: break-word;
}

.product-description p {
    margin-bottom: 1.2rem;
}

.product-description .label {
    display: inline-block;
    font-weight: 600;
    color: #fff;
    padding: 0.3rem 1.2rem;
    margin-bottom: 0.4rem;
    background-image: url('img/Highlight 紅色.png');
    background-size: 140% 140%;
    background-repeat: no-repeat;
    background-position: center;
}

/* Product Actions */
.product-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
    margin-top: 0.8rem;
}

.product-actions-buttons {
    display: flex;
    flex-direction: row;
    gap: 1.2rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.4rem;
    overflow: hidden;
}

.quantity-btn {
    flex: 0 0 4rem;
    width: 4rem;
    height: 4rem;
    background: #fff;
    border: none;
    font-size: 2rem;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.7);
}

.quantity-btn.disabled {
    color: rgba(0, 0, 0, 0.15);
    cursor: not-allowed;
}

.quantity-btn.disabled:hover {
    background: #fff;
    color: rgba(0, 0, 0, 0.15);
}



.quantity-input {
    width: 5rem;
    height: 4rem;
    border: none;
    border-left: 2px solid rgba(0, 0, 0, 0.08);
    border-right: 2px solid rgba(0, 0, 0, 0.08);
    text-align: center;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--ink);
    background: #fff;
    /* 隱藏數字輸入框的上下箭頭 */
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Chrome, Safari, Edge 隱藏箭頭 */
.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-input:focus {
    outline: none;
}

.btn-cart {
    width: 20rem;
    font-weight: 400;
    background: rgba(169, 11, 8, 0.1);
    color: var(--hero-red);
    border: 2px solid var(--hero-red);
}



.btn-buy {
    width: 20rem;
    font-weight: 400;
    background: var(--hero-red);
    color: #fff;
    border: 2px solid var(--hero-red);
}

.btn-cart:hover {
    background: #fff;
}

.btn-buy:hover {
    background: rgba(169, 11, 8, 0.9);
}



/* ==================== PILLARS ==================== */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
    gap: 2.4rem;
}

.pillars-grid article {
    position: relative;
    background: #fff;
    padding: 2.4rem;
    border-radius: 0.2rem;
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    word-break: break-word;
}

.pillar-corner-img {
    position: absolute;
    bottom: -8rem;
    right: -8rem;
    width: clamp(12rem, 15vw, 20rem);
    height: auto;
    opacity: 0.85;
    pointer-events: none;
}

.pillars-grid article h3 {
    font-size: var(--fs-h3);
    line-height: 1.4;
}

.pillars-grid article p {
    font-size: var(--fs-body);
    line-height: 1.8;
}

.pillar-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    margin-bottom: 2rem;
    border-radius: 0.2rem;
    overflow: hidden;
}

.pillar-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pillar-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 2.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, background 0.2s;
}

.pillar-nav:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.05);
}

.pillar-prev {
    left: 1rem;
}

.pillar-next {
    right: 1rem;
}

/* ==================== FOOTER ==================== */
.footer {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: #fff;
    /* 左黑 65% 右紅 35%，與 hero 相反 */
    background: linear-gradient(90deg, #000 0%, #000 65%, var(--hero-red) 65%, var(--hero-red) 100%);
    min-height: clamp(28rem, 25vw, 40rem);
}

.footer-content {
    position: relative;
    z-index: 1;
    /* 置於左側黑色區域中間 */
    width: 65%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.footer-content h3 {
    font-size: var(--fs-h3);
    margin-bottom: 1.6rem;
}

.footer-content p {
    font-size: var(--fs-body);
    margin-bottom: 0.8rem;
}

.footer a {
    color: #ffbd59;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-visual {
    position: absolute;
    bottom: -17%;
    left: 65%;
    transform: translateX(-50%);
    width: clamp(20rem, 22vw, 32rem);
    pointer-events: none;
    z-index: 2;
}

.footer-visual img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* ==================== ANIMATIONS ==================== */
@keyframes riseUp {
    from {
        transform: translateY(2rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== MEDIA QUERIES ==================== */

/* Tablet: 768px - 1024px */
@media (max-width: 1024px) {
    .hero-visual {
        left: 65%;
        /* hero 高度仍為 37.65vw，維持 80% 比例 */
        width: clamp(27rem, 30vw, 40rem);
    }

    /* hero-cta 定位不變，與 hero 高度同步 */

    .product-card {
        grid-template-columns: minmax(24rem, 35rem) 1fr;
    }

    .pillars-grid {
        grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
    }
}

/* Tablet Portrait & Large Phone: 600px - 768px */
@media (max-width: 768px) {
    .hero {
        flex-wrap: wrap;
        align-content: center;
        padding: 2rem 0;
    }

    .hero-content {
        padding: 2.4rem;
        flex: 0 0 60%;
        max-width: 60%;
    }

    .hero-visual {
        left: 65%;
        /* hero 高度仍為 37.65vw，維持 80% 比例 */
        width: clamp(27rem, 30vw, 40rem);
    }

    .hero-cta {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        flex: 0 0 100%;
        justify-content: flex-start;
        /* 對齊 hero-content 的文字：margin-left + padding */
        margin-left: clamp(2rem, 10vw, 20rem);
        padding-left: 2.4rem;
        margin-top: 0;
    }

    .hero-cta .btn {
        /* 取消 vw 縮放，改用固定大小 */
        font-size: 1.6rem;
        padding: 1.2rem 2.4rem;
        letter-spacing: 0.15rem;
    }

    .product-card {
        grid-template-columns: 1fr;
        gap: 2rem;
    }



    .thumb {
        width: 5.2rem;
        height: 5.2rem;
    }

    .story-inner {
        grid-template-columns: 1fr;
    }

    .story-gallery {
        min-height: 28rem;
        order: -1;
    }

    .story-block {
        padding: 2.4rem var(--content-padding);
    }

    .pillars-grid {
        grid-template-columns: 1fr;
    }

    .brand-intro-content {
        max-width: 85%;
    }

    .section-corner-img,
    .product-corner-img,
    .pillar-corner-img {
        width: clamp(10rem, 15vw, 16rem);
    }

    .pillar-corner-img {
        bottom: -4rem;
        right: -4rem;
    }
}

/* Mobile: < 560px */
@media (max-width: 560px) {
    html {
        font-size: 58%;
        /* Slightly smaller base for mobile */
    }

    .hero {
        min-height: 45vh;
    }

    .product-actions-buttons {
        width: 100%;
    }

    .btn-cart,
    .btn-buy {
        width: auto;
        flex: 1;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .hero-content {
        gap: 0.6rem;
        margin-left: 0;
        padding: 1.6rem;
        flex: 0 0 65%;
        max-width: 65%;
    }

    .hero-visual {
        left: 65%;
        /* hero 高度改為 45vh，改用 vh 比例 */
        width: clamp(18rem, 36vh, 32rem);
    }

    .hero-cta {
        flex: 0 0 100%;
        /* 對齊 hero-content 的文字：margin-left(0) + padding */
        margin-left: 0;
        padding-left: 1.6rem;
    }

    .btn {
        padding: 1.2rem 2.2rem;
        letter-spacing: 0.1rem;
        font-size: 1.5rem;
    }

    section {
        padding: clamp(3rem, 2rem + 3vw, 6rem) var(--content-padding);
    }

    .product-card {
        margin-bottom: 3.2rem;
    }



    .thumb {
        width: 4.8rem;
        height: 4.8rem;
    }

    .pillar-visual {
        aspect-ratio: 4/3;
    }

    .pillar-nav {
        width: 3.2rem;
        height: 3.2rem;
        font-size: 1.8rem;
    }

    .pillars-grid article {
        padding: 2rem;
        border-radius: 0.2rem;
    }

    .artisan-line {
        margin-top: 4rem;
    }

    .brand-intro-content {
        max-width: 92%;
        padding: 2rem 1.5rem;
    }


    .footer {
        min-height: auto;
        background: #000;
        justify-content: center;
    }

    .footer-content {
        width: 100%;
        padding: 4rem 2rem;
    }

    .footer-visual {
        display: none;
    }
}

/* Extra Small Mobile: < 400px */
@media (max-width: 400px) {
    html {
        font-size: 55%;
    }

    .hero-content {
        flex: 0 0 70%;
        max-width: 70%;
        padding: 1.2rem;
    }



    .hero-visual {
        left: 65%;
        /* hero 高度仍為 45vh，維持 vh 比例 */
        width: clamp(18rem, 36vh, 32rem);
    }

    .hero-cta {
        flex: 0 0 100%;
        /* 對齊 hero-content 的文字 */
        padding-left: 1.2rem;
    }


    .thumb {
        width: 4.4rem;
        height: 4.4rem;
    }
}

/* ==================== CART SIDEBAR ==================== */

/* 購物車浮動按鈕 */
.cart-toggle {
    position: fixed;
    bottom: 2.4rem;
    right: 2.4rem;
    width: 5.6rem;
    height: 5.6rem;
    border-radius: 50%;
    background: var(--hero-red);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0.4rem 1.6rem rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 1000;
}

.cart-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 0.6rem 2rem rgba(0, 0, 0, 0.3);
}

.cart-toggle svg {
    width: 2.4rem;
    height: 2.4rem;
}

#cart-count {
    position: absolute;
    top: -0.4rem;
    right: -0.4rem;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.6rem;
    background: #ffbd59;
    color: var(--ink);
    border-radius: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
}

/* 購物車遮罩 */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
}

.cart-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 購物車側邊欄 */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: min(40rem, 90vw);
    height: 100vh;
    background: #fff;
    box-shadow: -0.4rem 0 2rem rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1002;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    transform: translateX(0);
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2.4rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.cart-header h3 {
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
}

.cart-close-btn {
    width: 3.6rem;
    height: 3.6rem;
    border: none;
    background: transparent;
    font-size: 2rem;
    cursor: pointer;
    color: var(--ink);
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.cart-close-btn:hover {
    opacity: 1;
}

/* 購物車內容 */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.6rem 2.4rem;
}

.cart-empty {
    text-align: center;
    color: rgba(0, 0, 0, 0.4);
    padding: 4rem 0;
    font-size: 1.6rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.6rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-img {
    width: 6rem;
    height: 6rem;
    object-fit: cover;
    border-radius: 0.4rem;
    flex-shrink: 0;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    font-size: 1.6rem;
}

.cart-item-price {
    color: var(--hero-red);
    font-weight: 600;
    font-size: 1.4rem;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.cart-qty-btn {
    width: 3.2rem;
    height: 3.2rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.4rem;
    background: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cart-qty-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.cart-item-qty {
    min-width: 3rem;
    text-align: center;
    font-weight: 600;
    font-size: 1.4rem;
}

.cart-remove-btn {
    margin-left: auto;
    width: 3.2rem;
    height: 3.2rem;
    border: none;
    background: transparent;
    color: rgba(0, 0, 0, 0.3);
    font-size: 1.4rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.cart-remove-btn:hover {
    color: var(--hero-red);
}

/* 購物車底部 */
.cart-footer {
    padding: 2rem 2.4rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: #fafafa;
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.6rem;
    font-size: 1.8rem;
    font-weight: 600;
}

.cart-checkout-btn {
    width: 100%;
    padding: 1.4rem 2rem;
    font-size: 1.6rem;
    text-align: center;
}

/* 購物車通知 */
.cart-notification {
    position: fixed;
    bottom: 10rem;
    right: 2.4rem;
    background: var(--ink);
    color: #fff;
    padding: 1.2rem 2rem;
    border-radius: 0.4rem;
    font-size: 1.4rem;
    font-weight: 500;
    box-shadow: 0 0.4rem 1.2rem rgba(0, 0, 0, 0.2);
    transform: translateY(2rem);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1003;
}

.cart-notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* 響應式調整 */
@media (max-width: 480px) {
    .cart-toggle {
        bottom: 1.6rem;
        right: 1.6rem;
        width: 5rem;
        height: 5rem;
    }

    .cart-sidebar {
        width: 100vw;
    }

    .cart-header,
    .cart-items,
    .cart-footer {
        padding-left: 1.6rem;
        padding-right: 1.6rem;
    }

    .cart-notification {
        right: 1.6rem;
        left: 1.6rem;
        bottom: 8rem;
    }
}

/* ==================== MOBILE CTA ==================== */
.mobile-cta {
    display: none;
    /* Desktop default hidden */
}

@media (max-width: 768px) {
    .mobile-cta {
        display: flex;
        position: fixed;
        bottom: 2rem;
        left: 50%;
        transform: translateX(-50%) translateY(200%);
        background-color: var(--hero-red);
        color: #fff;
        padding: 1.2rem 3.6rem;
        border-radius: 50px;
        font-size: 1.6rem;
        font-weight: 700;
        text-decoration: none;
        box-shadow: 0 4px 15px rgba(228, 59, 44, 0.4);
        z-index: 999;
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        align-items: center;
        justify-content: center;
    }

    .mobile-cta.visible {
        transform: translateX(-50%) translateY(0);
    }

    .mobile-cta:active {
        transform: translateX(-50%) scale(0.95);
        background-color: #c0392b;
    }
}

/* ==================== UTILITIES ==================== */
.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
        /* or inline */
    }

    br.mobile-only {
        display: inline;
    }
}