@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-lighter: #60a5fa;
    --primary-bg: #eff6ff;
    --primary-border: #bfdbfe;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
    --radius: 8px;
    --radius-lg: 12px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gray-100);
    color: var(--gray-700);
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
}
button { padding: 0; border: none; background: transparent; cursor: pointer; transition: .2s; }
button:focus { outline: none; }
a { transition: .2s; }
a:hover, a:active, a:focus { text-decoration: none; outline: none; }
input, textarea, select {
    padding: 0; margin: 0; border-radius: 0;
    -webkit-appearance: none; appearance: none;
    box-shadow: none; transition: .2s;
}

input:focus, textarea:focus, select:focus { outline: none; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--primary); color: #fff; }

@media (min-width: 1400px) {
    .container { max-width: 1360px; }
}

/* ===== Header ===== */
.new1-header {
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    color: #fff;
    padding: 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}
.new1-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 24px;
}
.new1-header .header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.new1-header .header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}
.new1-header .header-logo img { height: 28px; }
.new1-header .header-contact {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: rgba(255,255,255,.85);
    padding: 4px 12px;
    background: rgba(255,255,255,.15);
    border-radius: 20px;
}
.new1-header .header-contact svg { flex-shrink: 0; }
.new1-header .header-right { display: flex; align-items: center; gap: 12px; }
.new1-header .header-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: rgba(255,255,255,.2);
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    transition: .2s;
}
.new1-header .header-btn:hover { background: rgba(255,255,255,.3); }
.new1-header .header-link {
    color: rgba(255,255,255,.85);
    font-size: 13px;
}
.new1-header .header-link:hover { color: #fff; }

/* ===== Side Buttons ===== */
.new1-side-btns {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.new1-side-btns .side-item {
    padding: 10px 14px;
    background: var(--primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    box-shadow: var(--shadow-md);
    transition: .2s;
}
.new1-side-btns .side-item:hover { padding-left: 20px; }
.new1-side-btns .side-item:first-child { background: var(--danger); }
.new1-side-btns .side-item:nth-child(2) { background: #7c3aed; }
.new1-side-btns .side-item a {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

/* ===== Main Layout ===== */
.new1-main {
    padding: 20px 0;
}
.new1-main .container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
}
.new1-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.new1-left {
    flex: 3;
    min-width: 0;
}
.new1-right {
    flex: 1;
    min-width: 280px;
    max-width: 340px;
    position: sticky;
    top: 76px;
}

/* ===== Section Title ===== */
.new1-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.new1-title svg { color: var(--primary); }
.new1-title-sm {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    margin: 0 0 8px 0;
}

/* ===== Search ===== */
.new1-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.new1-search input {
    flex: 1;
    height: 40px;
    padding: 0 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--gray-700);
    background: var(--gray-50);
    transition: .2s;
}
.new1-search input:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.new1-search input::placeholder { color: var(--gray-400); }
.new1-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 20px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: .2s;
    cursor: pointer;
}
.new1-search-btn:hover { background: #1d4ed8; }

/* ===== Category ===== */
.new1-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px 0;
}
.new1-category-item {
    padding: 8px 16px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    transition: .2s;
    white-space: nowrap;
}
.new1-category-item:hover {
    border-color: var(--primary-lighter);
    color: var(--primary);
    background: var(--primary-bg);
}
.new1-category-item.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ===== Goods ===== */
.new1-goods-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    max-height: 420px;
    overflow-y: auto;
    padding: 8px 0;
}

.new1-goods-list .goods_box {
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

.new1-goods-list .goods_box > .card {
    position: relative;
    padding: 12px;
    background: var(--gray-50) !important;
    border: 2px solid var(--gray-200) !important;
    border-radius: var(--radius) !important;
    cursor: pointer;
    transition: all .2s;
    overflow: hidden;
    margin-top: 0 !important;
    box-shadow: none !important;
}
.section .goods .new1-goods-list .goods_box > .card {
    border: 2px solid var(--gray-200) !important;
    box-shadow: none !important;
}
.section .goods .new1-goods-list .goods_box.active > .card {
    border: 2px solid var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,.15) !important;
    background: var(--primary-bg) !important;
}
.new1-goods-list .goods_box > .card .card__detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
}
.new1-goods-list .goods_box > .card .row {
    margin: 0 !important;
}
.new1-goods-list .goods_box > .card .col-md-12 {
    padding: 0 !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}
.new1-goods-list .goods_box > .card .card__wrap {
    padding: 0;
}

.new1-goods-item {
    position: relative;
    padding: 12px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all .2s;
    overflow: hidden;
}

.new1-goods-item:hover,
.new1-goods-list .goods_box:hover > .card {
    border-color: var(--primary-lighter) !important;
    box-shadow: var(--shadow-md) !important;
}

.new1-goods-item.active,
.new1-goods-list .goods_box.active > .card {
    border-color: var(--primary) !important;
    background: var(--primary-bg) !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,.15) !important;
}

