/* === 全域重設和基礎樣式 === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background: #f9f6f2;
    color: #332c25;
}

.main-content {
    padding: 72px 0 96px;
}

.hero-section {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    gap: 56px;
    padding: 56px;
    margin-bottom: 56px;
    border-radius: 36px;
    background: radial-gradient(120% 120% at 20% 0%, rgba(255, 228, 225, 0.55) 0%, rgba(244, 230, 214, 0.4) 35%, rgba(255, 255, 255, 0.92) 100%);
    box-shadow: 0 40px 90px rgba(79, 59, 45, 0.18);
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 36px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 1;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(79, 59, 45, 0.1);
    color: #4f3b2d;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.hero-title {
    font-family: 'Lato', 'Noto Sans TC', sans-serif;
    font-size: 48px;
    line-height: 1.2;
    font-weight: 800;
    color: #2f241b;
    margin: 0;
}

.hero-description {
    max-width: 540px;
    font-size: 16px;
    line-height: 1.7;
    color: rgba(51, 43, 37, 0.78);
}

.hero-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-highlight {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #4f3b2d;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 12px 24px rgba(79, 59, 45, 0.08);
}

.hero-highlight__icon {
    font-size: 14px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.hero-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 12px 26px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.hero-action--primary {
    background: linear-gradient(120deg, #60432f 0%, #8f6a4a 100%);
    color: #fff;
    box-shadow: 0 18px 34px rgba(79, 59, 45, 0.25);
}

.hero-action--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 40px rgba(79, 59, 45, 0.28);
}

.hero-action--ghost {
    background: rgba(255, 255, 255, 0.85);
    color: #4f3b2d;
    border: 1px solid rgba(79, 59, 45, 0.18);
}

.hero-action--ghost:hover {
    background: rgba(79, 59, 45, 0.12);
}

.hero-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: flex-end;
    z-index: 1;
}
.catalog-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.catalog-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(79, 59, 45, 0.08);
}

.catalog-toolbar__primary {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.catalog-toolbar__title {
    font-size: 16px;
    font-weight: 700;
    color: #2f241b;
    margin: 0;
}

.catalog-toolbar__desc {
    font-size: 13px;
    color: rgba(51, 43, 37, 0.58);
    line-height: 1.4;
    max-width: 560px;
    margin: 0;
}

.catalog-toolbar__notice {
    margin-top: 6px;
    font-size: 13px;
    color: #8a715c;
    line-height: 1.45;
}

.catalog-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    overflow-x: auto;
    padding-bottom: 1px;
}

.catalog-tabs::-webkit-scrollbar {
    height: 6px;
}

.catalog-tabs::-webkit-scrollbar-thumb {
    background: rgba(79, 59, 45, 0.2);
    border-radius: 999px;
}

.catalog-toolbar__secondary {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.catalog-toolbar__label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(51, 43, 37, 0.6);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.catalog-section .products-grid {
    margin-bottom: 0;
}

.catalog-section .subcategory-container {
    margin-top: 0;
}

.catalog-section .subcategory-tabs {
    gap: 6px;
    padding: 0;
}

@media (max-width: 1024px) {
    .catalog-toolbar {
        grid-template-columns: 1fr;
    }

    .catalog-toolbar__secondary {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 10px;
    }
}


.hero-card {
    position: relative;
    width: 260px;
    padding: 24px 22px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 30px 60px rgba(79, 59, 45, 0.18);
    overflow: hidden;
}

.hero-card--primary {
    background: linear-gradient(160deg, #574030 0%, #7f5c42 100%);
    color: #fff;
}

.hero-card--primary .hero-card__badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.hero-card__brand {
    font-size: 14px;
    letter-spacing: 0.12em;
    font-weight: 700;
    opacity: 0.8;
}

.hero-card__name {
    margin: 12px 0 8px;
    font-size: 22px;
    font-weight: 700;
}

.hero-card__price {
    font-size: 16px;
    font-weight: 600;
}

.hero-card__tag {
    margin-top: 18px;
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 12px;
    font-weight: 500;
}

.hero-card--secondary {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.9);
    color: #4f3b2d;
    border: 1px solid rgba(79, 59, 45, 0.1);
}

.hero-card__title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.hero-card__text {
    font-size: 14px;
    line-height: 1.5;
    color: rgba(79, 59, 45, 0.75);
}

.hero-accent-bubble {
    position: absolute;
    inset: auto -120px -120px auto;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.45) 0%, rgba(255, 222, 212, 0.0) 70%);
}

.category-filter {
    background: none;
    border: none;
    padding: 0;
}

.category-panel {
    background: #ffffff;
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 30px 80px rgba(79, 59, 45, 0.12);
    border: 1px solid rgba(79, 59, 45, 0.08);
}

.category-panel__header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.filter-subtitle {
    font-size: 14px;
    color: rgba(79, 59, 45, 0.7);
}

.category-panel__divider {
    height: 1px;
    background: rgba(79, 59, 45, 0.08);
    margin: 20px 0;
}

.category-panel__subtitle {
    font-size: 13px;
    font-weight: 600;
    color: rgba(79, 59, 45, 0.65);
    margin-bottom: 10px;
}

.category-panel__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.products-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.product-card--modern {
    border: none;
    box-shadow: none;
    background: transparent;
}

.product-card__inner {
    background: #ffffff;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(79, 59, 45, 0.08);
    box-shadow: 0 28px 60px rgba(79, 59, 45, 0.12);
    display: flex;
    flex-direction: column;
}

.product-card__media {
    position: relative;
    background: linear-gradient(160deg, rgba(244, 230, 214, 0.65) 0%, rgba(255, 255, 255, 0.95) 100%);
    padding: 32px 32px 24px;
}

.product-card__image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 18px;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.product-card__badge {
    position: absolute;
    top: 20px;
    left: 24px;
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.product-card__badge--discount {
    background: #ff6363;
}

.product-card__brand-chip {
    position: absolute;
    bottom: 18px;
    left: 24px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(51, 43, 37, 0.72);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.product-card__body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.product-card__brand {
    font-size: 14px;
    font-weight: 600;
    color: #4f3b2d;
}

.product-card__stock {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: 600;
}

.product-card__stock.is-available {
    background: rgba(82, 196, 80, 0.15);
    color: #287d29;
}

.product-card__stock.is-soldout {
    background: rgba(217, 150, 148, 0.2);
    color: #9f3b3b;
}

.product-card__title {
    font-size: 18px;
    font-weight: 700;
    color: #332c25;
    margin: 0;
    line-height: 1.45;
}

.product-card__rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(51, 43, 37, 0.65);
}

.product-card__stars i {
    color: #f4b03e;
}

.product-card__price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.product-card__swatches {
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-card__swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}

.product-card__swatch-more {
    font-size: 11px;
    color: rgba(51, 43, 37, 0.55);
}

.product-card__options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-card__option {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-card__option-label {
    font-size: 12px;
    color: rgba(51, 43, 37, 0.7);
    font-weight: 600;
}

.product-card__select {
    border-radius: 12px;
    border: 1px solid rgba(79, 59, 45, 0.16);
    padding: 10px 12px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.95);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-card__select:focus {
    border-color: #4f3b2d;
    box-shadow: 0 0 0 3px rgba(79, 59, 45, 0.12);
    outline: none;
}

.product-card__footer {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.product-card__quantity {
    display: inline-flex;
    align-items: center;
    background: rgba(249, 246, 242, 0.9);
    border-radius: 12px;
    border: 1px solid rgba(79, 59, 45, 0.1);
    overflow: hidden;
}

.product-card__quantity .quantity-step {
    border: none;
    background: transparent;
    width: 36px;
    height: 36px;
    font-size: 16px;
    font-weight: 600;
    color: #4f3b2d;
}

.product-card__quantity .product-quantity-input {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #4f3b2d;
}

.product-card__add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    background: linear-gradient(120deg, #60432f 0%, #8f6a4a 100%);
    color: #fff;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card__add:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(79, 59, 45, 0.22);
}

.product-card__media .wishlist-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    color: #4f3b2d;
    box-shadow: 0 10px 22px rgba(79, 59, 45, 0.16);
}

.product-card__body .wishlist-btn.active {
    background: #ff6b81;
    color: #fff;
}

@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
        padding: 40px 32px;
    }

    .hero-visual {
        flex-direction: row;
        justify-content: flex-start;
    }

    .hero-card {
        width: 220px;
    }

    .product-layout {
        grid-template-columns: 1fr;
    }

    .category-panel {
        position: static;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 32px 24px;
        gap: 32px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-highlights {
        gap: 8px;
    }

    .hero-highlight {
        font-size: 12px;
    }

    .hero-visual {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-card {
        width: 100%;
    }
}

body {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    color: #332c25;
    background-color: #f9f6f2;
    overflow-x: hidden;
}

/* === 字體系統 === */
.font-title {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
}

