.text-purple-muted {
    color: #6B7280;
}

.bg-purple-gradient {
    background-image: linear-gradient(to bottom right, #B93C9F, #8E24AA);
}

.bg-purple-soft {
    background-color: #F8EEF6;
}

/* 買家登入／忘記密碼等 auth 頁：Firefox 在 body 為 flex 欄、main 為 flex-grow 時，預設 min-height:auto 偶發把可捲動高度算錯 */
body.buyer-signin-page > main,
body.buyer-forgot-password-page > main,
body.buyer-reset-password-page > main {
    min-height: 0;
}
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #D1D5DB;
    border-radius: 20px;
}

.dark ::-webkit-scrollbar-thumb {
    background-color: #4A148C;
}

/*登入驗證碼文字大寫*/
#Captcha {
    text-transform: uppercase;
}

/* register-04：配銷國家「已選」標籤由 JS 產生；Tailwind content 未掃 .js 時任意色不會出現在 bundle，故用固定 CSS */
.distribution-country-tag {
    background-color: #B93C9F;
}

.distribution-country-tag-remove:hover {
    background-color: #8E24AA;
}

/* Privacy Modal */
.modal-overlay {
    transition: opacity 0.3s ease-out;
}

.modal-content {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.modal-hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-hidden .modal-content {
    transform: scale(0.95);
}

/* Loading 動畫 */
.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* 媒合時段網格（booking-tune） */
@media (max-width: 767.98px) {
    .schedule-scroll-row.schedule-mobile-mode > [data-schedule-panel].is-active-panel {
        display: flex !important;
        flex-direction: column;
        width: 100%;
        min-width: 0;
    }

    .schedule-scroll-row.schedule-mobile-mode > [data-schedule-panel]:not(.is-active-panel) {
        display: none !important;
    }
}

.schedule-slot-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

@media (max-width: 1319.98px) {
    .schedule-slot-grid > button.flex {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0.375rem;
    }

    .schedule-slot-grid > button.flex > span.material-symbols-outlined {
        order: -1;
        align-self: center;
        line-height: 1;
    }

    .schedule-slot-grid > button.flex > div.text-left {
        text-align: center;
        width: 100%;
    }
}

.schedule-days-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .schedule-days-grid {
        display: grid;
        grid-template-columns: repeat(8, minmax(0, 1fr));
        gap: 0.5rem;
        align-items: stretch;
    }
}

/* booking-tune-new：底部操作列（與頁內 <style> 同步） */
.booking-tune-page > .flex-1 {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.booking-tune-page main {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    padding-bottom: 5.5rem;
}

.booking-tune-page .booking-tune-content {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}

.booking-tune-page .booking-tune-copyright {
    flex-shrink: 0;
    margin: 0;
    padding: 0.75rem 1rem 1rem;
    text-align: center;
    font-size: 0.875rem;
}

#booking-tune-action-bar {
    flex-shrink: 0;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    background-color: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

@media (min-width: 1024px) {
    #booking-tune-action-bar {
        left: 16rem;
        right: 0;
        width: auto;
    }
}

@media (min-width: 768px) {
    .booking-tune-page main {
        min-height: calc(100vh - 4rem);
        padding-bottom: 0;
    }

    #booking-tune-action-bar {
        position: sticky;
        bottom: 0;
        left: auto;
        right: auto;
        width: 100%;
        margin-top: auto;
        justify-content: flex-end;
        padding-left: 2.5rem;
        padding-right: 2.5rem;
        box-shadow: none;
    }
}

#booking-tune-action-bar button {
    flex: 1 1 0%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 0.5rem;
    transition: background-color 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}

@media (min-width: 768px) {
    #booking-tune-action-bar button {
        flex: 0 0 auto;
    }
}

#booking-tune-action-bar #schedule-cancel-reset {
    border: 1px solid #d1d5db;
    background-color: #fff;
    color: #374151;
    padding: 0.625rem 1rem;
}

@media (min-width: 768px) {
    #booking-tune-action-bar #schedule-cancel-reset {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

#booking-tune-action-bar #schedule-cancel-reset:hover {
    background-color: #f9fafb;
}

#booking-tune-action-bar #matching-availability-submit {
    border: none;
    background-color: #B93C9F;
    color: #fff;
    padding: 0.625rem 1rem;
    box-shadow: 0 4px 6px -1px rgba(185, 60, 159, 0.25);
}

@media (min-width: 768px) {
    #booking-tune-action-bar #matching-availability-submit {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

#booking-tune-action-bar #matching-availability-submit:hover {
    background-color: #8E24AA;
}

#booking-tune-action-bar #matching-availability-submit:active {
    transform: scale(0.98);
}

#booking-tune-action-bar #matching-availability-submit:disabled {
    opacity: 0.6;
    pointer-events: none;
}

#booking-tune-action-bar .material-symbols-outlined {
    font-size: 20px;
    line-height: 1;
}

