/* Front V53 commerce — cart / order list / checkout
   Migrated with mainStyle split (still used by Cart/Order/Home/p).
*/
.BtmFunLayer { 
    max-width: 450px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    align-content: center;
    padding-top:6px;
    padding-bottom:6px;
}

.BtmFunLayerMyShoppingCart {
    max-width:240px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    align-content: center;
    padding-top: 6px;
    padding-bottom: 6px;
}

#MyShoppingCart1 {
    min-height: 300px;
    margin-top: 15px;
}

.my-shopping-cart-empty-msg {
    padding: 2rem 0 1rem;
}

.my-shopping-cart-actions {
    padding-bottom: 0;
}

.my-shopping-cart-toolbar {
    padding-bottom: 1.5rem;
}

.my-shopping-cart-home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.75rem;
    color: #ced4da;
    text-decoration: none;
    background: transparent;
    border: none;
    box-shadow: none;
}

.my-shopping-cart-home-btn:hover,
.my-shopping-cart-home-btn:focus,
.my-shopping-cart-home-btn:active,
.my-shopping-cart-home-btn:focus-visible {
    color: #ced4da;
    text-decoration: none;
    background: transparent;
    border: none;
    box-shadow: none;
    outline: none;
    opacity: 1;
}

.my-shopping-cart-home-btn i {
    font-size: 1.25rem;
}

/* ===== 訂單列表 ===== */
.order-list-page .member-hub-panel-title {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.35;
    color: var(--site-navy, var(--site-fg, inherit));
}

.order-list-page .member-hub-panel-title i {
    font-size: 0.95em;
    opacity: 0.85;
    vertical-align: -0.05em;
}

.order-list-page blockquote {
    font-size: 1.05rem;
    font-weight: 600;
}

.order-list-total-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
    color: #6c757d;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 999px;
}

.order-list-empty {
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 0.5rem;
}

.order-list-card {
    border: 1px solid #e9ecef;
    border-radius: 0.625rem;
    overflow: hidden;
}

.order-list-card-header {
    background: linear-gradient(180deg, #f8f9fb 0%, #f1f3f5 100%);
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.25rem;
}

.order-list-label {
    font-size: 0.8125rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.order-list-order-id {
    font-size: 1.125rem;
    font-weight: 700;
    color: #212529;
}

.order-list-status {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.order-list-payment {
    font-size: 1.25rem;
    font-weight: 700;
    color: #c82333;
    line-height: 1.2;
}

.order-list-card .card-body {
    padding-top: 0;
}

.order-list-address,
.order-list-address-summary {
    padding: 0.75rem 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #6c757d;
}

.order-list-items-head {
    margin: 0 -1.25rem 0;
    padding: 0.55rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #343a40;
    background: #f1f3f5;
    border-top: 1px solid #eef0f2;
    border-bottom: 1px solid #eef0f2;
}

.order-list-items {
    border-top: 0;
}

.order-list-item {
    padding: 0.875rem 0;
    border-bottom: 1px solid #eef0f2;
}

.order-list-item:last-child {
    border-bottom: none;
    padding-bottom: 0.25rem;
}

.order-list-item-thumb {
    display: block;
    width: 80px;
    height: 80px;
}

.order-list-item-thumb img,
.order-list-item-thumb-empty {
    display: block;
    width: 80px;
    height: 80px;
    object-fit: cover;
    background: #fff;
}

.order-list-item-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    font-size: 1.5rem;
}

.order-list-item-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #0d6efd;
    line-height: 1.4;
    word-break: break-word;
}

.order-list-item-title:hover {
    color: #0a58ca;
}

.order-list-item-price {
    margin-top: 0.25rem;
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .order-list-card-header {
        padding: 0.875rem 1rem;
    }

    .order-list-card-actions {
        width: 100%;
        text-align: left !important;
    }

    .order-list-item {
        align-items: flex-start;
    }

    .order-list-item-meta {
        min-width: 4.5rem;
    }

    .order-list-item-thumb img {
        width: 72px;
        height: 72px;
    }
}

.checkout-stepper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 0 0;
}

.checkout-step {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: #6c757d;
    font-size: 0.875rem;
}

