:root{

    /* ================= BRAND ================= */
    --kai-blue:#001c7d;
    --kai-red:#e53935;
    --kai-orange:#ff6f00;
    --kai-green:#2e7d32;
    --kai-purple:#4d006c;
    --kai-yellow:#fefff5;
    --kai-white:#fff;
    --kai-lblue: #4c869c;
    /* ================= SEMANTIC ================= */
    --primary: var(--kai-blue);
    --secondary: var(--kai-red);
    --success:#2e7d32;
    --danger:#c62828;
    --warning:#ff6f00;

    /* ================= UI ================= */
    --dark:#0b1f3a;
    --muted:#6b7280;
    --bg:#f4f4f4;
    --card:#ffffff;
    --border:#e5e7eb;

    /* ================= DESIGN TOKENS ================= */
    --radius:17px;
    --shadow:0 4px 14px rgba(0,0,0,0.10);
    --transition:.2s ease;
}

/* =====================================================
   POS ENGINE + CATEGORY + PRODUCT
   ICHIBAN SUSHI FULL KIOSK SYSTEM
   CLEAN • ISOLATED • NO BOOTSTRAP CONFLICT
===================================================== */

/* ================= GLOBAL ISOLATION ================= */
.pos-app{
    font-family: Arial, sans-serif;
    background:#f5f5f5;
    width:100vw;
    overflow-x:hidden;
}





/* =====================================================
   PRODUCT GRID ENGINE
===================================================== */

.vm-products-vertical{
    display:grid !important;
    grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
    gap:14px;

    padding:14px;
    width:100%;
    background:#fafafa;
}



/* =====================================================
   POS PRO MAX PERFORMANCE (FULL BLEED FIX)
   NO BOOTSTRAP CONFLICT • FULL WIDTH STABLE GRID
===================================================== */

/* ================= ROOT ================= */
html, body{
    width:100%;
    height:100%;
    margin:0;
    padding:0;
    overflow-x:hidden;
}

/* ================= POS APP FULL SCREEN ================= */
.pos-app{
    font-family: Arial, sans-serif;
    background:#f5f5f5;

    /* 🔥 FIX FULL WIDTH ISSUE */
    width:100% !important;
    max-width:100% !important;

    margin:0 !important;
    padding:0 !important;
}

/* =====================================================
   🔥 KILL BOOTSTRAP CONTAINER LIMIT
===================================================== */
.pos-app .container,
.pos-app .container-fluid,
.pos-app .container-sm,
.pos-app .container-md,
.pos-app .container-lg,
.pos-app .container-xl,
.pos-app .container-xxl{
    max-width:100% !important;
    width:100% !important;

    margin:0 !important;
    padding:0 !important;
}

/* =====================================================
   🔥 ROW RESET (STOP FLEX BOOTSTRAP)
===================================================== */
.pos-app .row{
    display:grid !important;
    grid-template-columns:100%;

    margin:0 !important;
    padding:0 !important;

    width:100% !important;
}

/* CHILD FIX (INI YANG BIKIN RAPAT & MISALIGN) */
.pos-app .row > *{
    width:100% !important;
    max-width:100% !important;

    padding:0 !important;
    margin:0 !important;

    flex:none !important;
}

/* =====================================================
   CATEGORY GRID FIX (NO OVERFLOW + NO GIANT IMAGE)
===================================================== */
.category-view .row{
    display:grid !important;

    grid-template-columns:repeat(auto-fill,minmax(140px,1fr));

    gap:12px;

    width:100%;

    margin:0 !important;
    padding:12px;

    box-sizing:border-box;
}

/* CATEGORY IMAGE CONTROL (FIX GIANT IMAGE ISSUE) */
.category-view .category img{
    width:64px !important;
    height:64px !important;

    object-fit:cover;

    border-radius:50%;

    display:block;
    margin:0 auto 6px auto;
}



/* =====================================================
   POS LAYOUT FULL SCREEN ENGINE
===================================================== */
.pos-layout{
    display:grid;

    grid-template-columns:220px 1fr 320px;

    width:100%;
    height:100vh;
}

