/* ============================================================
   FatBear 購物車元件樣式
   ============================================================ */

/* ── Navbar 購物車 Badge ── */
.cart-badge {
    position: absolute;
    top: 8px;
    right: -4px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 8px;
    padding: 0 4px;
}

/* ── Toast 通知 ── */
.cart-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    transition: transform 300ms cubic-bezier(0.4,0,0.2,1), opacity 300ms ease;
}
.cart-toast-enter {
    transform: translateX(120%);
    opacity: 0;
}
.cart-toast-visible {
    transform: translateX(0);
    opacity: 1;
}
.cart-toast-leave {
    transform: translateX(120%);
    opacity: 0;
}
.cart-toast-body {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(20, 20, 35, 0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 14px 18px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    max-width: 380px;
}
.cart-toast-icon {
    color: #2ecc71;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.cart-toast-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.cart-toast-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #ecf0f1;
}
.cart-toast-item {
    font-size: 0.75rem;
    color: #95a5a6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}
.cart-toast-action {
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #f39c12;
    text-decoration: none;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 150ms ease;
}
.cart-toast-action:hover {
    background: rgba(243,156,18,0.12);
    color: #f0a830;
}

/* ── 購物車頁面 ── */
.cart-page-container {
    max-width: 780px;
    margin: 0 auto;
    padding: 40px 24px 64px;
}
.cart-page-header {
    margin-bottom: 24px;
}
.cart-page-header .back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #95a5a6;
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 12px;
    transition: color 150ms ease;
}
.cart-page-header .back-btn:hover { color: #ecf0f1; }
.cart-page-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: #ecf0f1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 4px;
}
.cart-page-title i {
    color: #f39c12;
    font-size: 1.5rem;
}
.cart-count-badge {
    font-size: 0.88rem;
    font-weight: 400;
    color: #95a5a6;
}
.cart-checkout-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ecf0f1;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cart-checkout-title i {
    color: #f39c12;
}

/* 二欄佈局（已棄用）*/
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 28px;
    align-items: start;
}

/* 單欄佈局 */
.cart-single-column {
    max-width: 780px;
    margin: 0 auto;
}

/* 左欄：購物車商品 */
.cart-items-section {
    min-height: 200px;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.cart-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ecf0f1;
}
.cart-count {
    font-size: 0.85rem;
    color: #95a5a6;
    font-weight: 400;
}

.cart-item-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: border-color 200ms ease;
}
.cart-item-row:hover {
    border-color: rgba(255,255,255,0.14);
}
.cart-item-row.cart-item-warning {
    border-color: rgba(231,76,60,0.35);
    opacity: 0.65;
}

.cart-item-img {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}
a.cart-item-img {
    display: block;
    cursor: pointer;
}
.cart-item-name {
    font-size: 1rem;
    font-weight: 600;
    color: #ecf0f1;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}
a.cart-item-name:hover {
    color: #ecf0f1;
}
.cart-item-variant {
    font-size: 0.85rem;
    color: #95a5a6;
}
.cart-item-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    line-height: 1.3;
}
.cart-item-badge.badge-physical {
    background: rgba(52,152,219,0.15);
    color: #5dade2;
    border: 1px solid rgba(52,152,219,0.25);
}
.cart-item-badge.badge-virtual {
    background: rgba(46,204,113,0.12);
    color: #58d68d;
    border: 1px solid rgba(46,204,113,0.2);
}
.cart-item-warning-msg {
    font-size: 0.72rem;
    color: #e74c3c;
    margin-top: 3px;
}

/* 付款模式 badge（per-item） */
.cart-item-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    line-height: 1.3;
    transition: all 150ms ease;
}
.cart-item-mode-badge.mode-cash {
    background: rgba(243,156,18,0.12);
    color: #f0a830;
    border: 1px solid rgba(243,156,18,0.25);
}
.cart-item-mode-badge.mode-cash:hover {
    background: rgba(243,156,18,0.22);
    border-color: rgba(243,156,18,0.4);
}
.cart-item-mode-badge.mode-points {
    background: rgba(251,191,36,0.12);
    color: #FBBF24;
    border: 1px solid rgba(251,191,36,0.25);
}
.cart-item-mode-badge.mode-points:hover {
    background: rgba(251,191,36,0.22);
    border-color: rgba(251,191,36,0.4);
}
.cart-item-mode-badge.mode-cash-only {
    background: rgba(149,165,166,0.1);
    color: #95a5a6;
    border: 1px solid rgba(149,165,166,0.2);
    cursor: default;
}