.checkout-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #e9ecef;
    font-weight: 700;
    font-size: 0.75rem;
}

.checkout-step.is-current {
    color: #0d6efd;
    font-weight: 600;
}

.checkout-step.is-current .checkout-step-num {
    background: #0d6efd;
    color: #fff;
}

.checkout-step.is-done {
    color: #198754;
}

.checkout-step.is-done .checkout-step-num {
    background: #198754;
    color: #fff;
}

.checkout-step-disabled {
    opacity: 0.55;
    cursor: default;
}

.checkout-step-line {
    flex: 0 0 1.25rem;
    height: 2px;
    background: #dee2e6;
}

/* ===== 確認訂單頁 ===== */
.order-index-page blockquote {
    font-size: 1.35rem;
    font-weight: 600;
}

.order-index-card {
    border: 1px solid #e9ecef;
    border-radius: 0.625rem;
    overflow: hidden;
}

.order-index-card-header {
    background: linear-gradient(180deg, #f8f9fb 0%, #f1f3f5 100%);
    border-bottom: 1px solid #e9ecef;
    padding: 0.875rem 1.25rem;
}

.order-index-card .form-label,
.order-index-card .col-form-label {
    font-size: 0.875rem;
    color: #495057;
}

.order-index-address-form {
    --ss-main-height: 38px;
    --ss-border-radius: 0.375rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.order-index-address-form .order-addr-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    width: 100%;
}

.order-index-address-form .order-addr-label {
    flex: none;
    max-width: none;
    margin-bottom: 0;
    padding-top: 0;
}

.order-index-address-form .order-addr-field {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    margin-right: 0;
}

.order-index-address-form .order-addr-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem 1rem;
}

.order-index-address-form .order-addr-row > .order-addr-block {
    flex: 1 1 12rem;
    width: auto;
}

.order-index-address-form .order-addr-geo {
    display: block;
}

.order-index-address-form .order-addr-geo-country {
    width: 100%;
}

.order-index-address-form .order-addr-top-countries {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.45rem;
    margin: 0.7rem 0 0.55rem;
    padding: 0.15rem 0.05rem;
}

.order-index-address-form .order-addr-top-countries[hidden] {
    display: none;
}

.order-index-address-form .order-addr-top-country {
    appearance: none;
    border: 1px solid #e9ecef;
    background: #f8f9fa;
    padding: 0.2rem 0.55rem;
    margin: 0;
    border-radius: 999px;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #495057;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.order-index-address-form .order-addr-top-country:hover {
    color: #0d6efd;
    background: #eef5ff;
    border-color: #cfe2ff;
    text-decoration: none;
}

.order-index-address-form .order-addr-top-country.is-active {
    color: #0a58ca;
    font-weight: 600;
    background: #e7f1ff;
    border-color: #9ec5fe;
}

.order-index-address-form .order-addr-top-country:focus-visible {
    outline: 2px solid #86b7fe;
    outline-offset: 2px;
}

.order-index-address-form .order-addr-top-country-more {
    border-style: dashed;
    color: #6c757d;
}

.order-index-address-form .input-group {
    width: 100%;
    flex-wrap: nowrap;
}

.order-index-address-form .input-group > .form-control {
    width: auto;
}

