﻿/* ==================== 批發坊 - LV Style ==================== */
:root {
    --color-border-thin: #e1e1e1;
    --color-border-subtle: #b4b4b4;
    --color-border-intense: #929292;
    --color-common-highlight: #444;
    --color-common-success: #5c7d0b;
    --color-common-error: #c53929;
    --color-common-oob: #294883;
    --color-common-accent: #000;
    --color-content-subtle: #727272;
    --color-content-intense: #1a1a1a;
    --color-content-invert-subtle: #b4b4b4;
    --color-content-invert-intense: #f8f8f8;
    --color-surface-extra-light: #fff;
    --color-surface-intense: #929292;
    --color-surface-light: #f8f8f8;

    /* Aliases mapping old names → LV palette */
    --c-black: var(--color-common-accent);
    --c-dark: var(--color-content-intense);
    --c-dark2: var(--color-content-intense);
    --c-border: var(--color-border-thin);
    --c-gold: var(--color-common-highlight);
    --c-gold-dark: var(--color-common-highlight);
    --c-gold-light: var(--color-common-highlight);
    --c-white: var(--color-surface-extra-light);
    --c-cream: var(--color-surface-light);
    --c-gray: var(--color-content-subtle);
    --c-gray2: var(--color-border-subtle);
    --c-gray-bg: var(--color-surface-light);
    --c-red: var(--color-common-error);

    --f-serif: 'Cormorant Garamond', 'Noto Serif TC', serif;
    --f-sans: 'Montserrat', 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
    --w-max: 98%;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--f-sans);
    color: var(--color-content-intense);
    background: var(--color-surface-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: color .3s; }
a:hover { color: var(--color-common-highlight); }
img { max-width: 100%; display: block; }

.container { max-width: var(--w-max); margin: 0 auto; padding: 0 1rem; }
.text-center { text-align: center; }
.text-gold { color: var(--color-common-highlight); }

h1, h2, h3, h4 { font-family: var(--f-serif); font-weight: 500; }

/* ==================== HEADER ==================== */
.site-header {
    background: var(--color-surface-extra-light);
    color: var(--color-content-intense);
    position: relative;
    z-index: 1000;
    transition: background .3s, box-shadow .3s;
    border-bottom: 1px solid var(--color-border-thin);
}

/* Homepage: transparent header over hero image */
.page-home .site-header {
    background: transparent;
    border-bottom: none;
    position: absolute;
    top: 0; left: 0; right: 0;
}
.page-home .site-header.header-scrolled {
    background: var(--color-surface-extra-light);
    border-bottom: 1px solid var(--color-border-thin);
    box-shadow: 0 1px 10px rgba(0,0,0,0.06);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 0.75rem;
    position: relative;
}

/* Mobile icon sections */
.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 2;
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: none;
    background: none;
    color: var(--color-content-subtle);
    cursor: pointer;
    border-radius: 2px;
    transition: color .3s;
    position: relative;
}
.icon-btn:hover { color: var(--color-common-highlight); }
.icon-btn svg { display: block; }

/* Homepage transparent header: white icons */
.page-home .site-header:not(.header-scrolled) .icon-btn { color: var(--color-content-invert-intense); }
.page-home .site-header:not(.header-scrolled) .icon-btn:hover { color: var(--color-common-highlight); }

.icon-btn .cart-count {
    position: absolute;
    top: 2px;
    right: 0;
    background: var(--color-common-highlight);
    color: var(--color-surface-extra-light);
    border-radius: 10px;
    padding: 0 5px;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 14px;
    min-width: 14px;
    text-align: center;
}

/* Logo centered — all screen sizes (LV style) */
.logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--f-serif);
    font-size: 1.3rem;
    letter-spacing: 0.2em;
    white-space: nowrap;
    z-index: 1;
}
.logo a { color: inherit; }

/* Homepage transparent header: white logo */
.page-home .site-header:not(.header-scrolled) .logo { color: var(--color-content-invert-intense); }
.page-home .site-header:not(.header-scrolled) .logo span { color: var(--color-content-invert-subtle); }

/* Desktop header taller and more spacious */
@media (min-width: 769px) {
    .header-top {
        height: 72px;
        padding: 0 2rem;
    }
    .header-left, .header-right {
        gap: 0.5rem;
    }
    .logo {
        font-size: 1.6rem;
    }
}

/* Nav drawer — LV-style side panel */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: var(--color-surface-extra-light);
    padding: 0;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .4s ease;
    z-index: 1001;
    border-right: 1px solid var(--color-border-thin);
}
.mobile-nav.open {
    display: block;
    transform: translateX(0);
}
.mobile-nav ul { list-style: none; padding-top: 1rem; }
.mobile-nav > ul > li > a,
.mobile-nav .nav-item-row > a {
    display: block;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--color-border-thin);
    font-size: 0.85rem;
    color: var(--color-content-subtle);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.mobile-nav a:hover { color: var(--c-gold); }

/* Nav backdrop */
.nav-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0;
    transition: opacity .4s;
}
.nav-backdrop.open {
    display: block;
    opacity: 1;
}

/* Close button inside drawer */
.nav-close-btn {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    width: 38px; height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: var(--color-content-subtle);
    cursor: pointer;
    z-index: 2;
}
.nav-close-btn:hover { color: var(--color-common-highlight); }

.nav-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-border-thin);
}
.nav-item-row > a { flex: 1; border-bottom: none !important; }

.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    color: var(--color-content-subtle);
    cursor: pointer;
    transition: transform .3s, color .3s;
    flex-shrink: 0;
}
.nav-toggle:hover { color: var(--color-common-highlight); }
.nav-parent.expanded > .nav-item-row .nav-toggle { transform: rotate(180deg); }

