.new-product-actions {
    margin-top: 12px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.new-add-btn {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.26);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.new-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.34);
}

.new-add-btn:active {
    transform: scale(0.985);
}

.new-add-btn[disabled] {
    background: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
}

.new-inline-counter {
    width: 100%;
    max-width: 188px;
    height: 44px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: center;
    justify-items: center;
    box-shadow: 0 5px 14px rgba(37, 99, 235, 0.08);
}

.new-counter-value {
    min-width: 28px;
    text-align: center;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
}

.new-qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 11px;
    border: none;
    background: #e0ecff;
    color: #1d4ed8;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.new-qty-btn:hover {
    background: #cfe3ff;
}

.new-qty-btn:active {
    transform: scale(0.94);
}

.new-cart-fab {
    position: fixed;
    top: 84px;
    right: 20px;
    z-index: 1250;
    height: 54px;
    border: none;
    border-radius: 18px;
    padding: 0 14px 0 12px;
    display: none;
    align-items: center;
    gap: 10px;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(30, 64, 175, 0.32);
    cursor: pointer;
    transform: translateY(-6px) scale(0.98);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease, box-shadow 0.2s ease;
}

.new-cart-fab.ready {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.new-cart-fab:hover {
    box-shadow: 0 20px 38px rgba(30, 64, 175, 0.38);
}

.new-cart-fab-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.new-cart-fab-icon img {
    width: 15px;
    height: 15px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.new-cart-fab-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.05;
}

.new-cart-fab-title {
    font-size: 0.72rem;
    opacity: 0.9;
    font-weight: 700;
}

.new-cart-fab-total {
    font-size: 0.9rem;
    font-weight: 900;
}

.new-cart-fab-count {
    min-width: 23px;
    height: 23px;
    border-radius: 999px;
    background: #ffffff;
    color: #1d4ed8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.76rem;
    font-weight: 900;
    padding: 0 7px;
}

.new-cart-panel {
    position: fixed;
    inset: 0;
    z-index: 1400;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(5px);
    display: none;
}

.new-cart-panel.active {
    display: block;
}

.new-cart-modal-centered {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(15, 23, 42, 0.56);
    backdrop-filter: blur(8px);
}

.new-cart-modal-centered .new-cart-content {
    position: relative;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: min(460px, calc(100vw - 24px));
    max-height: min(86dvh, 720px);
    border-radius: 22px;
}

.new-active-order-modal {
    width: min(520px, calc(100vw - 24px)) !important;
    max-height: min(88dvh, 760px);
}

.new-active-order-modal .new-cart-header {
    padding: 18px 18px 14px;
}

.new-active-order-modal-body {
    padding: 14px 18px 2px;
}

.new-active-order-modal-text {
    margin: 0 0 10px 0;
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.62;
    font-weight: 600;
}

.new-active-order-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px 18px 18px;
}