.order-index-address-form .order-addr-phone-sep {
    flex: 0 0 1px;
    width: 1px;
    padding: 0;
    border: 0;
    background-color: var(--bs-border-color, #dee2e6);
    pointer-events: none;
}

.order-index-address-form .order-addr-phone-cc {
    flex: 0 0 5rem;
    width: 5rem;
    max-width: 5rem;
    text-align: center;
    letter-spacing: 0.02em;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
}

.order-index-address-form .order-addr-phone-local {
    flex: 1 1 auto;
    min-width: 0;
}

.order-index-address-form input,
.order-index-address-form select,
.order-index-address-form .form-control,
.order-index-address-form .form-select,
.order-index-address-form .ss-main {
    max-width: none;
    width: 100%;
}

.order-index-address-form .ss-main {
    min-width: 0;
}

.order-index-address-form .ss-content {
    z-index: 1080;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
}

.order-index-address-form .invalid-feedback {
    display: none;
}

.order-index-address-form .invalid-feedback.d-block {
    display: block;
}

.order-index-payment-wrap {
    margin-bottom: 1.25rem;
}

.order-pay-address {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #6c757d;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
}

.order-fps {
    border: 1px solid #e9ecef;
    border-radius: 0.625rem;
    overflow: hidden;
}

.order-fps > .card-header {
    border-bottom: 1px solid #e9ecef;
}

.order-fps .card-body {
    padding: 1.15rem 1.25rem 1.25rem;
}

.order-fps-account {
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
    background: #f8f9fb;
    border: 1px solid #eef0f2;
    border-radius: 0.5rem;
}

.order-fps-kicker {
    margin-bottom: 0.45rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6c757d;
    letter-spacing: 0.02em;
}

.order-fps-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.85rem;
    margin-bottom: 0.55rem;
}

.order-fps-number {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.03em;
    color: #212529;
    font-variant-numeric: tabular-nums;
}

.order-fps-copy {
    flex: none;
}

.order-fps-note {
    font-size: 0.9375rem;
    color: #495057;
    line-height: 1.5;
}

.order-fps-warn {
    font-size: 0.875rem;
    color: #b02a37;
}

.order-fps-rules {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
}

.order-fps-rules-text {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #6c757d;
    max-width: 40rem;
}

.transaction-details-md {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #212529;
}

.transaction-details-md h1,
.transaction-details-md h2,
.transaction-details-md h3 {
    font-weight: 600;
    line-height: 1.35;
    margin-top: 1.15rem;
    margin-bottom: 0.5rem;
}

.transaction-details-md h1 {
    font-size: 1.35rem;
    margin-top: 0;
}

.transaction-details-md h2 {
    font-size: 1.1rem;
}

.transaction-details-md h3 {
    font-size: 1rem;
}

.transaction-details-md p,
.transaction-details-md ul,
.transaction-details-md ol {
    margin-bottom: 0.75rem;
}

.transaction-details-md ul,
.transaction-details-md ol {
    padding-left: 1.25rem;
}

.transaction-details-md li + li {
    margin-top: 0.2rem;
}

@media (max-width: 575.98px) {
    .order-fps-number {
        font-size: 1.35rem;
    }
}

/* —— Order / Pay：付款步驟 —— */
.order-pay-page {
    max-width: 1100px;
}

.order-pay-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.order-pay-kicker {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--site-text-muted, #6c757d);
}

