*{
    box-sizing:border-box;
}

html{
    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility;
    scroll-behavior:smooth;
}

body{
    margin:0;
    font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Inter","Segoe UI",Arial,sans-serif;
    background:#f5f5f7;
    color:#1d1d1f;
}

a{
    text-decoration:none;
    color:inherit;
}

.udl-page{
    min-height:100vh;
}

/* HEADER */

.udl-header{
    height:96px;
    background:rgba(255,255,255,.88);
    backdrop-filter:blur(8px);
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:16px 32px;
    position:sticky;
    top:0;
    z-index:50;
    border-bottom:1px solid rgba(0,0,0,.05);
    box-shadow:0 8px 24px rgba(15,23,42,.04);
}

.udl-logo img{
    height:64px;
}

.view-order-btn{
    display:flex;
    align-items:center;
    gap:10px;
    background:#fff;
    border:1px solid rgba(0,0,0,.08);
    border-radius:18px;
    padding:13px 20px;
    font-size:15px;
    font-weight:700;
    color:#1d1d1f;
    box-shadow:0 6px 18px rgba(15,23,42,.05);
}

.view-order-btn span{
    background:#ff7900;
    color:#fff;
    border-radius:50%;
    min-width:24px;
    height:24px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:12px;
    font-weight:700;
}

/* MAIN */

.udl-main{
    margin-right:370px;
    padding:28px 32px;
}

/* SHARED CARDS */

.customer-card,
.find-customer-box,
.product-search-box,
.benefit-bar,
.category-card,
.order-sidebar{
    background:rgba(255,255,255,.92);
    backdrop-filter:blur(8px);
    border:1px solid rgba(0,0,0,.06);
    box-shadow:0 10px 24px rgba(15,23,42,.08);
}

/* CUSTOMER PANEL */

.customer-panel{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:18px;
    margin-bottom:18px;
}

.customer-card{
    padding:22px;
    min-height:130px;
    border-radius:26px;
    contain:layout paint;
}

.active-customer{
    display:flex;
    align-items:flex-start;
    gap:16px;
}

.customer-icon,
.find-icon{
    width:58px;
    height:58px;
    border-radius:50%;
    background:#f2f3f5;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:26px;
    flex-shrink:0;
}

.customer-card small{
    color:#86868b;
    font-size:13px;
    font-weight:600;
}

.customer-card h3{
    margin:8px 0;
    font-size:23px;
    font-weight:700;
    letter-spacing:-.03em;
}

.customer-card p{
    margin:0;
    color:#86868b;
}

.active-customer a,
.customer-card button{
    border:1px solid rgba(0,0,0,.1);
    background:#fff;
    color:#1d1d1f;
    padding:10px 15px;
    border-radius:16px;
    font-weight:700;
    display:inline-block;
    margin-top:10px;
    cursor:pointer;
}

.invoice-card h3{
    color:#dc2626;
}

/* LOGIN BOX */

.find-customer-box{
    padding:22px;
    display:grid;
    grid-template-columns:360px 1fr;
    gap:24px;
    align-items:center;
    margin-bottom:20px;
    border-radius:26px;
    contain:layout paint;
}

.find-left{
    display:flex;
    align-items:center;
    gap:16px;
}

.find-left h3{
    margin:0 0 6px;
    font-size:30px;
    font-weight:700;
    letter-spacing:-.04em;
}

.find-left p{
    margin:0;
    color:#86868b;
    font-size:14px;
    line-height:1.5;
}

.login-form-grid{
    display:grid;
    grid-template-columns:1fr 1fr auto;
    gap:14px;
    align-items:end;
    width:100%;
}

.login-form-grid label{
    display:block;
    margin-bottom:8px;
    font-size:13px;
    font-weight:700;
    color:#1d1d1f;
}

.login-form-grid input{
    width:100%;
    height:54px;
    border:1px solid #dfe3ea;
    border-radius:18px;
    padding:0 16px;
    font-size:15px;
    background:#fff;
    color:#1d1d1f;
    outline:none;
}