.new1-goods-item h3,
.new1-goods-list .goods_box .card__detail_name {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 6px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.new1-goods-item .goods-price,
.new1-goods-list .goods_box .card__detail_price {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    display: inline-block;
}

.new1-goods-item .goods-stock,
.new1-goods-list .goods_box .card__detail_stock {
    font-size: 12px;
    color: var(--gray-400);
    margin-left: 8px;
    display: inline-block;
}
.new1-goods-list .goods_box .card__detail_stock.text-success {
    color: var(--success) !important;
}

.new1-goods-list .goods_box .card__detail_stock_tip {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    opacity: 0;
    transition: .2s;
}
.new1-goods-list .goods_box:hover .card__detail_stock_tip,
.new1-goods-list .goods_box.active .card__detail_stock_tip {
    opacity: 1;
}

.new1-goods-list .goods_box .lite_img {
    display: none !important;
}
.new1-goods-list .goods_box.active .lite_img {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 28px;
    height: 28px;
    border-radius: 0 0 calc(var(--radius) - 2px) 0;
    display: block !important;
    z-index: 2;
}

.new1-goods-img-wrap {
    width: 100%;
    /* height: 180px; */
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
    /* background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%); */
    display: flex;
    align-items: center;
    justify-content: center;
}
.new1-goods-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .3s;
}
.new1-goods-img-wrap:hover img {
    transform: scale(1.05);
}

/* ===== Right Panel ===== */
.new1-right-panel {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.new1-right-section {
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
}
.new1-right-section:last-child { border-bottom: none; }
.new1-right-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.new1-right-section-title svg { color: var(--primary); }

/* ===== Form Inputs ===== */
.new1-input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--gray-700);
    background: var(--gray-50);
    transition: .2s;
}
.new1-input:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.new1-input::placeholder { color: var(--gray-400); }
.new1-input-group {
    margin-bottom: 10px;
}
.new1-input-group:last-child { margin-bottom: 0; }
.new1-input-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.new1-input-label .required { color: var(--danger); }
.new1-input-hint {
    font-size: 11px;
    color: var(--gray-400);
    margin-top: 3px;
}

/* ===== Checkbox Buttons ===== */
.new1-check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.new1-check-btn {
    padding: 4px 10px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    font-size: 12px;
    color: var(--gray-600);
    cursor: pointer;
    transition: .2s;
}
.new1-check-btn:hover { border-color: var(--primary-lighter); color: var(--primary); }
.new1-check-btn.active {
    background: var(--primary-bg);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 500;
}

/* ===== Pay Type ===== */
.new1-pay-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.new1-pay-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: .2s;
    font-size: 13px;
    color: var(--gray-700);
}
.new1-pay-item:hover { border-color: var(--primary-lighter); }
.new1-pay-item.active {
    border-color: var(--primary);
    background: var(--primary-bg);
}
.new1-pay-item img { width: 20px; height: 20px; }
.new1-pay-item .pay-check {
    margin-left: auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
}
.new1-pay-item.active .pay-check {
    border-color: var(--primary);
    background: var(--primary);
}
.new1-pay-item.active .pay-check::after {
    content: '';
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
}

/* ===== Discount / Remark ===== */
.new1-discount-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}
.new1-discount-box, .new1-remark-box {
    padding: 12px;
    background: var(--primary-bg);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 12px;
}
.new1-remark-box {
    background: var(--gray-50);
    border-color: var(--gray-200);
}

/* ===== Bottom Bar ===== */
.new1-bottom-bar {
    position: sticky;
    bottom: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -2px 10px rgba(0,0,0,.06);
    z-index: 90;
    padding: 12px 0;
}
.new1-bottom-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 24px !important;
}
.new1-bottom-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.new1-goods-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}
.new1-goods-name svg { color: var(--primary); }
.new1-quantity-box {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
}
.new1-quantity-box .qty-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    color: var(--gray-600);
    font-size: 16px;
    transition: .2s;
}
.new1-quantity-box .qty-btn:hover { background: var(--gray-200); }
.new1-quantity-box input {
    width: 48px;
    height: 32px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--gray-200);
    border-right: 1px solid var(--gray-200);
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-800);
}
.new1-price-display {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--gray-600);
}
.new1-price-display .price-symbol { color: var(--danger); font-weight: 600; }
.new1-price-display .price-value { color: var(--danger); font-size: 20px; font-weight: 700; }
.new1-price-display .price-original {
    font-size: 12px;
    color: var(--gray-400);
    text-decoration: line-through;
    margin-left: 4px;
}
.new1-pay-btn {
    height: 40px;
    padding: 0 32px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    transition: .2s;
}
.new1-pay-btn:hover { background: #1d4ed8; }

/* ===== Footer ===== */
.new1-footer {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: var(--gray-400);
}

/* ===== QR Code ===== */
.new1-ewm {
    position: fixed;
    right: 20px;
    bottom: 80px;
    text-align: center;
    background: var(--white);
    padding: 12px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 80;
    font-size: 12px;
    color: var(--gray-500);
}

/* ===== Merchant Info Bar ===== */
.new1-merchant-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--primary-bg);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--gray-600);
}
.new1-merchant-bar .auth-badge {
    display: flex;
    align-items: center;
    gap: 4px;
}
.new1-merchant-bar .auth-yes { color: var(--primary); font-weight: 600; }
.new1-merchant-bar .auth-no { color: var(--warning); }
.new1-merchant-bar .deposit { color: var(--danger); font-weight: 600; }

/* ===== Scrollbar ===== */
.new1-category-list::-webkit-scrollbar,
.new1-goods-list::-webkit-scrollbar {
    width: 4px;
}
.new1-category-list::-webkit-scrollbar-thumb,
.new1-goods-list::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 2px;
}
.new1-category-list::-webkit-scrollbar-track,
.new1-goods-list::-webkit-scrollbar-track {
    background: transparent;
}

/* ===== Hidden Utility ===== */
.new1-hidden { display: none !important; }

/* ===== Divider ===== */
.new1-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 16px 0;
}