.mobile-nav .sub-nav { display: none; padding-left: 2rem; background: var(--color-surface-light); }
.mobile-nav .nav-parent.expanded > .sub-nav { display: block; }
.mobile-nav .sub-nav a {
    display: block;
    padding: 0.6rem 2rem;
    border-bottom: 1px solid var(--color-border-thin);
    font-size: 0.78rem;
    color: var(--color-content-subtle);
    text-transform: none;
    letter-spacing: 0.03em;
}
.mobile-nav .sub-nav a:hover { color: var(--color-common-highlight); }

/* Search */
.search-box {
    display: none;
    padding: 1rem 1.5rem;
    background: var(--color-surface-extra-light);
    border-bottom: 1px solid var(--color-border-thin);
}
.search-box.open { display: block; }
.search-box form { display: flex; max-width: 600px; margin: 0 auto; position: relative; }
.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-common-highlight);
    color: var(--color-content-intense);
    padding: 0.6rem 0;
    font-size: 0.9rem;
    outline: none;
    letter-spacing: 0.05em;
}
.search-box input::placeholder { color: var(--color-content-subtle); }
.search-box button {
    background: none;
    border: none;
    color: var(--color-common-highlight);
    padding: 0 1rem;
    cursor: pointer;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* ==================== SECTION TITLES ==================== */
.section { padding: 2.5rem 0; }
.section-title {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}
.section-title h2 {
    font-size: 1.6rem;
    letter-spacing: 0.1em;
    color: var(--c-dark);
}
.section-title h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--c-gold);
    margin: 0.5rem auto 0;
}
.section-title p {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--c-gray);
    margin-top: 0.3rem;
}

/* ==================== BANNER (LV-style full-viewport) ==================== */
.hero-banner {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-content-invert-intense);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-image: var(--bg-mobile);
}
@media (min-width: 769px) {
    .hero-banner { background-image: var(--bg-desktop); }
}
.hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}
.hero-banner > * { position: relative; z-index: 2; }
.hero-banner h1 {
    font-size: 2.5rem;
    color: var(--color-content-invert-intense);
    letter-spacing: 0.25em;
    margin-bottom: 0.75rem;
    font-weight: 300;
}
.hero-banner .hero-subtitle {
    font-size: 0.85rem;
    letter-spacing: 0.3em;
    color: var(--color-content-invert-subtle);
    text-transform: uppercase;
    margin-bottom: 2rem;
}
.hero-banner .hero-desc {
    font-size: 0.8rem;
    color: var(--color-content-invert-subtle);
    max-width: 480px;
    line-height: 1.8;
    margin: 0 auto 2rem;
}
.hero-banner .hero-cta {
    display: inline-block;
    padding: 0.8rem 2.5rem;
    border: 1px solid var(--color-content-invert-intense);
    color: var(--color-content-invert-intense);
    background: transparent;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: all .3s;
}
.hero-banner .hero-cta:hover {
    background: var(--color-content-invert-intense);
    color: var(--color-content-intense);
}

/* Large image section (LV-style editorial) */
.img-section {
    position: relative;
    width: 100%;
    overflow: hidden;
}
.img-section .img-bg {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.img-section .img-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    transition: background .3s;
}
.img-section:hover .img-overlay { background: rgba(0, 0, 0, 0.35); }
.img-section .img-overlay h2 {
    font-size: 2rem;
    color: var(--color-content-invert-intense);
    letter-spacing: 0.2em;
    margin-bottom: 0.5rem;
    font-weight: 300;
}
.img-section .img-overlay p {
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--color-content-invert-subtle);
    margin-bottom: 1.5rem;
}
.img-section .img-overlay .img-cta {
    display: inline-block;
    padding: 0.6rem 2rem;
    border: 1px solid var(--color-content-invert-intense);
    color: var(--color-content-invert-intense);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: all .3s;
}
.img-section .img-overlay .img-cta:hover {
    background: var(--color-content-invert-intense);
    color: var(--color-content-intense);
}

/* LV-style promo strip */
.promo-strip {
    background: var(--color-surface-extra-light);
    color: var(--color-content-subtle);
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--color-border-thin);
}

/* LV-style service icons */
.service-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    padding: 2.5rem 1rem;
    background: var(--color-surface-extra-light);
    border-bottom: 1px solid var(--color-border-thin);
}
.service-item {
    text-align: center;
    min-width: 140px;
}
.service-item svg {
    width: 32px; height: 32px;
    margin: 0 auto 0.5rem;
    color: var(--color-common-highlight);
}
.service-item h4 {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}
.service-item p {
    font-size: 0.7rem;
    color: var(--color-content-subtle);
    letter-spacing: 0.05em;
}

/* LV-style category showcase */
.cat-showcase {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}
.cat-showcase-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--color-surface-light);
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (min-width: 768px) {
    .cat-showcase-item { border-right: 1px solid var(--color-border-thin); }
    .cat-showcase-item:last-child { border-right: none; }
}
.cat-showcase-item img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s;
}
.cat-showcase-item:hover img { transform: scale(1.05); }
.cat-showcase-item .cat-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-content-invert-intense);
    transition: background .3s;
}
.cat-showcase-item:hover .cat-overlay { background: rgba(0, 0, 0, 0.4); }
.cat-showcase-item .cat-overlay h3 {
    font-size: 1.5rem;
    letter-spacing: 0.2em;
    margin-bottom: 0.5rem;
    position: relative;
    padding-bottom: 0.75rem;
    color: var(--color-content-invert-intense);
}
.cat-showcase-item .cat-overlay h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 1px;
    background: var(--color-common-highlight);
}
.cat-showcase-item .cat-overlay span {
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--color-common-highlight);
}