.font-body {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* === 佈局容器 === */
.container {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 32px;
}

.container-fluid {
    width: 100%;
    padding: 0 16px;
}

/* === 導航欄 === */
.navbar {
    background-color: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.navbar-brand {
    font-family: 'Lato', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #333333;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 32px;
    margin: 0;
}

.nav-link {
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #666666;
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: #333333;
}

.nav-link.active {
    color: #333333;
    font-weight: 500;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #dcc7b0;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.nav-primary-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.nav-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.nav-pill-btn:focus-visible {
    outline: 2px solid rgba(29, 78, 216, 0.4);
    outline-offset: 2px;
}

.nav-pill-btn--primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.25);
}

.nav-pill-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.3);
}

.nav-pill-btn--ghost {
    background: #ffffff;
    color: #1f2937;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
}

.nav-pill-btn--ghost:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.nav-pill-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-pill-label {
    display: inline-flex;
    align-items: center;
}

.nav-search-panel,
.nav-more-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    display: none;
    flex-direction: column;
    gap: 16px;
    min-width: 260px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    box-shadow: 0 26px 52px rgba(15, 23, 42, 0.18);
    z-index: 1200;
}

.nav-search-panel.is-open,
.nav-more-menu.is-open {
    display: flex;
}

.nav-search-panel .search-box {
    display: flex;
    gap: 10px;
    width: 100%;
}

.nav-search-panel .search-input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #dbe3f5;
    border-radius: 12px;
    font-size: 14px;
}

.nav-search-panel .search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.nav-search-panel .search-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.28);
}

.nav-search-panel .search-btn:hover {
    background: #1d4ed8;
}

.nav-more-menu__content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-more-menu__content > * {
    width: 100%;
}

.nav-more-menu__content .cart-icon {
    align-self: flex-start;
}

.nav-more-menu__content .leader-account {
    width: 100%;
}

.nav-more-menu__content .leader-login-btn {
    width: 100%;
}

.leader-login-btn {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid #dcc7b0;
    background: #ffffff;
    color: #6f4f37;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.leader-login-btn:hover {
    background: #f8f1ea;
    border-color: #c9a483;
}

.leader-account {
    position: relative;
}

.leader-account__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: rgba(223, 200, 179, 0.28);
    color: #4a3a2a;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.leader-account__button:hover {
    background: rgba(223, 200, 179, 0.38);
    border-color: rgba(223, 200, 179, 0.6);
}

.leader-account__button.is-active {
    background: rgba(79, 59, 45, 0.14);
    border-color: rgba(79, 59, 45, 0.32);
}

.leader-account__menu[hidden] {
    display: none !important;
}

.leader-account__icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.leader-account__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(223, 200, 179, 0.4);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2000;
}

.leader-account__menu a,
.leader-account__menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.leader-account__menu a:hover,
.leader-account__menu button:hover {
    background: rgba(223, 200, 179, 0.12);
}

.leader-login-btn:focus-visible,
.leader-account__button:focus-visible {
    outline: 2px solid #c29f82;
    outline-offset: 2px;
}
body.leader-portal-active .main-content {
    display: none;
}

body.leader-portal-checking .main-content,
body.leader-portal-checking .static-page {
    display: none;
}

body.leader-portal-checking #leader-portal-section {
    display: none !important;
}

body.leader-portal-active #leader-portal-section {
    display: block;
}

body.leader-portal-login-only {
    min-height: 100vh;
    background: linear-gradient(135deg, #f9efe7 0%, #f5f0ec 100%);
}

body.leader-portal-login-only .navbar,
body.leader-portal-login-only .site-footer,
body.leader-portal-login-only .sticky-toolbar {
    display: none !important;
}

body.leader-portal-login-only #leader-portal-section {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: none;
    width: 100%;
    min-height: 100vh;
    padding: 72px 24px;
}

body.leader-portal-login-only #leader-portal-section .leader-portal-shell {
    width: min(960px, 100%);
    padding: 56px 60px;
    box-shadow: 0 32px 64px rgba(15, 23, 42, 0.2);
    border-radius: 28px;
}

body.leader-portal-login-only .leader-portal-topbar {
    display: none;
}


body.leader-portal-active:not(.leader-portal-login-only) #leader-portal-section .leader-portal-topbar h1 {
    display: none;
}

body.leader-portal-login-only #leader-portal-section .leader-portal-content {
    display: grid;
    gap: 32px;
    grid-template-columns: minmax(0, 1fr);
}

body.leader-portal-login-only #loginCard {
    margin: 0;
    max-width: none;
}

body.leader-portal-login-only #leader-portal-cancel,
body.leader-portal-login-only #leader-portal-close,
body.leader-portal-login-only #leader-portal-close-secondary {
    display: none !important;
}

#leader-portal-section[hidden] {
    display: none !important;
}

#leader-portal-section {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 40px 32px 88px;
}

#leader-portal-section .leader-portal-shell {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 20px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
    padding: 48px 64px;
    width: 100%;
    max-width: 100%;
}

#leader-portal-section .leader-portal-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

#leader-portal-section .leader-portal-topbar h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #1f2a37;
}

#leader-portal-section .leader-portal-content {
    display: grid;
    gap: 32px;
}

#leader-portal-section .card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 16px;
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
    padding: 32px;
}

#leader-portal-section h2 {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 700;
    color: #1f2a37;
}

#leader-portal-section p {
    margin: 0 0 24px;
    color: rgba(15, 23, 42, 0.65);
    font-size: 14px;
}

#leader-portal-section label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.7);
}

#leader-portal-section input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    font-size: 15px;
    box-sizing: border-box;
}

#leader-portal-section input:focus {
    outline: none;
    border-color: #c29f82;
    box-shadow: 0 0 0 3px rgba(194, 159, 130, 0.26);
}

#leader-portal-section .btn-primary {
    background: #c29f82;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 16px 28px rgba(194, 159, 130, 0.36);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

#leader-portal-section .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 32px rgba(176, 139, 110, 0.42);
}

#leader-portal-section .btn-secondary {
    background: rgba(15, 23, 42, 0.05);
    color: #1f2a37;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

#leader-portal-section .alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
}

#leader-portal-section .alert-error {
    background: rgba(220, 38, 38, 0.15);
    color: #b91c1c;
    border: 1px solid rgba(248, 113, 113, 0.35);
}

#leader-portal-section .orders-table {
    width: 100%;
    border-collapse: collapse;
}

#leader-portal-section .orders-table th,
#leader-portal-section .orders-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    text-align: left;
    font-size: 14px;
}

#leader-portal-section .orders-table tr:hover {
    background: rgba(194, 159, 130, 0.08);
}

#leader-portal-section .status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    font-size: 12px;
    font-weight: 600;
}

#leader-portal-section .detail-section {
    margin-top: 32px;
    padding: 24px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

#leader-portal-section .detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 12px;
}

#leader-portal-section .portal-tabs {
    display: flex;
    gap: 8px;
    margin: 20px 0 18px;
    flex-wrap: wrap;
}

#leader-portal-section .portal-tab {
    border: 1px solid transparent;
    border-radius: 999px;
    background: rgba(234, 224, 212, 0.4);
    color: #725c48;
    font-size: 14px;
    padding: 8px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Noto Sans TC', sans-serif;
}

#leader-portal-section .portal-tab:hover {
    background: rgba(234, 210, 188, 0.75);
    color: #4f3b2d;
}

#leader-portal-section .portal-tab.is-active {
    background: #4f3b2d;
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(79, 59, 45, 0.18);
}

#leader-portal-section .portal-panels {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

#leader-portal-section .portal-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

#leader-portal-section .portal-panel-title {
    margin: 0;
    font-size: 20px;
    color: #2f241b;
}

#leader-portal-section .portal-panel {
    border: 1px solid rgba(79, 59, 45, 0.08);
    border-radius: 16px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.92);
}

#leader-portal-section .portal-panel .btn-secondary {
    white-space: nowrap;
}

#leader-portal-section .allocation-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#leader-portal-section .allocation-intro {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#leader-portal-section .allocation-subtitle {
    margin: 0;
    font-size: 14px;
    color: rgba(15, 23, 42, 0.6);
}

#leader-portal-section .allocation-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 2.3fr);
    gap: 20px;
    align-items: flex-start;
}

#leader-portal-section .allocation-column {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(79, 59, 45, 0.08);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#leader-portal-section .allocation-column h4 {
    margin: 0;
    font-size: 16px;
    color: #2f241b;
}

#leader-portal-section .allocation-cart-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#leader-portal-section .allocation-cart-item {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(79, 59, 45, 0.12);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#leader-portal-section .allocation-cart-item-header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-weight: 600;
    color: #2f241b;
}

