/* Product chooser modal */
.nlmt-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    overflow: hidden
}

.nlmt-modal.is-hidden {
    display: none
}

.nlmt-modal--lock {
    overflow: hidden
}

.nlmt-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .65);
    backdrop-filter: saturate(120%) blur(4px);
    transition: opacity 0.3s ease;
}

.nlmt-modal__content {
    position: relative;
    margin: 4vh auto;
    max-width: 1400px;
    width: 90%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    display: flex;
    flex-direction: column;
    max-height: 92vh;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.nlmt-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(to right, #f8fafc, #f1f5f9);
}

.nlmt-modal__title {
    font-weight: 700;
    color: #0f172a;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

.nlmt-modal__close {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    color: #334155;
    width: auto;
    height: auto;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.nlmt-modal__close:hover {
    transform: rotate(90deg);
}

.nlmt-product-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 16px;
    padding: 20px;
}

.nlmt-product-item {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
    background: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.nlmt-product-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.nlmt-product-item img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px;
    transition: all 0.3s ease;
}

.nlmt-product-item:hover img {
    transform: scale(1.03);
    border-color: #bae6fd;
}

.nlmt-product-info h4 {
    font-size: 14px;
    color: #1e293b;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
    transition: color 0.2s;
}

.nlmt-product-item:hover .nlmt-product-info h4 {
    color: #0284c7;
}

.nlmt-product-meta {
    font-size: 0.875rem;
    color: #64748b;
}

.nlmt-product-meta span {
    display: block;
    margin-bottom: 4px;
}

.nlmt-product-price {
    font-size: 16px;
    color: #059669;
    font-weight: 700;
    margin-top: auto;
    border-top: 1px dashed #e2e8f0;
    padding-top: 8px;
}

/* Modal Body Structure */
.nlmt-modal__body {
    display: block;
    padding: 16px 18px;
    flex: 1;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.nlmt-modal__layout {
    display: flex;
    gap: 24px;
    height: 100%;
}

.nlmt-modal__sidebar {
    width: 260px;
    flex-shrink: 0;
    border-right: 1px solid #e6eef3;
    padding-right: 18px;
    padding-top: 4px;
}

.nlmt-modal__main {
    flex: 1;
    min-width: 0;
}

.nlmt-sidebar__section {
    margin-bottom: 24px;
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #e6eef3;
}

.nlmt-sidebar__title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e6eef3;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 13px;
}

/* Brand button style */
.nlmt-modal__brands {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nlmt-brand-btn {
    padding: 0px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    text-align: left;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    margin-bottom: 5px;
    margin-right: 0px;
    display: block;
}

.nlmt-brand-btn:hover {
    background: linear-gradient(to right, #0ea5e9, #0891d2);
    border-color: #bae6fd;
    color: #fff;
}

.nlmt-brand-btn:active {
    transform: translateY(1px);
}

.nlmt-brand-btn.is-active {
    background: linear-gradient(to right, #0ea5e9, #0891d2);
    color: #fff;
    border-color: #0891d2;
    box-shadow: 0 2px 4px rgba(8, 145, 210, 0.2);
}

/* Base styles */
.nlmt-btn-open-picker.du-toan-nlmt-btn {
    cursor: pointer
}

.du-toan-nlmt {
    --bg1: #0ea5e9;
    --bg2: #059669;
    --label: #e6fff9;
    --text: #e8fbff;
    --muted: #b8e7ef;
    --input-bg: #fff;
    --input-bd: #165766;
    --accent: #27e6f2;
    --ring: #6ee7b7;
    max-width: 720px;
    margin: 20px auto;
    padding: 16px;
    border-radius: 10px;
    background: linear-gradient(180deg, #0c7d86, #0a5d79 60%, #084e64 100%);
    color: var(--text);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .14);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif
}

.du-toan-nlmt__form {
    display: grid;
    gap: 0.8rem
}

.du-toan-nlmt__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem
}

.du-toan-nlmt__form label {
    display: grid;
    gap: 4px;
    color: #fff
}

.du-toan-nlmt__form label>span,
.du-toan-nlmt__form label>strong {
    font-weight: 700;
    color: var(--label);
    letter-spacing: .02em;
    font-size: 0.9rem
}

.du-toan-nlmt__form input {
    padding: 8px 12px;
    border: 1px solid var(--input-bd);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--input-bd);
    outline: 0;
    transition: border-color .15s, box-shadow .15s
}

.du-toan-nlmt__form select {
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--input-bd);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--input-bd);
    outline: 0;
    transition: border-color .15s, box-shadow .15s;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #7fd7e0 50%), linear-gradient(135deg, #7fd7e0 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(1em - 2px), calc(100% - 12px) calc(1em - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat
}

.du-toan-nlmt__form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(39, 230, 242, .2)
}

