﻿/* ================= ROOT / PALETTE ================= */
:root {
    --primary: #2563eb;
    --primary-soft: #eff6ff;
    --danger: #ef4444;
    --success: #16a34a;
    --warning: #f59e0b;
    --surface: #ffffff;
    --surface-soft: #f9fafb;
    --border: #e5e7eb;
    --border-strong: #d1d5db;
    --text-main: #111827;
    --text-muted: #6b7280;
    --radius-lg: 16px;
    --shadow-soft: 0 12px 24px rgba(15, 23, 42, 0.06);
}

/* ================= ROOT WRAP + HEADER ================= */
.anvu-ck-root {
    max-width: 100%;
    margin: 0px auto ;
    padding: 5px 12px 32px;
    background: #FFF;
    border-radius: 24px;
}

.anvu-ck-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.anvu-ck-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

    .anvu-ck-back-link i {
        font-size: 12px;
    }

/* Stepper */
.anvu-ck-stepper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.anvu-ck-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.7);
    border: 1px solid transparent;
}

    .anvu-ck-step .dot {
        width: 28px;
        height: 28px;
        border-radius: 999px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #e5e7eb;
        color: #4b5563;
        font-size: 14px;
    }

    .anvu-ck-step .info {
        display: flex;
        flex-direction: column;
    }

    .anvu-ck-step .label {
        font-size: 11px;
        color: #9ca3af;
    }

    .anvu-ck-step .title {
        font-size: 13px;
        font-weight: 700;
        color: #111827;
    }

    .anvu-ck-step.active {
        border-color: #9ca3af
    }

        .anvu-ck-step.active .dot {
            color: #fff;
        }

@media (max-width: 768px) {
    .anvu-ck-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .anvu-ck-stepper {
        width: 100%;
        justify-content: space-between;
    }

    .anvu-ck-step .title {
        display: none; /* mobile only label */
    }
}

/* ================= GRID ================= */
.anvu-cart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.9fr);
    gap: 16px;
    align-items: start;
}

@media (max-width: 992px) {
    .anvu-cart-grid {
        grid-template-columns: 1fr;
    }
}

/* ================= LEFT CARD BASE ================= */
.anvu-card,
.anvu-ck-block {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

/* cart list */
.anvu-cart-left {
    padding: 0;
}

/* top bar chọn tất cả */
.anvu-cart-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.anvu-checkall {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--text-main);
    font-size: 14px;
}

    .anvu-checkall input {
        width: 18px;
        height: 18px;
        accent-color: var(--danger);
    }

.anvu-trash {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 0;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}

    .anvu-trash i {
        color: #94a3b8;
    }

    .anvu-trash:hover {
        background: #fee2e2;
        transform: translateY(-1px);
    }