#leader-portal-section .allocation-cart-item-meta {
    font-size: 13px;
    color: rgba(15, 23, 42, 0.55);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#leader-portal-section .allocation-recipient-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

#leader-portal-section .recipient-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    border-radius: 999px;
    padding: 10px 18px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

#leader-portal-section .recipient-add-icon-only {
    padding: 10px 12px;
    min-width: 44px;
    justify-content: center;
}

#leader-portal-section .recipient-add-icon-only .svg-icon {
    width: 20px;
    height: 20px;
}

#leader-portal-section .recipient-add-btn .svg-icon {
    width: 18px;
    height: 18px;
}

#leader-portal-section .recipient-add-btn:hover {
    box-shadow: 0 8px 18px rgba(60, 41, 27, 0.1);
}

#leader-portal-section .allocation-saved {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#leader-portal-section .allocation-saved-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

#leader-portal-section .allocation-saved-title {
    font-size: 14px;
    font-weight: 600;
    color: #2f241b;
}

#leader-portal-section .allocation-saved-hint {
    font-size: 12px;
    color: rgba(15, 23, 42, 0.55);
}

#leader-portal-section .allocation-saved-empty {
    padding: 12px 14px;
    border: 1px dashed rgba(79, 59, 45, 0.25);
    border-radius: 12px;
    font-size: 13px;
    color: rgba(15, 23, 42, 0.6);
    background: rgba(255, 255, 255, 0.78);
}

#leader-portal-section .allocation-recipient-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#leader-portal-section .recipient-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#leader-portal-section .recipient-chip {
    border: 1px solid rgba(79, 59, 45, 0.2);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    min-height: 44px;
    font: inherit;
    outline: none;
    position: relative;
}

#leader-portal-section .recipient-chip-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

#leader-portal-section .recipient-chip:hover {
    background: rgba(243, 237, 232, 0.9);
    border-color: rgba(79, 59, 45, 0.35);
}

#leader-portal-section .recipient-chip:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 59, 45, 0.2);
}

#leader-portal-section .recipient-chip.is-active {
    background: rgba(249, 244, 237, 0.95);
    border-color: rgba(79, 59, 45, 0.5);
    box-shadow: 0 6px 16px rgba(60, 41, 27, 0.1);
}

#leader-portal-section .recipient-chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(79, 59, 45, 0.08);
    color: #4f3b2d;
}

#leader-portal-section .recipient-chip-icon .svg-icon {
    width: 16px;
    height: 16px;
}

#leader-portal-section .recipient-chip-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1.2;
}

#leader-portal-section .recipient-chip-name {
    font-weight: 600;
    font-size: 14px;
    color: #2f241b;
}

#leader-portal-section .recipient-chip-meta {
    font-size: 12px;
    color: rgba(15, 23, 42, 0.55);
}

#leader-portal-section .recipient-chip-action {
    margin-left: auto;
    font-size: 12px;
    color: rgba(15, 23, 42, 0.45);
}

#leader-portal-section .recipient-chip.is-active .recipient-chip-action {
    color: #4f3b2d;
    font-weight: 600;
}

#leader-portal-section .recipient-chip-actions {
    margin-left: auto;
}

#leader-portal-section .recipient-detail {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#leader-portal-section .recipient-card {
    border: 1px solid rgba(79, 59, 45, 0.12);
    border-radius: 16px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 18px rgba(60, 41, 27, 0.08);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#leader-portal-section .recipient-card.is-active {
    border-color: rgba(79, 59, 45, 0.35);
    box-shadow: 0 12px 22px rgba(60, 41, 27, 0.12);
}

#leader-portal-section .recipient-name-display {
    font-size: 20px;
    font-weight: 600;
    color: #2f241b;
    line-height: 1.2;
}

#leader-portal-section .recipient-card-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 6px 0 4px;
}

#leader-portal-section .recipient-info-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.4;
}

#leader-portal-section .recipient-info-label {
    flex: 0 0 72px;
    color: rgba(15, 23, 42, 0.55);
    font-weight: 500;
}

#leader-portal-section .recipient-info-value {
    flex: 1 1 auto;
    color: #2f241b;
    word-break: break-word;
}

#leader-portal-section .recipient-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#leader-portal-section .recipient-name-input {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: #2f241b;
    border: none;
    background: transparent;
    padding: 0;
}

#leader-portal-section .recipient-name-input:focus {
    outline: none;
    border-bottom: 1px solid rgba(79, 59, 45, 0.4);
}

#leader-portal-section .recipient-remove-btn {
    border: none;
    background: none;
    color: #b03a2e;
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

#leader-portal-section .recipient-remove-btn:hover {
    text-decoration: underline;
}

#leader-portal-section .recipient-card-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

#leader-portal-section .recipient-card-fields input,
#leader-portal-section .recipient-card-fields textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(79, 59, 45, 0.18);
    padding: 10px 12px;
    font-size: 14px;
    background: #fff;
}

#leader-portal-section .recipient-card-fields textarea {
    min-height: 56px;
    resize: vertical;
}

#leader-portal-section .recipient-allocations-table {
    width: 100%;
    border-collapse: collapse;
}

#leader-portal-section .recipient-allocations-table th,
#leader-portal-section .recipient-allocations-table td {
    padding: 8px 6px;
    border-bottom: 1px solid rgba(79, 59, 45, 0.08);
    font-size: 13px;
    vertical-align: middle;
}

#leader-portal-section .recipient-allocations-table th {
    text-align: left;
    color: rgba(15, 23, 42, 0.6);
    font-weight: 500;
}

#leader-portal-section .recipient-allocations-table input[type="number"] {
    width: 90px;
    border-radius: 8px;
    border: 1px solid rgba(79, 59, 45, 0.18);
    padding: 6px 10px;
    text-align: center;
    font-size: 14px;
}

#leader-portal-section .recipient-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

#leader-portal-section .recipient-card-footer label {
    font-size: 13px;
    color: rgba(15, 23, 42, 0.65);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#leader-portal-section .recipient-card-footer input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

#leader-portal-section .allocation-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

#leader-portal-section .allocation-summary {
    font-size: 14px;
    color: rgba(15, 23, 42, 0.65);
    display: flex;
    gap: 16px;
}

#leader-portal-section .allocation-actions {
    display: flex;
    gap: 12px;
}

#leader-portal-section .recipient-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: rgba(15, 23, 42, 0.6);
}

#leader-portal-section .recipient-field input,
#leader-portal-section .recipient-field textarea {
    width: 100%;
}

#leader-portal-section .recipient-field--full {
    grid-column: 1 / -1;
}

#leader-portal-section .recipient-allocation-variant {
    font-size: 12px;
    color: rgba(15, 23, 42, 0.55);
    margin-top: 4px;
}

#leader-portal-section .allocation-empty {
    border: 1px dashed rgba(79, 59, 45, 0.25);
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    font-size: 14px;
    color: rgba(15, 23, 42, 0.6);
    background: rgba(249, 246, 241, 0.6);
}

#leader-portal-section .allocation-summary-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

#leader-portal-section .allocation-summary-item .allocation-summary-note {
    font-size: 12px;
    color: rgba(15, 23, 42, 0.55);
}

#leader-portal-section .allocation-summary-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(79, 59, 45, 0.08);
    font-weight: 600;
    line-height: 1.2;
}

#leader-portal-section .allocation-summary-item.summary-complete {
    background: rgba(21, 128, 61, 0.15);
    color: #15803d;
}

#leader-portal-section .allocation-summary-item.summary-partial {
    background: rgba(180, 83, 9, 0.12);
    color: #b45309;
}

#leader-portal-section .allocation-summary-item.summary-empty {
    background: rgba(79, 59, 45, 0.08);
    color: rgba(15, 23, 42, 0.55);
}

@media (max-width: 1024px) {
    #leader-portal-section .allocation-grid {
        grid-template-columns: 1fr;
    }

    #leader-portal-section .allocation-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    #leader-portal-section {
        padding: 24px 12px 60px;
    }

    #leader-portal-section .leader-portal-shell {
        padding: 24px;
    }

    #leader-portal-section .leader-portal-topbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

body.leader-portal-mobile #leader-portal-section {
    padding: 12px 10px 72px;
}

body.leader-portal-mobile #leader-portal-section .leader-portal-shell {
    padding: 16px 14px;
    border-radius: 18px;
}

body.leader-portal-mobile #leader-portal-section .portal-tabs {
    overflow-x: auto;
    padding-bottom: 4px;
}

body.leader-portal-mobile #leader-portal-section .portal-tab {
    flex: 0 0 auto;
    font-size: 13px;
    padding: 8px 16px;
}

body.leader-portal-mobile #leader-portal-section .portal-panels {
    gap: 18px;
}

body.leader-portal-mobile #leader-portal-section .portal-panel {
    padding: 16px 14px;
    border-radius: 16px;
}

body.leader-portal-mobile #leader-portal-section .allocation-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