/* ==================== CATEGORY SUB-NAV (horizontal scroll) ==================== */
.sub-cat-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 0.5rem;
}
.sub-cat-scroll::-webkit-scrollbar {
    height: 4px;
}
.sub-cat-scroll::-webkit-scrollbar-thumb {
    background: var(--c-border);
    border-radius: 2px;
}
.sub-cat-scroll .btn {
    flex-shrink: 0;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    white-space: nowrap;
}

/* ==================== ORDER TABS (horizontal scroll) ==================== */
.order-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--c-border);
}
.order-tabs::-webkit-scrollbar {
    height: 3px;
}
.order-tabs::-webkit-scrollbar-thumb {
    background: var(--c-border);
    border-radius: 2px;
}
.order-tab {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    color: var(--c-gray);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
    white-space: nowrap;
}
.order-tab:hover {
    color: var(--c-gold);
}
.order-tab.active {
    color: var(--c-gold);
    border-bottom-color: var(--c-gold);
    font-weight: 600;
}

/* 訂單卡片列表 */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.order-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.order-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.2rem;
    background: #fafafa;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
}
.order-card-info {
    display: flex;
    gap: 1rem;
    color: #666;
}
.order-card-date { color: #999; }
.order-card-no { color: #333; font-weight: 500; }

.order-card-body {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
}
.order-card-items {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.order-item-link {
    display: flex;
    gap: 0.8rem;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}
.order-item-link:hover { opacity: 0.8; }

.order-item-img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.order-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.order-more-img {
    background: #f0f0f0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #999;
}
.order-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    padding: 0.2rem 0;
}
.order-item-name {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.order-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}
.order-item-price {
    color: #e74c3c;
    font-weight: 500;
}
.order-item-qty {
    color: #999;
}
.order-item-more-text {
    color: var(--c-gold);
    font-size: 0.8rem;
}

.order-card-summary {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border-left: 1px solid #f0f0f0;
    padding-left: 1rem;
}
.order-card-total {
    text-align: center;
    flex: 1;
}
.order-card-total-label {
    display: block;
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 0.3rem;
}
.order-card-total-price {
    font-size: 0.85rem;
    color: #666;
}
.order-card-total-price em {
    font-style: normal;
    font-size: 1.2rem;
    color: #e74c3c;
    font-weight: 700;
}
.order-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 110px;
    align-items: center;
}
.order-action-form { margin: 0; width: 100%; }
.order-action-form .btn { width: 100%; text-align: center; justify-content: center; }

.btn-sm {
    padding: 0 0.8rem;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 32px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 640px) {
    .order-card-header {
        padding: 0.6rem 0.8rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .order-card-info {
        flex-direction: column;
        gap: 0.2rem;
    }
    .order-card-body {
        flex-direction: column;
        padding: 0.8rem;
    }
    .order-item-img {
        width: 64px;
        height: 64px;
    }
    .order-card-summary {
        width: 100%;
        flex-direction: row;
        align-items: center;
        border-left: none;
        border-top: 1px solid #f0f0f0;
        padding-left: 0;
        padding-top: 0.8rem;
    }
    .order-card-actions {
        flex-direction: row;
        width: auto;
    }
    .order-action-form .btn { width: auto; }
}

/* ==================== PRODUCT GRID ==================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.product-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
.product-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }

.product-card {
    background: transparent;
    border: none;
    overflow: hidden;
    transition: opacity .3s;
    position: relative;
}
.product-card:hover {
    opacity: 0.8;
}
.product-card .product-img {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--c-cream);
    position: relative;
}
.product-card .product-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.product-card:hover .product-img img { transform: scale(1.05); }
.product-card .product-info {
    padding: 1rem 0.5rem;
    text-align: center;
}
.product-card .product-name {
    font-size: 0.78rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: 0.03em;
}
.product-card .product-price {
    font-size: 0.9rem;
    color: var(--c-dark);
    font-weight: 400;
    letter-spacing: 0.05em;
}
.product-card .product-brand {
    font-size: 0.7rem;
    color: var(--c-gray);
    margin-bottom: 0.2rem;
}

/* Product card with delete button (history/wishlist) */
.history-card, .wishlist-card {
    position: relative;
}
.product-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.card-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.9);
    border: 1px solid var(--color-border-thin);
    border-radius: 50%;
    cursor: pointer;
    color: var(--color-content-subtle);
    z-index: 2;
    transition: all .2s;
    padding: 0;
}
.card-delete-btn:hover {
    background: var(--color-surface-intense);
    color: var(--color-content-invert-intense);
    border-color: var(--color-surface-intense);
}

/* ==================== BREADCRUMB ==================== */
.breadcrumb {
    padding: 1rem;
    font-size: 0.75rem;
    color: var(--c-gray);
}
.breadcrumb a { color: var(--c-gray); }
.breadcrumb a:hover { color: var(--c-gold); }
.breadcrumb span { margin: 0 0.5rem; }

/* ==================== PAGINATION ==================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    padding: 2rem 0;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    font-size: 0.85rem;
    color: var(--c-dark);
    border-radius: 2px;
}
.pagination a:hover { border-color: var(--c-gold); color: var(--c-gold); }
.pagination .current { background: var(--c-black); color: var(--c-gold); border-color: var(--c-black); }

/* ==================== PRODUCT DETAIL ==================== */
.product-detail-wrap { width: 100%; }
.product-detail { display: grid; grid-template-columns: 1fr; gap: 0; }
.product-image-section { display: flex; flex-direction: column; gap: 0; position: relative; }
.product-sold-out .gallery-img { opacity: 0.5; }
.product-sold-out-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 2px;
    z-index: 10;
    pointer-events: none;
}
.gallery-img {
    width: 100%;
    display: block;
    object-fit: cover;
}