/* CATEGORY */
.pos-category{
    background:#fff;
    overflow-y:auto;
}

/* PRODUCTS */
.pos-products{
    overflow-y:auto;
    padding:10px;
}

/* CART */
.pos-cart{
    background:#fff;
    overflow-y:auto;
}

/* =====================================================
   TOP BAR FIX FULL WIDTH
===================================================== */
.pos-topbar{
    width:100%;
    height:60px;

    display:flex;
    align-items:center;

    padding:0 12px;

    background:#fff;
    border-bottom:1px solid #eee;
}

/* =====================================================
   MOBILE FIX
===================================================== */
@media(max-width:768px){

    .pos-layout{
        grid-template-columns:1fr;
        grid-template-rows:auto 1fr auto;
    }

    .pos-category{
        display:none;
    }

    .pos-cart{
        position:fixed;
        bottom:0;
        right:0;

        width:100%;
        height:40%;
    }

    .vm-products-vertical{
        grid-template-columns:repeat(2,1fr);
    }
}

/* =====================================================
   TOP BAR
===================================================== */

.pos-topbar{
    height:60px;
    background:#fff;

    display:flex;
    align-items:center;

    padding:0 12px;
    border-bottom:1px solid #eee;
}

#posSearch{
    width:100%;
    height:40px;

    border:1px solid #ddd;
    border-radius:10px;

    padding:0 12px;
    font-size:13px;
}

/* =====================================================
   POS ROW FULL ISOLATION FIX
===================================================== */

.pos-app .row{
    display:grid !important;   /* 🚨 MATIKAN FLEX BOOTSTRAP */
    flex-wrap:unset !important;
    margin:0 !important;
    width:100%;
}

/* CHILD RESET */
.pos-app .row > *{
    width:auto !important;
    max-width:none !important;
    flex:unset !important;
    flex-shrink:unset !important;
}
/* =====================================================
   RESPONSIVE MODE
===================================================== */

@media(max-width:768px){

    .pos-layout{
        grid-template-columns:1fr;
        grid-template-rows:auto 1fr auto;
    }

    .pos-category{
        display:none;
    }

    .pos-cart{
        position:fixed;
        right:0;
        bottom:0;

        width:100%;
        height:40%;

        z-index:999;
    }

    .vm-products-vertical{
        grid-template-columns:repeat(2,1fr);
        gap:10px;
    }

    .category-view .row{
        grid-template-columns:repeat(4,1fr);
        gap:10px;
    }
}
/* =====================================================
   POS FORM CONTROL LAYER (KIOSK MODE)
   Override Bootstrap + browser default form style
===================================================== */

.pos-app input,
.pos-app button,
.pos-app select,
.pos-app textarea{
    font-family: Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.2;
    margin: 0;
}

/* ================= INPUT STYLE ================= */
.pos-app input{
    height:40px;
    border:1px solid #ddd;
    border-radius:9px;
    padding:0 12px;

    background:#f5f5f5;
    outline:none;
}

.pos-app input:focus{
    border-color:#c40000;
    box-shadow:0 0 0 2px rgba(196,0,0,0.1);
}

/* ================= BUTTON STYLE ================= */
.pos-app button{
    border:none;
    cursor:pointer;
}

/* ================= SELECT STYLE ================= */
.pos-app select{
    height:40px;
    border:1px solid #ddd;
    border-radius:10px;
    background:#fff;
    padding:0 10px;
}

/* ================= TEXTAREA ================= */
.pos-app textarea{
    border:1px solid #ddd;
    border-radius:10px;
    padding:10px;
}
/* =====================================================
   BOOTSTRAP CONTAINER FULL KILL (POS MODE ONLY)
===================================================== */