body.leader-portal-mobile #leader-portal-section .allocation-column {
    padding: 14px;
    border-radius: 14px;
    gap: 14px;
}

body.leader-portal-mobile #leader-portal-section .allocation-column h4 {
    font-size: 15px;
}

body.leader-portal-mobile #leader-portal-section .allocation-recipient-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

body.leader-portal-mobile #leader-portal-section .allocation-recipient-toolbar .btn-secondary {
    width: 100%;
}

body.leader-portal-mobile #leader-portal-section .recipient-add-btn {
    justify-content: center;
}

body.leader-portal-mobile #leader-portal-section .recipient-chip {
    width: 100%;
}

body.leader-portal-mobile #leader-portal-section .recipient-chip-group {
    gap: 8px;
}

body.leader-portal-mobile #leader-portal-section .allocation-cart-item {
    padding: 12px;
}

body.leader-portal-mobile #leader-portal-section .allocation-cart-item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

body.leader-portal-mobile #leader-portal-section .allocation-cart-item-meta {
    font-size: 12px;
}

body.leader-portal-mobile #leader-portal-section .recipient-card {
    padding: 16px 14px;
    border-radius: 16px;
    gap: 12px;
}

body.leader-portal-mobile #leader-portal-section .recipient-card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

body.leader-portal-mobile #leader-portal-section .recipient-name-input {
    font-size: 16px;
}

body.leader-portal-mobile #leader-portal-section .recipient-name-display {
    font-size: 18px;
}

body.leader-portal-mobile #leader-portal-section .recipient-info-label {
    flex-basis: 60px;
    font-size: 12px;
}

body.leader-portal-mobile #leader-portal-section .recipient-card-fields {
    grid-template-columns: 1fr;
    gap: 10px;
}

body.leader-portal-mobile #leader-portal-section .recipient-field input,
body.leader-portal-mobile #leader-portal-section .recipient-field textarea {
    padding: 10px;
    font-size: 14px;
}

body.leader-portal-mobile #leader-portal-section .recipient-allocations-table thead {
    display: none;
}

body.leader-portal-mobile #leader-portal-section .recipient-allocations-table tr {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(79, 59, 45, 0.1);
}

body.leader-portal-mobile #leader-portal-section .recipient-allocations-table td {
    border: none;
    padding: 0;
    font-size: 13px;
}

body.leader-portal-mobile #leader-portal-section .recipient-allocations-table input[type="number"] {
    width: 100%;
    padding: 8px;
}

body.leader-portal-mobile #leader-portal-section .recipient-card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

body.leader-portal-mobile #leader-portal-section .recipient-card-footer label {
    justify-content: flex-start;
}

body.leader-portal-mobile #leader-portal-section .allocation-footer {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    padding: 12px 14px;
    border-radius: 16px;
    box-shadow: 0 -8px 18px rgba(15, 23, 42, 0.12);
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

body.leader-portal-mobile #leader-portal-section .allocation-summary {
    flex-direction: column;
    gap: 10px;
}

body.leader-portal-mobile #leader-portal-section .allocation-actions {
    flex-direction: column;
    align-items: stretch;
}

body.leader-portal-mobile #leader-portal-section .allocation-actions .btn-secondary,
body.leader-portal-mobile #leader-portal-section .allocation-actions .btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 15px;
}

body.leader-portal-mobile #leader-portal-section .portal-panel-title {
    font-size: 18px;
}

body.leader-portal-mobile #leader-portal-section .allocation-subtitle {
    font-size: 13px;
}

body.leader-portal-mobile #leader-portal-section .portal-panel {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

body.leader-portal-mobile #leader-portal-section .allocation-column {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

body.leader-portal-mobile #leader-portal-section .allocation-cart-item {
    border-radius: 14px;
    border: 1px solid rgba(79, 59, 45, 0.12);
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

body.leader-portal-mobile #leader-portal-section .recipient-chip-group {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

body.leader-portal-mobile #leader-portal-section .recipient-chip {
    border-radius: 16px;
    border: 1px solid rgba(79, 59, 45, 0.16);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
    padding: 16px;
    align-items: flex-start;
    width: 100%;
    background: #ffffff;
}

body.leader-portal-mobile #leader-portal-section .recipient-chip-icon {
    margin-top: 2px;
}

body.leader-portal-mobile #leader-portal-section .recipient-chip-text {
    gap: 4px;
}

body.leader-portal-mobile #leader-portal-section .recipient-chip-action {
    margin-left: 0;
    margin-top: 8px;
    align-self: flex-start;
}

body.leader-portal-mobile #leader-portal-section .orders-table {
    display: block;
    border-collapse: separate;
    border-spacing: 0;
}

body.leader-portal-mobile #leader-portal-section .orders-table thead {
    display: none;
}

body.leader-portal-mobile #leader-portal-section .orders-table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.leader-portal-mobile #leader-portal-section .orders-table tr {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(79, 59, 45, 0.12);
    background: #ffffff;
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
}

body.leader-portal-mobile #leader-portal-section .orders-table td {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    border: none;
    font-size: 14px;
    color: #1f2a37;
}

body.leader-portal-mobile #leader-portal-section .orders-table td::before {
    font-size: 12px;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.55);
    content: '';
}

body.leader-portal-mobile #leader-portal-section .orders-table td:nth-child(1) {
    font-size: 16px;
    font-weight: 700;
    color: #2f241b;
}

body.leader-portal-mobile #leader-portal-section .orders-table td:nth-child(1)::before {
    content: '團購單號';
}

body.leader-portal-mobile #leader-portal-section .orders-table td:nth-child(2)::before {
    content: '標題';
}

body.leader-portal-mobile #leader-portal-section .orders-table td:nth-child(3)::before {
    content: '狀態';
}

body.leader-portal-mobile #leader-portal-section .orders-table td:nth-child(4)::before {
    content: '總數量';
}

body.leader-portal-mobile #leader-portal-section .orders-table td:nth-child(5)::before {
    content: '總金額';
}

body.leader-portal-mobile #leader-portal-section .orders-table td:nth-child(6)::before {
    content: '建立時間';
}

body.leader-portal-mobile #leader-portal-section .orders-table td:nth-child(7) {
    flex-direction: row;
    justify-content: flex-end;
    gap: 8px;
}

body.leader-portal-mobile #leader-portal-section .orders-table td:nth-child(7)::before {
    display: none;
}

body.leader-portal-mobile #leader-portal-section .status-badge {
    align-self: flex-start;
}

body.leader-portal-mobile #leader-portal-section .allocation-summary-item {
    font-size: 13px;
}

body.leader-portal-mobile #leader-portal-section .portal-panel-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

body.leader-portal-mobile #leader-portal-section .portal-panel-header .btn-secondary {
    width: 100%;
}

/* 手機：Vue 团購主專區實際組件調整 */
body.leader-portal-mobile #leader-portal-app .app-header[data-v-be0f379c] {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

body.leader-portal-mobile #leader-portal-app .session-status[data-v-be0f379c] {
    align-self: stretch;
    justify-content: space-between;
}

body.leader-portal-mobile #leader-portal-app .tab-bar[data-v-be0f379c] {
    width: 100%;
    overflow-x: auto;
}

body.leader-portal-mobile #leader-portal-app .tab-button[data-v-be0f379c] {
    flex: 1 0 auto;
    text-align: center;
}

body.leader-portal-mobile #leader-portal-app .content-grid[data-v-d01c8096] {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

body.leader-portal-mobile #leader-portal-app table.recipient-table[data-v-d01c8096] {
    display: block;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

body.leader-portal-mobile #leader-portal-app table.recipient-table[data-v-d01c8096] thead[data-v-d01c8096] {
    display: none;
}

body.leader-portal-mobile #leader-portal-app table.recipient-table[data-v-d01c8096] tbody[data-v-d01c8096] {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.leader-portal-mobile #leader-portal-app table.recipient-table[data-v-d01c8096] tr[data-v-d01c8096] {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(79, 59, 45, 0.12);
    background: #ffffff;
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
}

body.leader-portal-mobile #leader-portal-app table.recipient-table[data-v-d01c8096] td[data-v-d01c8096] {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: none;
    padding: 0;
    font-size: 14px;
    color: #1f2a37;
}

body.leader-portal-mobile #leader-portal-app table.recipient-table[data-v-d01c8096] td[data-v-d01c8096]::before {
    font-size: 12px;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.55);
    content: '';
}

body.leader-portal-mobile #leader-portal-app table.recipient-table[data-v-d01c8096] td:nth-child(1)[data-v-d01c8096] {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

body.leader-portal-mobile #leader-portal-app table.recipient-table[data-v-d01c8096] td:nth-child(1)[data-v-d01c8096]::before {
    content: '選擇';
}

body.leader-portal-mobile #leader-portal-app table.recipient-table[data-v-d01c8096] td:nth-child(2)[data-v-d01c8096]::before {
    content: '姓名';
}

