:root{
    --app-accent:#4a9ee8;
    --app-bg:#f4f6f9;
    --app-radius:18px;
}

*{box-sizing:border-box}

body{
    background:var(--app-bg);
    color:#1f2937;
    -webkit-font-smoothing:antialiased;
}

.btn-primary{
    --bs-btn-bg:var(--app-accent);
    --bs-btn-border-color:var(--app-accent);
    --bs-btn-hover-bg:#338ddd;
    --bs-btn-hover-border-color:#338ddd;
}

.login-page{
    background:
        radial-gradient(circle at 10% 10%, rgba(74,158,232,.14), transparent 35%),
        radial-gradient(circle at 90% 90%, rgba(74,158,232,.12), transparent 30%),
        var(--app-bg);
}

.login-card{
    max-width:440px;
    background:#fff;
    border-radius:26px;
    padding:32px;
    box-shadow:0 20px 60px rgba(31,41,55,.10);
}

.brand-circle{
    width:74px;
    height:74px;
    border-radius:24px;
    background:linear-gradient(145deg, var(--app-accent), #77baf2);
    color:white;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:32px;
    box-shadow:0 14px 30px rgba(74,158,232,.28);
}

.input-group-lg .form-control,
.input-group-lg .input-group-text{
    min-height:58px;
}

.store-header{
    background:rgba(244,246,249,.92);
    backdrop-filter:blur(16px);
    border-bottom:1px solid rgba(0,0,0,.05);
}

.icon-btn{
    width:42px;
    height:42px;
    padding:0;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.cart-badge{
    position:absolute;
    top:-7px;
    right:-5px;
    min-width:21px;
}

.search-wrap{
    position:relative;
}

.search-wrap > i{
    position:absolute;
    left:17px;
    top:50%;
    transform:translateY(-50%);
    color:#94a3b8;
    z-index:2;
}

.search-wrap .form-control{
    border:0;
    border-radius:18px;
    padding-left:46px;
    box-shadow:0 5px 20px rgba(31,41,55,.06);
}

.category-scroller{
    display:flex;
    gap:9px;
    overflow-x:auto;
    padding-bottom:4px;
    scrollbar-width:none;
}

.category-scroller::-webkit-scrollbar{display:none}

.category-pill{
    white-space:nowrap;
    border-radius:999px;
    background:#fff;
    color:#475569;
    border:1px solid #e7ebf0;
    padding:.55rem .9rem;
}

.category-pill.active{
    background:#1f2937;
    color:white;
    border-color:#1f2937;
}

.product-card{
    border:0;
    background:#fff;
    border-radius:20px;
    overflow:hidden;
    box-shadow:0 7px 22px rgba(31,41,55,.065);
    transition:transform .18s ease, box-shadow .18s ease;
}

.product-card:hover{
    transform:translateY(-3px);
    box-shadow:0 12px 32px rgba(31,41,55,.11);
}

.product-image-wrap{
    width:100%;
    aspect-ratio:1/1;
    background:#f8fafc;
    overflow:hidden;
}

.product-image{
    width:100%;
    height:100%;
    object-fit:contain;
    padding:8px;
}

.product-title{
    font-size:1rem;
    line-height:1.25rem;
    font-weight:700;
    margin:0 0 .3rem;
    min-height:2.5rem;
}

.product-category{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.product-price{
    font-weight:800;
    font-size:1.12rem;
}

.stock{
    font-size:.73rem;
    display:flex;
    align-items:center;
    gap:5px;
    margin-top:2px;
}

.stock span{
    width:7px;
    height:7px;
    border-radius:50%;
    display:inline-block;
}

.stock-success{color:#16804f}
.stock-success span{background:#22a567}
.stock-warning{color:#9a6c06}
.stock-warning span{background:#e9a800}
.stock-danger{color:#b42318}
.stock-danger span{background:#dc3545}

.add-btn{
    width:42px;
    height:42px;
    padding:0;
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
}

.floating-cart{
    position:fixed;
    left:50%;
    transform:translateX(-50%);
    bottom:18px;
    width:min(92%, 430px);
    border-radius:999px;
    background:#1f2937;
    color:white;
    text-decoration:none;
    padding:14px 18px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    box-shadow:0 16px 38px rgba(31,41,55,.28);
    z-index:1020;
}

.floating-cart strong{
    min-width:28px;
    height:28px;
    border-radius:999px;
    background:white;
    color:#1f2937;
    display:flex;
    align-items:center;
    justify-content:center;
}

.cart-line{
    display:flex;
    gap:14px;
    align-items:center;
    border-bottom:1px solid #eef1f4;
}

.cart-line:last-child{
    border-bottom:0;
}

.cart-line img{
    width:72px;
    height:72px;
    object-fit:contain;
    border-radius:15px;
    background:#f8fafc;
}

.cart-line-title{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width:320px;
}

.qty-control{
    display:inline-flex;
    align-items:center;
    gap:10px;
    background:#f3f5f7;
    border-radius:999px;
    padding:3px;
}

.qty-btn{
    width:30px;
    height:30px;
    padding:0;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:#fff;
}

.debug-pre{
    background:#111827;
    color:#e5e7eb;
    border-radius:14px;
    padding:14px;
    max-height:520px;
    overflow:auto;
    font-size:.78rem;
}

.min-w-0{min-width:0}

@media (max-width:575.98px){
    .login-card{
        padding:24px 20px;
        border-radius:22px;
    }

    .container{
        --bs-gutter-x:1rem;
    }

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

    .product-card .p-3{
        padding:.8rem!important;
    }

    .product-title{
        font-size:.92rem;
        min-height:2.3rem;
    }

    .product-price{
        font-size:1rem;
    }

    .add-btn{
        width:38px;
        height:38px;
    }

    .cart-line{
        gap:10px;
    }

    .cart-line img{
        width:62px;
        height:62px;
    }

    .cart-line-title{
        max-width:145px;
    }
}
