/* Giỏ hàng, thanh toán, tài khoản khách (client-assets/js/store.js). Màu theo biến của theme. */
[hidden] { display: none !important; }

.store-toast {
    position: fixed; right: 16px; bottom: 16px; z-index: 100000; max-width: calc(100vw - 32px);
    display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 8px;
    background: #222; color: #fff; font-size: .95rem; box-shadow: 0 6px 24px rgba(0,0,0,.2);
    opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.store-toast.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.store-toast--success { background: #1f7a3a; }
.store-toast--error { background: var(--fs-color-alert, #e3262c); }
.store-toast a { color: #fff; text-decoration: underline; font-weight: 600; white-space: nowrap; }

.store-notice { margin: 0 0 16px; padding: 10px 14px; border-radius: 6px; font-size: .95rem; }
.store-notice--error { background: #fdecec; color: #a51b1f; border: 1px solid #f5c2c4; }
.store-notice--success { background: #eaf6ee; color: #1f6b35; border: 1px solid #bfe3c9; }
.store-field-error { display: block; margin-top: 4px; color: #c62828; font-size: .85rem; }
input.store-invalid, textarea.store-invalid, select.store-invalid { border-color: #c62828 !important; }
.store-note { color: #777; font-size: .85rem; margin: 8px 0; }
.store-warn { color: #c62828; font-size: .85rem; margin-top: 4px; }
.store-muted { color: #888; font-size: .85rem; }
.store-variant { color: #777; font-size: .85rem; }

/* Trang sản phẩm */
.store-option-group { margin-bottom: 12px; }
.store-option-label { font-weight: 600; font-size: .9rem; margin-bottom: 6px; text-transform: uppercase; }
.store-option-values { display: flex; flex-wrap: wrap; gap: 8px; }
.store-option {
    display: inline-flex; align-items: center; gap: 6px; margin: 0; min-height: 38px; padding: 6px 12px;
    border: 1px solid #ddd; border-radius: 6px; background: #fff; color: #333; font-size: .9rem;
    font-weight: 400; line-height: 1.3; text-transform: none; letter-spacing: 0; cursor: pointer;
}
.store-option:hover { border-color: var(--fs-color-primary, #e3262c); }
.store-option.is-selected { border-color: var(--fs-color-primary, #e3262c); color: var(--fs-color-primary, #e3262c); box-shadow: inset 0 0 0 1px var(--fs-color-primary, #e3262c); }
.store-swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.store-price-old { color: #888; font-size: 1.1rem; margin-right: 8px; }
.store-price-now { color: #d21d1d; font-size: 1.6rem; font-weight: 700; text-decoration: none; }
.store-price-badge { margin-left: 8px; padding: 2px 6px; border-radius: 4px; background: #d21d1d; color: #fff; font-size: .85rem; }
.store-stock { display: block; margin: 0 0 12px; color: #1f7a3a; font-size: .9rem; }
.store-stock.is-out { color: #c62828; font-weight: 600; }
.store-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store-actions .button { height: 42px; line-height: 42px; margin: 0; padding: 0 20px; }
.store-actions .button[disabled] { opacity: .5; cursor: not-allowed; }
.store-actions .quantity-input input { height: 42px; margin: 0; max-width: 90px; }

/* Giỏ hàng */
.store-qty { display: inline-flex; align-items: center; }
.store-qty .button { margin: 0; min-width: 32px; height: 36px; padding: 0 8px; }
.store-qty input { width: 52px; height: 36px; margin: 0; text-align: center; }
.cart_item.is-unavailable td { opacity: .6; }
.cart_item.is-unavailable .product-remove { opacity: 1; }
.store-mini-cart .woocommerce-mini-cart { list-style: none; margin: 0 0 10px; padding: 0; max-height: 320px; overflow: auto; }
.store-mini-cart .mini_cart_item { display: block; padding: 8px 0; border-bottom: 1px solid #eee; text-align: left; }
.store-mini-cart .mini_cart_item a { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.store-mini-cart .mini_cart_item img { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; flex: none; }
.store-mini-cart .quantity { display: block; color: #777; font-size: .85rem; margin-top: 2px; }
.store-mini-cart .buttons { display: flex; gap: 8px; }
.store-mini-cart .buttons .button { flex: 1; margin: 0; }
.store-mini-cart .store-more { font-size: .85rem; color: #777; }

/* Thanh toán */
.store-checkout-box { background: #fff; border-radius: 10px; padding: 20px; margin-bottom: 20px; }
.store-payment { list-style: none; margin: 0 0 12px; padding: 0; }
.store-payment li { margin: 0 0 8px; padding: 10px 12px; border: 1px solid #e5e5e5; border-radius: 6px; }
.store-payment label { display: flex; gap: 8px; align-items: center; margin: 0; font-weight: 600; cursor: pointer; }
.store-payment input { margin: 0; }
.store-payment .store-note { font-weight: 400; margin: 6px 0 0 24px; }
.store-voucher { display: flex; gap: 8px; }
.store-voucher input { margin: 0; }
.store-voucher .button { margin: 0; white-space: nowrap; }
.store-voucher-msg { display: block; margin-top: 6px; font-size: .85rem; }
.store-voucher-msg.is-ok { color: #1f7a3a; }
.store-voucher-msg.is-error { color: #c62828; }
.store-done { max-width: 640px; margin: 0 auto; padding: 30px 20px; background: #fff; border-radius: 10px; text-align: center; }
.store-done__icon { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: #1f7a3a; color: #fff; font-size: 34px; line-height: 64px; }
.store-done table { text-align: left; margin: 16px 0; }
.store-done__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.store-done__actions .button { margin: 0; }
.store-bank { text-align: left; background: #f7f7f7; border-radius: 8px; padding: 14px 16px; margin: 12px 0; }
.store-bank p { margin: 0 0 4px; }

/* Đơn hàng */
.store-order { background: #fff; border: 1px solid #eee; border-radius: 10px; padding: 16px; margin: 16px 0; }
.store-order__head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.store-order__meta { display: grid; gap: 4px; font-size: .9rem; margin-bottom: 12px; }
.store-order__totals th { font-weight: 400; }
.store-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #eee; font-size: .8rem; white-space: nowrap; }
.store-badge--pending { background: #fff4e0; color: #9a5b00; }
.store-badge--processing { background: #e6f0ff; color: #1d4fa0; }
.store-badge--completed { background: #e7f6ec; color: #1f6b35; }
.store-badge--cancelled { background: #fdecec; color: #a51b1f; }

/* Tài khoản */
.store-account-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.store-account-nav .button { margin: 0; }
.store-address { border: 1px solid #eee; border-radius: 8px; padding: 12px; margin-bottom: 10px; }
.store-address__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.store-address__actions .button { margin: 0; }

@media (max-width: 549px) {
    .store-actions .button { flex: 1 1 auto; }
    .store-order__head { flex-direction: column; }
}