.cart-item-price {
    font-size: 0.95rem;
    color: #bdc3c7;
    white-space: nowrap;
    min-width: 75px;
    text-align: right;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.cart-item-qty button {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: #bdc3c7;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 150ms ease;
    padding: 0;
    line-height: 1;
}
.cart-item-qty button i {
    line-height: 1;
    display: block;
}
.cart-qty-value {
    min-width: 28px;
    text-align: center;
    font-size: 0.95rem;
    color: #ecf0f1;
    font-weight: 600;
    line-height: 34px;
}
.cart-item-qty button:hover:not(:disabled) {
    background: rgba(255,255,255,0.08);
    color: #ecf0f1;
    border-color: rgba(255,255,255,0.18);
}
.cart-item-qty button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #4a4a4a;
}
.cart-item-qty input {
    width: 38px;
    text-align: center;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #ecf0f1;
    font-size: 0.85rem;
    padding: 3px 0;
    -moz-appearance: textfield;
}
.cart-item-qty input::-webkit-outer-spin-button,
.cart-item-qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-item-subtotal {
    font-size: 1rem;
    font-weight: 600;
    color: #ecf0f1;
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: #95a5a6;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 150ms ease;
    flex-shrink: 0;
}
.cart-item-remove:hover {
    color: #e74c3c;
    background: rgba(231,76,60,0.1);
}

.cart-continue-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    margin-bottom: 8px;
    color: #95a5a6;
    text-decoration: none;
    font-size: 0.84rem;
    transition: color 150ms ease;
    padding: 8px 0;
}
.cart-continue-link:hover { color: #ecf0f1; }
.cart-continue-link i { font-size: 0.78rem; }

/* 空購物車 */
.cart-empty {
    text-align: center;
    padding: 80px 24px;
    color: #95a5a6;
    max-width: 360px;
    margin: 0 auto;
}
.cart-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-empty-icon i {
    font-size: 2rem;
    color: #555;
}
.cart-empty-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #bdc3c7;
    margin-bottom: 8px;
}
.cart-empty p {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 0;
}
.cart-empty-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    padding: 11px 28px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #ecf0f1;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 200ms ease;
}
.cart-empty-link:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.18);
    color: #fff;
}
.cart-empty-link i { color: #f39c12; }

/* 右欄：結帳表單 */
.cart-checkout-section {
    position: sticky;
    top: calc(var(--navbar-height, 56px) + 16px);
}

.cart-checkout-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 26px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-bottom: 14px;
}
.cart-checkout-card:last-child {
    margin-bottom: 0;
}

.cart-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ecf0f1;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cart-card-title i {
    font-size: 0.92rem;
    color: #f39c12;
}

/* 付款模式切換 */
.cart-mode-toggle {
    display: flex;
    background: rgba(0,0,0,0.25);
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 16px;
}
.product-purchase-actions .cart-mode-toggle {
    margin-bottom: 14px;
}
.cart-mode-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 9px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #95a5a6;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 200ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}
.cart-mode-btn.active {
    background: rgba(255,255,255,0.08);
    color: #ecf0f1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.cart-mode-btn:hover:not(.active) {
    color: #bdc3c7;
}

