/* ============================================================================
   Legacy component CSS extracted from ProductCard.razor (S2).

   It was a 347-line <style> block at the top of the component, so Blazor emitted
   a full copy PER INSTANCE — roughly 50 copies, ~17,000 lines of duplicated CSS
   in the DOM, on the busiest page in the app. The rules are static (no Razor
   interpolation) and were never scoped, so moving them here is behaviour-neutral
   and they now parse once.

   This is a holding pen, not a design layer: till.css overrides what it needs on
   top (it loads after this and its .mp-till selectors outrank these). Whittle
   this file down as the tile is reworked.
   ========================================================================= */

    .image-container {
        display: block;
        width: 100%;
        aspect-ratio: 4 / 3;
        position: relative;
        overflow: hidden;
    }

    .image-container img {
        position: absolute; 
        top: 0;
        left: 0;
        width: 100%;
        height: 100%; 
        object-fit: cover; 
        border-radius: 0;
    }

    .image-container12 {
        width: 100%;
        height: auto; 
        max-height: 300px; 
        border-radius: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .mp-till .modal-body .image-container12 img{
        width: auto; 
        height: 100%; 
        max-width: 100%; 
        object-fit: cover; 
    }

    .mp-till .card-body{
        padding: 0;
    }

    .mp-till .col-6{
        margin-bottom: 0px;
        padding: 0px;
    }

    .mp-till .card{
        margin: 0;
        padding: 0;
        background-color: #0000d3;
        transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    }

    .card-custom {
        background-color: #ff7322;
        color: white;
    }

    /* ── Floating tile style ─────────────────────────────────────── */
    .card-tile {
        border-radius: 14px !important;
        overflow: hidden;
        box-shadow: 0 4px 14px rgba(0,0,0,0.18) !important;
        transition: transform 0.22s ease, box-shadow 0.22s ease !important;
        cursor: pointer;
    }
    

    @media (hover: hover) {
        .card-tile:hover {
            transform: translateY(-5px) scale(1.02);
            box-shadow: 0 14px 32px rgba(0,0,0,0.30) !important;
        }
    }

    /* Price badge — top-right corner */
    .tile-price-badge {
        position: absolute;
        top: 8px;
        right: 8px;
     
        background: rgba(255,255,255,0.92);
        color: #111;
        font-size: 12px;
        font-weight: 700;
        padding: 3px 10px;
        border-radius: 20px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.20);
        line-height: 1.5;
        white-space: nowrap;
    }

    /* Name overlay — bottom gradient */
    .tile-name-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0) 100%);
        padding: 28px 10px 8px;
      
    }

    .tile-name {
        color: #ffffff !important;
        font-weight: 600;
        margin: 0;
        text-shadow: 0 1px 3px rgba(0,0,0,0.5);
        line-height: 1.3;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    /* Placeholder when no image */
    .tile-no-image {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: rgba(255,255,255,0.45);
        background: rgba(0,0,0,0.12);
    }

    .product-name {
        color: #ffffff;
    }

    .price {}

    .mp-till .modal-title{
        font-size: 1.5rem;
        font-weight: bold;
        color: #333;
    }

    .addon-item {
        min-width: 80px;
        text-align: center;
        background-color: #f9f9f9;
        border: 1px solid #ddd;
        font-size: 0.85rem;
        cursor: pointer;
    }

    .addon-item:hover {
        background-color: #e7e7e7;
        border-color: #ccc;
    }

    .quantity-button {
        font-size: 1.25rem;
        font-weight: bold;
    }

    input[type="number"] {
        font-size: 1rem;
        text-align: center;
    }

    .mp-till .btn-outline-danger:hover{
        background-color: #dc3545;
        color: white;
    }

    .btn-succes:hover {
        background-color: #28a745;
        color: white;
    }

    .mp-till .modal-bottom .modal-dialog{
        transform: translateY(100%);
        transition: transform 0.3s ease-out;
    }

    .mp-till .modal-bottom.show .modal-dialog{
        transform: translateY(0);
    }

    .mp-till .btn-outline-secondary:hover{
        background-color: #6c757d;
        color: white;
    }

    .mp-till .btn-check:checked+.btn-outline-secondary{
        background-color: #0d6efd;
        border-color: #0d6efd;
        color: #fff;
    }

    .mp-till .btn-outline-secondary{
        border-width: 2px;
    }

    .mp-till .btn-outline-secondary:hover{
        background-color: #f8f9fa;
        border-color: #0d6efd;
    }

    .modal-dialog1 {
        margin: 1.75rem auto;
        width: 100%;
        max-width: 500px;
        transition: transform 0.3s ease-out;
    }

    /* SCOPED IN S6. ProductCard and ProductCard1 both redefined Bootstrap's
       .d-flex utility globally — flex-wrap: wrap, justify-content:
       space-between, align-items: stretch on *every* d-flex in the app. Inside
       the components that was only true while the till was mounted; lifting the
       blocks into this file in S2 made it true on every page, all the time,
       which is how a two-button toolbar on /Summary ended up with its buttons
       pushed to opposite ends of the screen. Scoped to .mp-till, so the till
       keeps exactly the layout it had and nothing else inherits it. */
    .mp-till .d-flex {
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: stretch;
    }

    .card-custom {
        flex: 1 1 30%; 
        margin-bottom: 20px;
        height: 100%;
        transition: background-color 0.3s ease, box-shadow 0.3s ease;
    }

        .mp-till .modal-backdrop{
            display: none !important;
        }

      

    .mp-till .modal-backdrop{
        display: none !important;
    }

    @media (max-width: 768px) {
        .mp-till .modal-dialog{
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            margin: 0;
            transform: translateY(100%);
            width: 100%;
            max-width: 100%;
        }
        
        .mp-till .modal.show .modal-dialog{
            transform: translateY(0);
        }
    }

    @media (max-width: 768px) {
        .card-custom {
            flex: 1 1 45%;
        }
    }

    @media (max-width: 576px) {
        .card-custom {
            flex: 1 1 auto;  /* Allow cards to size based on grid */
        }
    }

    .col1 {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .tops-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 0;
    }

    @media (min-width: 576px) {
        .tops-container {
            max-width: 440px;
            margin: 0 auto;
        }
    }

    @media (min-width: 992px) {
        .tops-container {
            max-width: 550px;
        }
    }

    @media (min-width: 576px) {
        .col1 {
            grid-template-columns: repeat(4, 1fr);
        }
    }

    @media (min-width: 992px) {
        .col1 {
            grid-template-columns: repeat(5, 1fr);
        }
    }
    .btn-succes {
        background-color: #286aa7;
        border-color: #286aa7;
        color: white;
        font-weight: bold;s
        padding: 10px 20px;
        border-radius: 6px;
        transition: background-color 0.3s, transform 0.2s;
    }
    .barcode-container {
        background-color: white;
        padding: 4px;
        margin: 6px auto;
        border-radius: 4px;
        max-width: 80%;
    }
    
    .barcode-container img {
        display: block;
        height: 40px;
        width: 100%;
        object-fit: contain;
    }
    .variant-item {
        transition: all 0.2s ease;
        background-color: #f8f9fa;
    }

    .variant-item:hover {
        background-color: #e9ecef;
    }

    .variant-item.border-primary {
        background-color: rgba(13, 110, 253, 0.05);
    }

    .mp-till .form-check-input:checked{
        background-color: #0d6efd;
        border-color: #0d6efd;
    }
    @* @media (max-width: 992px) {

        
    } *@
    



/* ============================================================================
   Legacy component CSS extracted from ProductCard1.razor (S2).
   An 827-line <style> block at component top level — one copy per instance in
   sale/expert mode. No Razor interpolation, never scoped, so lifting it here is
   behaviour-neutral and it parses once.
   ========================================================================= */

    .image-container {
        position: relative;
        width: 100%;
        aspect-ratio: 16 / 9;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    .controls-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 8px;
        background: rgba(0, 0, 0, 0.4);
        display: flex;
        flex-direction: column;
        gap: 6px;
        align-items: center;
        width: 100%;
        box-sizing: border-box; 
    }

    .controls-overlay .quantity-controls {
        background: rgba(255, 255, 255, 0.9);
        border-radius: 25px;
        padding: 6px;
        width: 100%;
        max-width: 100%; 
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
    }

    .controls-overlay .btn-group {
        background: rgba(255, 255, 255, 0.9);
        border-radius: 25px;
        padding: 6px;
        width: 100%;
        max-width: 100%; 
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
    }

    .quantity-btn {
        flex: 1;
        max-width: 40%;
        border-radius: 20px !important;
        margin: 0 2px;
        border: 1px solid #dee2e6;
        background: transparent;
        color: #333;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        padding: 0;
        width: auto; 
        min-width: 40px; 
    }

    .mp-till .btn-outline-secondary{
        flex: 1;
        max-width: 45%;
        border-radius: 20px !important;
        margin: 0 2px;
        border: 1px solid #dee2e6;
        background: transparent;
        color: #333;
        display: flex;
        align-items: center;
        justify-content: center;
        width: auto;
    }
    @media (max-width: 768px) {
        .controls-overlay {
            padding: 2px !important;
            gap: 2px !important;
            background: rgba(0, 0, 0, 0.3);
            transform: scale(0.95);
            transform-origin: bottom center;
            width: 100%;
        }

        .controls-overlay .quantity-controls,
        .controls-overlay .btn-group {
            width: 100%;
            max-width: 98%; 
            border-radius: 12px !important;
            padding: 1px !important;
        }
        
        .quantity-btn, .quantity-controls button {
            max-width: 45%;
            min-width: 28px !important;
            min-height: 28px !important;
            font-size: 0.55rem !important;
            padding: 0 !important;
            border-radius: 9px !important;
            margin: 0 1px !important;
        }
        
        .mp-till .btn-outline-secondary{
            max-width: 48%;
            font-size: 0.7rem !important;
            padding: 3px 6px !important;
            border-radius: 12px !important;
            margin: 0 1px !important;
            height: 24px !important;
        }
    }
    @media (max-width: 768px) {
        .controls-overlay {
            padding: 2px !important;
            gap: 2px !important;
            background: rgba(0, 0, 0, 0.3);
        }

        .controls-overlay .quantity-controls {
            border-radius: 12px !important;
            padding: 1px !important;
        }

        .controls-overlay .btn-group {
            border-radius: 12px !important;
            padding: 1px !important;
        }

        .quantity-btn, .quantity-controls button {
            width: 50px !important;
            height: 40px !important;
            min-width: 18px !important;
            min-height: 18px !important;
            font-size: 0.55rem !important;
            padding: 0 !important;
            border-radius: 9px !important;
            margin: 0 1px !important;
        }

        .bi-plus, .bi-dash {
            font-size: 1rem !important;
        }

        .quantity-display {
            padding: 0 2px !important;
            font-size: 0.6rem !important;
            width: 20px !important;
        }

        .mp-till .btn-outline-secondary{
            border-radius: 20px !important;
            margin: 0 2px;
            border: 1px solid #dee2e6;
            background: transparent;
            color: #333;
            min-width: auto !important; 
            padding: 6px 12px !important; 
            white-space: normal !important;
            height: auto !important; 
            display: flex !important;
            align-items: center;
            justify-content: center;
            word-break: break-word;
            line-height: 1.2;
        }

        .controls-overlay {
            transform: scale(0.95);
            transform-origin: bottom center;
        }
        .mp-till .btn-outline-secondary{
            border-radius: 12px !important;
            padding: 3px 8px !important;
            font-size: 0.7rem !important;
            margin: 0 2px !important;
            height: 24px !important;
            min-width: 40px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
        }
        
        .controls-overlay .btn-group {
            border-radius: 15px !important;
            padding: 2px !important;
        }
    }
    @media (max-width:320){
        .controls-overlay {
            padding: 2px !important;
            gap: 2px !important;
            background: rgba(0, 0, 0, 0.3);
        }

        .controls-overlay .quantity-controls {
            border-radius: 12px !important;
            padding: 1px !important;
        }

        .controls-overlay .btn-group {
            border-radius: 12px !important;
            padding: 1px !important;
        }

        .quantity-btn, .quantity-controls button {
            width: 40px !important;
            height: 40px !important;
            min-width: 18px !important;
            min-height: 18px !important;
            font-size: 0.55rem !important;
            padding: 0 !important;
            border-radius: 9px !important;
            margin: 0 1px !important;
        }

        .bi-plus, .bi-dash {
            font-size: 0.55rem !important;
        }

        .quantity-display {
            padding: 0 2px !important;
            font-size: 0.6rem !important;
            width: 20px !important;
        }

        .mp-till .btn-outline-secondary{
            border-radius: 8px !important;
            padding: 1px 2px !important;
            font-size: 0.55rem !important;
            margin: 0 1px !important;
            height: 16px !important;
        }

        .controls-overlay {
            transform: scale(0.95);
            transform-origin: bottom center;
        }
        .mp-till .btn-outline-secondary{
            border-radius: 12px !important;
            padding: 5px 81px !important;
            font-size: 0.7rem !important;
            margin: 0 2px !important;
            height: 24px !important;
            min-width: 60px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
        }
        
        .controls-overlay .btn-group {
            border-radius: 15px !important;
            padding: 5px !important;
        }
    }

    @media (min-width: 769px) {
        .controls-overlay {
            padding: 12px;
        
            background: rgba(0, 0, 0, 0.5);
        }

        .controls-overlay .quantity-controls {
            border-radius: 25px;
            padding: 6px;
        }

        .controls-overlay .btn-group {
            border-radius: 25px;
            padding: 6px;
        }

        .quantity-controls button {
            width: 30px !important;
            height: 30px !important;
        }

        .quantity-display {
            padding: 0 12px;
            width: 50px !important;
        }
    }
    .image-container img {
        position: absolute; 
        top: 0;
        left: 0;
        width: 100%;
        height: 100%; 
        object-fit: cover; 
        border-radius: 0;
    }


    .image-container12 {
        width: 100%;
        height: auto; 
        max-height: 300px; 
        border-radius: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .mp-till .modal-body .image-container12 img{
        width: auto; 
        height: 100%; 
        max-width: 100%; 
        object-fit: cover; 
    }

    .mp-till .card-body{
        padding: 0;
    }

    .mp-till .col-6{
        margin-bottom: 0px;
        padding: 0px;
    }

    .mp-till .card{
        margin: 0;
        border-radius: 0;
        padding: 0;
        background-color: #0000d3;
        transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    }

    .card-custom {
        background-color: #ff7322;
        color: white;
    }

    .card-custom:hover {
        background-color: #ff7043;
        box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1);
    }

    input[type="number"] {
        font-size: 1rem;
        text-align: center;
    }

    .mp-till .btn-outline-danger:hover{
        background-color: #dc3545;
        color: white;
    }

    .mp-till .btn-success:hover{
        background-color: #28a745;
        color: white;
    }

    .mp-till .modal-bottom .modal-dialog{
        transform: translateY(100%);
        transition: transform 0.3s ease-out;
    }

    .mp-till .modal-bottom.show .modal-dialog{
        transform: translateY(0);
    }

    .mp-till .btn-outline-secondary{
        border-radius: 20px !important;
        margin: 0 2px;
        border: 1px solid #dee2e6;
        background: transparent;
        color: #333;
    }

    .mp-till .btn-check:checked + .btn-outline-secondary{
        background-color: #0d6efd;
        border-color: #0d6efd;
        color: white;
    }

    .mp-till .btn-outline-secondary:hover{
        background-color: rgba(13, 110, 253, 0.1);
        border-color: #0d6efd;
        color: #0d6efd;
    }

    .quantity-display {
        background: transparent;
        color: #333;
        font-weight: bold;
        padding: 0 12px;
    }

    .mp-till .btn-primary{
        background-color: #0d6efd;
        border-color: #0d6efd;
        color: white;
    }

    .mp-till .btn-primary:hover{
        background-color: #0b5ed7;
        border-color: #0b5ed7;
    }

    .modal-dialog1 {
        margin: 1.75rem auto;
        width: 100%;
        max-width: 500px;
        transition: transform 0.3s ease-out;
    }

    /* (the identical .d-flex override from the other product card — see the
       note above; one scoped copy is enough) */

    .card-custom {
        flex: 1 1 30%; 
        margin-bottom: 20px;
        height: 100%;
        transition: background-color 0.3s ease, box-shadow 0.3s ease;
    }

    .mp-till .modal-backdrop{
        display: none !important;
    }

    .image-container {
        position: relative;
        width: 100%;
        padding-top: 100%; 
        background-size: cover;
        background-position: center;
        }

    .mp-till .modal-backdrop{
        display: none !important;
    }

    @media (max-width: 768px) {
        .mp-till .modal-dialog{
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            margin: 0;
            transform: translateY(100%);
            width: 100%;
            max-width: 100%;
        }
        
        .mp-till .modal.show .modal-dialog{
            transform: translateY(0);
        }
    }

    @media (max-width: 768px) {
        .card-custom {
            flex: 1 1 45%;
        }
    }

    @media (max-width: 576px) {
        .card-custom {
            flex: 1 1 100%;
        }
    }

    .col1 {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .tops-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 0;
    }

    @media (min-width: 576px) {
        .tops-container {
            max-width: 440px;
            margin: 0 auto;
        }
    }

    @media (min-width: 992px) {
        .tops-container {
            max-width: 550px;
        }
    }

    @media (min-width: 576px) {
        .col1 {
            grid-template-columns: repeat(4, 1fr);
        }
    }

    @media (min-width: 992px) {
        .col1 {
            grid-template-columns: repeat(5, 1fr);
        }
    }
    .btn-succes {
        background-color: #286aa7;
        border-color: #286aa7;
        color: white;
        font-weight: bold;s
        padding: 10px 20px;
        border-radius: 6px;
        transition: background-color 0.3s, transform 0.2s;
    }
    .quantity-controls input[type="number"] {
        font-size: 0.9rem;
        padding: 0.2rem;
    }

    .quantity-controls button {
        font-size: 0.9rem;
        padding: 0.2rem;
    }

    .mp-till .btn-group-sm > .btn{
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }

    .mp-till .card-body{
        padding: 0.5rem;
    }

    .option-badge {
        position: absolute;
        top: -8px;
        right: -8px;
        min-width: 18px;
        height: 18px;
        border-radius: 50%;
        font-size: 0.65rem;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-weight: bold;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
        z-index: 2;
    }

    .dining-badge {
        background-color: #0d6efd;
    }

    .parcel-badge {
        background-color: #dc3545;
    }

    .mp-till .btn-outline-secondary{
        padding-right: 12px !important;
    }

    @media (max-width: 768px) {
        .option-badge {
            min-width: 16px;
            height: 16px;
            font-size: 0.6rem;
            top: -6px;
            right: -6px;
        }
    }

    @media (max-width: 768px) {
        .quantity-btn {
            min-width: 50px;
            min-height: 28px;
            padding: 2px 6px;
            font-size: 0.7rem;
            border-radius: 12px !important;
        }
        .mp-till .btn-outline-secondary{
            font-size: 0.7rem !important;
            padding: 4px 8px !important;
            border-radius: 12px !important;
            margin: 0 1px !important;
        }
        
        .controls-overlay .btn-group {
            width: auto !important;
            min-width: 120px !important; /* Minimum width for mobile */
            flex-wrap: nowrap;
            gap: 4px;
        }
    }
    @media (max-width: 320px) {
        .mp-till .btn-outline-secondary{
            font-size: 0.6rem !important;
            padding: 3px 6px !important;
        }
        
        .controls-overlay .btn-group {
            min-width: 100px !important;
        }
    }

    @media (max-width: 768px) {
        .quantity-badge {
            width: 20px;
            height: 20px;
            font-size: 0.75rem;
            top: 5px;
            right: 5px;
        }
        
        .controls-overlay {
            display: flex !important;
            opacity: 1 !important;
            visibility: visible !important;
        }
        
        .controls-overlay .quantity-controls,
        .controls-overlay .btn-group {
            opacity: 1 !important;
            visibility: visible !important;
            display: flex !important;
        }
    }
    .quantity-controls {
        background: rgba(255, 255, 255, 0.9);
        border-radius: 25px;
        padding: 6px;
        width: fit-content;
        margin: 0 auto;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .quantity-btn {
        border-radius: 20px !important;
        margin: 0 2px;
        border: 1px solid #dee2e6;
        background: transparent;
        color: #333;
        min-width: 60px !important;
        min-height: 40px !important; 
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        padding: 0;
    }
    .quantity-btn {
        background-color: rgba(13, 110, 253, 0.1);
        border-color: #0d6efd;
        color: #0d6efd;
    }

    .mp-till .btn-check:checked + .quantity-btn{
        background-color: #0d6efd;
        border-color: #0d6efd;
        color: white;
    }

    @media (max-width: 768px) {
        .quantity-controls {
            padding: 4px;
            border-radius: 15px;
        }

        .quantity-btn {
            min-width: 28px;
            min-height: 28px;
            font-size: 0.7rem;
            border-radius: 12px !important;
        }
    }

    @media (min-width: 769px) and (max-width: 1200px) {
        .controls-overlay {
            padding: 8px;
            gap: 4px;
        }
        
        .controls-overlay .btn-group {
            width: 100% !important;
            max-width: 100% !important;
            margin: 0;
            padding: 4px;
        }
        
        .mp-till .btn-outline-secondary{
            font-size: 0.75rem !important;
            padding: 4px 8px !important;
            margin: 0 1px !important;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 45%;
        }
        
        .quantity-controls {
            width: 100%;
            max-width: 100%;
            justify-content: center;
        }
        
        .quantity-btn {
            min-width: 40px !important;
            min-height: 34px !important;
        }
        
        /* Ensure card maintains its width */
        .card-custom {
            width: 100%;
            max-width: 100%;
            overflow: hidden;
        }
    }

    .product-row td {
        width: auto;
        vertical-align: middle;
        padding: 0.5rem 0.75rem;
        border-top: 1px solid rgba(0,0,0,0.05);
    }

.col-thumbnail { width: 64px; }
.thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.04);
}
.thumb-placeholder {
    width: 48px;
    height: 48px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:8px;
    background:linear-gradient(135deg,#f0f0f0,#e6e6e6);
    color:#555;
    font-weight:700;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.col-name .product-title {
    font-weight:600;
    font-size: .95rem;
    color: #212529;
}
.col-name .product-sub {
    margin-top:2px;
    color: #6c757d;
}

.col-price { min-width: 110px; }

.col-parcel, .col-qty { min-width: 140px; }

@media (max-width: 768px) {
    .col-price, .col-parcel, .col-qty { font-size: .86rem; padding: .35rem .5rem; }
    .thumb, .thumb-placeholder { width: 40px; height: 40px; }
    .col-thumbnail { width: 48px; }
}
    
/* subtle hover for easier scanning */
.product-row:hover {
    background: rgba(13,110,253,0.03);
}
.toppings-badges { gap:8px; align-items:center; }

.topping-badge {
    display:inline-flex;
    align-items:center;
    padding:6px 10px;
    border-radius:999px;
    background:#f1f3f5;
    color:#333;
    font-size:0.82rem;
    cursor:pointer;
    border:1px solid rgba(0,0,0,0.05);
    transition:all .12s ease;
}
.topping-badge:hover { transform:translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.06); }
.topping-badge.selected { background:#0d6efd; color:white; border-color:rgba(13,110,253,0.2); }

/* ensure the new toggle column button fits */
.col-toggle { width:42px; padding-left:0.5rem; padding-right:0.25rem; }
.product-row td,
.toppings-row td {
    border-bottom: 1px solid rgba(0,0,0,0.06); /* horizontal line between rows */
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* vertical separators between columns (skip first column) */
.product-row td:not(:first-child),
.toppings-row td:not(:first-child) {
    border-left: 1px solid rgba(0,0,0,0.06);
}

/* add right border to last column for clearer box look */
.product-row td:last-child,
.toppings-row td:last-child {
    border-right: 1px solid rgba(0,0,0,0.06);
}

/* subtle rounded boxes on mobile (optional) */
@media (max-width: 768px) {
    .product-row {
        border-radius: 8px;
        overflow: hidden;
        border: 1px solid rgba(0,0,0,0.04);
        margin-bottom: 8px;
    }
    .product-row td {
        border-left: none !important;
        border-right: none !important;
    }
}


/* ============================================================================
   Legacy component CSS extracted from CatagoryCard.razor (S2).
   107 lines, one copy per category rendered. It DID interpolate Razor values,
   so those became custom properties the markup sets inline per instance:
     --cat-size   category tile edge (from _home.categorycardsize / screen width)
     --cat-brand  the business's brand colour
     --cat-font   configured category font size
   The selected ring keeps the brand colour — that is a feature, not drift.
   ========================================================================= */

    .category-container {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin: 0;
        padding: 2px;
        cursor: pointer;
    }

    .category-card {
        border-radius: 50%;
        overflow: hidden;
        cursor: pointer;
        transition: transform 0.25s ease, box-shadow 0.25s ease;
        box-shadow: 0 3px 10px rgba(0,0,0,0.14);
        position: relative;
        background-color: rgba(0,0,0,0.08);
        width: var(--cat-size);
        height: var(--cat-size);
    }

    @media (hover: hover) {
        .category-card:hover {
            transform: scale(1.08);
            box-shadow: 0 6px 18px rgba(0,0,0,0.22);
        }
        .category-card:hover .card-img-top {
            transform: scale(1.12);
        }
    }

    /* Ring indicator — no layout shift, works on any background */
    .category-card.selected {
        box-shadow: 0 0 0 3px var(--mp-surface), 0 0 0 5px var(--cat-brand), var(--mp-shadow);
        transform: scale(1.06);
    }

    .category-card .card-img-top {
        background-size: cover;
        background-position: center;
        width: 100%;
        height: 100%;
        transition: transform 0.35s ease;
    }

    /* First-letter placeholder for categories without an image */
    .cat-initial {
        font-size: clamp(12px, 35%, 32px);
        font-weight: 700;
        color: rgba(255,255,255,0.75);
        user-select: none;
    }

    .category-title {
        margin-top: 6px;
    }

    .category-title .card-title {
        margin: 0;
        color: #222;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        line-height: 1.25;
        /* Clamp to 2 lines */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .category-title .card-title.selected-title {
        color: var(--cat-brand);
    }

    /* ── Compact button mode (categoryImageEnabled = false) ── */
    .cat-btn {
        display: inline-flex;
        border: 2px solid var(--cat-brand);
        color: var(--cat-brand);
        background: transparent;
        border-radius: 50px;
        padding: 5px 12px;
        font-size: var(--cat-font);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        cursor: pointer;
        transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
        outline: none;
        margin: 2px;
    }

    .cat-btn:active {
        transform: scale(0.93);
    }

    .cat-btn-selected {
        background: var(--cat-brand);
        color: #fff;
        box-shadow: 0 3px 10px rgba(0,0,0,0.20);
    }


/* ============================================================================
   Cart.razor styles extracted (S2).
   982 lines. Single instance, so this is not about duplication — it is about
   getting ~50 hardcoded Bootstrap-era literals onto the token set so the cart
   follows the theme. Its one Razor interpolation (@cartWidth, the resizable
   desktop panel width) became --cart-w, set inline from the same field.
   Layout, transforms and transitions are untouched.
   ========================================================================= */

    .mobile-view-toggle 
    {
        display: none;
        position: fixed;
        top: 70px;
        right: 10px;
        z-index: 1000;
    }

    @media (min-width: 992px) {
        .mobile-view-toggle {
            display: block;
        }
    
        /* mobile-view-active: body slides UP from bottom instead of in from right */
        .cart-summary.mobile-view-active .cart-summary-body {
            left: 0;
            right: 0;
            bottom: 0;
            top: 0;
            width: 100% !important;
            max-width: 100vw;
            height: 100dvh;
            overflow-x: hidden;
            overflow-y: auto;
            transform: translateY(100%);
            visibility: hidden;
            pointer-events: none;
            z-index: 1045;
            background-color: var(--mp-surface, white);
        }

        .cart-summary.mobile-view-active .cart-summary-body.expanded {
            transform: translateY(0);
            visibility: visible;
            pointer-events: auto;
            overflow: auto;
        }
        
        .cart-summary.mobile-view-active .resize-handle {
            display: none;
        }
    }

     
    .cart-summary {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: transparent;
        border: none;
        pointer-events: none;
        z-index: 1020;
    }

    /* Mobile bottom-sheet: slide up/down via transform for smooth 60fps animation */
    .cart-summary-body {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 100dvh;
        background-color: var(--mp-surface, white);
        transform: translateY(100%);
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s ease;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0;
        z-index: 1045;
    }

    .cart-summary-body.expanded {
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
        overflow-y: auto;
    }

    .cart-summary-header {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
        cursor: pointer;
        background-color: var(--mp-surface-2, #f8f9fa);
        border-top: 1px solid var(--mp-line-strong, #dee2e6);
        border-radius: 8px 8px 0 0;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.12);
        z-index: 1020;
        pointer-events: auto;
        transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    }

    @media (min-width: 992px) {
        .cart-summary {
            bottom: 0;
            left: 0;
            width: 100%;
            pointer-events: none;
            z-index: 1020;
        }

        /* Desktop collapsed state: full-width bottom bar */
        .cart-summary-header {
            display: flex;
            position: fixed;
            bottom: 0;
            left: 0;
            right: auto;
            top: auto;
            width: 100%;
            height: auto;
            background: var(--mp-surface-2, #f8f9fa);
            border-top: 1px solid var(--mp-line, #dee2e6);
            border-radius: 8px 8px 0 0;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            z-index: 1020;
            pointer-events: auto;
            padding: 0.85rem 1.5rem;
            padding-bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
            box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
            transform: none;
        }

        /* Show cart items and total in the desktop bottom bar */
        .cart-summary:not(.mobile-view-active) .cart-summary-header .cart-summary-items,
        .cart-summary:not(.mobile-view-active) .cart-summary-header > span:last-child {
            display: flex;
        }

        /* Keep toggle-arrow as pull-up indicator above the header */
        .cart-summary:not(.mobile-view-active) .cart-summary-header .toggle-arrow {
            position: absolute;
            top: -14px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 1.5rem;
        }

        /* Sidebar body: slides in from the right when expanded with higher z-index than nav */
        .cart-summary-body {
            position: fixed;
            right: 0;
            top: 0;
            left: auto;
            bottom: 0;
            width: var(--cart-w, 380px);
            height: 100dvh;
            transform: translateX(100%);   /* hidden off-screen right */
            visibility: hidden;
            pointer-events: none;
            transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s ease;
            overflow-y: auto;
            min-width: 320px;
            max-width: 80vw;
            background-color: var(--mp-surface, white);
            box-shadow: -4px 0 20px rgba(0, 0, 0, 0.18);
            z-index: 1045;
        }

        .cart-summary-body.expanded {
            transform: translateX(0);      /* slide in from right */
            visibility: visible;
            pointer-events: auto;
        }
    }

    @media (max-width: 991px) {
        .cart-summary {
            bottom: 0;
            left: 0;
            width: 100%;
            right: auto;
            overflow-x: hidden;
            pointer-events: none;
        }

        .cart-summary-header {
            position: fixed;
            bottom: 0;
            left: 0;
            flex-direction: column;
            align-items: stretch;
            gap: 8px;
            padding: 12px;
            padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
            width: 100% !important;
            max-width: 100vw !important;
            z-index: 1020;
            pointer-events: auto;
        }

        .cart-summary-body {
            position: fixed;
            top: 0;
            left: 0;
            width: 100% !important;
            height: 100dvh !important;
            max-width: 100vw !important;
            overflow-x: hidden;
            z-index: 1045;
            background-color: var(--mp-surface, white);
        }
        
        #PrintSale.container {
            width: 100%;
            max-width: 100%;
            padding-left: 10px;
            padding-right: 10px;
            overflow-x: hidden;
        }
        .cart-summary-header {
            flex-direction: column;
            align-items: stretch;
            gap: 8px;
            padding: 12px;
        }
        
        .cart-summary-header > span:last-child {
            align-self: flex-end;
            margin-top: 8px;
            border-top: 1px solid var(--mp-line);
            padding-top: 8px;
        
            text-align: right;
        }
        
        .cart-summary-items {
            width: 100%;
            max-width: 100%;
            overflow-x: hidden;
        }
        
        .cart-summary-items .item-details {
            width: 100%;
        }
        
        .item-name {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 70%;
        }
    }

    .cart-summary-header.hidden {
        display: none !important;
        opacity: 0 !important;
        pointer-events: none !important;
        visibility: hidden !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

    .cart-summary-items {
        display: flex;
        flex-direction: column; 
        gap: 0;
        max-height: 90px;
        overflow-y: auto; 
        margin: 0; 
        padding: 0; 
    }

    .cart-summary-items .item-details {
        padding: 0 0; 
        border: none; 
        display: flex;
        justify-content: space-between; 
        align-items: center;
    }

    .item-name {
        font-weight: bold;
        color: #343a40;
    }

    .item-quantity {
        font-weight: normal;
        color: var(--mp-muted); 
        text-align: right; 
    }

    .cart-summary-header span:last-child {
        font-size: 1.2rem;
        font-weight: bold;
        color: var(--mp-accent); 
    }

    .cart-summary-header:hover {
        background-color: var(--mp-surface-2);
    }

    .toggle-arrow {
        position: absolute;
        top: -10px; 
        left: 50%;
        transform: translateX(-50%); 
        font-size: 1.5rem;
        font-weight: bold;
        color: var(--mp-accent); 
        padding: 0 0.5rem; 
        z-index: 10; 
    }

    .toggle-arrow:hover {
        color: #0056b3; 
    }

    .close-button-container {
        position: sticky;
        top: 0;
        padding-top: max(8px, env(safe-area-inset-top, 8px));
        display: flex;
        justify-content: center;
        background-color: var(--mp-surface, white);
        z-index: 1050;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
        margin-bottom: 10px;
    }

    .close-button {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
        background-color: var(--mp-surface, white);
        border-radius: 50%;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
        border: 1px solid var(--mp-line, #dee2e6);
        margin-bottom: 6px;
        color: var(--mp-accent, #007bff);
        cursor: pointer;
    }

    .cart-summary-body.expanded {
        overflow: auto;
        /* No extra padding-top here — the close-button-container already
           accounts for the iOS safe-area inset via its own padding. */
    }
    @media (max-width: 768px) {
        .cart-header, 
        .cart-item {
            display: grid !important;
            grid-template-columns: 
                15%   
                15%  
                10%   
                10% 
                12%  
                40px  
            ;
            align-items: center;
        
        }

        .cart-header span {
            font-weight: bold;
            text-align: right;
        }

        .cart-header span:first-child,
        .cart-item span:first-child {
        
        }

       

        .cart-item .item-total {
            font-weight: bold;
            text-align: right;
        }

        .cart-item .text-center {
            text-align: center !important;
        }
        .cart-item .item-name {
        overflow: hidden;
        white-space: normal;
        word-break: break-word;
        hyphens: auto;
        max-width: 100%;
    
        line-height: 1.2;
    }

    .cart-item .item-quantity {
        white-space: nowrap; 
    }
    
    .mp-till .text-center[style="width: 6%"]{
        width: 40px !important;
        min-width: 40px;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 4px;
        margin-left: auto;
    }

    .mp-till .text-center[style="width: 6%"] button{
        padding: 4px;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        background: transparent;
    }

 

    .item-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .item-total {
        text-align: right;
        padding-right: 8px;
    }
}

.print-copies-container {
        display: flex;
        align-items: center;
        background: var(--mp-surface-2);
        padding: 12px;
        border-radius: 8px;
        margin: 10px 0;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .print-copies-label {
        flex: 1;
        color: var(--mp-ink-2);
        font-weight: 500;
        margin-right: 12px;
    }

    .print-copies-input {
        width: 80px;
        text-align: center;
        border: 2px solid var(--mp-line);
        border-radius: 6px;
        padding: 8px;
        font-size: 16px;
        color: var(--mp-ink-2);
        background: white;
        transition: all 0.3s ease;
    }

    .print-copies-input:focus {
        border-color: #80bdff;
        box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
        outline: none;
    }

    .copies-control {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .copy-button {
        background: var(--mp-surface-2);
        border: none;
        width: 32px;
        height: 32px;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .copy-button:hover {
        background: var(--mp-line);
    }

    .copy-button:active {
        transform: scale(0.95);
    }

    .cart-page-container {
        padding-bottom: 60px;
        height: 100vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .payment-types {
        display: flex;
        align-items: center;
    }

    .payment-details {
        transition: all 0.3s ease;
    }

    .mp-till .form-select{
        height: 100%;
        border-radius: 0.25rem;
        border: 1px solid #ced4da;
    }

    .mp-till .btn-group-toggle .btn{
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }

    .mp-till .btn-check:checked + .btn-outline-primary{
        background-color: var(--bs-primary);
        color: white;
    }
    .resize-handle {
        width: 10px;
        height: 50px;
        position: absolute;
        left: -5px; 
        top: 50%;
        transform: translateY(-50%);
        background-color: var(--mp-surface-2);
        border-radius: 3px;
        cursor: ew-resize;
        display: none;
        z-index: 1000;
        transition: background-color 0.2s;
        box-shadow: -1px 0 3px rgba(0, 0, 0, 0.2);
    }

    .resize-handle:hover, .resize-handle.dragging {
        background-color: var(--mp-accent);
    }

    .resize-handle::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 2px;
        height: 20px;
        background-color: rgba(0, 0, 0, 0.3);
    }

    @media (min-width: 992px) {
        .resize-handle {
            display: block;
        }
        
        .cart-summary-body {
            transition: width 0.1s ease;
            min-width: 300px;
            max-width: 80vw;
        }
    }
    @media (min-width: 992px) {
    .cart-header, 
    .cart-item {
        display: grid !important;
        grid-template-columns: minmax(150px, 40%) 90px auto auto auto 40px !important;
     
        align-items: center !important;
        padding: 0.5rem 1rem !important;
        width: 100% !important;
    }
    
    .cart-header span, .cart-item span {
        flex-grow: 0 !important;
        width: auto !important;
        max-width: none !important;
    }
    
    .cart-item .item-name, .cart-header .item-name {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: normal !important;
    }
    
    .cart-item .item-quantity, 
    .cart-header .item-quantity,
    .tax1-column, 
    .tax2-column, 
    .item-total {
        text-align: right !important;
        justify-self: end !important;
    }
    
    .cart-item span[style="width: 6%"], 
    .cart-header span[style="width: 6%"] {
        justify-self: center !important;
        width: auto !important;
    }
}

.held-bills-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .held-bill-card {
        border: 1px solid var(--mp-line);
        border-radius: 8px;
        padding: 12px;
        cursor: pointer;
        transition: all 0.2s ease;
        background-color: #fff;
        display: flex;
        flex-direction: column;
    }
    
    .held-bill-card:hover {
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        border-color: #adb5bd;
    }
    
    .held-bill-card.selected {
        border: 2px solid #0d6efd;
        background-color: var(--mp-accent-soft);
    }
    
    .held-bill-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
    }
    
    .held-bill-header h6 {
        margin: 0;
        font-weight: 600;
    }
    
    .held-bill-items {
        flex-grow: 1;
        margin-bottom: 10px;
        border-top: 1px solid var(--mp-line);
        padding-top: 8px;
    }
    
    .held-bill-item {
        display: flex;
        justify-content: space-between;
        margin-bottom: 4px;
        font-size: 0.9rem;
    }
    
    .held-bill-item .item-name {
        max-width: 70%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .held-bill-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 8px;
        border-top: 1px solid var(--mp-line);
    }
    
    .held-bill-footer .total-amount {
        font-weight: bold;
        color: #198754;
    }
    
    @media (max-width: 768px) {
        .held-bills-grid {
            grid-template-columns: 1fr;
        }
    }
   
 @media (max-width: 900px) {
    .cart-summary {
        bottom: 0;
        left: 0;
        right: auto;
        width: 100% !important;
        border-left: none;
        border-top: 1px solid var(--mp-line-strong);
        overflow-x: hidden;
        height: auto;
    }

    /* Let the base transform animation handle show/hide — no max-height override */
    .cart-summary-body {
        width: 100% !important;
        max-width: 100%;
        overflow-x: hidden;
    }

    .cart-summary-header {
        position: fixed;
        bottom: 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        left: 0;
        right: auto;
        width: 100% !important;
        border-top-right-radius: 0;
        border-top-left-radius: 0;
    }
}

    /* Mobile styles for smaller screens */
    @media (max-width: 991px) {
        .cart-summary {
            width: 100% !important;
            left: 0;
            right: auto;
        }

        .cart-summary-body,
        .cart-summary-header {
            width: 100% !important;
            max-width: 100%;
        }
    }
    .input-with-icon {
        position: relative;
    }
    
    .search-icon {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--mp-muted);
        pointer-events: none;
    }
    
    .suggestion-dropdown {
        position: absolute;
        top: calc(100% + 5px);
        left: 0;
        right: 0;
        z-index: 1050;
        background: white;
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
        max-height: 300px;
        overflow-y: auto;
        border: 1px solid var(--mp-line);
    }
    
    .suggestion-item {
        padding: 12px 16px;
        border-bottom: 1px solid var(--mp-line);
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .suggestion-item:last-child {
        border-bottom: none;
    }
    
    .suggestion-item:hover {
        background-color: var(--mp-accent-soft);
    }
    
    .suggestion-primary {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 4px;
    }
    
    .suggestion-name {
        font-weight: 600;
        font-size: 0.95rem;
        color: var(--mp-ink);
    }
    
    .recent-tag {
        background-color: #e6f7ff;
        color: #0077cc;
        padding: 2px 6px;
        border-radius: 4px;
        font-size: 0.7rem;
        font-weight: 600;
    }
    
    .suggestion-details {
        display: flex;
        justify-content: space-between;
        color: var(--mp-muted);
        font-size: 0.8rem;
    }
    
    .suggestion-phone, .suggestion-date {
        display: flex;
        align-items: center;
        gap: 4px;
    }
    
    .suggestion-more {
        padding: 8px 16px;
        text-align: center;
        font-size: 0.85rem;
        color: var(--mp-muted);
        background-color: var(--mp-surface-2);
        border-top: 1px solid var(--mp-line);
    }
    
    /* Hover animations */
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(-5px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .suggestion-dropdown {
        animation: fadeIn 0.2s ease;
    }
    
    /* Mobile optimizations */
    @media (max-width: 576px) {
        .suggestion-details {
            flex-direction: column;
            gap: 4px;
        }
        
        .suggestion-dropdown {
            position: fixed;
            top: auto;
            bottom: 0;
            left: 0;
            right: 0;
            max-height: 60vh;
            border-bottom-left-radius: 0;
            border-bottom-right-radius: 0;
            border-top-left-radius: 12px;
            border-top-right-radius: 12px;
            box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
            z-index: 1060;
        }
        
        .suggestion-dropdown:before {
            content: '';
            display: block;
            width: 40px;
            height: 4px;
            background-color: var(--mp-line);
            border-radius: 2px;
            margin: 8px auto;
        }
    }
    


.resize-handle {
    width: 24px;
    height: 80px;
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--mp-line);
    border-radius: 4px;
    cursor: ew-resize;
    display: none;
    z-index: 1000;
    transition: all 0.2s;
    box-shadow: -2px 0 6px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--mp-line);
    display: flex;
    align-items: center;
    justify-content: center;
}

.resize-handle:hover, .resize-handle.dragging {
    background-color: var(--mp-accent);
    width: 28px;
    box-shadow: -3px 0 8px rgba(0, 0, 0, 0.3);
}

.resize-handle:hover svg, .resize-handle.dragging svg {
    fill: white;
}

.resize-grip {
    
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}


@media  (max-width:600px){
        .resize-handle   {
            display: none;
        }     
    }
/* Quantity Control */
.quantity-control-wrapper {
    gap: 0;
    border: 1px solid var(--mp-line-strong);
    border-radius: var(--mp-radius-sm);
    overflow: hidden;
    display: inline-flex;
    align-items: stretch;
    height: 32px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    vertical-align: middle;
}

.qty-btn {
    background: var(--mp-surface-2);
    border: none;
    width: 30px;
    height: 32px;
    min-height: 32px;
    max-height: 32px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    color: var(--mp-ink);
    flex-shrink: 0;
    line-height: 1;
    box-sizing: border-box;
}

.qty-btn:hover:not(:disabled) {
    background: var(--mp-line);
}

.qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.qty-minus {
    border-right: 1px solid var(--mp-line);
}

.qty-plus {
    border-left: 1px solid var(--mp-line);
}

.qty-input {
    width: 42px;
    height: 32px;
    min-height: 32px;
    max-height: 32px;
    border: none;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--mp-ink);
    background: var(--mp-surface, #fff);
    padding: 0;
    margin: 0;
    line-height: 32px;
    vertical-align: middle;
    box-sizing: border-box;
    -moz-appearance: textfield;
}

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

.qty-input:focus {
    outline: none;
    background: var(--mp-surface, #fff);
    box-shadow: inset 0 0 0 1px var(--mp-accent);
}
.unit-info {
    min-width: 90px;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-start;
}

.unit-price {
    font-size: 0.9rem;
    color: var(--mp-muted);
    font-weight: 600;
}

/* tighten quantity control spacing on small screens */
@media (max-width: 576px) {
    .unit-info { min-width: 70px; }
    .qty-input { width: 44px; font-size: 0.85rem; }
}

/* ensure overall row alignment */
.item-box-details {
    gap: 8px;
    align-items: center;
}