/* Mobile gallery: horizontal swipe, one image at a time */
.mobile-gallery {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.mobile-gallery::-webkit-scrollbar { display: none; }
.mobile-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    cursor: pointer;
}
.mobile-slide img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    pointer-events: none;
}
.mobile-gallery-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 0.5rem 0;
}
.mobile-gallery-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-border-subtle);
    cursor: pointer;
    transition: background .2s, width .2s;
}
.mobile-gallery-dots .dot.active {
    background: var(--color-common-accent);
    width: 18px;
    border-radius: 3px;
}

/* Desktop: hide mobile gallery */
@media (min-width: 768px) {
    .mobile-gallery, .mobile-gallery-dots { display: none; }
}
/* Mobile: hide desktop gallery */
@media (max-width: 767px) {
    .product-image-section { display: none; }
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.92);
    z-index: 10000;
    overflow: hidden;
    touch-action: none;
}
.lightbox.open { display: block; }
.lightbox-track {
    display: flex;
    height: 100%;
    transition: transform .3s ease;
}
.lightbox-slide {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    pointer-events: none;
}
.lightbox-close {
    position: absolute;
    top: 1rem; right: 1rem;
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    z-index: 1;
}
.lightbox-counter {
    position: absolute;
    bottom: 1.5rem; left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

.product-detail .product-meta { padding: 1.5rem 1rem; max-width:98%;}
.product-detail .product-meta h1 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.product-detail .product-meta .brand-link { font-size: 0.8rem; color: var(--color-content-subtle); margin-bottom: 1rem; display: block; }
.product-detail .product-meta .price {
    font-size: 1.6rem;
    color: var(--color-common-highlight);
    font-weight: 600;
    margin-bottom: 1rem;
}
.product-detail .product-meta .desc {
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--color-content-subtle);
    margin-bottom: 1.5rem;
    border-top: 1px solid var(--color-border-thin);
    padding-top: 1rem;
}
.qty-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.qty-row label { font-size: 0.8rem; color: var(--c-gray); }
.qty-input {
    width: 60px;
    border: 1px solid #ddd;
    padding: 0.4rem;
    text-align: center;
    font-size: 0.9rem;
}
.btn {
    display: inline-block;
    padding: 0.7rem 2rem;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all .3s;
    border-radius: 20px;
   margin: 2rem 0 2rem;
}
.btn-gold { background: var(--color-common-highlight); color: var(--color-surface-extra-light); font-weight: 600; }
.btn-gold:hover { background: var(--color-content-intense); color: var(--color-surface-extra-light); }
.btn-gold:disabled, .btn-disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
    opacity: 0.7;
    pointer-events: none;
}
.btn-dark { background: var(--color-common-accent); color: var(--color-surface-extra-light); }
.btn-dark:hover { background: var(--color-content-intense); }
.btn-outline { background: transparent; border: 1px solid var(--color-content-intense); color: var(--color-content-intense); }
.btn-outline:hover { background: var(--color-common-accent); color: var(--color-surface-extra-light); }
.btn-block { display: block; width: 100%; text-align: center; }

/* ==================== FORMS ==================== */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.78rem; letter-spacing: 0.05em; color: var(--c-gray); margin-bottom: 0.4rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ddd;
    font-size: 0.9rem;
    font-family: var(--f-sans);
    background: var(--c-white);
    outline: none;
    transition: border-color .3s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--c-gold); }
.form-group textarea { resize: vertical; min-height: 80px; }

/* ==================== AUTH ==================== */
.auth-wrap { max-width: 420px; margin: 2rem auto; padding: 0 1rem; }
.auth-card {
    background: var(--c-white);
    border: 1px solid #eee;
    padding: 2rem 1.5rem;
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--c-gold), transparent);
}
.auth-card h2 { text-align: center; margin-bottom: 1.5rem; color: var(--c-dark); }
.auth-card .links { text-align: center; margin-top: 1rem; font-size: 0.8rem; }
.auth-card .links a { color: var(--c-gold); }

/* ==================== CART ==================== */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 0.75rem; border-bottom: 1px solid var(--color-border-thin); text-align: left; font-size: 0.85rem; }
.cart-table th { background: var(--color-surface-light); font-weight: 500; font-size: 0.78rem; text-transform: uppercase; color: var(--color-content-subtle); }
.cart-table .cart-prod { display: flex; align-items: center; gap: 0.75rem; }
.cart-table .cart-prod img { width: 50px; height: 50px; object-fit: cover; border: 1px solid var(--color-border-thin); }
.cart-table .cart-item-check {
    width: 16px; height: 16px;
    accent-color: var(--color-common-highlight);
    cursor: pointer;
}
.cart-table .unchecked-item td { opacity: 0.5; }
.cart-table .out-of-stock-row td { opacity: 0.6; }
.cart-table .stock-col { text-align: center; }
.cart-table .stock-ok { color: #28a745; font-weight: 600; }
.cart-table .stock-out { color: #d9534f; font-weight: 600; }
.stock-warning {
    font-size: 0.72rem;
    color: #d9534f;
    margin-top: 0.25rem;
}
.cart-img-wrap {
    position: relative;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}
.cart-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid var(--color-border-thin);
}
.sold-out-wrap .sold-out-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
}
.cart-summary { text-align: right; padding: 1.5rem 0; }
.cart-summary .total { font-size: 1.2rem; color: var(--color-common-highlight); font-weight: 600; }
.cart-summary .discount-line {
    font-size: 0.9rem;
    color: #28a745;
    margin-top: 0.25rem;
}
.cart-summary .discount-amount {
    font-weight: 600;
}
.cart-summary .final-total-line {
    font-size: 1.1rem;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border-thin);
}
.cart-summary .final-total {
    font-size: 1.4rem;
    color: var(--color-common-highlight);
    font-weight: 700;
}