body.leader-portal-mobile #leader-portal-app table.recipient-table[data-v-d01c8096] td:nth-child(3)[data-v-d01c8096]::before {
    content: '聯絡資訊';
}

body.leader-portal-mobile #leader-portal-app table.recipient-table[data-v-d01c8096] td:nth-child(4)[data-v-d01c8096]::before {
    content: '地址';
}

body.leader-portal-mobile #leader-portal-app table.recipient-table[data-v-d01c8096] td:nth-child(5)[data-v-d01c8096] {
    flex-direction: row;
    gap: 8px;
}

body.leader-portal-mobile #leader-portal-app table.recipient-table[data-v-d01c8096] td:nth-child(5)[data-v-d01c8096]::before {
    content: '操作';
}

body.leader-portal-mobile #leader-portal-app .action-cell[data-v-d01c8096] {
    flex-wrap: wrap;
    gap: 10px;
}

body.leader-portal-mobile #leader-portal-app .recipient-form[data-v-d01c8096] {
    padding: 16px;
    border-radius: 16px;
}

body.leader-portal-mobile #leader-portal-app .recipient-form[data-v-d01c8096] .form-actions[data-v-d01c8096] {
    flex-direction: column;
    align-items: stretch;
}

body.leader-portal-mobile #leader-portal-app .recipient-form[data-v-d01c8096] .form-actions button[data-v-d01c8096] {
    width: 100%;
}

body.leader-portal-mobile #leader-portal-app .order-list[data-v-c33c0989] {
    gap: 18px;
}

body.leader-portal-mobile #leader-portal-app table.order-table[data-v-c33c0989] {
    display: block;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    background: transparent;
    box-shadow: none;
}

body.leader-portal-mobile #leader-portal-app table.order-table[data-v-c33c0989] thead[data-v-c33c0989] {
    display: none;
}

body.leader-portal-mobile #leader-portal-app table.order-table[data-v-c33c0989] tbody[data-v-c33c0989] {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.leader-portal-mobile #leader-portal-app table.order-table[data-v-c33c0989] tr[data-v-c33c0989] {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(79, 59, 45, 0.12);
    background: #ffffff;
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
}

body.leader-portal-mobile #leader-portal-app table.order-table[data-v-c33c0989] td[data-v-c33c0989] {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: none;
    padding: 0;
    font-size: 14px;
    color: #1f2a37;
}

body.leader-portal-mobile #leader-portal-app table.order-table[data-v-c33c0989] td[data-v-c33c0989]::before {
    font-size: 12px;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.55);
    content: '';
}

body.leader-portal-mobile #leader-portal-app table.order-table[data-v-c33c0989] td:nth-child(1)[data-v-c33c0989] {
    font-size: 16px;
    font-weight: 700;
    color: #2f241b;
}

body.leader-portal-mobile #leader-portal-app table.order-table[data-v-c33c0989] td:nth-child(1)[data-v-c33c0989]::before {
    content: '團購單編號';
}

body.leader-portal-mobile #leader-portal-app table.order-table[data-v-c33c0989] td:nth-child(2)[data-v-c33c0989]::before {
    content: '標題';
}

body.leader-portal-mobile #leader-portal-app table.order-table[data-v-c33c0989] td:nth-child(3)[data-v-c33c0989]::before {
    content: '狀態';
}

body.leader-portal-mobile #leader-portal-app table.order-table[data-v-c33c0989] td:nth-child(4)[data-v-c33c0989]::before {
    content: '總數量';
}

body.leader-portal-mobile #leader-portal-app table.order-table[data-v-c33c0989] td:nth-child(5)[data-v-c33c0989]::before {
    content: '總金額';
}

body.leader-portal-mobile #leader-portal-app table.order-table[data-v-c33c0989] td:nth-child(6)[data-v-c33c0989]::before {
    content: '建立時間';
}

body.leader-portal-mobile #leader-portal-app table.order-table[data-v-c33c0989] td:nth-child(7)[data-v-c33c0989] {
    flex-direction: row;
    justify-content: flex-end;
    gap: 8px;
}

body.leader-portal-mobile #leader-portal-app table.order-table[data-v-c33c0989] td:nth-child(7)[data-v-c33c0989]::before {
    display: none;
}

body.leader-portal-mobile #leader-portal-app .action-buttons[data-v-c33c0989] {
    flex-wrap: wrap;
    justify-content: flex-end;
}

body.leader-portal-mobile #leader-portal-app .detail-panel[data-v-c33c0989] {
    padding: 16px;
    border-radius: 16px;
}

body.leader-portal-mobile #leader-portal-app .allocation-workspace[data-v-438c25e4] {
    gap: 18px;
}

body.leader-portal-mobile #leader-portal-app header[data-v-438c25e4] {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

body.leader-portal-mobile #leader-portal-app .actions[data-v-438c25e4] {
    width: 100%;
    flex-direction: column;
}

body.leader-portal-mobile #leader-portal-app .actions[data-v-438c25e4] .btn-secondary,
body.leader-portal-mobile #leader-portal-app .actions[data-v-438c25e4] .btn-primary {
    width: 100%;
}

body.leader-portal-mobile #leader-portal-app .selected-block[data-v-438c25e4],
body.leader-portal-mobile #leader-portal-app .cart-block[data-v-438c25e4],
body.leader-portal-mobile #leader-portal-app .matrix-block[data-v-438c25e4],
body.leader-portal-mobile #leader-portal-app .notes-block[data-v-438c25e4] {
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

body.leader-portal-mobile #leader-portal-app .cart-table[data-v-438c25e4] {
    display: block;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

body.leader-portal-mobile #leader-portal-app .cart-table[data-v-438c25e4] thead[data-v-438c25e4] {
    display: none;
}

body.leader-portal-mobile #leader-portal-app .cart-table[data-v-438c25e4] tbody[data-v-438c25e4] {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.leader-portal-mobile #leader-portal-app .cart-table[data-v-438c25e4] tr[data-v-438c25e4] {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(79, 59, 45, 0.12);
    background: #ffffff;
}

body.leader-portal-mobile #leader-portal-app .cart-table[data-v-438c25e4] td[data-v-438c25e4] {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: none;
    padding: 0;
    font-size: 13px;
}

body.leader-portal-mobile #leader-portal-app .cart-table[data-v-438c25e4] td[data-v-438c25e4]::before {
    font-size: 12px;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.55);
    content: '';
}

body.leader-portal-mobile #leader-portal-app .cart-table[data-v-438c25e4] td:nth-child(1)[data-v-438c25e4]::before {
    content: '商品';
}

body.leader-portal-mobile #leader-portal-app .cart-table[data-v-438c25e4] td:nth-child(2)[data-v-438c25e4]::before {
    content: '變體';
}

body.leader-portal-mobile #leader-portal-app .cart-table[data-v-438c25e4] td:nth-child(3)[data-v-438c25e4]::before {
    content: '數量';
}

body.leader-portal-mobile #leader-portal-app .cart-table[data-v-438c25e4] td:nth-child(4)[data-v-438c25e4]::before {
    content: '單價';
}

body.leader-portal-mobile #leader-portal-app .cart-table[data-v-438c25e4] td:nth-child(5)[data-v-438c25e4]::before {
    content: '小計';
}

body.leader-portal-mobile #leader-portal-app .matrix-scroll[data-v-438c25e4] {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid rgba(79, 59, 45, 0.12);
    background: #ffffff;
}

body.leader-portal-mobile #leader-portal-app .matrix-table[data-v-438c25e4] {
    min-width: 720px;
}

body.leader-portal-mobile #leader-portal-app .matrix-table[data-v-438c25e4] input[type="number"] {
    min-height: 40px;
    border-radius: 12px;
}

body.leader-portal-mobile #leader-portal-app .notes-block textarea[data-v-438c25e4] {
    min-height: 120px;
}

body.leader-portal-tablet #leader-portal-section {
    padding: 24px 18px 80px;
}

body.leader-portal-tablet #leader-portal-section .leader-portal-shell {
    padding: 22px 20px;
}

body.leader-portal-tablet #leader-portal-section .allocation-grid {
    grid-template-columns: 1fr;
    gap: 20px;
}

body.leader-portal-tablet #leader-portal-section .allocation-column {
    padding: 18px;
    border-radius: 16px;
}

body.leader-portal-tablet #leader-portal-section .allocation-footer {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 14px 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

body.leader-portal-tablet #leader-portal-section .allocation-actions {
    width: 100%;
    flex-direction: row;
}

#leader-portal-section .recipient-picker {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}

#leader-portal-section .recipient-picker.is-open {
    display: flex;
}

#leader-portal-section .recipient-picker-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