/* MATIKAN SEMUA CONTAINER LIMIT */
.pos-app .container,
.pos-app .container-sm,
.pos-app .container-md,
.pos-app .container-lg,
.pos-app .container-xl,
.pos-app .container-xxl{
    max-width:100% !important;
    width:100% !important;

    margin-left:0 !important;
    margin-right:0 !important;

    padding-left:0 !important;
    padding-right:0 !important;
}
.ichiban-pos{
    padding:12px;
    background:#f5f5f5;
}

/* =====================================================
   HEADER
===================================================== */
.ichiban-title{
    font-size:18px;
    font-weight:700;
    margin-bottom:10px;
}

/* =====================================================
   CATEGORY GRID
===================================================== */
.ichiban-category-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(110px,1fr));
    gap:12px;

    width:100%;
    padding:10px;
}

/* CATEGORY ITEM */
.ichiban-cat{
    background:#fefff5;
    border-radius:14px;

    padding:10px 8px;
    text-align:center;
    text-decoration:none;

    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;

    box-shadow:0 2px 6px rgba(0,0,0,0.06);
    transition:.15s ease;
}

.ichiban-cat:hover{
    transform:translateY(-2px);
    box-shadow:0 4px 12px rgba(0,0,0,0.10);
}

/* CATEGORY IMAGE */
.cat-img{
    width:90px;
    height:90px;
    border-radius:50%;
    overflow:hidden;

    display:flex;
    align-items:center;
    justify-content:center;

    background:#f5f5f5;
    margin-bottom:6px;
}

.cat-img img{
    width:100%;
    height:100%;
    object-fit:cover;
}

/* CATEGORY NAME */
.cat-name{
    font-size:13px;
    font-weight:600;
    color:#333;

    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;

    width:100%;
}

/* =====================================================
   PRODUCT GRID
===================================================== */
.ichiban-product-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
    gap:12px;
}

/* =====================================================
   PRODUCT CARD
===================================================== */
.ichiban-card{
    background:#fefff5;
    border-radius:14px;
    overflow:hidden;

    box-shadow:0 2px 10px rgba(0,0,0,0.06);

    display:flex;
    flex-direction:column;
}

/* IMAGE */
.ichiban-img{
    width:100%;
    height:170px;
    overflow:hidden;

    display:flex;
    align-items:center;
    justify-content:center;

    background:#f8f8f8;
}

.ichiban-img img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

/* NAME */
.ichiban-name{
    font-size:13px;
    font-weight:600;

    padding:8px;
    text-align:center;
}

/* PRICE */
.ichiban-price{
    padding:0 8px 6px;

    font-weight:700;
    color:var(--kai-red);

    text-align:center;
}

/* CART */
.ichiban-cart{
    margin-top:auto;

    display:flex;
    justify-content:center;
}

.ichiban-cart button,
.addtocart-button{
    width:100%;
    height:38px;

    border:none;
    border-radius:10px;

    background:linear-gradient(180deg,var(--kai-yellow),var(--kai-yellow));
    color:var(--kai-red);

    font-size:13px;
    font-weight:700;

    display:flex;
    align-items:center;
    justify-content:center;

    transition:.2s ease;
}

.addtocart-button:hover{
    opacity:0.92;
    transform:scale(1.01);
}

/* =====================================================
   CART DROPDOWN
===================================================== */
.dropdown-menu,
.vmCartModule .dropdown-menu,
.minicart .dropdown-menu{
    width:260px !important;
    max-height:320px !important;
    overflow-y:auto !important;

    padding:8px !important;
    border-radius:12px;

    box-shadow:0 6px 18px rgba(0,0,0,0.12);
}

/* CART ITEM */
.dropdown-menu .cart-item,
.vmCartModule .cart-item{
    display:flex;
    gap:8px;

    padding:6px 0;
    border-bottom:1px solid #eee;
}

/* CART IMAGE */
.dropdown-menu img,
.vmCartModule img{
    width:42px !important;
    height:42px !important;
    object-fit:cover !important;
    border-radius:8px !important;
}

/* CART TEXT */
.dropdown-menu .product-name{
    font-size:12px;
    line-height:1.2;
}

.dropdown-menu .product-price{
    font-size:12px;
    font-weight:700;
    color:#c40000;
}