/* ==================== MEMBER ==================== */
.member-wrap { display: grid; grid-template-columns: 1fr; gap: 1.5rem; padding: 1rem; }
.member-sidebar {
    background: var(--color-surface-extra-light);
    border: 1px solid var(--color-border-thin);
    padding: 1rem;
    border-radius: 4px;
}
.member-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border-thin);
}
.member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-surface-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-content-subtle);
}
.member-username {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-content-intense);
}
.member-menu { list-style: none; margin: 0; padding: 0; }
.member-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.5rem;
    font-size: 0.78rem;
    color: var(--color-content-intense);
    text-align: center;
    gap: 0.4rem;
    border-radius: 4px;
    transition: background .2s, color .2s;
}
.member-menu-item svg {
    width: 22px;
    height: 22px;
    color: var(--color-content-subtle);
    transition: color .2s;
}
.member-menu-item:hover {
    background: var(--color-surface-light);
    color: var(--color-common-highlight);
}
.member-menu-item:hover svg {
    color: var(--color-common-highlight);
}
.member-content {
    background: var(--color-surface-extra-light);
    border: 1px solid var(--color-border-thin);
    padding: 1.5rem;
    border-radius: 4px;
}

/* Mobile: 3 columns x 2 rows menu grid */
.member-menu {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.25rem;
}

/* Desktop: sidebar list layout */
@media (min-width: 769px) {
    .member-wrap { grid-template-columns: 220px 1fr; }
    .member-sidebar {
        padding: 1.5rem 1rem;
        align-self: start;
    }
    .member-menu {
        display: block;
    }
    .member-menu-item {
        flex-direction: row;
        justify-content: flex-start;
        padding: 0.6rem 0.5rem;
        font-size: 0.85rem;
        text-align: left;
        gap: 0.6rem;
        border-bottom: 1px solid var(--color-border-thin);
        border-radius: 0;
    }
    .member-menu-item svg {
        width: 18px;
        height: 18px;
    }
}