.new-active-order-btn-secondary {
    width: 100%;
    height: 46px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #1e293b;
    font-weight: 800;
    font-size: 0.92rem;
    cursor: pointer;
    transition: background 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.new-active-order-btn-secondary:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.new-active-order-btn-secondary:active {
    transform: scale(0.985);
}

.new-active-order-btn-primary {
    width: 100%;
    min-width: 0;
    height: 46px;
}

.new-cart-content {
    position: absolute;
    top: 92px;
    right: 20px;
    width: min(460px, calc(100vw - 24px));
    max-height: min(78vh, 760px);
    overflow: hidden;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.new-cart-header {
    padding: 16px 16px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.new-cart-title-wrap {
    min-width: 0;
}

.new-cart-title {
    margin: 0;
    font-size: 1.13rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.new-cart-subtitle {
    margin-top: 3px;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 600;
}

.new-cart-close {
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #334155;
    font-size: 20px;
    cursor: pointer;
    flex: 0 0 auto;
    transition: background 0.16s ease, transform 0.16s ease;
}

.new-cart-close:hover {
    background: #e2e8f0;
}

.new-cart-close:active {
    transform: scale(0.95);
}

.new-cart-empty {
    margin: 0;
    padding: 34px 18px 38px;
    color: #64748b;
    text-align: center;
    font-weight: 700;
}

.new-cart-body {
    overflow: auto;
    padding: 12px 14px;
}

.new-cart-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.new-cart-row {
    display: grid;
    grid-template-columns: 66px 1fr auto;
    gap: 11px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 17px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.045);
}

.new-cart-image {
    width: 66px;
    height: 66px;
    object-fit: contain;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.new-cart-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.new-cart-name {
    font-size: 0.93rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.28;
    word-break: break-word;
}

.new-cart-price {
    width: fit-content;
    font-size: 0.82rem;
    color: #1d4ed8;
    font-weight: 900;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    padding: 4px 8px;
}

.new-cart-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
}

.new-cart-line-total {
    font-size: 0.95rem;
    color: #0f172a;
    font-weight: 950;
    white-space: nowrap;
}

.new-cart-actions {
    display: inline-grid;
    grid-template-columns: 30px minmax(24px, 1fr) 30px 30px;
    align-items: center;
    gap: 4px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    padding: 3px;
}

.new-cart-actions .new-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    font-size: 0.95rem;
}

.new-cart-actions .new-counter-value {
    min-width: 22px;
    font-size: 0.9rem;
}

.new-cart-remove-btn {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    border: none;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.14s ease, background 0.14s ease;
}

.new-cart-remove-btn:hover {
    background: #fecaca;
}

.new-cart-remove-btn:active {
    transform: scale(0.94);
}

.new-cart-footer {
    flex: 0 0 auto;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 12px 14px 14px;
    box-shadow: 0 -12px 26px rgba(15, 23, 42, 0.06);
}

.new-cart-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #0f172a;
    font-weight: 800;
    margin-bottom: 11px;
}

.new-cart-total-row strong {
    color: #1d4ed8;
    font-size: 1.2rem;
    font-weight: 950;
}

.new-cart-checkout {
    width: 100%;
    min-height: 46px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    font-size: 0.96rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.3);
    transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

.new-cart-checkout:hover {
    filter: brightness(1.04);
}

.new-cart-checkout:active {
    transform: scale(0.985);
}

.new-cart-flyer {
    position: fixed;
    z-index: 2600;
    pointer-events: none;
    border-radius: 14px;
    background-color: #ffffff;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.26);
    border: 1px solid #dbeafe;
    transition: transform 0.52s cubic-bezier(0.2, 0.75, 0.24, 1), opacity 0.52s ease;
}

.new-order-preview-content {
    width: min(420px, calc(100vw - 24px));
}

.new-order-success {
    padding: 16px;
    overflow: auto;
}

.new-order-badge {
    width: 54px;
    height: 54px;
    margin: 2px auto 12px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 27px;
    font-weight: 950;
}

.new-order-preview-qr-wrap,
.active-order-qr-wrap {
    margin: 12px auto 14px;
    padding: 12px;
    width: fit-content;
    max-width: 100%;
    display: flex;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 22px;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
}

.new-order-preview-qr,
.active-order-qr {
    width: 240px;
    height: 240px;
    max-width: calc(100vw - 88px);
    max-height: calc(100vw - 88px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
}

.new-order-preview-qr canvas,
.new-order-preview-qr img,
.active-order-qr canvas,
.active-order-qr img {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.new-order-text-card {
    margin: 0 0 12px;
    padding: 12px;
    border-radius: 16px;
    background: #f8fbff;
    border: 1px solid #e2e8f0;
}

.new-order-text-card p {
    margin: 0;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.5;
    font-weight: 600;
}

.new-order-text-card p + p {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}

.qr-render-error {
    color: #ef4444;
    font-size: 0.86rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.4;
}

@media (max-width: 600px) {
    .new-cart-fab {
        right: 12px !important;
        top: auto !important;
        bottom: 18px !important;
        height: 52px;
        max-width: calc(100vw - 24px);
        padding: 0 12px;
        border-radius: 18px;
    }

    .new-cart-fab-title {
        font-size: 0.69rem;
    }

    .new-cart-fab-total {
        font-size: 0.84rem;
    }

    .new-cart-panel {
        background: rgba(15, 23, 42, 0.52);
    }

    .new-cart-modal-centered {
        padding: 16px;
        background: rgba(15, 23, 42, 0.62);
        backdrop-filter: blur(10px);
    }

    .new-cart-modal-centered .new-cart-content {
        width: min(460px, calc(100vw - 24px));
        max-height: min(84dvh, 700px);
        border-radius: 20px;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
    }

    .new-active-order-modal {
        width: min(520px, calc(100vw - 24px)) !important;
    }

    .new-active-order-modal-actions {
        grid-template-columns: 1fr;
        padding-top: 12px;
    }

    .new-cart-content {
        top: auto !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100vw;
        max-height: 88dvh;
        border-radius: 24px 24px 0 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        animation: newCartSheetIn 0.22s ease-out;
    }

    .new-cart-header {
        padding: 14px 14px 11px;
    }

    .new-cart-body {
        padding: 10px 10px;
    }

    .new-cart-row {
        grid-template-columns: 58px 1fr;
        gap: 10px;
        padding: 10px;
        border-radius: 16px;
    }

    .new-cart-image {
        width: 58px;
        height: 58px;
        border-radius: 13px;
    }

    .new-cart-name {
        font-size: 0.9rem;
    }

    .new-cart-price {
        font-size: 0.78rem;
        padding: 4px 7px;
    }

    .new-cart-right {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding-top: 9px;
        border-top: 1px dashed #dbeafe;
        margin-top: 2px;
    }

    .new-cart-line-total {
        font-size: 1rem;
    }

    .new-cart-footer {
        padding: 12px 12px max(14px, env(safe-area-inset-bottom));
    }

    .new-inline-counter {
        max-width: 100%;
    }

    .new-order-preview-content {
        max-height: 92dvh;
    }

    .new-order-success {
        padding: 14px;
    }

    .new-order-preview-qr,
    .active-order-qr {
        width: min(240px, calc(100vw - 88px));
        height: min(240px, calc(100vw - 88px));
    }
}

@keyframes newCartSheetIn {
    from {
        transform: translateY(24px);
        opacity: 0.85;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