.anvu-cart-items {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ================= ITEM ================= */
.anvu-item {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 32px 84px minmax(0, 1fr) 140px 130px 40px;
    gap: 12px;
    align-items: start;
    background: #fff;
}

    .anvu-item:hover {
        border-color: var(--border-strong);
        box-shadow: 0 6px 12px rgba(15,23,42,.04);
    }

@media (max-width: 992px) {
    .anvu-item {
        grid-template-columns: 28px 84px minmax(0, 1fr);
        grid-template-areas:
            "ck img info"
            "ck img price"
            "ck img qty"
            "ck img promo"
            "ck img del";
    }

    .anvu-item-price {
        grid-area: price;
        text-align: left;
    }

    .anvu-item-qty {
        grid-area: qty;
        justify-content: flex-start;
    }

    .anvu-item-promo-row {
        grid-area: promo;
    }

    .anvu-item-del {
        grid-area: del;
        justify-content: flex-start;
    }
}

.anvu-item-check {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 6px;
}

    .anvu-item-check input {
        width: 18px;
        height: 18px;
        accent-color: var(--danger);
    }

.anvu-item-img {
    width: 84px;
    height: 84px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .anvu-item-img img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.anvu-item-name {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.anvu-item-variant {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #f9fafb;
    font-size: 13px;
    cursor: pointer;
}

    .anvu-item-variant i {
        font-size: 11px;
        color: #9ca3af;
    }

.anvu-item-price {
    text-align: right;
    padding-top: 4px;
    white-space: nowrap;
}

.anvu-price-new {
    color: var(--danger);
    font-weight: 800;
    font-size: 16px;
}

.anvu-price-old {
    margin-top: 4px;
    font-size: 13px;
    text-decoration: line-through;
    color: #9ca3af;
}

/* qty */
.anvu-item-qty {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-top: 4px;
}

.anvu-qty {
    display: inline-flex;
    border-radius: 999px;
    border: 1px solid var(--border);
    overflow: hidden;
}

    .anvu-qty button {
        width: 32px;
        height: 32px;
        border: 0;
        background: #fff;
        cursor: pointer;
        font-weight: 800;
    }

    .anvu-qty input {
        width: 44px;
        height: 32px;
        border: 0;
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
        text-align: center;
        font-weight: 700;
    }

/* delete */
.anvu-item-del {
    display: flex;
    justify-content: flex-end;
    padding-top: 2px;
}

.anvu-del-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 0;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

    .anvu-del-btn i {
        color: #9ca3af;
    }

    .anvu-del-btn:hover {
        background: #fee2e2;
        color: var(--danger);
    }

/* promo row */
.anvu-item-promo-row {
    grid-column: 3 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 6px;
}

@media (max-width: 992px) {
    .anvu-item-promo-row {
        grid-column: auto;
    }
}

.anvu-promo-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

    .anvu-promo-toggle i:first-child {
        color: #f97316;
    }

.anvu-promo-panel {
    width: 100%;
    margin-top: 4px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    padding: 8px 10px;
}

/* ================= BLOCK HEADS LEFT ================= */
.anvu-ck-block {
    padding: 14px 16px 16px;
    margin-bottom: 12px;
}

.anvu-ck-block-head {
    margin-bottom: 10px;
}

.anvu-ck-block-title {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
}

    .anvu-ck-block-title i {
        width: 28px;
        height: 28px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #eff6ff;
        color: var(--primary);
        font-size: 14px;
    }

/* delivery radio pills */
.anvu-ck-delivery-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.anvu-ck-radio-pill span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
}

.anvu-ck-radio-pill input:checked + span {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
}

/* ================= PAYMENT LIST ================= */
.anvu-ck-paylist {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.anvu-ck-paybox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    transition: border .15s, box-shadow .15s, background .15s;
}

.anvu-ck-payitem input:checked + .anvu-ck-paybox {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(37,99,235,.12);
}

.anvu-ck-payicon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

    .anvu-ck-payicon.cod {
        background: #0ea5e9;
    }

    .anvu-ck-payicon.qr {
        background: #22c55e;
    }

    .anvu-ck-payicon.atm {
        background: #6366f1;
    }

    .anvu-ck-payicon.credit {
        background: #f97316;
    }

    .anvu-ck-payicon.momo {
        background: #ec4899;
    }

    .anvu-ck-payicon.installment {
        background: #7c3aed;
    }

.anvu-ck-paytext .t {
    font-weight: 700;
    font-size: 14px;
}

.anvu-ck-paytext .s {
    font-size: 12px;
    color: var(--text-muted);
}

/* ================= RIGHT SUMMARY ================= */
.anvu-ck-right {
    position: sticky;
    top: 5px;
    align-self: flex-start;
}

@media (max-width: 992px) {
    .anvu-ck-right {
        position: static;
        top: auto;
    }
}

.anvu-order-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    padding: 14px 16px 16px;
}

.anvu-order-title {
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 800;
}

    .anvu-order-title i {
        width: 30px;
        height: 30px;
        border-radius: 999px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #eef2ff;
        color: var(--primary);
    }

.anvu-order-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

.anvu-ol {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .anvu-ol.sm {
        font-size: 13px;
        color: var(--text-muted);
    }

    .anvu-ol.total {
        padding-top: 6px;
        border-top: 1px solid var(--border);
        margin-top: 4px;
    }

.anvu-pay {
    color: var(--danger);
    font-size: 18px;
    font-weight: 800;
}

.anvu-order-btn {
    margin-top: 14px;
    width: 100%;
    height: 50px;
    border-radius: 999px;
    border: 0;
    background: linear-gradient(90deg, #ef4444, #f97316);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}

    .anvu-order-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 20px rgba(220,38,38,.35);
    }

.anvu-order-note {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}
/* FORCE STYLE CHO INPUT/SELECT/TEXTAREA TRONG CHECKOUT */
.anvu-ck-block input.anvu-ck-input,
.anvu-ck-block select.anvu-ck-input,
.anvu-ck-block textarea.anvu-ck-input {
    width: 100%;
    border-radius: 10px !important;
    border: 1px solid #e5e7eb !important;
    padding: 9px 10px !important;
    font-size: 14px;
    outline: none;
    background-color: #ffffff;
    box-shadow: none !important;
    box-sizing: border-box;
}

    /* Hiệu ứng focus đẹp, đè luôn Bootstrap */
    .anvu-ck-block input.anvu-ck-input:focus,
    .anvu-ck-block select.anvu-ck-input:focus,
    .anvu-ck-block textarea.anvu-ck-input:focus {
        border-color: #93c5fd !important;
        box-shadow: 0 0 0 2px rgba(59,130,246,0.25) !important;
    }

/* Textarea – chiều cao & resize */
.anvu-ck-note {
    min-height: 80px;
    resize: vertical;
}

/* Hàng địa chỉ: giữ layout đẹp */
.anvu-ck-addr-row {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.anvu-ck-addr-select {
    flex: 0 0 220px;
    max-width: 100%;
}

.anvu-ck-addr-street {
    flex: 1 1 auto;
    min-width: 0;
}

@media (max-width: 768px) {
    .anvu-ck-addr-row {
        flex-direction: column;
    }

    .anvu-ck-addr-select {
        flex: 1 1 auto;
    }
}
/* =====================
   MÃ GIẢM GIÁ TRONG BOX ĐƠN HÀNG
   ===================== */

.anvu-order-card .anvu-coupon {
    padding-top: 10px;
    margin-top: 6px;
    border-top: 1px solid var(--border);
}

.anvu-order-card .anvu-coupon-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 8px;
    color: #111827;
}

    .anvu-order-card .anvu-coupon-label i {
        color: var(--red);
    }

/* Hàng input + button */
.anvu-order-card .anvu-coupon-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* INPUT – ĐÈ MỌI STYLE KHÁC */
.anvu-order-card .anvu-coupon-input {
    flex: 1 1 auto;
    height: 38px;
    padding: 0 10px;
    border-radius: 10px !important;
    border: 1px solid #e5e7eb !important;
    font-size: 14px;
    outline: none;
    box-shadow: none !important;
    background-color: #ffffff;
    box-sizing: border-box;
}

    .anvu-order-card .anvu-coupon-input:focus {
        border-color: #93c5fd !important;
        box-shadow: 0 0 0 2px rgba(59,130,246,.2) !important;
    }

/* BUTTON */
.anvu-order-card .anvu-coupon-btn {
    flex: 0 0 auto;
    height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    border: 0;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(90deg,#fb923c,#f97316);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

    .anvu-order-card .anvu-coupon-btn:hover {
        filter: brightness(1.05);
    }
.anvu-order-card .anvu-coupon {
    padding-top: 10px;
    margin-top: 6px;
    border-top: 1px solid var(--border);
}

.anvu-order-card .anvu-coupon-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 8px;
    color: #111827;
}

.anvu-order-card .anvu-coupon-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.anvu-order-card .anvu-coupon-input {
    flex: 1 1 auto;
    height: 38px;
    padding: 0 10px;
    border-radius: 10px !important;
    border: 1px solid #e5e7eb !important;
    font-size: 14px;
    outline: none;
    box-shadow: none !important;
    background-color: #ffffff;
    box-sizing: border-box;
}

    .anvu-order-card .anvu-coupon-input:focus {
        border-color: #93c5fd !important;
        box-shadow: 0 0 0 2px rgba(59,130,246,.2) !important;
    }

.anvu-order-card .anvu-coupon-btn {
    flex: 0 0 auto;
    height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    border: 0;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(90deg,#fb923c,#f97316);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
/* ===== NGƯỜI ĐẶT HÀNG – FORM ===== */

/* Giữ layout dạng cột + tạo khoảng thở trên dưới */
.anvu-ck-form {
    display: flex;
    flex-direction: column;
    gap: 10px; /* khoảng cách giữa các ô */
    padding-top: 8px;
}

    /* Style riêng cho input trong block này */
    .anvu-ck-form .anvu-ck-input {
        display: block;
        width: 100%;
        height: 44px;
        padding: 10px 12px;
        border-radius: 12px; /* mỗi ô là 1 “pill” riêng, không dính nhau */
        border: 1px solid #e5e7eb;
        font-size: 14px;
        outline: none;
        background-color: #fff;
        box-shadow: none;
    }

        /* Nếu browser / bootstrap vẫn đè border-radius, rule này đảm bảo tách ô */
        .anvu-ck-form .anvu-ck-input + .anvu-ck-input {
            margin-top: 8px; /* khoảng cách dọc bổ sung */
        }

        /* Hiệu ứng focus */
        .anvu-ck-form .anvu-ck-input:focus {
            border-color: #93c5fd;
            box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
        }
/* ===== PHƯƠNG THỨC THANH TOÁN – RADIO PILL ===== */

.anvu-ck-paylist {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

/* Mỗi phương thức là 1 label bao cả card */
.anvu-ck-payitem {
    position: relative;
    display: block;
    cursor: pointer;
}

    /* ẨN HOÀN TOÀN NÚT RADIO GỐC */
    .anvu-ck-payitem > input[type="radio"] {
        position: absolute;
        inset: 0; /* trải kín label để vẫn nhận focus/checked */
        opacity: 0;
        pointer-events: none;
        margin: 0;
    }

/* Card hiển thị cho từng phương thức */
.anvu-ck-paybox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease, transform .1s ease;
}

/* Icon bên trái (có thể là img hoặc font icon) */
.anvu-ck-payicon {
    flex: 0 0 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5f0ff; /* màu nền nhẹ cho icon */
    font-size: 20px;
    color: #1d4ed8;
    overflow: hidden;
}

    .anvu-ck-payicon img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Text tiêu đề + mô tả */
.anvu-ck-paytext .t {
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
}

.anvu-ck-paytext .s {
    font-size: 12px;
    color: #6b7280;
}

/* Hover nhẹ để biết là click được */
.anvu-ck-payitem:hover .anvu-ck-paybox {
    border-color: #c4d4ff;
    background: #f3f6ff;
}

/* TRẠNG THÁI ĐƯỢC CHỌN – THAY CHO CHẤM TRÒN RADIO */
.anvu-ck-payitem > input[type="radio"]:checked + .anvu-ck-paybox {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
    transform: translateY(-1px);
}

    /* Có thể nhấn mạnh icon khi chọn */
    .anvu-ck-payitem > input[type="radio"]:checked + .anvu-ck-paybox .anvu-ck-payicon {
        background: #2563eb;
        color: #fff;
    }
/* Tiêu đề block hóa đơn: icon + text */
.anvu-ck-inline-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.anvu-ck-inline-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.anvu-ck-inline-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #2563eb;
    font-size: 16px;
}

/* Form hóa đơn – giống block Người đặt hàng */
.anvu-ck-invoice {
    display: flex;
    flex-direction: column;
    gap: 8px; /* KHOẢNG CÁCH GIỮA CÁC TEXTBOX */
    margin-top: 4px;
}

/* Nhóm input (dùng chung cho cả Người đặt hàng + Hóa đơn) */
.anvu-ck-input-group {
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

    .anvu-ck-input-group .anvu-ck-input {
        border: none; /* bỏ border cũ */
        border-radius: 0; /* bo tròn do group lo */
        background: transparent;
        padding: 10px 12px;
    }

        .anvu-ck-input-group .anvu-ck-input:focus {
            outline: none;
            box-shadow: none;
        }
/* ====== TOGGLE SWITCH (kiểu Bootstrap) ====== */
.anvu-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    /* để click vùng rộng hơn một chút */
    padding: 2px;
}

    /* Ẩn checkbox gốc nhưng vẫn focus được */
    .anvu-switch input {
        position: absolute;
        opacity: 0;
        inset: 0;
        margin: 0;
        cursor: pointer;
    }

/* Track */
.anvu-switch-slider {
    position: relative;
    width: 42px;
    height: 22px;
    border-radius: 999px;
    background-color: #e5e7eb; /* xám nhạt */
    transition: background-color .18s ease, box-shadow .18s ease;
    box-shadow: 0 0 0 1px rgba(15,23,42,.04);
}

    /* Nút tròn */
    .anvu-switch-slider::before {
        content: "";
        position: absolute;
        top: 2px;
        left: 2px;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background-color: #fff;
        box-shadow: 0 1px 2px rgba(15,23,42,.15);
        transition: transform .18s ease;
    }

/* Trạng thái ON */
.anvu-switch input:checked + .anvu-switch-slider {
    background: linear-gradient(90deg, #22c55e, #16a34a); /* xanh kiểu bootstrap success */
    box-shadow: 0 0 0 1px rgba(22,163,74,.25);
}

    .anvu-switch input:checked + .anvu-switch-slider::before {
        transform: translateX(20px);
    }

/* Hover */
.anvu-switch:hover .anvu-switch-slider {
    box-shadow: 0 0 0 2px rgba(37,99,235,.12);
}

/* Focus (tab vào) */
.anvu-switch input:focus-visible + .anvu-switch-slider {
    box-shadow: 0 0 0 3px rgba(37,99,235,.3);
    outline: none;
}

/* Disabled */
.anvu-switch input:disabled + .anvu-switch-slider {
    cursor: not-allowed;
    background-color: #e5e7eb;
    opacity: .65;
}

    .anvu-switch input:disabled + .anvu-switch-slider::before {
        box-shadow: none;
    }
/* Compact promo panel for small areas */
.anvu-promo-panel {
    --bd: #e9ecef;
    --txt: #212529;
    --muted: #6c757d;
    --bg: #fff;
    --bg-hover: rgba(13,110,253,.05);
    --accent: #0d6efd;
    background: var(--bg);
    color: var(--txt);
    border: 1px solid var(--bd);
    border-radius: .5rem;
    overflow: hidden;
}

    /* No big header, just a thin accent line like a compact card */
    .anvu-promo-panel::before {
        content: "";
        display: block;
        height: 3px;
        background: var(--accent);
    }

    /* Reset list */
    .anvu-promo-panel > ul {
        list-style: none;
        margin: 0;
        padding: .25rem 0;
    }

        /* Items compact */
        .anvu-promo-panel > ul > li {
            position: relative;
            padding: .45rem .6rem .45rem 1.4rem; /* compact */
            font-size: .875rem; /* bootstrap small-ish */
            line-height: 1.3;
            border-top: 1px solid var(--bd);
            background: transparent;
        }

            /* Remove top border on first item */
            .anvu-promo-panel > ul > li:first-child {
                border-top: 0;
            }

            /* Small dot bullet */
            .anvu-promo-panel > ul > li::before {
                content: "";
                position: absolute;
                left: .6rem;
                top: .85rem;
                width: .4rem;
                height: .4rem;
                border-radius: 999px;
                background: var(--accent);
                opacity: .9;
            }

            /* Subtle hover (optional) */
            .anvu-promo-panel > ul > li:hover {
                background: var(--bg-hover);
            }

    /* Remove excessive &nbsp; spacing if any slips through */
    .anvu-promo-panel li {
        white-space: normal;
    }

/* Extra compact on very small width */
@media (max-width: 420px) {
    .anvu-promo-panel > ul > li {
        padding: .4rem .55rem .4rem 1.3rem;
        font-size: .84rem;
    }

        .anvu-promo-panel > ul > li::before {
            left: .55rem;
            top: .78rem;
        }
}
.anvu-promo-panel > ul > li {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Professional style cho khối tóm tắt địa chỉ */
#ckAddrSummary.anvu-ck-addr-summary {

    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 680px;
    padding: 12px 14px;
    border-radius: 12px;
    font: 500 14px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    letter-spacing: 0.1px;
    word-break: break-word;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

    /* Dot accent bên trái */
    #ckAddrSummary.anvu-ck-addr-summary::before {
        content: "";
        flex: 0 0 auto;
        width: 10px;
        height: 10px;
        margin-top: 6px;
        border-radius: 999px;
        background: var(--addr-accent);
        box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
    }

    /* Hover/focus nhìn “interactive” hơn */
    #ckAddrSummary.anvu-ck-addr-summary:hover,
    #ckAddrSummary.anvu-ck-addr-summary:focus-visible {
        border-color: #7dd3fc;
        box-shadow: 0 2px 6px rgba(14, 165, 233, 0.15), 0 12px 30px rgba(2, 132, 199, 0.10);
        transform: translateY(-1px);
        outline: none;
    }

/* Mobile tinh gọn */
@media (max-width: 640px) {
    #ckAddrSummary.anvu-ck-addr-summary {
        padding: 10px 12px;
        font-size: 13.5px;
        line-height: 1.5;
        border-radius: 10px;
    }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    #ckAddrSummary.anvu-ck-addr-summary {
        --addr-bg: #0b1220;
        --addr-bg-soft: #111a2b;
        --addr-text: #e2e8f0;
        --addr-border: #253047;
        --addr-accent: #38bdf8;
        --addr-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 30px rgba(0, 0, 0, 0.25);
    }
}
/* Top checkout area */
.anvu-ck-top {
    --ck-accent: #0ea5e9;
    --ck-text: #0f172a;
    --ck-muted: #475569;
    --ck-border: #e2e8f0;
    --ck-bg: #ffffff;
    --ck-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.04);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 0 14px;
    margin-bottom: 12px;
}

/* ===== ĐỊA CHỈ ĐÃ LƯU ===== */

.anvu-addr-book-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.anvu-addr-book-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.anvu-addr-book-icon {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #eff6ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    flex-shrink: 0;
}

    .anvu-addr-book-icon i {
        font-size: 13px;
    }

/* nút Thêm địa chỉ mới */
.anvu-addr-add-btn {
    border-radius: 999px;
    border: 1px dashed #cbd5f5;
    background: #f9fafb;
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
    cursor: pointer;
}

    .anvu-addr-add-btn i {
        font-size: 12px;
    }

    .anvu-addr-add-btn:hover {
        background: #eff6ff;
    }

/* danh sách */
.anvu-addr-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* mỗi item là 1 label bọc radio */
.anvu-addr-item {
    display: block;
    cursor: pointer;
    position: relative;
}

    /* ẩn radio gốc */
    .anvu-addr-item input[type="radio"] {
        position: absolute;
        inset: 0;
        opacity: 0;
        margin: 0;
        cursor: pointer;
    }

/* card địa chỉ */
.anvu-addr-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--border2);
    background: #f9fafb;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

/* vòng tròn radio custom */
.anvu-addr-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #cbd5f5;
    margin-top: 4px;
    position: relative;
    flex-shrink: 0;
    background: #fff;
}

    .anvu-addr-radio::after {
        content: "";
        position: absolute;
        inset: 2px;
        border-radius: 50%;
        background: #2563eb;
        transform: scale(0);
        transition: transform .16s ease-out;
    }