.order-pay-title {
    color: var(--site-text, #1a1a1a);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.order-pay-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 1.25rem 1.5rem;
    align-items: start;
    margin-top: 1.25rem;
}

.order-pay-panel {
    padding: 1.15rem 1.25rem;
    margin-bottom: 0.85rem;
    background: var(--site-surface, #fff);
    border: 1px solid var(--site-border, #e9ecef);
    border-radius: 0.75rem;
    box-shadow: 0 1px 0 var(--site-shadow, rgba(0, 0, 0, 0.04));
}

.order-pay-panel-label {
    margin: 0 0 0.65rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--site-text-muted, #6c757d);
}

.order-pay-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.order-pay-panel-head .order-pay-panel-label {
    margin-bottom: 0;
}

.order-pay-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--site-navy, #0b0454);
    text-decoration: none;
}

.order-pay-link:hover {
    text-decoration: underline;
}

.order-pay-amount-value {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--site-text, #1a1a1a);
    font-variant-numeric: tabular-nums;
}

.order-pay-ship-text {
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--site-text, #1a1a1a);
}

.order-pay-method {
    padding-top: 1.75rem;
    padding-bottom: 1.75rem;
    margin-top: 0.35rem;
    margin-bottom: 1.25rem;
}

/* 覆蓋 Bootstrap .btn 預設色，避免灰底／藍底與 accent 混色 */
.order-pay-cta.btn {
    --order-pay-cta-bg: var(--site-accent, #c52d2f);
    --order-pay-cta-bg-hover: color-mix(in srgb, var(--site-accent, #c52d2f) 88%, #000);
    --order-pay-cta-bg-active: color-mix(in srgb, var(--site-accent, #c52d2f) 78%, #000);
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--order-pay-cta-bg);
    --bs-btn-border-color: var(--order-pay-cta-bg);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--order-pay-cta-bg-hover);
    --bs-btn-hover-border-color: var(--order-pay-cta-bg-hover);
    --bs-btn-focus-shadow-rgb: 197, 45, 47;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--order-pay-cta-bg-active);
    --bs-btn-active-border-color: var(--order-pay-cta-bg-active);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--order-pay-cta-bg);
    --bs-btn-disabled-border-color: var(--order-pay-cta-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 5.75rem;
    padding: 1.65rem 1.85rem;
    margin: 0.35rem 0;
    font-size: clamp(1.35rem, 3.6vw, 1.75rem);
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.15;
    color: #fff;
    background-color: var(--order-pay-cta-bg);
    background-image: none;
    border: 2px solid var(--order-pay-cta-bg);
    border-radius: 0.75rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.order-pay-cta.btn:hover:not(:disabled),
.order-pay-cta.btn:focus-visible:not(:disabled) {
    color: #fff;
    background-color: var(--order-pay-cta-bg-hover);
    background-image: none;
    border-color: var(--order-pay-cta-bg-hover);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.order-pay-cta.btn:active:not(:disabled) {
    color: #fff;
    background-color: var(--order-pay-cta-bg-active);
    background-image: none;
    border-color: var(--order-pay-cta-bg-active);
    transform: translateY(1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}

.order-pay-cta.btn:disabled,
.order-pay-cta.btn.is-loading {
    color: #fff;
    background-color: var(--order-pay-cta-bg);
    background-image: none;
    border-color: var(--order-pay-cta-bg);
    opacity: 0.78;
    cursor: wait;
    box-shadow: none;
}

.order-pay-cta-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
}

.order-pay-cta-text {
    color: inherit;
}

.order-pay-cta-sec {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.35rem;
    height: 2.35rem;
    padding: 0 0.45rem;
    font-size: 1.15em;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    color: var(--order-pay-cta-bg, var(--site-accent, #c52d2f));
    background-color: #fff;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

/* Dark theme：btn-warning 黃底深字 */
[data-appearance="dark"] .order-pay-cta.btn.btn-warning,
.order-pay-cta.btn.btn-warning {
    --order-pay-cta-bg: var(--bs-warning, #ffc107);
    --order-pay-cta-bg-hover: color-mix(in srgb, var(--bs-warning, #ffc107) 88%, #000);
    --order-pay-cta-bg-active: color-mix(in srgb, var(--bs-warning, #ffc107) 78%, #000);
    --bs-btn-color: #212529;
    --bs-btn-hover-color: #212529;
    --bs-btn-active-color: #212529;
    --bs-btn-disabled-color: #212529;
    --bs-btn-focus-shadow-rgb: 255, 193, 7;
    color: #212529;
}

[data-appearance="dark"] .order-pay-cta.btn.btn-warning .order-pay-cta-sec,
.order-pay-cta.btn.btn-warning .order-pay-cta-sec {
    color: #212529;
    background-color: #fff;
}

.order-pay-auto-hint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.15rem 0.25rem;
    margin-top: 1rem !important;
    font-size: 0.8125rem;
    color: var(--site-text-muted, #6c757d);
}

.order-pay-cancel-auto {
    font-weight: 600;
    color: var(--site-navy, #0b0454);
    text-decoration: none;
    vertical-align: baseline;
}

.order-pay-cancel-auto:hover {
    text-decoration: underline;
}

.order-pay-empty {
    font-size: 0.9375rem;
    color: var(--site-text-muted, #6c757d);
}

.order-pay-aside .order-list-card {
    margin-bottom: 0;
}

.order-pay-personal .order-fps {
    margin-bottom: 0;
    box-shadow: none;
}

@media (max-width: 991.98px) {
    .order-pay-grid {
        grid-template-columns: 1fr;
    }

    .order-pay-aside {
        order: 2;
    }
}

@media (prefers-reduced-motion: reduce) {
    .order-pay-cta {
        transition: none;
    }
}
