:root {
    --nc-primary: #2563eb;
    --nc-bg: #f8fafc;
    --nc-white: #ffffff;
    --nc-text: #0f172a;
    --nc-text-muted: #64748b;
    --nc-border: #e2e8f0;
    --nc-success: #10b981;
    --nc-error: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}



.nc-checkout-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 40px;
}


.nc-checkout-wrapper button {
    margin: 0;
}

/* Quay lại cửa hàng */
.nc-checkout-back {
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--nc-text-muted);
    font-size: 0.9rem;
    font-weight: 700;
    transition: 0.3s;
    padding: 8px 0;
}

.nc-checkout-back:hover {
    color: var(--nc-primary);
    transform: translateX(-5px);
}

/* Card chung */
.nc-checkout-card {
    background: var(--nc-white);
    border-radius: 24px;
    padding: 24px;
    border: 1px solid var(--nc-border);
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    position: relative;
}

.nc-checkout-card h2 {
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: 800;
    color: var(--nc-text-muted);
    letter-spacing: 1.2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nc-checkout-card h2::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--nc-border);
}

/* GIỎ HÀNG: Sửa lại cho "ĐỀU" (image_d7e775.png) */
.nc-checkout-cart-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nc-checkout-item {
    display: flex;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    transition: all 0.5s ease;
    max-height: 200px;
    opacity: 1;
    overflow: hidden;
    align-items: center;
}

.nc-checkout-item.removing {
    opacity: 0;
    transform: translateX(50px);
    max-height: 0;
    padding: 0;
    margin: 0;
    border: none;
}

.nc-checkout-img {
    width: 85px;
    height: 85px;
    background: #f1f5f9;
    border-radius: 16px;
    flex-shrink: 0;
}

.nc-checkout-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 85px;
    /* Khớp chiều cao với ảnh cho cân */
    padding-right: 40px;
}

.nc-checkout-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--nc-text);
    line-height: 1.4;
}

.nc-checkout-qty-price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
}

.nc-checkout-qty-wrap {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border-radius: 10px;
    padding: 2px;
    border: 1px solid var(--nc-border);
}

.nc-checkout-qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    min-height: auto;
}

.nc-checkout-qty-num {
    font-size: 0.95rem;
    font-weight: 800;
    min-width: 28px;
    text-align: center;
}

.nc-checkout-price-area {
    text-align: right;
}

.nc-checkout-old-price {
    font-size: 0.8rem;
    color: var(--nc-text-muted);
    text-decoration: line-through;
    display: block;
    margin-bottom: 2px;
}

.nc-checkout-new-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--nc-primary);
    display: block;
}

.nc-checkout-del {
    position: absolute;
    top: 15px;
    right: 0;
    background: #fff1f2;
    color: var(--nc-error);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: 0.2s;
    min-height: auto;
}

.nc-checkout-del:hover {
    background: var(--nc-error);
    color: #fff;
}

/* MÃ ƯU ĐÃI */
.nc-checkout-cp-scroll {
    display: flex;
    gap: 12px;
    padding: 10px 0;

    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
}

/* .nc-checkout-cp-scroll::-webkit-scrollbar {
    display: none;
} */

.nc-checkout-v-card {
    flex: 0 0 240px;
    border: 1.5px dashed var(--nc-primary);
    padding: 14px;
    border-radius: 18px;
    background: #f0f7ff;
    cursor: pointer;
    transition: 0.2s;

    flex: 0 0 auto;
    white-space: nowrap;
}

.nc-checkout-v-card b {
    display: block;
    color: var(--nc-primary);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.nc-checkout-v-card span {
    font-size: 0.75rem;
    color: var(--nc-text-muted);
    line-height: 1.4;
    display: block;
}

.nc-checkout-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.nc-checkout-full {
    grid-column: span 2;
}

.nc-checkout-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nc-checkout-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
}

.nc-checkout-group label span {
    font-weight: 400;
    text-transform: none;
    opacity: 0.7;
}

.nc-checkout-grid .nc-checkout-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--nc-border);
    border-radius: 14px;
    font-size: 1rem;
    outline: none;
    transition: 0.2s;
    background: #fff;
    height: 50px;
    appearance: none;
    background-repeat: no-repeat;
    background-position: right 16px center;
}



.nc-checkout-card .nc-checkout-input.coupon-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--nc-border);
    border-radius: 14px;
    font-size: 1rem;
    outline: none;
    transition: 0.2s;
    background: #fff;
    height: 50px;
}

.nc-checkout-grid .ncvn-select .nc-checkout-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.nc-checkout-grid .nc-checkout-group .nc-checkout-input:focus {
    border-color: var(--nc-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08) !important;
}

textarea.nc-checkout-input {
    height: 100px;
    resize: none;
}

@media (max-width: 640px) {
    .nc-checkout-grid {
        grid-template-columns: 1fr;
    }

    .nc-checkout-full {
        grid-column: span 1;
    }
}

/* THANH TOÁN */
.nc-checkout-pay {
    border: 1.5px solid var(--nc-border);
    padding: 16px;
    border-radius: 14px;
    cursor: pointer;
    margin-bottom: 12px;
    font-weight: 600;
    transition: 0.2s;
}

.nc-checkout-pay.active {
    border-color: var(--nc-primary);
    background: #eff6ff;
    color: var(--nc-primary);
}

.nc-checkout-bill {
    border-top: 1px solid var(--nc-border);
    padding-top: 20px;
    margin-top: 20px;
}