/* =====================================================
   VM PRODUCT GLOBAL (ISOLATED SAFE)
===================================================== */
.vm-product-card,
.product,
.vm-product{
    background:var(--kai-yellow);
    border-radius:12px;

    padding:8px;
    min-height:140px;

    display:flex;
    flex-direction:column;

    box-shadow:0 1px 4px rgba(0,0,0,0.06);
    transition:.15s ease;
}

.vm-product-card:hover{
    transform:translateY(-3px);
    box-shadow:0 10px 22px rgba(0,0,0,0.10);
}

/* hide extra VM elements */
.vm-product .product-details,
.vm-product .vm-details-button,
.vm-product .product-fields{
    display:none !important;
}



/* =====================================================
   FIX BOX + IMAGE SYNCHRON (ICHIBAN PRO MODE)
===================================================== */

/* BOX IMAGE HARUS FIX HEIGHT */


/* IMAGE HARUS NGIKUT BOX (BUKAN SEBALIKNYA) */

h4 {
    font-size: 22px;
}

@media (max-width: 991px) {
    h4 {
        font-size: 18px;
    }
}

.h4, h4 {
    font-size: calc(1.275rem + .3vw);
}

/* =====================================================
   POS TYPOGRAPHY LOCK (ANTI BOOTSTRAP CONFLICT)
===================================================== */

.pos-app h4,
.ichiban-pos h4,
.vm-product h4,
.product h4{
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;

    margin: 4px 0 !important;
    color: #333 !important;
}

/* =====================================================
   CART DROPDOWN / MINICART LAYER FIX
===================================================== */

.vmCartModule{
    position: relative !important;
    z-index: 9999 !important;
}

.vmCartModule *{
    box-sizing: border-box;
}

/* dropdown / popup cart */
.vmCartModule .vmCartList,
.vmCartModule .dropdown-menu,
.vmCartModule .cart-popup,
.vmCartModule .vm-minicart{
    position: absolute !important;
    top: 100%;
    right: 0;
    z-index: 99999 !important;

    max-height: 320px;
    overflow-y: auto;

    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);

    transform: none !important;
}

/* =====================================================
   CART MODAL (SCOPED - SAFE)
===================================================== */

/* hanya modal kita */
#cartModal{
    padding:15px;
}

#cartModal .cart-modal-content{
    width:100%;
    max-width:420px;
    margin:auto;
    border-radius:14px;
    font-size:14px;
}

/* =====================================================
   OPTIONAL: LIMIT VM POPUP (ONLY CART)
===================================================== */

/* target popup VirtueMart add to cart saja */
body.com_virtuemart .facebox,
body.com_virtuemart .fancybox-wrap{
    max-width:420px !important;
    margin:auto !important;
}

/* jangan ganggu semua modal */
#cartModal{
    display:flex;
    align-items:center;
    justify-content:center;
}

/* mobile padding */
@media(max-width:480px){
    #cartModal .cart-modal-content{
        max-width:95%;
    }
}
/* =====================================================
   SAFETY LAYER (PREVENT FULLSCREEN POPUP BUG)
===================================================== */

.pos-popup{
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    opacity: 0;
    transform: translateY(-10px);
    transition: .2s ease;
}

.pos-popup.show{
    opacity: 1;
    transform: translateY(0);
}

.pos-popup-box{
    background: #111;
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    box-shadow: 0 10px 25px rgba(0,0,0,.2);
}

.pos-popup-icon{
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2ecc71;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size: 12px;
}
a {
    color: inherit;
    text-decoration: none;
}
.pos-filter-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    padding: 10px;
    border-bottom: 1px solid #eee;
}
/* FORCE TRUE MODAL (ANTI JATUH KE BAWAH) */
#cartModal{
    position: fixed !important;
    inset: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    z-index: 999999 !important;

    background: rgba(0,0,0,0.5);

    opacity: 0;
    visibility: hidden;
}

#cartModal.show{
    opacity: 1;
    visibility: visible;
}