#leader-portal-section .recipient-picker-panel {
    position: relative;
    width: min(520px, calc(100% - 48px));
    max-height: 90vh;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#leader-portal-section .recipient-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 14px;
    border-bottom: 1px solid rgba(79, 59, 45, 0.12);
}

#leader-portal-section .recipient-picker-header h3 {
    margin: 0;
    font-size: 20px;
    color: #2f241b;
}

#leader-portal-section .recipient-picker-close {
    border: none;
    background: none;
    color: rgba(15, 23, 42, 0.55);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

#leader-portal-section .recipient-picker-close:hover {
    background: rgba(15, 23, 42, 0.08);
}

#leader-portal-section .recipient-picker-body {
    padding: 14px 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
}

#leader-portal-section .recipient-picker-search {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(79, 59, 45, 0.18);
    padding: 10px 14px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.95);
}

#leader-portal-section .recipient-picker-status {
    font-size: 13px;
    color: rgba(15, 23, 42, 0.55);
}

#leader-portal-section .recipient-picker-list {
    flex: 1 1 auto;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 6px;
}

#leader-portal-section .recipient-picker-empty {
    text-align: center;
    padding: 36px 12px;
    font-size: 14px;
    color: rgba(15, 23, 42, 0.55);
    background: rgba(249, 246, 241, 0.7);
    border-radius: 16px;
}

#leader-portal-section .recipient-picker-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid rgba(79, 59, 45, 0.18);
    border-radius: 16px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.96);
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

#leader-portal-section .recipient-picker-item:hover {
    border-color: rgba(79, 59, 45, 0.28);
    background: rgba(249, 244, 237, 0.92);
    box-shadow: 0 10px 18px rgba(60, 41, 27, 0.14);
}

#leader-portal-section .recipient-picker-item input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
}

#leader-portal-section .recipient-picker-item-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
}

#leader-portal-section .recipient-picker-name {
    font-size: 15px;
    font-weight: 600;
    color: #2f241b;
}

#leader-portal-section .recipient-picker-meta {
    font-size: 13px;
    color: rgba(15, 23, 42, 0.6);
}

#leader-portal-section .recipient-picker-badge {
    margin-top: 6px;
    align-self: flex-start;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(21, 128, 61, 0.12);
    color: #166534;
    font-size: 12px;
    font-weight: 600;
}

#leader-portal-section .recipient-picker-item.is-disabled {
    opacity: 0.6;
    cursor: default;
    box-shadow: none;
}

#leader-portal-section .recipient-picker-item.is-disabled:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(79, 59, 45, 0.18);
}

#leader-portal-section .recipient-picker-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px 24px;
    border-top: 1px solid rgba(79, 59, 45, 0.12);
}

#leader-portal-section .recipient-picker-actions .btn-primary,
#leader-portal-section .recipient-picker-actions .btn-secondary {
    min-width: 120px;
}

#leader-portal-section .recipient-picker .recipient-picker-create {
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

#leader-portal-section .recipient-create-panel {
    max-width: 560px;
}

#leader-portal-section .recipient-create-body {
    gap: 16px;
}

#leader-portal-section .recipient-create-hint {
    font-size: 13px;
    color: rgba(15, 23, 42, 0.6);
}

#leader-portal-section .recipient-create-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

#leader-portal-section .recipient-create-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: rgba(15, 23, 42, 0.7);
}

#leader-portal-section .recipient-create-grid input,
#leader-portal-section .recipient-create-grid textarea {
    border-radius: 10px;
    border: 1px solid rgba(79, 59, 45, 0.18);
    padding: 10px 12px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.96);
    width: 100%;
}

#leader-portal-section .recipient-create-grid textarea {
    resize: vertical;
    min-height: 64px;
}

#leader-portal-section .recipient-create-full {
    grid-column: 1 / -1;
}

#leader-portal-section .recipient-create-required {
    color: #b91c1c;
    margin-left: 4px;
}

#leader-portal-section .recipient-create-error {
    min-height: 18px;
    font-size: 13px;
    color: #b91c1c;
}

body.leader-portal-mobile #leader-portal-section .recipient-picker-panel {
    width: calc(100% - 24px);
    max-height: 92vh;
    border-radius: 18px;
}

body.leader-portal-mobile #leader-portal-section .recipient-picker-body {
    padding: 12px 16px 18px;
}

body.leader-portal-mobile #leader-portal-section .recipient-picker-actions {
    padding: 16px;
    flex-direction: column;
    gap: 10px;
}

body.leader-portal-mobile #leader-portal-section .recipient-picker-actions .btn-primary,
body.leader-portal-mobile #leader-portal-section .recipient-picker-actions .btn-secondary {
    width: 100%;
}

body.leader-portal-mobile #leader-portal-section .recipient-create-grid {
    grid-template-columns: 1fr;
}

body.leader-portal-mobile #leader-portal-section .recipient-create-panel {
    width: calc(100% - 24px);
}

body.leader-portal-tablet #leader-portal-section .allocation-actions .btn-primary,
body.leader-portal-tablet #leader-portal-section .allocation-actions .btn-secondary {
    flex: 1 1 0;
    padding: 12px;
}

body.leader-portal-tablet #leader-portal-section .allocation-recipient-toolbar {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

body.leader-portal-desktop #leader-portal-section {
    padding: 36px 28px 96px;
}

body.leader-portal-desktop #leader-portal-section .leader-portal-shell {
    padding: 28px 32px;
    border-radius: 22px;
}

body.leader-portal-desktop #leader-portal-section .portal-panels {
    gap: 30px;
}

body.leader-portal-desktop #leader-portal-section .allocation-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.8fr);
    gap: 28px;
    align-items: flex-start;
}

body.leader-portal-desktop #leader-portal-section .allocation-column {
    padding: 24px;
    border-radius: 20px;
}

body.leader-portal-desktop #leader-portal-section .allocation-column--items {
    position: sticky;
    top: 32px;
    max-height: calc(100vh - 200px);
    overflow: auto;
}

body.leader-portal-desktop #leader-portal-section .allocation-recipient-list {
    max-height: calc(100vh - 240px);
    overflow: auto;
    padding-right: 8px;
}

body.leader-portal-desktop #leader-portal-section .allocation-footer {
    position: static;
    background: transparent;
    padding: 0;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

body.leader-portal-desktop #leader-portal-section .allocation-summary {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

body.leader-portal-desktop #leader-portal-section .allocation-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 14px;
}

body.leader-portal-desktop #leader-portal-section .allocation-actions .btn-primary,
body.leader-portal-desktop #leader-portal-section .allocation-actions .btn-secondary {
    padding: 12px 20px;
    width: auto;
}

body.leader-portal-desktop #leader-portal-section .allocation-recipient-toolbar {
    align-items: center;
    gap: 16px;
}

body.leader-portal-desktop #leader-portal-section .recipient-card {
    padding: 20px 22px;
    border-radius: 18px;
}

body.leader-portal-desktop #leader-portal-section .recipient-card-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 240px;
    padding: 8px 40px 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    font-size: 14px;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #dcc7b0;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(220, 199, 176, 0.1);
}

.search-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #666666;
    cursor: pointer;
    font-size: 16px;
}

.cart-icon {
    position: relative;
    background: none;
    border: none;
    font-size: 20px;
    color: #666666;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.cart-icon:hover {
    background-color: #f0f0f0;
}

.cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: #ff4757;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* === 移動端導航 === */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #333333;
    cursor: pointer;
}

/* === 主要內容 === */
.main-content {
    padding: 32px 0 64px;
}

.page-header {
    text-align: center;
    margin-bottom: 48px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.page-subtitle {
    font-size: 16px;
    color: #666666;
    max-width: 600px;
    margin: 0 auto;
}

/* === 增強型分類篩選器 === */
.category-filter {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    align-self: start;
}

.product-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 32px;
    align-items: flex-start;
}

.filter-title {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 20px;
}

.category-main-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.category-tab {
    background: rgba(234, 224, 212, 0.4);
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 14px;
    color: #725c48;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Noto Sans TC', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    font-weight: 500;
}

.category-tab:hover {
    background-color: rgba(234, 210, 188, 0.7);
    color: #4f3b2d;
}

.category-tab.active {
    background-color: #4f3b2d;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 8px 16px rgba(79, 59, 45, 0.18);
}

.category-tab--disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.category-count {
    background-color: rgba(255,255,255,0.2);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 500;
}

.category-tab.active .category-count {
    background-color: rgba(255,255,255,0.25);
}

/* 子分類 */
.subcategory-container {
    margin-top: 0;
    max-height: none;
    overflow: visible;
}

.subcategory-container.active {
    max-height: none;
}

.subcategory-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 0 0;
}

.subcategory-tab {
    background: rgba(239, 233, 224, 0.6);
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12px;
    color: #6d5a46;
    cursor: pointer;
    transition: all 0.2s ease;
}