.login-form-grid input:focus{
    border-color:#b8c0cc;
}

.login-form-grid button{
    height:54px;
    border:0;
    background:linear-gradient(180deg,#1f2937,#111827);
    color:#fff;
    border-radius:18px;
    padding:0 26px;
    font-size:15px;
    font-weight:700;
    cursor:pointer;
    box-shadow:0 10px 22px rgba(15,23,42,.16);
    transition:transform .22s ease, box-shadow .22s ease;
}

.login-form-grid button:hover{
    transform:translateY(-2px);
    box-shadow:0 14px 30px rgba(15,23,42,.20);
}

/* PRODUCT SEARCH */

.product-search-box{
    margin-bottom:26px;
    overflow:hidden;
    border-radius:26px;
}

.product-search-form{
    display:grid;
    grid-template-columns:1fr 240px 70px;
}

.product-search-form input,
.product-search-form select{
    width:100%;
    height:60px;
    border:0;
    border-right:1px solid #eef2f7;
    background:#fff;
    padding:0 18px;
    font-size:15px;
    color:#1d1d1f;
    outline:none;
}

.product-search-form button{
    border:0;
    background:linear-gradient(180deg,#1f2937,#111827);
    color:#fff;
    font-size:22px;
    font-weight:700;
    cursor:pointer;
}

/* CATEGORY */

.category-heading{
    text-align:center;
    margin:30px 0 26px;
}

.category-heading h1{
    margin:0;
    font-size:36px;
    font-weight:700;
    letter-spacing:-.04em;
}

.category-heading h1:after{
    content:"";
    width:44px;
    height:3px;
    background:#ff7900;
    display:block;
    margin:10px auto 0;
    border-radius:99px;
}

.category-heading p{
    color:#86868b;
    margin:12px 0 0;
    font-size:15px;
}

.category-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:22px;
}

.category-card{
    border-radius:28px;
    overflow:hidden;
    transition:transform .25s ease, box-shadow .25s ease;
    contain:layout paint;
    transform:translateZ(0);
}

.category-card:hover{
    transform:translateY(-4px);
    box-shadow:0 14px 32px rgba(15,23,42,.10);
}

.category-img{
    height:220px;
    background:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    padding:20px;
}

.category-img img{
    max-width:100%;
    max-height:180px;
    width:auto;
    height:auto;
    object-fit:contain;
    display:block;
}


.category-card:hover .category-img img{
    transform:scale(1.03);
}

.no-img{
    font-weight:700;
    color:#86868b;
}

.category-info{
    display:grid;
    grid-template-columns:52px 1fr auto;
    gap:12px;
    align-items:center;
    padding:18px;
}

.category-icon{
    width:44px;
    height:44px;
    border-radius:16px;
    background:#f2f3f5;
    color:#1d1d1f;
    display:flex;
    align-items:center;
    justify-content:center;
}

.category-info h3{
    margin:0 0 5px;
    font-size:18px;
    font-weight:700;
    letter-spacing:-.02em;
}

.category-info p{
    margin:0;
    color:#86868b;
    font-size:14px;
}

.category-info span{
    font-size:30px;
    color:#86868b;
}

/* BENEFITS */

.benefit-bar{
    margin-top:26px;
    padding:20px;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:18px;
    border-radius:26px;
}

/* FIX CATEGORY IMAGE SIZE */
.category-grid{
    width:100%;
    overflow:hidden;
}

.category-card{
    min-width:0;
}

.category-img{
    height:210px !important;
    padding:10px !important;
}

.category-img img{
    width:100% !important;
    height:100% !important;
    max-width:260px !important;
    max-height:190px !important;
    object-fit:contain !important;
    display:block !important;
    opacity:1 !important;
    padding:0 !important;
}

/* stop left side cutting */
.udl-main{
    overflow:hidden;
}

.benefit-bar div{
    display:grid;
    gap:5px;
    color:#1d1d1f;
    font-weight:600;
}

.benefit-bar span{
    color:#86868b;
    font-size:13px;
    font-weight:500;
}

/* SIDEBAR */

.order-sidebar{
    position:fixed;
    top:120px;
    right:26px;
    width:340px;
    height:calc(100vh - 145px);
    border-radius:28px;
    display:flex;
    flex-direction:column;
    overflow:hidden;
    z-index:40;
    contain:layout paint;
}

.order-head{
    padding:22px;
    border-bottom:1px solid #eef2f7;
}

.order-head h3{
    margin:0;
    font-size:22px;
    font-weight:700;
    letter-spacing:-.03em;
}

.order-items{
    flex:1;
    overflow-y:auto;
    padding:18px;
}

.empty-order{
    color:#86868b;
    font-weight:600;
    text-align:center;
    padding:34px 10px;
}

.mini-order-item{
    display:grid;
    grid-template-columns:64px 1fr auto;
    gap:12px;
    padding:13px 0;
    border-bottom:1px solid #eef2f7;
}

.mini-order-item img{
    width:64px;
    height:64px;
    object-fit:contain;
    border-radius:16px;
    background:#fff;
}

.mini-order-item strong{
    display:block;
    font-size:13px;
    line-height:1.35;
    font-weight:700;
}

.mini-order-item small,
.mini-order-item p{
    color:#86868b;
    margin:4px 0 0;
    font-size:12px;
}

.mini-order-item b{
    font-size:13px;
    font-weight:700;
}

.order-foot{
    border-top:1px solid #eef2f7;
    padding:18px;
}

.subtotal{
    display:flex;
    justify-content:space-between;
    font-weight:700;
    margin-bottom:14px;
}

.outline-btn,
.send-btn{
    display:block;
    text-align:center;
    padding:15px;
    border-radius:18px;
    font-weight:700;
    margin-bottom:10px;
}

.outline-btn{
    background:#fff;
    border:1px solid #dfe3ea;
    color:#1d1d1f;
}

.send-btn{
    background:linear-gradient(180deg,#1f2937,#111827);
    color:#fff;
    box-shadow:0 10px 22px rgba(15,23,42,.16);
}

.order-note{
    background:#fff7ed;
    border-radius:18px;
    padding:14px;
    color:#86868b;
    font-size:13px;
    line-height:1.5;
}

/* CUSTOMER RESULTS */

.customer-results{
    padding:14px 20px;
    margin-bottom:16px;
    background:#fff;
    border-radius:22px;
}

.customer-result-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:14px 0;
    border-bottom:1px solid #eef2f7;
}

.customer-result-row:last-child{
    border-bottom:0;
}

.customer-result-row span{
    display:block;
    color:#86868b;
    margin-top:4px;
}

.customer-result-row a{
    background:linear-gradient(180deg,#1f2937,#111827);
    color:#fff;
    padding:11px 16px;
    border-radius:16px;
    font-weight:700;
}

.result-empty{
    padding:14px;
    font-weight:700;
}

/* PRODUCT PAGE SUPPORT */
/* PRODUCT PAGE SUPPORT */

.product-card{
    contain:layout paint;
    will-change:transform;
    transform:translateZ(0);
}

.product-img{
    height:300px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#fff;
    padding:18px;
    overflow:hidden;
}

.product-img img{
    display:block;
    opacity:1;
    visibility:visible;
    max-width:100%;
    max-height:250px;
    width:auto;
    height:auto;
    object-fit:contain;
    transition:transform .25s ease;
}

.product-card:hover .product-img img{
    transform:scale(1.04);
}

/* MOBILE BUTTON */

.mobile-order-btn{
    display:none;
}

/* TABLET */

@media(max-width:1200px){

    .udl-main{
        margin-right:0;
    }

    .order-sidebar{
        display:none;
    }

    .category-grid{
        grid-template-columns:repeat(2,1fr);
    }

    .products-grid{
        grid-template-columns:repeat(2,1fr);
    }
}

/* MOBILE */

@media(max-width:900px){

    html,
    body{
        width:100%;
        max-width:100%;
        overflow-x:hidden;
    }

    .udl-header{
        height:auto;
        padding:14px 16px;
    }

    .udl-logo img{
        height:52px;
    }

    .view-order-btn{
        padding:10px 14px;
        font-size:14px;
    }

    .udl-main{
        width:100%;
        margin:0;
        padding:16px 14px 100px;
        overflow:visible;
    }

    .customer-panel,
    .find-customer-box,
    .login-form-grid,
    .product-search-form,
    .products-filter-form{
        grid-template-columns:1fr !important;
    }

    .category-grid{
        grid-template-columns:1fr;
        gap:16px;
    }

    .products-grid{
        grid-template-columns:1fr;
        gap:12px;
    }

    .product-card{
        border-radius:20px;
    }

    .product-img{
        height:145px;
        padding:8x;
    }

    .product-img img{
        max-height:135px;
    }

    .product-body{
        padding:12px;
    }

    .product-title{
        font-size:17px;
        line-height:1.2;
        margin-bottom:6px;
        min-height:auto;
    }

    .product-code{
        font-size:12px;
        margin-bottom:8px;
    }

    .product-info{
        gap:8px;
        margin-bottom:8px;
    }

    .product-info div{
        padding:9px;
    }

    .product-info small{
        font-size:10px;
    }

    .product-info strong{
        font-size:16px;
    }

    .price-box,
    .order-lock{
        padding:10px;
        margin-bottom:8px;
        font-size:12px;
    }

    .add-form{
        grid-template-columns:120px 1fr;
        gap:8px;
    }

    .qty-wrap,
    .add-order-btn{
        height:42px;
    }

    .qty-btn{
        width:34px;
        height:34px;
    }

    .benefit-bar{
        grid-template-columns:1fr;
    }

    .order-sidebar{
        display:none !important;
    }

    .mobile-order-btn{
        display:block;
        position:fixed;
        left:14px;
        right:14px;
        bottom:16px;
        z-index:9999;
        background:linear-gradient(180deg,#1f2937,#111827);
        color:#fff;
        text-align:center;
        padding:15px;
        border-radius:18px;
        font-weight:700;
        box-shadow:0 14px 28px rgba(15,23,42,.22);
    }
}

@media(max-width:900px){

    .products-grid{
        grid-template-columns:1fr !important;
        gap:16px !important;
    }

    .product-card{
        display:grid !important;
        grid-template-columns:140px 1fr !important;
        align-items:center;
        gap:14px;
        padding:14px;
        border-radius:24px;
        overflow:hidden;
    }

    .product-img{
        height:140px !important;
        width:140px !important;
        padding:8px !important;
        border:0 !important;
        background:#fff !important;
    }

    .product-img img{
        max-width:100% !important;
        max-height:120px !important;
    }

    .product-body{
        padding:0 !important;
    }

    .product-title{
        font-size:16px !important;
        line-height:1.15 !important;
        margin-bottom:6px !important;
    }

    .product-code{
        margin-bottom:8px !important;
        font-size:12px !important;
    }

    .product-info{
        grid-template-columns:1fr 1fr !important;
        gap:8px !important;
        margin-bottom:8px !important;
    }

    .product-info div{
        padding:8px !important;
        border-radius:12px !important;
    }

    .price-box{
        padding:10px !important;
        margin-bottom:8px !important;
    }

    .add-form{
        grid-template-columns:90px 1fr !important;
        gap:8px !important;
    }

    .qty-wrap,
    .add-order-btn{
        height:42px !important;
    }
}

@media(max-width:900px){

    .product-card{
        min-height:230px !important;
    }

    .product-img{
        width:120px !important;
        height:120px !important;
        align-self:center !important;
        justify-self:center !important;
    }

    .product-img img{
        max-width:105px !important;
        max-height:105px !important;
    }

    .product-body{
        display:flex;
        flex-direction:column;
        justify-content:center;
    }

    .product-title{
        font-size:15px !important;
    }

    .price-box,
    .order-lock{
        padding:8px !important;
        font-size:11px !important;
    }
}