.carrinho {
    cursor: pointer;
    font-size: 1.2em;
}
.produto {
    border: 1px solid #005db9;
    padding: 15px;
    border-radius: 5px;
}
.small-font {
    font-size: 0.9rem; /* Fonte menor */
}
.btn-add {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1;             /* garante alinhamento vertical de texto */
    border-radius: 50%;
    border: 2px solid #eb6d40; /* mesma cor do navbar */
    color: #eb6d40; /* texto também na cor do tema */
}

/* when using outline buttons, keep border/color consistent */
.btn-outline-secondary.btn-add {
    border-color: #eb6d40;
    color: #eb6d40;
}

/* helper classes for modern quantity control */
.quantity-control {
    gap: 0.25rem; /* slightly tighter spacing */
}

.quantity-value {
    min-width: 20px;
    text-align: center;
    font-weight: 500;
    /* border removed for cleaner look */
    padding: 0 4px;
    color: #eb6d40; /* mesma cor do fundo do navbar */
}

/* allow the image to shrink with the column; cap its maximum size
   so cards stay reasonably sized on large screens */
.produto-imagem {
    width: 100%;       /* fills the column but never more than max-width */
    max-width: 120px;
    height: 120px;      /* maintain aspect ratio */
    max-height: none;  /* don’t force a fixed height */
    object-fit: contain;
}

/* shrink images on smaller screens */
@media (max-width: 768px) {
    .produto-imagem {
        width: 65px;
        height: 100%;
        object-fit: cover;
    }
}

@media (max-width: 576px) {
    .produto-imagem {
        width: 60px;
        height: 100%;
        object-fit: cover;
    }
}

/* Navbar custom colors */
.navbar {
    background-color: #eb6d40 !important; /* laranja vermelhado */
}
.navbar .navbar-brand,
.navbar .nav-link {
    color: #fff !important; /* fonte branca */
}

/* Toggler icon color when collapsed */
.navbar-light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba%28255,255,255,1%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* RESPONSIVE ADJUSTMENTS FOR MOBILE */
@media (max-width: 768px) {
    /* reduce overall font size to make text smaller on phones/tablets */
    body {
        font-size: 0.9rem;
    }
    h1{
        font-size: 1.6rem;
    }
    h2, h3, h4, h5, h6 {
        font-size: 1.3rem;
    }
    .navbar-brand, .nav-link {
        font-size: 0.95rem;
    }
    .card-title {
        font-size: 1rem;
    }
    .card-text {
        font-size: 0.85rem;
    }
    .btn, .btn-add {
        font-size: 0.9rem;
    }
    .produto {
        padding: 10px;
    }
}

@media (max-width: 576px) {
    /* additional shrinking for very small screens */
    body {
        font-size: 0.85rem;
    }
    h1{
        font-size: 1.4rem;
    }
     h2, h3, h4, h5, h6 {
        font-size: 1rem;
    }
    .navbar-brand, .nav-link {
        font-size: 0.9rem;
    }
    .card-title {
        font-size: 0.95rem;
    }
    .card-text {
        font-size: 0.8rem;
    }
    /* make quantity buttons smaller on tiny screens */
    .btn-add {
        width: 22px;
        height: 22px;
        font-size: 0.8rem;
    }
}

/* Red flag on required fields (triangle in top-right corner) */
input:required,
textarea:required,
select:required {
    padding-right: 1.4rem; /* avoid overlap with the triangle */
    background-image: linear-gradient(to bottom left, red 50%, transparent 50%);
    background-position: top right;
    background-repeat: no-repeat;
    background-size: 1rem 1rem;
}

.navbar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: nowrap;
}

.navbar-search-wrap {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    min-width: 220px;
}

.navbar-search-wrap .search-form {
    width: 100%;
    max-width: 640px;
}

/* mobile: search em nova linha */
@media (max-width: 576px) {
    .navbar-top {
        flex-wrap: wrap;
    }

    .navbar-search-wrap {
        order: 3;
        width: 100%;
        flex: 0 0 100%;
        margin-top: 0.35rem;
    }

    .navbar-search-wrap .search-form {
        max-width: none;
        width: 100%;
    }

    .navbar-search-wrap .form-control {
        max-width: none !important;
        width: calc(100% - 72px) !important;
    }

    .navbar-search-wrap .btn {
        width: 60px;
    }
}

/* Mobile table stacked cards / readable sem descer colunas */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 576px) {
    .table-responsive table {
        display: block;
        width: 100%;
    }
    .table-responsive thead {
        display: none;
    }
    .table-responsive tbody,
    .table-responsive tr,
    .table-responsive td {
        display: block;
        width: 100%;
    }
    .table-responsive tr {
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
        padding: 0.5rem;
        background: #fff;
    }
    .table-responsive tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.3rem;
        margin-bottom: 0.7rem;
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
        padding: 0.5rem;
        background: #fff;
    }
    .table-responsive td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.25rem 0.5rem;
        border: 0;
        position: relative;
        text-align: left;
        white-space: normal;
        font-size: 0.87rem;
    }
    .table-responsive td::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 0.4rem;
        white-space: nowrap;
        color: #495057;
    }
    .table-responsive td[data-label="Produto"] {
        grid-column: 1 / -1;
        display: block;
        padding-top: 0.5rem;
    }
    .table-responsive td[data-label="Produto"]::before {
        display: block;
        margin-right: 0;
        margin-bottom: 0.25rem;
    }
    .table-responsive td[data-label="Ação"] {
        grid-column: 1 / -1;
        padding-top: 0.35rem;
        margin-top: 0.2rem;
    }
}