.du-toan-nlmt__form select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(39, 230, 242, .2)
}

.du-toan-nlmt__calc {
    margin-top: .5rem;
    margin-right: 0px;
    padding: .5rem .8rem;
    background: linear-gradient(90deg, #16c2f3, #10b981);
    color: #00313a;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2)
}

.du-toan-nlmt__calc:hover {
    filter: brightness(1.05)
}

.du-toan-nlmt__result {
    margin-top: 0.8rem;
    font-weight: 600;
    background: rgba(0, 0, 0, .12);
    padding: .6rem .8rem;
    border-radius: 8px
}

/* Result page */
.du-toan-nlmt-result {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    max-width: 1200px;
    margin: 16px auto
}

.du-toan-nlmt-list {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .05)
}

.du-toan-nlmt-list__content {
    flex: 1;
    margin-bottom: 16px;
}

.du-toan-nlmt-list__footer {
    border-top: 1px dashed #edf2f5;
    padding-top: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.du-toan-nlmt-list__head {
    display: grid;
    grid-template-columns: 1fr 160px 180px;
    font-weight: 600;
    border-bottom: 1px solid #eef2f7;
    padding: 5px 0;
    color: #0b3a42;
    text-align: center;
    font-size: 0.9rem
}

.du-toan-nlmt-list__head>div:first-child {
    text-align: left
}

.du-toan-nlmt-list__row {
    display: grid;
    grid-template-columns: 1fr 160px 180px;
    padding: 8px 0;
    border-bottom: 1px dashed #edf2f5;
    align-items: center
}

.du-toan-nlmt-list__cell {
    font-size: 14px;
    color: #223
}

.du-toan-nlmt-list__prod {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 10px;
    align-items: center
}

.du-toan-nlmt-list__prod img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 6px;
    background: #f7fafc;
    border: 1px solid #e2e8f0
}

.du-toan-nlmt-list__meta {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.9rem
}

.du-toan-nlmt-list__price {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center
}

.du-toan-nlmt-list__total {
    text-align: left;
    font-weight: 700;
    color: #0a8f5a;
    margin-left: 20px;
}

.du-toan-nlmt-list__total .nlmt-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
}

.du-toan-nlmt-list__total .nlmt-row-change,
.du-toan-nlmt-list__total .nlmt-row-remove {
    border: 0;
    background: transparent;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    font-size: 14px;
}

.du-toan-nlmt-list__total .nlmt-row-change:hover,
.du-toan-nlmt-list__total .nlmt-row-remove:hover {
    opacity: 1
}

.du-toan-nlmt-money {
    line-height: 1.2
}

.du-toan-nlmt-qty {
    opacity: .7;
    font-size: 11px;
    display: none;
}

.du-toan-nlmt-qtyctrl {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 6px
}

.du-toan-nlmt-qtyctrl .qty-group {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    background: #fff
}

.du-toan-nlmt-qtyctrl .qty-minus,
.du-toan-nlmt-qtyctrl .qty-plus {
    margin: 0;
    width: 30px;
    height: 30px;
    border: 0;
    background: #f8fafc;
    color: #0b3a42;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center
}