/* ==================== FLASH MESSAGES ==================== */
.flash-msg { padding: 0.75rem 1rem; margin-bottom: 1rem; border-left: 3px solid var(--c-gold); background: #fffbe6; font-size: 0.85rem; }
.flash-msg.error { border-left-color: var(--c-red); background: #fdf0ef; color: var(--c-red); }
.flash-msg.success { border-left-color: #27ae60; background: #f0fff4; color: #27ae60; }

/* ==================== FOOTER ==================== */
.site-footer {
    background: var(--color-surface-extra-light);
    color: var(--color-content-subtle);
    padding: 2.5rem 0 1.5rem;
    border-top: 1px solid var(--color-border-thin);
}
.footerList {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;   /* 新增：让列表项水平居中 */
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0 auto;
}
.footer-bottom {
    border-top: 1px solid var(--color-border-thin);
    margin-top: 1.5rem;
    padding-top: 1rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--color-content-subtle);
}
.footer-bottom span { color: var(--color-common-highlight); }

/* ==================== ERROR PAGE ==================== */
.error-page { text-align: center; padding: 4rem 1rem; }
.error-page h1 { font-size: 3rem; color: var(--c-gold); }
.error-page p { color: var(--c-gray); margin: 0.5rem 0 1.5rem; }

/* ==================== ADMIN ==================== */
.admin-header { background: var(--color-surface-extra-light); color: var(--color-content-intense); padding: 0 1rem; display: flex; align-items: center; justify-content: space-between; height: 56px; position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--color-border-thin); }
.admin-header .logo { font-size: 1.1rem; }
.admin-nav { display: none; }
.admin-nav ul { display: flex; gap: 1.2rem; list-style: none; }
.admin-nav a { font-size: 0.78rem; color: var(--color-content-subtle); }
.admin-nav a:hover { color: var(--color-common-highlight); }
.admin-mobile-nav { display: block; }
.admin-mobile-nav select {
    background: var(--color-surface-light);
    color: var(--color-content-intense);
    border: 1px solid var(--color-border-thin);
    padding: 0.4rem;
    font-size: 0.8rem;
}

.admin-body { padding: 1.5rem; }
.admin-body h2 { font-size: 1.3rem; margin-bottom: 1rem; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 0.6rem; border-bottom: 1px solid #eee; text-align: left; font-size: 0.82rem; }
.admin-table th { background: var(--c-gray-bg); font-weight: 500; font-size: 0.75rem; text-transform: uppercase; }
.admin-table .actions { display: flex; gap: 0.5rem; }
.admin-table .actions a { font-size: 0.75rem; }

.admin-card { background: var(--c-white); border: 1px solid #eee; padding: 1.5rem; margin-bottom: 1rem; }
.addr-item {
    transition: border-color .2s, background .2s;
}
.addr-item:has(input[type="radio"]:checked) {
    border-color: var(--color-common-highlight) !important;
    background: rgba(200, 112, 0, 0.05);
}

/* Delivery options (single line, horizontal scroll) */
.delivery-options {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}
.delivery-option {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--c-white); border: 1px solid #eee; padding: 1.2rem; text-align: center; }
.stat-card .num { font-size: 1.6rem; color: var(--c-gold); font-family: var(--f-serif); }
.stat-card .label { font-size: 0.75rem; color: var(--c-gray); text-transform: uppercase; letter-spacing: 0.1em; }

.admin-form { max-width: 640px; }
.admin-form .form-row { display: grid; grid-template-columns: 1fr; gap: 0; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 2px; font-size: 0.7rem; }
.badge-0 { background: #e8e8e8; color: #666; }
.badge-1 { background: #fff3cd; color: #856404; }
.badge-2 { background: #d1ecf1; color: #0c5460; }
.badge-3 { background: #d4edda; color: #155724; }
.badge-4 { background: #f8d7da; color: #721c24; }

/* ==================== TABLET ==================== */
@media (min-width: 768px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .product-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
    .product-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
    .product-detail { grid-template-columns: 1fr 1fr; align-items: start; }
    .product-detail .product-meta {
        position: sticky;
        top: 72px;
        max-width: 80%;
        padding: 2rem 1.5rem;
        align-self: start;
        justify-self: center;
        text-align: left;
    }
    .stat-grid { grid-template-columns: repeat(4, 1fr); }

    .admin-nav { display: block; }
    .admin-mobile-nav { display: none; }
    .admin-form .form-row { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .hero-banner h1 { font-size: 3.5rem; }
    .img-section .img-bg { aspect-ratio: 21/9; }
    .img-section .img-overlay h2 { font-size: 2.5rem; }
    .section { padding: 4rem 0; }
    .cat-showcase { grid-template-columns: repeat(3, 1fr); }
}

/* ==================== DESKTOP ==================== */
@media (min-width: 1024px) {
    .container { padding: 0 2rem; }
    .product-grid { grid-template-columns: repeat(4, 1fr); }
    .product-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
    .cart-table th, .cart-table td { padding: 1rem; }
}

/* ==================== 商品相簿縮圖 ==================== */
.product-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}
.thumb-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 2px solid var(--c-border);
    border-radius: 2px;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color .2s;
}
.thumb-img:hover { border-color: var(--c-gold-dark); }
.thumb-img.active { border-color: var(--c-gold); }

/* ==================== NOTIFICATION ==================== */
.notification {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-content-intense);
    color: var(--color-surface-extra-light);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    z-index: 10000;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    max-width: 90%;
    text-align: center;
}
.notification i { color: var(--color-common-highlight); font-size: 1.2rem; }
@keyframes notifIn { from { opacity: 0; transform: translate(-50%, -40%) scale(0.9); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes notifOut { from { opacity: 1; transform: translate(-50%, -50%) scale(1); } to { opacity: 0; transform: translate(-50%, -60%) scale(0.9); } }

/* ==================== MOBILE ACTION BAR ==================== */
.mobile-action-bar {
    display: none;
}
@media (max-width: 768px) {
    .mobile-action-bar {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: var(--color-surface-extra-light);
        border-top: 1px solid var(--color-border-thin);
        z-index: 999;
        padding: 0;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
    }
    .action-bar-container {
        display: flex;
        align-items: center;
        height: 50px;
    }
    .mobile-action-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--color-content-subtle);
        font-size: 0.6rem;
        gap: 3px;
        cursor: pointer;
        transition: color .2s;
        padding: 4px 0;
    }
    .mobile-action-btn .si { width: 1.25rem; height: 1.25rem; }
    .mobile-action-btn:active { color: var(--color-common-highlight); }
    .mobile-action-btn.line-btn .si {
      filter: drop-shadow(0 1px 2px rgba(6, 199, 85, 0.3));
    }
    .mobile-action-btn.bag-btn {
        color: var(--color-common-highlight);
        font-weight: 500;
    }
    .mobile-action-btn.bag-btn i { font-size: 1rem; }
    .product-actions-desktop { display: none !important; }
    .mobile-bottom-spacer { height: 54px; }
}
@media (min-width: 769px) {
    .mobile-action-bar { display: none !important; }
    .mobile-bottom-spacer { display: none; }
}

/* ==================== OPTIONS PANEL ==================== */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}
.product-options-panel {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 9999;
    border-radius: 12px 12px 0 0;
    transform: translateY(100%);
    transition: transform .3s ease;
    max-height: 80vh;
    overflow-y: auto;
}
.product-options-panel.open {
    display: block;
    transform: translateY(0);
}
.options-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}
.options-panel-title { font-size: 1rem; font-weight: 600; }
.close-options-panel {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
    padding: 0.25rem 0.5rem;
}
.close-options-btn:hover { color: #333; }

/* ==================== UTILITY CLASSES ==================== */
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-05 { gap: 0.5rem; }
.gap-075 { gap: 0.75rem; }
.gap-1 { gap: 1rem; }
.mb-05 { margin-bottom: 0.5rem; }
.mb-075 { margin-bottom: 0.75rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-15 { margin-bottom: 1.5rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-05 { margin-top: 0.5rem; }
.mt-1 { margin-top: 1rem; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.font-small { font-size: 0.75rem; }
.font-sm { font-size: 0.85rem; }
.font-base { font-size: 1rem; }
.font-bold { font-weight: 600; }
.color-gray { color: var(--c-gray); }
.color-gold { color: var(--c-gold); }
.w-full { width: 100%; }
.max-w-640 { max-width: 640px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.overflow-x-auto { overflow-x: auto; }
.btn-block { display: block; width: 100%; }
.inline-block { display: inline-block; }

/* Cart table improvements */
.cart-table td, .cart-table th {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--c-border);
}

/* Admin card improvements for frontend */
.card-bordered {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

/* Section title margin overrides */
.section-title-mb-15 { margin-bottom: 1.5rem; }

/* Back link style */
.back-link {
    font-size: 0.8rem;
    color: var(--c-gray);
    text-decoration: none;
}
.back-link:hover { color: var(--c-gold); }

/* Form textarea */
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--c-border);
    border-radius: 4px;
    background: transparent;
    color: var(--c-text);
    resize: vertical;
    font-size: 0.85rem;
}

/* ==================== ORDER DETAIL ==================== */
.order-detail-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}
.order-detail-img-wrap {
    width: 60px;
}
.order-no-img {
    width: 50px;
    height: 50px;
    background: #f5f5f5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: #999;
}
.order-detail-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}
.order-detail-card .order-remark,
.order-detail-card .order-admin-note,
.order-detail-card .order-points-info {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}
.order-detail-card .order-admin-note { color: var(--c-gold); }
.order-detail-card .order-points-info { color: var(--c-gray); }
.order-detail-addr { font-size: 0.85rem; }
.order-detail-total {
    text-align: right;
    margin-top: 0.5rem;
    font-size: 1rem;
}
.order-detail-total .text-gold { font-weight: 600; }
.order-detail-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.btn-line {
    background: #06C755;
    color: #fff;
    border-color: #06C755;
}
.btn-cancel {
    background: #fff;
    color: #d9534f;
    border: 1px solid #d9534f;
}
.btn-cancel:hover {
    background: #d9534f;
    color: #fff;
}
.cancel-order-form { margin: 0; }
.order-info-item { margin-bottom: 0.5rem; }
.confirm-form { margin-top: 1rem; }
.product-link {
    color: inherit;
    text-decoration: none;
}
.product-link:hover { text-decoration: underline; }

/* Empty placeholder */
.empty-placeholder {
    padding: 2rem;
    color: var(--c-gray);
    text-align: center;
}

/* Page info text */
.page-info {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--c-gray);
}

/* View link in tables */
.view-link {
    font-size: 0.78rem;
    color: var(--c-gold);
    text-decoration: none;
}
.view-link:hover { text-decoration: underline; }
/* ==================== ADDITIONAL UTILITY CLASSES ==================== */
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.align-start { align-items: flex-start; }
.ml-05 { margin-left: 0.5rem; }
.mb-025 { margin-bottom: 0.25rem; }
.mt-075 { margin-top: 0.75rem; }
.gap-025 { gap: 0.25rem; }
.inline { display: inline; }
.text-gold-bold { color: var(--c-gold); font-weight: 600; }
.bg-surface-light { background: var(--color-surface-extra-light); }
.py-1 { padding-top: 1rem; padding-bottom: 1rem; }
.hidden { display: none; }

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    color: var(--c-gray);
}
.empty-state-padding { padding: 3rem; }
.empty-state-padding-sm { padding: 2rem; }
.empty-state-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--c-border);
}

/* ==================== CART IMPROVEMENTS ==================== */
.cart-col-check { width: 40px; }
.cart-qty-narrow { width: 50px; }
.cart-remove-form { display: inline; }
.cart-subtotal-bold { font-weight: 600; }
.link-btn-danger {
    background: none;
    border: none;
    color: var(--color-common-error);
    cursor: pointer;
    font-size: 0.8rem;
}

/* ==================== BUTTON VARIANTS ==================== */
.btn-outline-gold-sm {
    background: none;
    border: 1px solid var(--c-gold);
    color: var(--c-gold);
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
}
.btn-outline-gray-sm {
    background: none;
    border: 1px solid var(--c-border);
    color: var(--c-gray2);
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
}
.btn-outline-red-sm {
    background: none;
    border: 1px solid var(--c-red);
    color: var(--c-red);
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
}

/* ==================== CHECKOUT SECTIONS ==================== */
.checkout-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.checkout-section-title { font-size: 1rem; }

/* ==================== ADDRESS CARDS ==================== */
.addr-card {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--c-border);
    margin-bottom: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}
