:root{
    --brand:#ff3b30; /* vermelho iFood-like */
    --brand-dark:#c12a21;
    --muted:#6c757d;
}

.brand-logo{
    font-weight:700;
    font-size:1.25rem;
}
.brand-accent{
    color:var(--brand);
    margin-left:6px;
}

/* brand logo image adjustments */
.brand img{height:48px}
.site-header .brand{display:flex;align-items:center}

.cart-badge{
    background:var(--brand);
    color:white;
    border-radius:12px;
    padding:2px 8px;
    font-size:0.8rem;
    margin-left:6px;
}

.product-card{
    border-radius:12px;
    box-shadow:0 4px 12px rgba(0,0,0,0.06);
    overflow:hidden;
}

.product-card .card-body{min-height:140px}

.search-bar input{width:420px}

.hero .btn{font-weight:600}

/* Mobile responsive tweaks */
@media (max-width: 992px) {
    .search-bar input{width:240px}
}

@media (max-width: 768px) {
    .search-bar{flex:1 1 auto}
    .search-bar input{width:100%;}
    .topbar .container{flex-wrap:wrap}
    .topbar .brand{width:100%;margin-bottom:8px}
    .topbar .search-bar{order:2;width:100%;margin:6px 0}
    .topbar .d-flex.align-items-center{order:3;width:100%;justify-content:flex-end}
    .hero .container{flex-direction:column;align-items:flex-start}
    .hero .display-6{font-size:1.5rem}
    .hero .lead{font-size:0.95rem}
    .hero .btn{width:100%;margin-top:10px}
/* hero background overlay to improve text contrast */
.hero{position:relative}
.hero:before{content:'';position:absolute;left:0;top:0;right:0;bottom:0;background:linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45));pointer-events:none}
.hero .container{position:relative;z-index:2}
    .product-card .card-body{min-height:120px}
    .product-image{height:200px}
    .product-card{margin-bottom:12px}
    .product-card .card-body .btn{display:block;width:100%}
    /* make product columns 2 per row on mobile */
    .row [class*="col-"]{flex:0 0 50%;max-width:50%;}
    .cart-badge{font-size:0.9rem;padding:6px 10px}
    .site-footer .row{flex-direction:column}
}

@media (max-width: 576px) {
    .search-bar input{padding:10px}
    .product-image{height:160px}
    .qty-input{width:60px}
    .btn{padding:0.6rem 0.9rem}
}

/* mobile cart table adjustments */
@media (max-width: 576px) {
    table.table{font-size:0.95rem}
    table.table thead{display:none}
    table.table tbody tr{display:block;border:1px solid #eee;margin-bottom:8px;padding:10px;border-radius:8px}
    table.table tbody tr td{display:block;padding:4px 0}
    table.table tbody tr td[data-label]:before{content:attr(data-label) ": ";font-weight:600}
    .line-subtotal{text-align:right;font-weight:600}
}

/* ensure cart empty card looks good */
@media (max-width:576px){
    #emptyCart .card-body{padding:16px}
}

/* make images responsive */
.card-img-top, img{max-width:100%;height:auto}

.restaurants-section .rest-card{border-radius:12px;overflow:hidden;box-shadow:0 6px 18px rgba(0,0,0,0.06)}
.restaurants-section .rest-card img{height:160px;object-fit:cover}
.restaurants-section h3{font-weight:700}

.site-footer{background:#fafafa}
.site-footer h5{font-weight:700}
.site-footer a{color:inherit}

/* dark header to match logo */
.site-header{background:#000;color:#fff}
.topbar, .topbar .container{background:transparent}
.topbar a, .topbar .brand, .topbar .search-bar input, .topbar .d-flex a, .topbar .btn{color:#fff}
.topbar a.text-white{color:#fff !important}
.topbar .btn-outline-primary{color:#fff;border-color:rgba(255,255,255,0.2)}
.brand img{filter:none; display:block}

.site-toast{position:fixed;right:20px;bottom:20px;background:#111;color:#fff;padding:10px 16px;border-radius:8px;opacity:0;transition:opacity .25s ease,transform .25s ease;transform:translateY(10px);z-index:1050}
.site-toast.show{opacity:1;transform:translateY(0)}

/* sidebar layout */
.app-layout{min-height:100vh}
.sidebar{position:fixed;left:0;top:0;bottom:0;width:240px;overflow:auto}
.content{margin-left:240px}
.sidebar .nav-link{color:rgba(255,255,255,0.9);padding:8px 0}
.cart-badge{background:var(--brand);color:white;border-radius:12px;padding:2px 8px;font-size:0.8rem;margin-left:6px}

@media (max-width: 768px){
    .sidebar{position:relative;width:100%;}
    .content{margin-left:0}
}

/* sidebar collapse for mobile */
.sidebar{transition:transform .28s ease, opacity .28s ease}
.sidebar{transform:translateX(0);opacity:1}
.sidebar.collapsed{transform:translateX(-100%);opacity:0;pointer-events:none}
.sidebar-overlay{opacity:0;visibility:hidden;position:fixed;left:0;top:0;right:0;bottom:0;background:rgba(0,0,0,0.5);z-index:1040;transition:opacity .28s ease, visibility .28s ease}
.sidebar-overlay.show{opacity:1;visibility:visible}
.sidebar-toggle{display:none;position:fixed;left:12px;top:12px;z-index:1050}

@media (max-width: 768px){
    .sidebar{position:fixed;left:0;top:0;bottom:0;width:240px;z-index:1050}
    .content{margin-left:0}
    .sidebar-toggle{display:block}
    .sidebar-overlay.show{display:block}
}

/* star rating */
.star-rating .star-btn{color:#ccc;font-size:1.4rem;border:0}
.star-rating .star-btn i{pointer-events:none}
.star-rating .star-btn:hover, .star-rating .star-btn:focus{color:gold;text-decoration:none}
.star-rating .star-btn.selected{color:gold}

.product-image{
    height:160px;
    object-fit:cover;
}

.btn-primary.ifood{
    background:var(--brand);
    border-color:var(--brand);
}
.btn-primary.ifood:hover{
    background:var(--brand-dark);
    border-color:var(--brand-dark);
}

.admin-bar{background:#111;}
.admin-bar a{color:#fff;text-decoration:none}

.admin-bar .cart-badge{background:var(--brand);color:#fff;padding:2px 6px;border-radius:10px;font-size:0.8rem}