.nc-checkout-total {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--nc-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nc-checkout-btn {
    width: 100%;
    padding: 22px;
    background: var(--nc-primary);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 24px;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2);
}

.nc-checkout-invalid {
    border-color: var(--nc-error) !important;
    background: #fff5f5 !important;
}

.nc-checkout-shake {
    animation: shake 0.4s;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    75% {
        transform: translateX(8px);
    }
}




.ncvn-checkout .ncvn-select {
    position: relative;
}

.ncvn-checkout .ncvn-select input[readonly] {
    cursor: pointer;
}

.ncvn-checkout .ncvn-select__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    z-index: 999;
    overflow: hidden;
    display: none;
}

.ncvn-checkout .ncvn-select.open .ncvn-select__dropdown {
    display: block;
}

.ncvn-checkout .ncvn-select__search {
    padding: 10px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
}

.ncvn-checkout .ncvn-select__search input {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    outline: none;
}

.ncvn-checkout .ncvn-select__options {
    max-height: 260px;
    overflow: auto;
}

.ncvn-checkout .ncvn-select__option {
    padding: 12px 14px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ncvn-checkout .ncvn-select__option:hover {
    background: #f8fafc;
}

.ncvn-checkout .ncvn-select__option.is-selected {
    background: #f5f3ff;
    color: var(--nc-primary);
}

.ncvn-checkout .ncvn-select__option .ncvn-check {
    color: var(--nc-primary);
    opacity: 0;
}

.ncvn-checkout .ncvn-select__option.is-selected .ncvn-check {
    opacity: 1;
}

.ncvn-checkout .payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.ncvn-checkout .payment-card {
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    background: #fff;
}

.ncvn-checkout .payment-card.active {
    border-color: var(--nc-primary);
    background: #f5f3ff;
    color: var(--nc-primary);
}

.ncvn-checkout .payment-card i {
    font-size: 1.4rem;
    margin-bottom: 8px;
    display: block;
}

.ncvn-checkout .payment-card span {
    font-size: 0.75rem;
    font-weight: 800;
}

.ncvn-checkout .product-card {
    display: flex;
    background: #fff;
    border-radius: 20px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #f1f5f9;
    position: relative;
}

.ncvn-checkout .product-image {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 15px;
}

.ncvn-checkout .product-details {
    flex: 1;
    padding: 0 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ncvn-checkout .product-details h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.ncvn-checkout .product-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ncvn-checkout .qty-box {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border-radius: 12px;
    padding: 5px;
    gap: 10px;
}

.ncvn-checkout .qty-box button {
    width: 28px;
    height: 28px;
    border: none;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.ncvn-checkout .qty-box span {
    font-weight: 800;
    font-size: 0.9rem;
    min-width: 20px;
    text-align: center;
}

.ncvn-checkout .price-group {
    text-align: right;
}

.ncvn-checkout .old-price {
    font-size: 0.8rem;
    color: var(--sub-text);
    text-decoration: line-through;
    display: block;
}

.ncvn-checkout .price-tag {
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--nc-primary);
    display: block;
}

.ncvn-checkout .remove-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #cbd5e1;
    cursor: pointer;
    transition: 0.2s;
}

.ncvn-checkout .promo-box {
    margin-top: 2rem;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 20px;
    border: 2px dashed #e2e8f0;
}

.ncvn-checkout .promo-input {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    background: #ffffff;
    border-radius: 999px;
    padding: 4px;
    border: 1px solid #e2e8f0;
}

.ncvn-checkout .promo-input input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 999px;
    border: none;
    outline: none;
    font-size: 0.9rem;
}

.ncvn-checkout .promo-input button {
    background: var(--nc-primary);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.ncvn-checkout .coupon-active {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #eef2ff;
    border-radius: 999px;
    padding: 6px 10px;
    width: fit-content;
}

.ncvn-checkout .coupon-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #4f46e5;
    font-weight: 800;
}

.ncvn-checkout .coupon-code {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text);
}

.ncvn-checkout .coupon-remove-btn {
    border: none;
    background: #eef2ff;
    color: #64748b;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.ncvn-checkout .coupon-remove-btn:hover {
    background: #e0e7ff;
    color: #1e293b;
}

.ncvn-checkout .empty-cart-card {
    max-width: 520px;
    margin: 40px auto 0;
    text-align: center;
}

.ncvn-checkout .empty-cart-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--nc-primary);
    font-size: 1.6rem;
}

.ncvn-checkout .empty-cart-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}

.ncvn-checkout .empty-cart-text {
    font-size: 0.95rem;
    color: var(--sub-text);
    margin-bottom: 20px;
}

.ncvn-checkout .empty-cart-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    background: var(--nc-primary);
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 12px 25px rgba(79, 70, 229, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.ncvn-checkout .empty-cart-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(79, 70, 229, 0.4);
}

.ncvn-checkout .summary-details {
    margin-top: 1.5rem;
}

.ncvn-checkout .summary-row {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-weight: 500;
    color: var(--sub-text);
}

.ncvn-checkout .total-row {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--text);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text);
}

.ncvn-checkout .btn-pay {
    width: 100%;
    background: var(--nc-primary);
    color: white;
    padding: 1.2rem;
    border-radius: 20px;
    border: none;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 2rem;
}

.ncvn-checkout .mobile-sticky-footer {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 15px 20px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    justify-content: space-between;
    align-items: center;
}

.ncvn-checkout .mobile-sticky-footer b {
    color: var(--nc-primary);
    font-size: 1.3rem;
}

.ncvn-checkout .btn-mobile-pay {
    background: var(--nc-primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
}