.addr-card-horizontal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.addr-radio {
    margin-top: 4px;
    flex-shrink: 0;
}
.addr-info {
    flex: 1;
    font-size: 0.85rem;
}
.addr-info-horizontal {
    font-size: 0.85rem;
    flex: 1;
    min-width: 200px;
}
.addr-badge-default {
    display: inline-block;
    background: var(--c-gold);
    color: #fff;
    font-size: 0.6rem;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 4px;
}
.addr-badge-default-lg {
    display: inline-block;
    background: var(--c-gold);
    color: #fff;
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 3px;
    margin-bottom: 4px;
}
.addr-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}
.addr-actions-horizontal {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}
.link-btn-edit {
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    font-size: 0.7rem;
    text-decoration: underline;
}
.link-btn-delete {
    background: none;
    border: none;
    color: var(--c-red);
    cursor: pointer;
    font-size: 0.7rem;
    text-decoration: underline;
}
.addr-empty-text {
    text-align: center;
    color: var(--c-gray);
    padding: 1rem;
}
.addr-empty-card {
    text-align: center;
    padding: 2rem;
    color: var(--c-gray);
}

/* ==================== PAYMENT OPTION ==================== */
.payment-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--c-gold);
    border-radius: 4px;
    cursor: pointer;
    background: rgba(212, 175, 55, 0.05);
}
.payment-option-text { font-size: 0.9rem; }

/* ==================== POINTS SECTION ==================== */
.points-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.points-available {
    font-size: 0.8rem;
    color: var(--c-gray);
}
.points-available strong { color: var(--c-gold); }
.points-desc {
    font-size: 0.78rem;
    color: var(--c-gray);
    margin-bottom: 0.75rem;
}
.points-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.points-label {
    font-size: 0.85rem;
    flex-shrink: 0;
}
.points-input {
    flex: 1;
    max-width: 150px;
    padding: 0.5rem;
    border: 1px solid var(--c-border);
    border-radius: 4px;
}
.points-deduction-display {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--c-gray);
}

/* ==================== ORDER SUMMARY TABLE ==================== */
.order-summary-label {
    text-align: right;
    color: var(--c-gray);
}
.order-summary-value {
    text-align: right;
    color: var(--c-gold);
}
.order-total-label {
    text-align: right;
    font-weight: 600;
}
.order-total-value {
    font-weight: 600;
    font-size: 1.1rem;
    text-align: right;
}