.subcategory-tab:hover,
.subcategory-tab.active {
    background: rgba(79, 59, 45, 0.12);
    border-color: rgba(79, 59, 45, 0.2);
    color: #4f3b2d;
}


@media (max-width: 1024px) {
    .product-layout {
        grid-template-columns: 1fr;
    }

    .category-filter {
        position: static;
        max-height: none;
        overflow: visible;
        margin-bottom: 24px;
    }
}

/* 品牌分組樣式 */
.brand-group-header {
    font-size: 14px;
    font-weight: 600;
    color: #666666;
    margin: 16px 0 8px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid #f0f0f0;
}
.brand-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 4px 0 8px;
}

.brand-group + .brand-group-header {
    margin-top: 20px;
}


.brand-group-header:first-child {
    margin-top: 0;
}

/* === 產品網格 === */
.products-container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.product-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.product-image-container {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background-color: #f8f9fa;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #C0392B;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.product-badge.sale {
    background-color: #C0392B;
}

.product-badge.new {
    background-color: #27AE60;
}

.product-badge.hot {
    background-color: #E74C3C;
}

.wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666666;
    z-index: 2;
}

.wishlist-btn:hover {
    background-color: #ffffff;
    color: #ff4757;
}

.wishlist-btn.active {
    background-color: #ff4757;
    color: white;
}

.product-info {
    padding: 20px;
}

.product-brand {
    font-size: 12px;
    color: #999999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.product-title {
    font-size: 16px;
    font-weight: 500;
    color: #333333;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-star {
    font-size: 14px;
    color: #ffd700;
}

.rating-star.empty {
    color: #e0e0e0;
}

.rating-count {
    font-size: 12px;
    color: #999999;
}

.product-variations {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}

.variation-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px #e0e0e0;
}

.variation-more {
    font-size: 11px;
    color: #999999;
    margin-left: 4px;
}

.product-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.product-price .current-price {
    font-weight: 700;
}

.product-price .original-price {
    font-size: 13px;
    color: #999999;
    text-decoration: line-through;
}


.current-price {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
}

.original-price {
    font-size: 14px;
    color: #999999;
    text-decoration: line-through;
}

.discount-badge {
    background-color: #ff4757;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.product-card-options {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-card-option {
    display: flex;
    flex-direction: column;
}

.product-card-option-label {
    font-size: 12px;
    color: #777777;
    margin-bottom: 4px;
}

.product-card-option-select {
    width: 100%;
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    color: #444444;
    background-color: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-card-option-select:focus {
    outline: none;
    border-color: #dcc7b0;
    box-shadow: 0 0 0 2px rgba(220, 199, 176, 0.2);
}

.product-quantity-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    max-width: 160px;
    background-color: #ffffff;
}

.product-quantity-input {
    width: 60px;
    border: none;
    text-align: center;
    font-size: 14px;
    padding: 6px 4px;
}

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

.quantity-step {
    background: #f4f4f4;
    border: none;
    width: 34px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #666666;
    cursor: pointer;
    transition: background 0.2s ease;
}

.quantity-step:hover {
    background: #e9e9e9;
}

.quantity-step:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.add-to-cart-btn {
    width: 100%;
    background-color: #ddc5c4;
    color: #333333;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 2;
}

.add-to-cart-btn:hover:not(:disabled) {
    background-color: #d4b8b7;
    transform: translateY(-1px);
}

.add-to-cart-btn:disabled {
    background-color: #f0f0f0;
    color: #999999;
    cursor: not-allowed;
}

/* === 產品詳細模態視窗 === */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    padding: 20px;
}

.product-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(30px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.product-modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: #666;
    transition: all 0.2s ease;
    z-index: 1;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #333;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.product-gallery {
    position: relative;
}

.main-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 16px;
    background: #f8f9fa;
}

.thumbnail-gallery {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    border: 2px solid transparent;
}

.thumbnail.active,
.thumbnail:hover {
    opacity: 1;
    border-color: #dcc7b0;
}

.product-details {
    padding: 20px 0;
}

.modal-product-brand {
    font-size: 14px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.modal-product-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
    line-height: 1.3;
}

.modal-product-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-rating-stars {
    display: flex;
    gap: 4px;
}

.modal-rating-star {
    font-size: 18px;
    color: #ffd700;
}

.modal-rating-star.empty {
    color: #e0e0e0;
}

.modal-rating-text {
    font-size: 14px;
    color: #666;
}

.modal-product-price {
    margin-bottom: 32px;
}

.modal-current-price {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.modal-price-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-original-price {
    font-size: 18px;
    color: #999;
    text-decoration: line-through;
}

.modal-discount-badge {
    background: #ff4757;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.product-options {
    margin-bottom: 32px;
}

.option-group {
    margin-bottom: 24px;
}

.option-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.color-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #555555;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    min-width: 80px;
    text-align: center;
}

.color-option:hover {
    border-color: #dcc7b0;
}

.color-option.active {
    background: #dcc7b0;
    border-color: #dcc7b0;
    color: #333333;
    box-shadow: 0 6px 16px rgba(220, 199, 176, 0.3);
    font-weight: 600;
}

.power-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 300px;
    margin-bottom: 16px;
}

.modal-select-wrapper {
    position: relative;
}

.modal-select-wrapper::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 1px solid #999;
    border-bottom: 1px solid #999;
    transform: translateY(-50%) rotate(45deg);
    pointer-events: none;
}

.modal-select {
    width: 100%;
    padding: 10px 40px 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    color: #444;
    background: #fff;
    appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-select:focus {
    outline: none;
    border-color: #dcc7b0;
    box-shadow: 0 0 0 2px rgba(220, 199, 176, 0.2);
}


.option-selected-indicator {
    display: inline-block;
    margin-left: 12px;
    font-size: 13px;
    color: #888;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.quantity-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.quantity-btn {
    background: #f8f9fa;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.quantity-btn:hover {
    background: #e9ecef;
}

.quantity-input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.modal-actions {
    display: flex;
    gap: 16px;
}

.modal-add-to-cart {
    flex: 1;
    background: #dcc7b0;
    color: #333;
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-add-to-cart:hover {
    background: #d4b8b7;
    transform: translateY(-1px);
}

.modal-wishlist-btn {
    background: none;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    font-size: 20px;
}

.modal-wishlist-btn:hover {
    border-color: #ff4757;
    color: #ff4757;
}

.modal-wishlist-btn.active {
    background: #ff4757;
    border-color: #ff4757;
    color: white;
}

.product-description {
    grid-column: 1 / -1;
    padding-top: 40px;
    border-top: 1px solid #f0f0f0;
    margin-top: 20px;
}

.description-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.description-content {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
}

/* === 載入和空狀態 === */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 64px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top: 3px solid #dcc7b0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state {
    text-align: center;
    padding: 64px 0;
    color: #666;
    font-size: 16px;
}

.empty-state {
    text-align: center;
    padding: 64px 0;
}

.empty-icon {
    font-size: 64px;
    color: #e0e0e0;
    margin-bottom: 16px;
}

.empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 8px;
}

.empty-description {
    font-size: 14px;
    color: #999999;
    max-width: 400px;
    margin: 0 auto;
}

/* === 分頁 === */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
}

.pagination-info {
    font-size: 14px;
    color: #666666;
    margin: 0 16px;
}