.du-toan-nlmt-qtyctrl .qty-minus {
    border-right: 1px solid #cbd5e1
}

.du-toan-nlmt-qtyctrl .qty-plus {
    border-left: 1px solid #cbd5e1
}

.du-toan-nlmt-qtyctrl .qty-input {
    width: 50px;
    height: 30px;
    border: 0;
    text-align: center;
    outline: none;
    margin-bottom: 0;
    font-size: 0.9rem
}

.du-toan-nlmt-qtyctrl .qty-minus:hover,
.du-toan-nlmt-qtyctrl .qty-plus:hover {
    background: #eef2f7
}

.du-toan-nlmt-qtyctrl .qty-input::-webkit-outer-spin-button,
.du-toan-nlmt-qtyctrl .qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0
}

.du-toan-nlmt-qtyctrl .qty-input {
    appearance: textfield;
    -moz-appearance: textfield
}

.du-toan-nlmt-note {
    margin-top: 8px;
    color: #4a5568;
    background: #f7fafc;
    border: 1px dashed #e2e8f0;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.9rem
}

.du-toan-nlmt-result__summary {
    background: #f8fbfd;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .05)
}

.du-toan-nlmt-result__grand {
    font-size: 28px;
    font-weight: 800;
    color: #0a8f5a;
    text-align: center;
}

.du-toan-nlmt-result__vat {
    font-size: 14px;
    color: #0b3a42;
    text-align: center;
}

.du-toan-nlmt-result__shipping {
    font-size: 12px;
    color: #2b6b68;
    opacity: .85;
    margin-top: -4px;
    margin-bottom: 4px
}

.du-toan-nlmt-badge {
    display: inline-block;
    background: #ecfdf5;
    color: #047857;
    padding: 4px 8px;
    border-radius: 999px;
    margin-right: 6px;
    font-weight: 700;
    font-size: 0.8rem
}

.du-toan-nlmt-btn {
    display: inline-block;
    background: #0ea5e9;
    color: #033a3f;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(14, 165, 233, .2);
    font-size: 0.9rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.du-toan-nlmt-btn:hover {
    background: #0c96d3;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(14, 165, 233, .3)
}

.du-toan-nlmt-btn.nlmt-btn-outline {
    background: transparent;
    border: 1px solid #0ea5e9;
    color: #0ea5e9;
    box-shadow: none;
}

.du-toan-nlmt-btn.nlmt-btn-outline:hover {
    background: #f0f9ff;
    border-color: #0c96d3;
    color: #0c96d3;
}

/* Summary UI */
.nlmt-pill {
    background: #fff;
    border: 1px solid #edf2f5;
    border-radius: 8px;
    padding: 8px 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .02);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px
}

.nlmt-pill__label {
    color: #0b3a42;
    font-weight: 700;
    font-size: 0.9rem
}

.nlmt-pill__value {
    background: #e6fbf6;
    color: #03565c;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.85rem
}

.nlmt-pill__link {
    display: none
}

.nlmt-pills {
    margin-top: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px
}

.nlmt-pill {
    width: 100%
}

.nlmt-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f9fbfc;
    border: 1px solid #edf2f5;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px
}

.nlmt-card__icon {
    font-size: 24px
}

.nlmt-card__label {
    font-size: 13px;
    color: #0b3a42
}

.nlmt-card__value {
    font-size: 20px;
    color: #0a8f5a;
    font-weight: 800
}

.nlmt-savings {
    background: #f9fbfc;
    border: 1px solid #edf2f5;
    border-radius: 8px;
    padding: 10px
}

.nlmt-savings__title {
    font-size: 15px;
    color: #0b3a42;
    font-weight: 800;
    border-bottom: 2px solid rgba(11, 58, 66, .15);
    padding-bottom: 6px;
    margin-bottom: 6px
}

.nlmt-savings__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(11, 58, 66, .15);
}

.nlmt-savings__row:last-child {
    border-bottom: 0;
    background: #f0f9ff;
    margin: 8px -10px -10px;
    padding: 12px;
    border-radius: 0 0 8px 8px;
}