/* ==================== MODAL ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.modal-content {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    margin: auto;
    position: relative;
    color: var(--c-text);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.modal-close-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--c-text);
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.modal-close-btn:hover { opacity: 1; }
.modal-title {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--c-text);
    font-weight: 600;
}
.modal-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}
.modal-actions .btn { flex: 1; }

/* ==================== ALL CATEGORIES ==================== */
.category-list {
    max-width: 640px;
    margin: 0 auto;
}
.category-item-card {
    margin-bottom: 1.5rem;
    background: #fff;
    border: 1px solid #eee;
    padding: 1rem;
}
.category-item-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--c-dark);
}
.subcategory-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.subcategory-link {
    font-size: 0.8rem;
    color: var(--c-gray);
}

/* ==================== ALL BRANDS ==================== */
.brand-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}
.brand-logo-img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}
.brand-name-placeholder {
    font-family: var(--f-serif);
    font-size: 1.2rem;
    color: var(--c-gold);
}

/* ==================== NEWS LIST ==================== */
.news-list-wrap {
    max-width: 800px;
    margin: 0 auto;
}
.news-item {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}
.news-item-meta {
    font-size: 0.78rem;
    color: var(--c-gray);
    margin-bottom: 0.3rem;
}
.news-item-title {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}
.news-item-excerpt {
    font-size: 0.8rem;
    color: var(--c-gray);
}

/* ==================== NEWS DETAIL ==================== */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #eee;
    padding: 2rem 1.5rem;
}
.article-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.article-meta {
    font-size: 0.78rem;
    color: var(--c-gray);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.75rem;
}
.article-body {
    font-size: 0.9rem;
    line-height: 1.8;
}
.article-back-wrap {
    max-width: 800px;
    margin: 1rem auto 0;
    text-align: center;
}

/* ==================== HOME PAGE NEWS ==================== */
.home-news-list {
    max-width: 640px;
    margin: 0 auto;
}
.home-news-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border-thin);
    font-size: 0.85rem;
}
.home-news-date {
    color: var(--color-content-subtle);
    font-size: 0.78rem;
}

/* ==================== AUTH PAGES ==================== */
.auth-links-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}
.auth-link-muted { color: var(--color-content-subtle); }
.auth-desc {
    font-size: 0.85rem;
    color: var(--color-content-subtle);
    margin-bottom: 1rem;
    text-align: center;
}

/* ==================== SEARCH ==================== */
.search-result-count {
    text-align: center;
    font-size: 0.8rem;
    color: var(--c-gray);
    margin-bottom: 1rem;
}

/* ==================== BRAND PAGE ==================== */
.brand-desc {
    font-size: 0.8rem;
    color: var(--c-gray);
    margin-top: 0.5rem;
}

/* ==================== MEMBER ==================== */
.member-profile-form { max-width: 400px; }
.member-content-title { margin-bottom: 1rem; }

/* 會員等級/點數/經驗卡片 */
.member-stats-card {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.member-stat-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1.2rem;
    text-align: center;
}
.member-stat-label {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 0.4rem;
}
.member-stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--c-text);
}
.member-stat-level { color: var(--c-gold); }
.member-stat-discount { color: #d9534f; }
.member-stat-points { color: #5cb85c; }
.member-stat-exp { color: #4a90e2; }

/* 經驗值進度條 */
.member-exp-progress {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
}
.member-exp-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}
.member-exp-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}
.member-exp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--c-gold), #e8c76a);
    border-radius: 4px;
    transition: width 0.3s ease;
}

@media (max-width: 640px) {
    .member-stats-card { grid-template-columns: repeat(2, 1fr); }
}

/* ==================== FAVORITE / WISHLIST ==================== */
.heart-icon-active { color: #e74c3c; }

/* SVG 圖標通用樣式 */
.si {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  fill: currentColor;
  stroke: currentColor;
  flex-shrink: 0;
}
.si-lg { width: 1.25em; height: 1.25em; }
.si-xl { width: 1.5em; height: 1.5em; }
.si-2x { width: 2em; height: 2em; }
.wishlist-empty-card {
    text-align: center;
    padding: 3rem;
    color: var(--c-gray);
}
.history-empty-card {
    text-align: center;
    padding: 3rem;
    color: var(--c-gray);
}

/* ==================== CHECKOUT CONTAINER ==================== */
.checkout-container { max-width: 640px; }

.product-info-summary {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}
.product-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.product-summary-details { flex: 1; }
.product-summary-name { font-size: 0.9rem; font-weight: 500; margin-bottom: 0.25rem; }
.product-summary-price { font-size: 1.1rem; color: var(--c-gold); font-weight: 600; margin-bottom: 0.75rem; }
.product-summary-quantity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.quantity-label { font-size: 0.8rem; color: #666; }
.quantity-control-small {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}
.quantity-btn-small {
    width: 32px;
    height: 32px;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.quantity-btn-small:hover { background: #eee; }
.quantity-input-small {
    width: 40px;
    height: 32px;
    border: none;
    text-align: center;
    font-size: 0.85rem;
}
.confirm-add-btn {
    width: calc(100% - 2rem);
    margin: 1rem;
    padding: 0.85rem;
    background: var(--color-common-highlight);
    color: var(--color-surface-extra-light);
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.confirm-add-btn:hover { background: var(--color-content-intense); }

/* ==================== MOBILE ADDRESS ACTIONS ==================== */
@media (max-width: 640px) {
    .addr-card-horizontal {
        flex-direction: column;
        align-items: stretch;
    }
    .addr-actions-horizontal {
        justify-content: flex-end;
        width: 100%;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--c-border);
    }
}