.pagination-btn {
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.pagination-btn:hover:not(:disabled) {
    border-color: #dcc7b0;
    background-color: #f8f9fa;
}

.pagination-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.load-more-btn {
    display: block;
    margin: 32px auto 0;
    background-color: #ffffff;
    color: #333333;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.load-more-btn:hover {
    border-color: #dcc7b0;
    background-color: #f8f9fa;
}

/* === 響應式設計 === */
@media (max-width: 768px) {
    .navbar-container {
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
    }

    .mobile-menu-btn {
        order: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 999px;
        border: 1px solid rgba(15, 23, 42, 0.12);
        background: #ffffff;
        color: #1f2937;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    }

    .navbar-brand {
        order: 1;
        font-size: 22px;
        margin-left: 8px;
    }

    .navbar-nav {
        display: none;
    }

    .navbar-actions .search-box {
        order: 1;
    }

    .navbar-actions .cart-icon {
        order: 2;
    }

    .navbar-actions .leader-account {
        order: 3;
    }

    .navbar-actions .leader-login-btn {
        order: 4;
    }

    .mobile-menu-btn:active {
        transform: scale(0.95);
    }

    .mobile-menu-btn .svg-icon {
        width: 22px;
        height: 22px;
    }

    body.mobile-menu-open {
        overflow: hidden;
    }

    body.mobile-menu-open .navbar {
        z-index: 1100;
    }

    body.mobile-menu-open .navbar-container {
        position: relative;
    }

    body.mobile-menu-open .navbar-nav {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        background: #ffffff;
        padding: 16px 20px;
        gap: 12px;
        border: 1px solid #f0f0f0;
        border-radius: 16px;
        box-shadow: 0 18px 36px rgba(15, 23, 42, 0.15);
        animation: mobileMenuFade 0.18s ease;
    }

    body.mobile-menu-open .navbar-nav .nav-link {
        padding: 6px 0;
        font-size: 16px;
    }

    body.mobile-menu-open .mobile-menu-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 1000;
    }

    .nav-search-panel,
    .nav-more-menu {
        left: 16px;
        right: 16px;
        min-width: unset;
        width: auto;
    }

    .search-input {
        width: 200px;
    }

    .main-content {
        padding: 24px 0 48px;
    }

    .page-title {
        font-size: 24px;
    }

    .category-filter {
        padding: 16px;
        margin-bottom: 24px;
    }

    .category-main-tabs {
        gap: 8px;
    }

    .category-tab {
        font-size: 13px;
        padding: 8px 16px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }

    .product-info {
        padding: 16px;
    }

    .product-title {
        font-size: 14px;
    }

    .current-price {
        font-size: 16px;
    }

    /* 移動端模態視窗調整 */
    .product-modal {
        padding: 10px;
    }

    .product-detail {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .modal-product-title {
        font-size: 24px;
    }

    .modal-current-price {
        font-size: 28px;
    }

    .power-options {
        max-width: 100%;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-wishlist-btn {
        width: 100%;
    }
}

@keyframes mobileMenuFade {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === 購物車模態視窗 === */
/* 側邊購物車 */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.cart-sidebar.active {
    visibility: visible;
    opacity: 1;
}

.cart-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.cart-drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: 420px;
    height: 100%;
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.cart-drawer-header {
    padding: 24px;
    border-bottom: 1px solid #f0f0f0;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-title i {
    font-size: 20px;
    color: #666;
}

.cart-count-badge {
    background: #ff4757;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-drawer-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.cart-drawer-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}
.cart-drawer-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cart-items-container {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #f5f5f5;
    gap: 16px;
}

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

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    background: #f8f9fa;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-specs {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.cart-item-variations {
    font-size: 12px;
    color: #777777;
    margin-bottom: 8px;
    line-height: 1.4;
}

.cart-item-price {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 2px;
}

.quantity-btn {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    font-size: 16px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #e9ecef;
    color: #333;
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-display {
    min-width: 40px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    padding: 0 4px;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #ff4757;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.cart-item-remove:hover {
    background: rgba(255, 71, 87, 0.1);
    color: #e03e54;
}
.cart-drawer-footer {
    border-top: 1px solid #f0f0f0;
    padding: 24px;
    background: #ffffff;
}

.cart-summary {
    margin-bottom: 20px;
}

.cart-subtotal,
.cart-shipping {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: #666;
}

.shipping-free {
    color: #27AE60;
    font-weight: 500;
}

.cart-total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid #f0f0f0;
    margin-top: 8px;
}

.total-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.total-amount {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.cart-actions {
    display: flex;
    gap: 12px;
}

.cart-btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cart-btn-secondary {
    background: #ffffff;
    color: #666;
    border: 1px solid #ddd;
}

.cart-btn-secondary:hover {
    background: #f8f9fa;
    border-color: #ccc;
    color: #333;
}

.cart-btn-primary {
    background: #dcc7b0;
    color: #333;
    border: 1px solid #dcc7b0;
}

.cart-btn-primary:hover {
    background: #d4b8b7;
    border-color: #d4b8b7;
}

.cart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    color: #999;
}

.cart-empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.cart-empty-state h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #666;
}

.cart-empty-state p {
    font-size: 14px;
    color: #999;
    margin: 0;
}

@media (max-width: 768px) {
    .cart-drawer {
        width: 100%;
    }
    
    .cart-drawer-header {
        padding: 20px;
    }
    
    .cart-item {
        padding: 16px 20px;
    }
    
    .cart-drawer-footer {
        padding: 20px;
    }
}
/* === 通知系統 === */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.notification {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-left: 4px solid #27AE60;
    animation: slideIn 0.3s ease;
    max-width: 320px;
}

.notification.error {
    border-left-color: #E74C3C;
}

.notification.warning {
    border-left-color: #F39C12;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
    

/* === 靜態頁面樣式 === */

.static-page {
    padding: 64px 0 96px;
    background: linear-gradient(180deg, #ffffff 0%, #faf7f3 100%);
}

.static-container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

.static-hero {
    text-align: center;
    margin-bottom: 48px;
}

.static-hero__title {
    font-family: 'Lato', sans-serif;
    font-size: 42px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

.static-hero__subtitle {
    font-size: 18px;
    color: rgba(31, 41, 55, 0.7);
    line-height: 1.7;
}

.static-content {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.08);
    padding: 40px;
}

.static-content p {
    margin-bottom: 1.2em;
    color: rgba(31, 41, 55, 0.75);
    font-size: 16px;
}

.static-section {
    margin-top: 48px;
}

.static-section__title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1f2937;
}

#about-highlights {
    list-style: none;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin: 0;
    padding: 0;
}

#about-highlights li {
    background: rgba(194, 159, 130, 0.08);
    border: 1px solid rgba(194, 159, 130, 0.2);
    border-radius: 16px;
    padding: 18px 20px;
    font-size: 15px;
    color: rgba(31, 41, 55, 0.8);
}

#contact-details {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(209, 213, 219, 0.6);
}

.info-label {
    font-weight: 600;
    color: rgba(31, 41, 55, 0.7);
}

.info-value {
    color: rgba(31, 41, 55, 0.85);
    font-size: 16px;
}

.info-value a {
    color: #c29f82;
    text-decoration: none;
}

.info-value a:hover {
    text-decoration: underline;
}

.contact-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 32px;
}

.contact-card {
    background: #fff8f1;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(194, 159, 130, 0.25);
}

#contact-map {
    width: 100%;
    min-height: 320px;
    border: none;
    border-radius: 16px;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.1);
}

.page-error {
    text-align: center;
    padding: 48px 0;
    color: #b91c1c;
    font-weight: 600;
}

@media (max-width: 768px) {
    .static-page {
        padding: 48px 0 72px;
    }
    .static-content {
        padding: 28px;
    }
    .static-hero__title {
        font-size: 32px;
    }
}

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

@media (max-width: 768px) {
    body.leader-portal-login-only #leader-portal-section {
        padding: 48px 20px;
    }
    body.leader-portal-login-only #leader-portal-section .leader-portal-shell {
        padding: 40px 32px;
        border-radius: 24px;
    }
}


@media (max-width: 1280px) {
    #leader-portal-section {
        padding: 36px 28px 72px;
    }
    #leader-portal-section .leader-portal-shell {
        padding: 40px 48px;
    }
}

@media (max-width: 960px) {
    #leader-portal-section {
        padding: 32px 24px 64px;
    }
    #leader-portal-section .leader-portal-shell {
        padding: 36px;
    }
}

@media (max-width: 768px) {
    #leader-portal-section {
        padding: 24px 16px 56px;
    }
    #leader-portal-section .leader-portal-shell {
        padding: 28px 20px;
    }
}
@media (max-width: 768px) {
  #leader-portal-app .recipient-card-list {
    padding: 0;
    margin: 0;
    overflow-x: hidden;
  }
  #leader-portal-app .recipient-card {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
  #leader-portal-app .recipient-card__section {
    flex-wrap: wrap;
  }
}

/* =========================================
   手機版修復 - 2025-10-06
   ========================================= */

/* 手機版搜尋欄修復 - 縮小尺寸 */
@media (max-width: 768px) {
    .search-box {
        max-width: 180px;
    }
    
    .search-input {
        width: 100%;
        max-width: 180px;
        padding: 6px 32px 6px 12px;
        font-size: 13px;
    }
    
    .search-btn {
        right: 8px;
        font-size: 16px;
    }
}

/* 手機版漢堡選單遮罩修復 */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

body.mobile-menu-open .mobile-menu-overlay {
    display: block;
    opacity: 1;
}

/* 手機版導航選單優化 */
@media (max-width: 768px) {
    .navbar-container {
        position: relative;
    }
    
    .navbar-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 12px);
        left: 0;
        right: 0;
        background: #ffffff;
        padding: 16px;
        gap: 4px;
        border-radius: 12px;
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.15);
        z-index: 1100;
    }
    
    body.mobile-menu-open .navbar {
        position: relative;
        z-index: 1100;
    }
    
    body.mobile-menu-open .navbar-nav {
        display: flex;
    }
    
    body.mobile-menu-open {
        overflow: hidden;
    }
    
    .navbar-nav .nav-link {
        padding: 10px 12px;
        font-size: 15px;
        border-radius: 8px;
        transition: background 0.2s ease;
    }
    
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        background: #f8f9fa;
    }
}

/* 行動版導覽額外覆寫 */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
}