/* nội dung bên phải */
.anvu-addr-main {
    min-width: 0;
    flex: 1;
}

.anvu-addr-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.anvu-addr-name-phone {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

    .anvu-addr-name-phone .p {
        font-weight: 600;
        color: #4b5563;
    }

    .anvu-addr-name-phone .sep {
        color: #9ca3af;
    }

.anvu-addr-tag {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

    .anvu-addr-tag i {
        font-size: 11px;
    }

    .anvu-addr-tag.default {
        background: #fef3c7;
        color: #b45309;
    }

    .anvu-addr-tag.work {
        background: #e0f2fe;
        color: #0369a1;
    }

.anvu-addr-line {
    font-size: 13px;
    color: #374151;
    margin-bottom: 4px;
}

.anvu-addr-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
}

    .anvu-addr-meta .type i {
        margin-right: 4px;
    }

/* nút sửa / xoá */
.anvu-addr-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .anvu-addr-actions .dot {
        color: #d1d5db;
    }

.anvu-addr-link {
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    color: #2563eb;
    cursor: pointer;
}

    .anvu-addr-link.danger {
        color: #ef4444;
    }

/* hover tổng thể card */
.anvu-addr-item:hover .anvu-addr-card {
    border-color: #c4d4ff;
    background: #f3f4ff;
}

/* trạng thái checked */
.anvu-addr-item input[type="radio"]:checked + .anvu-addr-card {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(37,99,235,.15);
}

    .anvu-addr-item input[type="radio"]:checked + .anvu-addr-card .anvu-addr-radio {
        border-color: transparent;
        background: #e0ecff;
    }

        .anvu-addr-item input[type="radio"]:checked + .anvu-addr-card .anvu-addr-radio::after {
            transform: scale(1);
        }

/* mobile */
@media (max-width: 768px) {
    .anvu-addr-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}


.anvu-item {
    position: relative;
}

.anvu-item-check {
    position: relative;
    z-index: 50;
}

    .anvu-item-check input {
        pointer-events: auto;
    }