/* 表單欄位 */
.cart-field-group {
    margin-bottom: 16px;
}
.cart-field-group:last-child {
    margin-bottom: 0;
}
.cart-field-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #bdc3c7;
    margin-bottom: 6px;
}
.cart-field-label .required {
    color: #e74c3c;
    margin-left: 2px;
}
.cart-field-input {
    width: 100%;
    padding: 11px 14px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #ecf0f1;
    font-size: 0.95rem;
    transition: border-color 200ms ease;
}
.cart-field-input:focus {
    outline: none;
    border-color: rgba(243,156,18,0.5);
}
.cart-field-input::placeholder { color: #666; }
.cart-field-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2395a5a6' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.cart-field-select option {
    background: #1a1a2e;
    color: #ecf0f1;
}
.cart-field-hint {
    font-size: 0.78rem;
    color: #95a5a6;
    margin-top: 4px;
}
.cart-field-status {
    font-size: 0.82rem;
    margin-top: 6px;
    padding-left: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.cart-field-status i { font-size: 0.72rem; flex-shrink: 0; }
.cart-field-status.status-ok { color: #2ecc71; }
.cart-field-status.status-error { color: #e74c3c; }
.cart-field-status.status-loading { color: #95a5a6; }

/* 物流方式 radio */
.cart-shipping-options {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}
.cart-shipping-option {
    flex: 1;
}
.cart-shipping-option input { display: none; }
.cart-shipping-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 9px 8px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #95a5a6;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 180ms ease;
    text-align: center;
}
.cart-shipping-option input:checked + label {
    border-color: rgba(243,156,18,0.4);
    background: rgba(243,156,18,0.08);
    color: #f0a830;
}
.cart-shipping-option label:hover {
    border-color: rgba(255,255,255,0.18);
    color: #bdc3c7;
}
.cart-shipping-fee-label {
    font-size: 0.68rem;
    display: block;
    margin-top: 2px;
    opacity: 0.8;
}

/* 地址區塊 */
.cart-address-group {
    display: none;
}
.cart-address-group.active {
    display: block;
}
.cart-address-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* 付款明細 */
.cart-summary {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 16px;
    margin-top: 8px;
}
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.95rem;
    color: #bdc3c7;
}
.cart-summary-row.discount { color: #2ecc71; }
.cart-summary-row.shipping { color: #95a5a6; }
.cart-summary-row.total {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 10px;
    padding-top: 14px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ecf0f1;
}
.cart-summary-row.total .summary-value {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.35rem;
}

/* 點數明細 */
.cart-points-summary { margin-top: 12px; }
.cart-points-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 0.85rem;
    color: #bdc3c7;
}
.cart-points-row.balance { color: #FBBF24; }
.cart-points-row.insufficient { color: #e74c3c; }
.cart-points-row.remaining { color: #2ecc71; }

/* 結帳按鈕 */
.cart-checkout-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 200ms ease;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.cart-checkout-btn.cash-btn {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: #fff;
}
.cart-checkout-btn.cash-btn:hover { opacity: 0.9; }
.cart-checkout-btn.points-btn {
    background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
    color: #1a1a2e;
}
.cart-checkout-btn.points-btn:hover { opacity: 0.9; }
.cart-checkout-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* 記住我 & 條款 — 統一樣式 */
.cart-remember,
.cart-terms {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: #95a5a6;
    margin-top: 10px;
}
.cart-remember input[type="checkbox"],
.cart-terms input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: #f39c12;
    cursor: pointer;
}
.cart-remember label,
.cart-terms label {
    cursor: pointer;
    line-height: 1.4;
}
.cart-terms a { color: #f39c12; }

/* 未登入警告區塊 */
.cart-not-logged-notice {
    margin-top: 14px;
    padding: 16px 18px;
    background: rgba(231, 76, 60, 0.06);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: 10px;
}
.cart-not-logged-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 8px;
}
.cart-not-logged-header i {
    font-size: 0.88rem;
}
.cart-not-logged-desc {
    font-size: 0.82rem;
    color: #bdc3c7;
    line-height: 1.5;
    margin: 0 0 12px 0;
}
.cart-not-logged-notice .cart-terms {
    margin-top: 0;
}

/* 登入提示 */
.cart-login-hint {
    text-align: center;
    padding: 16px;
    background: rgba(243,156,18,0.06);
    border: 1px solid rgba(243,156,18,0.15);
    border-radius: 10px;
    margin-top: 12px;
}
.cart-login-hint p {
    font-size: 0.82rem;
    color: #bdc3c7;
    margin-bottom: 8px;
}
.cart-login-hint a {
    color: #f39c12;
    font-weight: 600;
    text-decoration: none;
}

/* 7-11 門市搜尋按鈕 */
.cart-cvs-selected {
    background: rgba(46,204,113,0.08);
    border: 1px solid rgba(46,204,113,0.2);
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 8px;
    font-size: 0.8rem;
    color: #bdc3c7;
}
.cart-cvs-selected strong { color: #ecf0f1; }

/* 優惠碼區塊 */
.cart-code-row {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}
.cart-code-row .cart-field-input { flex: 1; }
.cart-code-validate-btn {
    padding: 9px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #bdc3c7;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 150ms ease;
}
.cart-code-validate-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #ecf0f1;
    border-color: rgba(255,255,255,0.18);
}

/* ── 響應式 ── */
@media (max-width: 960px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
    .cart-checkout-section {
        position: static;
    }
    .cart-single-column {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .cart-page-container { padding: 16px 14px 80px; }
    .cart-page-header { margin-bottom: 14px; }
    .cart-page-title { font-size: 1.35rem; }
    .cart-page-title i { font-size: 1.2rem; }

    /* 商品列：改為 Grid 雙行佈局 */
    .cart-item-row {
        display: grid;
        grid-template-columns: 52px 1fr auto;
        grid-template-rows: auto auto;
        gap: 6px 12px;
        padding: 14px;
        position: relative;
    }
    .cart-item-img {
        width: 52px;
        height: 52px;
        grid-row: 1 / 3;
        grid-column: 1;
        align-self: center;
    }
    .cart-item-info {
        grid-column: 2 / 4;
        grid-row: 1;
        min-width: 0;
        padding-right: 28px; /* 為刪除按鈕留空間 */
    }
    .cart-item-price { display: none; }
    .cart-item-qty {
        grid-column: 2;
        grid-row: 2;
        justify-self: start;
    }
    .cart-item-subtotal {
        grid-column: 3;
        grid-row: 2;
        align-self: center;
        min-width: auto;
        font-size: 0.88rem;
    }
    .cart-item-remove {
        position: absolute;
        top: 12px;
        right: 12px;
        font-size: 0.8rem;
    }
    .cart-address-row { grid-template-columns: 1fr; }
    .cart-shipping-options { flex-direction: column; }
}

@media (max-width: 480px) {
    .cart-page-container { padding: 12px 10px 80px; }
    .cart-item-subtotal { min-width: auto; font-size: 0.82rem; }
}

@media (max-width: 768px) {
    .cart-toast {
        right: 12px;
        left: 12px;
        top: 76px;
    }
    .cart-toast-body {
        max-width: 100%;
        flex-wrap: wrap;
        padding: 14px 16px;
        gap: 8px 12px;
    }
    .cart-toast-text {
        flex: 1 1 0;
        min-width: 0;
    }
    .cart-toast-item {
        white-space: normal;
        max-width: none;
        line-height: 1.4;
    }
    .cart-toast-action {
        width: 100%;
        text-align: center;
        padding: 8px 12px;
        background: rgba(243,156,18,0.1);
        border: 1px solid rgba(243,156,18,0.2);
        border-radius: 8px;
    }
}

/* ── 商品詳情頁按鈕 ── */
.product-purchase-actions {
    margin-top: 24px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: transparent;
    color: #bdc3c7;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 150ms ease;
}
.qty-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #ecf0f1;
    border-color: rgba(255,255,255,0.2);
}
.quantity-selector input[type="number"] {
    width: 50px;
    text-align: center;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #ecf0f1;
    font-size: 0.95rem;
    padding: 6px;
    -moz-appearance: textfield;
}
.quantity-selector input::-webkit-outer-spin-button,
.quantity-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.unit-price-label {
    font-size: 0.85rem;
    color: #95a5a6;
    margin-left: 8px;
}

.action-buttons-row {
    display: flex;
    gap: 10px;
}
.btn-add-to-cart,
.btn-buy-now {
    flex: 1;
    padding: 13px 16px;
    border: none;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 200ms ease;
}
.btn-add-to-cart {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #ecf0f1;
}
.btn-add-to-cart:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}
.btn-buy-now {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: #fff;
}
.btn-buy-now:hover { opacity: 0.9; }
.btn-add-to-cart:disabled,
.btn-buy-now:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 商品頁小計行 */
.item-subtotal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.92rem;
    color: #bdc3c7;
}
.item-subtotal-row span:last-child {
    font-weight: 700;
    color: #ecf0f1;
    font-size: 1.05rem;
}

.points-hint {
    margin-top: 14px;
    font-size: 0.8rem;
    color: #FBBF24;
    background: rgba(251,191,36,0.08);
    border: 1px solid rgba(251,191,36,0.15);
    border-radius: 8px;
    padding: 10px 14px;
}
.points-hint i { margin-right: 6px; }

/* 商品卡片快速加入購物車 → 已移至 shop.css（確保商城首頁可載入） */

/* 確認彈窗 */
.cart-confirm-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.cart-confirm-dialog {
    background: #1a1a2e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 28px;
    max-width: 480px;
    width: 90%;
    color: #ecf0f1;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.cart-confirm-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}
.cart-confirm-body {
    font-size: 0.85rem;
    color: #bdc3c7;
    line-height: 1.7;
    margin-bottom: 20px;
}
.cart-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.cart-confirm-cancel {
    padding: 9px 20px;
    border: 1px solid rgba(255,255,255,0.12);
    background: transparent;
    color: #95a5a6;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 150ms ease;
}
.cart-confirm-cancel:hover { color: #ecf0f1; border-color: rgba(255,255,255,0.2); }
.cart-confirm-ok {
    padding: 9px 20px;
    border: none;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: #fff;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 150ms ease;
}
.cart-confirm-ok:hover { opacity: 0.9; }