.nlmt-savings__row>div:first-child {
    color: #0b3a42;
    opacity: .85;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nlmt-savings__row>div:first-child .nlmt-percentage {
    background: #e0f2fe;
    color: #0369a1;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.nlmt-savings__row>div:last-child {
    font-weight: 900;
    color: #075e54;
    font-size: 16px;
    letter-spacing: .2px;
    background: linear-gradient(135deg, #0ea5e9, #10b981);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Modal picker */
.nlmt-modal.is-hidden {
    display: none
}

.nlmt-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    overflow: hidden
}

.nlmt-modal--lock {
    overflow: hidden
}

.nlmt-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .65);
    backdrop-filter: saturate(120%) blur(4px);
    transition: opacity 0.3s ease;
}

.nlmt-modal__content {
    position: relative;
    margin: 4vh auto;
    max-width: 1400px;
    width: 90%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    display: flex;
    flex-direction: column;
    max-height: 92vh;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.nlmt-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(to right, #f8fafc, #f1f5f9);
}

.nlmt-modal__title {
    font-weight: 700;
    color: #0f172a;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

.nlmt-modal__close {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    color: #334155;
    width: auto;
    height: auto;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.nlmt-modal__close:hover {
    transform: rotate(90deg);
}

.nlmt-modal__body {
    display: block;
    padding: 16px 18px;
    flex: 1;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.nlmt-modal__layout {
    display: flex;
    gap: 24px;
    height: 100%;
}

.nlmt-modal__sidebar {
    width: 260px;
    flex-shrink: 0;
    border-right: 1px solid #e6eef3;
    padding-right: 18px;
    padding-top: 4px;
}

.nlmt-modal__main {
    flex: 1;
    min-width: 0;
}

.nlmt-sidebar__section {
    margin-bottom: 24px;
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #e6eef3;
}

.nlmt-sidebar__title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e6eef3;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 13px;
}

.nlmt-modal__cats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nlmt-cat-btn {
    padding: 0px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    text-align: left;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    margin-bottom: 5px;
    margin-right: 0px;
}

.nlmt-cat-btn:hover {
    background: #f0f9ff;
    border-color: #bae6fd;
    color: #0284c7;
}

.nlmt-cat-btn:active {
    transform: translateY(1px);
}

.nlmt-cat-btn.is-active {
    background: linear-gradient(to right, #0ea5e9, #0891d2);
    color: #fff;
    border-color: #0891d2;
    box-shadow: 0 2px 4px rgba(8, 145, 210, 0.2);
}

.nlmt-brands-container {
    margin-top: 8px;
}

.nlmt-brands {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 6px;
}

.nlmt-brands::-webkit-scrollbar {
    width: 6px;
}

.nlmt-brands::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.nlmt-brands::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.nlmt-brands::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.nlmt-brand-item {
    margin-bottom: 5px;
}

.nlmt-brand-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.nlmt-brand-checkbox:hover {
    background-color: #f0f9ff;
    border-color: #e2e8f0;
}

.nlmt-brand-input {
    margin-right: 10px;
    accent-color: #0284c7;
    width: 16px;
    height: 16px;
}

.nlmt-brand-name {
    font-size: 0.9rem;
    color: #334155;
    font-weight: 600;
    transition: all 0.2s;
}

.nlmt-brand-input:checked+.nlmt-brand-name {
    color: #0284c7;
    font-weight: 600;
}

.nlmt-brand-checkbox:has(.nlmt-brand-input:checked) {
    background: linear-gradient(to right, #0ea5e9, #0891d2);
    border-color: #0891d2;
    box-shadow: 0 2px 4px rgba(8, 145, 210, 0.2);
}

.nlmt-brand-input:checked+.nlmt-brand-name {
    color: #fff;
    font-weight: 600;
}

/* Legacy styles for backward compatibility */
.nlmt-filter-brand {
    display: block;
    padding: 6px 10px;
    text-decoration: none;
    color: #475569;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.nlmt-filter-brand:hover {
    background: #f1f5f9;
    color: #0b3a42;
}

.nlmt-filter-brand[aria-current="true"] {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 600;
}

.nlmt-cat-btn:hover {
    background: #e6fbf6;
    border-color: #bae8df
}

.nlmt-modal__results {
    min-height: 0;
    overflow: visible
}

.nlmt-filter-title {
    font-weight: 700;
    margin: 0 0 12px;
    font-size: 13px;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding-bottom: 8px;
    border-bottom: 1px solid #e6eef3;
}

/* Legacy horizontal brands - hidden but kept for backward compatibility */
.nlmt-modal__main .nlmt-brands {
    display: none;
}

/* Brands container in sidebar */
.nlmt-brands-container {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #e6eef3;
    margin-bottom: 16px;
}

/* Legacy horizontal brand filters - hidden but kept for backward compatibility */
.nlmt-filter-brand {
    display: none;
    padding: 4px 10px;
    border: 1px solid #e6eef3;
    border-radius: 999px;
    background: #f7fafc;
    color: #0b3a42;
    text-decoration: none;
    transition: all .15s ease;
    font-size: 0.85rem;
}

.nlmt-filter-brand[aria-current="true"],
.nlmt-filter-brand:hover {
    background: #e6fbf6;
    border-color: #bae8df;
}

.nlmt-top__title {
    font-weight: 700;
    color: #0f172a;
    font-size: 18px;
    letter-spacing: -0.01em;
}

.nlmt-modal__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.nlmt-top__sort {
    font-size: 0.9rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nlmt-top__sort a {
    color: #0369a1;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    padding: 6px 12px;
    border-radius: 6px;
    background: transparent;
}

.nlmt-top__sort a:hover {
    color: #0284c7;
    background: #f0f9ff;
}

.nlmt-top__sort a.active {
    color: #0c4a6e;
    font-weight: 600;
    background: #e0f2fe;
}

/* Anchor-based sort buttons (match material modal buttons) */
.nlmt-top__sort .nlmt-sort {
    padding: 6px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #475569;
    font-size: 0.875rem;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.nlmt-top__sort .nlmt-sort:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.nlmt-top__sort .nlmt-sort.active {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #0369a1;
    font-weight: 500;
}

.nlmt-modal__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.nlmt-card--pick {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
    background: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nlmt-card--pick:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.nlmt-card--pick img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px;
    transition: all 0.3s ease;
}

.nlmt-card--pick:hover img {
    transform: scale(1.03);
    border-color: #bae6fd;
}

.nlmt-card__no-image {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 24px;
}

.nlmt-card__no-image:after {
    content: "🖼️";
    opacity: 0.5;
}

.nlmt-card__label {
    font-size: 14px;
    color: #1e293b;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
    transition: color 0.2s;
}

.nlmt-card--pick:hover .nlmt-card__label {
    color: #0284c7;
}

.nlmt-card__value {
    font-size: 16px;
    color: #059669;
    font-weight: 700;
    margin-top: auto;
    border-top: 1px dashed #e2e8f0;
    padding-top: 8px;
}

.nlmt-btn-pick {
    border: 0;
    border-radius: 8px;
    background: linear-gradient(to right, #0ea5e9, #0891d2);
    color: #fff;
    padding: 0px 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(14, 165, 233, 0.2);
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nlmt-btn-pick:hover {
    background: linear-gradient(to right, #0284c7, #0369a1);
    box-shadow: 0 4px 8px rgba(14, 165, 233, 0.3);
}

.nlmt-btn-pick:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(14, 165, 233, 0.2);
}

.nlmt-modal__pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    padding: 16px 0 8px;
    margin-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.nlmt-modal__pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #334155;
    font-size: 0.9rem;
    transition: all 0.2s;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.nlmt-modal__pagination a:hover {
    background: #f0f9ff;
    border-color: #bae6fd;
    color: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nlmt-modal__pagination a.is-active {
    background: #0284c7;
    border-color: #0284c7;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.3);
}

.nlmt-modal__pagination a:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Loading and error states */
.nlmt-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #64748b;
    gap: 16px;
}

.nlmt-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(14, 165, 233, 0.15);
    border-radius: 50%;
    border-top-color: #0ea5e9;
    animation: nlmt-spin 0.8s linear infinite;
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.2);
}

@keyframes nlmt-spin {
    to {
        transform: rotate(360deg);
    }
}

.nlmt-error-message {
    padding: 16px 20px;
    text-align: center;
    color: #b91c1c;
    background: #fee2e2;
    border-radius: 10px;
    margin: 16px 0;
    border: 1px solid #fecaca;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.1);
    font-size: 0.95rem;
}

.nlmt-no-products {
    padding: 30px 20px;
    text-align: center;
    color: #475569;
    background: #f8fafc;
    border-radius: 10px;
    margin: 16px 0;
    border: 1px dashed #e2e8f0;
    font-size: 0.95rem;
}

.nlmt-empty-brands {
    padding: 12px;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    font-style: italic;
}

/* Tabs */
.du-toan-nlmt__tabs {
    display: flex;
    gap: .5rem;
    margin-bottom: .75rem
}

.du-toan-nlmt__tabs button {
    flex: 0 0 auto;
    padding: .4rem .7rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .25);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 0.9rem
}

.du-toan-nlmt__tabs button.is-active {
    background: rgba(255, 255, 255, .2);
    border-color: transparent
}

.du-toan-nlmt .is-hidden {
    display: none
}

/* Headings */
.du-toan-nlmt__section-title {
    margin: 0 0 6px;
    color: var(--label);
    font-weight: 800;
    letter-spacing: .03em;
    font-size: 1rem
}

/* Range slider */
.du-toan-nlmt input[type=range] {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, #0a84a5, #0a68c5);
    border-radius: 999px;
    outline: 0
}

.du-toan-nlmt input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #8ffcff, #1fe3ff 60%, #10b9f0);
    border: 2px solid #0ff;
    box-shadow: 0 0 0 4px rgba(0, 255, 255, .18)
}

.du-toan-nlmt input[type=range]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #8ffcff, #1fe3ff 60%, #10b9f0);
    border: 2px solid #0ff;
    box-shadow: 0 0 0 4px rgba(0, 255, 255, .18)
}

.du-toan-nlmt__range-val {
    margin-left: .5rem;
    color: #bffcff;
    font-weight: 700;
    font-size: 0.9rem
}

/* Responsive */
@media (max-width:1024px) {
    .nlmt-modal__content {
        width: 95%;
    }

    .nlmt-modal__layout {
        flex-direction: column;
    }

    .nlmt-modal__sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e6eef3;
        padding-right: 0;
        padding-bottom: 16px;
        margin-bottom: 16px;
    }

    .nlmt-sidebar__section {
        margin-bottom: 12px;
    }

    .nlmt-product-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .du-toan-nlmt-result {
        grid-template-columns: 1.35fr 1fr
    }

    .du-toan-nlmt-list__head {
        grid-template-columns: 1fr 140px 150px
    }

    .du-toan-nlmt-list__row {
        grid-template-columns: 1fr 140px 150px
    }
}

@media (max-width:900px) {
    .du-toan-nlmt-result {
        grid-template-columns: 1fr;
        gap: 14px
    }
}

@media (max-width:768px) {
    .nlmt-modal__content {
        width: 96%;
        margin: 2vh auto;
        max-height: 96vh;
    }

    .nlmt-modal__header {
        padding: 12px 14px;
    }

    .nlmt-modal__title {
        font-size: 1rem;
    }

    .nlmt-modal__body {
        padding: 12px 14px;
    }

    .nlmt-product-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .nlmt-top__title {
        font-size: 16px;
    }

    .nlmt-brands {
        max-height: 200px;
    }
}

@media (max-width:720px) {
    .du-toan-nlmt-list__head {
        grid-template-columns: 1fr 120px 120px
    }

    .du-toan-nlmt-list__row {
        grid-template-columns: 1fr 120px 120px
    }

    .du-toan-nlmt-list__prod {
        grid-template-columns: 50px 1fr
    }

    .du-toan-nlmt-list__prod img {
        width: 46px;
        height: 46px
    }

    .du-toan-nlmt-qtyctrl .qty-group {
        border-radius: 4px
    }

    .du-toan-nlmt-qtyctrl .qty-minus,
    .du-toan-nlmt-qtyctrl .qty-plus {
        width: 28px;
        height: 28px
    }

    .du-toan-nlmt-qtyctrl .qty-input {
        height: 28px;
        width: 40px
    }

    .du-toan-nlmt-result__grand {
        font-size: 24px;
    }
}

@media (max-width:480px) {
    .nlmt-modal__content {
        width: 98%;
        border-radius: 8px;
    }

    .nlmt-modal__header {
        padding: 10px 12px;
    }

    .nlmt-modal__body {
        padding: 10px 12px;
    }

    .nlmt-product-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .nlmt-modal__top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .nlmt-top__sort {
        width: 100%;
        flex-wrap: wrap;
    }

    .nlmt-cat-btn {
        min-width: 100px;
        font-size: 0.85rem;
        padding: 8px;
    }

    .nlmt-brand-btn {
        padding: 6px 8px;
    }

    .nlmt-product-item {
        padding: 10px;
    }

    .du-toan-nlmt-list {
        padding: 10px
    }

    .du-toan-nlmt-list__head {
        grid-template-columns: 1fr 100px 100px;
        font-size: 0.8rem
    }

    .du-toan-nlmt-list__row {
        grid-template-columns: 1fr 100px 100px
    }

    .nlmt-savings__row>div:last-child {
        font-size: 15px
    }

    .nlmt-card__value {
        font-size: 18px
    }

    .nlmt-pill__value {
        padding: 3px 6px;
        font-size: 0.8rem
    }
}

/* Enhanced responsive for modal */
@media (max-width:1024px) {
    .nlmt-modal__content {
        width: 95%;
    }

    .nlmt-modal__layout {
        flex-direction: column;
    }

    .nlmt-modal__sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e6eef3;
        padding-right: 0;
        padding-bottom: 16px;
        margin-bottom: 16px;
    }

    .nlmt-sidebar__section {
        margin-bottom: 12px;
    }

    .nlmt-modal__cats {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .nlmt-cat-btn {
        flex: 0 0 auto;
        min-width: 120px;
    }
}

@media (max-width:768px) {
    .nlmt-modal__content {
        width: 96%;
        margin: 2vh auto;
        max-height: 96vh;
    }

    .nlmt-modal__header {
        padding: 12px 14px;
    }

    .nlmt-modal__title {
        font-size: 1rem;
    }

    .nlmt-modal__body {
        padding: 12px 14px;
    }

    .nlmt-modal__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .nlmt-top__title {
        font-size: 16px;
    }

    .nlmt-top__sort {
        font-size: 0.85rem;
    }

    .nlmt-brands {
        max-height: 200px;
    }
}

@media (max-width:480px) {
    .nlmt-modal__content {
        width: 98%;
        border-radius: 8px;
    }

    .nlmt-modal__header {
        padding: 10px 12px;
    }

    .nlmt-modal__body {
        padding: 10px 12px;
    }

    .nlmt-modal__grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .nlmt-modal__top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .nlmt-top__sort {
        width: 100%;
        flex-wrap: wrap;
    }

    .nlmt-cat-btn {
        min-width: 100px;
        font-size: 0.85rem;
        padding: 8px;
    }

    .nlmt-brand-checkbox {
        padding: 6px 8px;
    }

    .nlmt-card--pick {
        padding: 10px;
    }

    .nlmt-btn-pick {
        padding: 8px;
        font-size: 0.85rem;
    }
}