/* 新品型錄：搜尋區 */
.npr-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    border: 1px solid #E5E7EB;
    border-radius: 9999px;
    background: #fff;
    padding: 0.375rem 0.375rem 0.375rem 1.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.npr-search-wrap:focus-within {
    border-color: #B93C9F;
    box-shadow: 0 0 0 3px rgba(185, 60, 159, 0.12);
}
.npr-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9375rem;
    color: #1F2937;
    padding: 0.625rem 0.75rem 0.625rem 0;
}
.npr-search-input::placeholder {
    color: #9CA3AF;
}
.npr-search-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    background-color: #B93C9F;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}
.npr-search-btn:hover {
    background-color: #9F2C86;
}
.npr-search-btn:active {
    transform: scale(0.96);
}

/* 找參展商：搜尋列下方篩選下拉 */
.se-search-section {
    width: 100%;
}
.se-filter-strip {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
}
.se-filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.625rem;
}
@media (min-width: 640px) {
    .se-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.75rem;
    }
}
.se-filter-field {
    min-width: 0;
}
.se-filter-combo {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    min-height: 2.75rem;
    border: 1px solid #E4B8D8;
    border-radius: 0.75rem;
    background-color: #fff;
    box-shadow: 0 1px 4px rgba(185, 60, 159, 0.1);
    padding-right: 2.25rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.se-filter-combo::after {
    content: "";
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23B93C9F' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}
.se-filter-combo:focus-within {
    border-color: #B93C9F;
    box-shadow: 0 0 0 3px rgba(185, 60, 159, 0.12), 0 1px 4px rgba(185, 60, 159, 0.12);
}
.se-filter-combo:has(.se-filter-select:disabled) {
    background-color: #FAFAFA;
    border-color: #E5E7EB;
    box-shadow: none;
}
.se-filter-combo:has(.se-filter-select:disabled)::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.se-filter-combo-label {
    flex-shrink: 0;
    padding: 0.625rem 0.5rem 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #B93C9F;
    white-space: nowrap;
    cursor: pointer;
}
.se-filter-combo:has(.se-filter-select:disabled) .se-filter-combo-label {
    color: #9CA3AF;
}
.se-filter-select {
    flex: 1;
    min-width: 0;
    width: 100%;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0.625rem 0.375rem 0.625rem 0.25rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: #374151;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
}
.se-filter-select:focus {
    outline: none;
}
.se-filter-select:disabled {
    color: #9CA3AF;
    cursor: not-allowed;
}

/* 新品型錄：禁止整頁橫向捲動（僅分類列內部可滑） */
@media (max-width: 639px) {
    body.npr-recommendation-page {
        overflow-x: hidden;
    }
}

/* 新品型錄：頁面寬度限制（避免分類列撐開整頁） */
.npr-page-main > * {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* 新品型錄：分類標籤（僅分類列手機水平拖放，其餘 fit 視窗） */
@media (max-width: 639px) {
    .npr-category-strip {
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }
    .npr-category-scroll {
        display: block;
        width: 100%;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }
    .npr-category-scroll.is-dragging {
        user-select: none;
    }
    .npr-category-scroll::-webkit-scrollbar {
        display: none;
    }
    .npr-category-list {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.5rem;
        width: max-content;
        max-width: none;
        padding: 0.125rem 0 0.25rem;
    }
}
@media (min-width: 640px) {
    .npr-category-strip,
    .npr-category-scroll {
        width: 100%;
        overflow: visible;
    }
    .npr-category-list {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
        max-width: 100%;
    }
}
.npr-category-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    border-radius: 9999px;
    background-color: #F3F4F6;
    border: 1px solid transparent;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1F2937;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.npr-category-chip:hover {
    background-color: #F8EEF6;
}
.npr-category-chip.is-active {
    background-color: #FADDF2;
    border-color: #B93C9F;
    color: #B93C9F;
}
.npr-category-chip .npr-chip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background-color: #E5E7EB;
    flex-shrink: 0;
}
.npr-category-chip.is-active .npr-chip-icon {
    background-color: #B93C9F;
    color: #fff;
}

/* 媒合產品列表：最多一列 4 個 */
.matching-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1rem;
    row-gap: 2rem;
}

@media (min-width: 640px) {
    .matching-product-grid {
        column-gap: 1.5rem;
        row-gap: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .matching-product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.matching-product-grid > .col-span-full {
    grid-column: 1 / -1;
}

/* 新品型錄：產品卡片 */
.npr-product-card-wrap {
    position: relative;
}
.npr-favorite-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: color 0.2s ease, transform 0.2s ease;
}
.npr-favorite-btn:hover {
    transform: scale(1.05);
}
.npr-product-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-align: left;
    border: none;
    background: transparent;
    padding: 0;
    font: inherit;
    color: inherit;
}
body.npr-detail-modal-open {
    overflow: hidden;
}
#npr-detail-modal {
    z-index: 1060;
}
#npr-cancel-reason-modal {
    z-index: 1070;
}
.npr-detail-modal-panel {
    animation: nprDetailModalIn 0.22s ease-out;
    max-height: 92vh;
}
#npr-detail-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
#npr-detail-modal-body .npr-meeting-day-tabs-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.npr-tab-label-inner {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    direction: ltr;
    unicode-bidi: isolate;
}
.npr-tab-label-icon {
    order: 0;
    flex-shrink: 0;
    font-size: 1.375rem;
    line-height: 1;
    width: 1.375rem;
    text-align: center;
}
.npr-tab-label-text {
    order: 1;
    white-space: nowrap;
}
.npr-book-meeting-btn .npr-tab-label-icon {
    font-size: 1.125rem;
    width: 1.125rem;
}
.npr-price-panel {
    background-color: #F9FAFB;
}
.npr-reservation-card {
    background-color: #f9f7f7;
    border: 1px solid #e0e0e0;
}
.npr-reservation-card__divider {
    background-color: #e0e0e0;
}
.npr-reservation-card__label {
    color: #666666;
}
.npr-reservation-card__status--accepted {
    background-color: #d1f2e1;
    color: #2d7a4d;
}
.npr-reservation-card__status-dot--accepted {
    background-color: #2d7a4d;
}
.npr-meeting-legend-busy {
    background-color: #FFEDD5;
    border: 1px solid #FED7AA;
}
.npr-meeting-slot-busy {
    background-color: #FFF7ED;
    border: 1px solid #FED7AA;
    cursor: not-allowed;
}
.npr-meeting-slot-busy .npr-meeting-slot-time {
    color: #6B7280;
    opacity: 1;
}
.npr-meeting-slot-busy .npr-meeting-slot-badge {
    display: inline-block;
    background-color: #FFEDD5;
    color: #EA580C;
    font-weight: 500;
    font-size: 0.75rem;
    line-height: 1.25rem;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
}
.npr-cancel-reason-panel {
    animation: nprDetailModalIn 0.22s ease-out;
}
#bm-accept-modal .npr-cancel-reason-panel {
    width: 100%;
    max-width: 28rem;
}
#npr-cancel-reason-list label,
#bm-cancel-reason-list label {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    cursor: pointer;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    background-color: #fff;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
#npr-cancel-reason-list label:hover,
#bm-cancel-reason-list label:hover {
    border-color: #B93C9F;
    background-color: #fdf5fb;
}
#npr-cancel-reason-list input[type="radio"],
#bm-cancel-reason-list input[type="radio"] {
    margin-top: 0.125rem;
    flex-shrink: 0;
}
#npr-cancel-reason-list .npr-cancel-reason-label-text,
#bm-cancel-reason-list .bm-cancel-reason-label-text {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #1f2937;
}
.npr-detail-modal-header .bg-primary {
    background-color: #B93C9F;
}
@keyframes nprDetailModalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.npr-detail-modal-loading .animate-spin {
    animation: nprDetailSpin 1s linear infinite;
}
@keyframes nprDetailSpin {
    to { transform: rotate(360deg); }
}
.npr-product-card .npr-product-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 0.75rem;
    overflow: hidden;
    background-color: #F3F4F6;
    margin-bottom: 0.875rem;
}
.npr-product-card .npr-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.npr-product-card:hover .npr-product-img img {
    transform: scale(1.03);
}
.npr-product-brand {
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9CA3AF;
    margin-bottom: 0.25rem;
}
.npr-product-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1F2937;
    line-height: 1.4;
    margin-bottom: 0.375rem;
}
.npr-product-price {
    font-size: 0.875rem;
    color: #6B7280;
}

/* 新品型錄：分頁 */
.npr-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem 0 0.5rem;
}
.npr-page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    border: 1px solid #E5E7EB;
    background: #fff;
    color: #6B7280;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.npr-page-btn:hover:not(:disabled) {
    border-color: #B93C9F;
    color: #B93C9F;
}
.npr-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.npr-page-btn.is-active {
    background-color: #1F2937;
    border-color: #1F2937;
    color: #fff;
}
.npr-page-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    color: #9CA3AF;
    font-size: 0.875rem;
}

/* 新品型錄詳細頁 */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #CBD5E1;
    border-radius: 3px;
}
@keyframes npr-fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.animate-fade-in {
    animation: npr-fadeIn 0.3s ease-out forwards;
}
.product-thumb {
    transition: border-color 0.2s ease, opacity 0.2s ease;
}
.product-thumb.is-active {
    border-color: #B93C9F;
}
.product-thumb:not(.is-active):hover {
    border-color: #D1D5DB;
}
.npr-product-thumbs-extra {
    animation: npr-fadeIn 0.25s ease-out forwards;
}