/* =========================================================
   SEÇÕES DO CARDÁPIO (desktop + mobile)
   Mesma paleta do header e do filtro (css/home/filtro.css):
   marrom #46260F · dourado #C9A46A / #E3C796 · creme #F7EFE4
   Carregado depois de homeDesktop/homeMobile para prevalecer sobre eles.
   ========================================================= */

.bc-panel.bc-section {
    --bc-brown: #46260F;
    --bc-gold: #C9A46A;
    --bc-gold-soft: #E3C796;
    --bc-gold-text: #9A6B2F; /* dourado escurecido: legível sobre branco */
    --bc-cream: #F7EFE4;
    --bc-line: #E8DCCB;
    --bc-text: #3B2416;
    --bc-muted: #8A7461;

    background: var(--bc-card-secao);
    border: 1px solid rgba(70, 38, 15, 0.06);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(59, 36, 22, 0.08);
    font-family: Inter, system-ui, sans-serif;
}

/* ---------- Cabeçalho da categoria ---------- */

.bc-section__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

/* Traço dourado que completa a linha do título */
.bc-section__head::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--bc-gold-soft), transparent);
}

.bc-section__thumb {
    position: relative;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: #fff;
    border: 2px solid var(--bc-gold-soft);
    color: var(--bc-gold);
    font-size: 1rem;
}

.bc-section__thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bc-section__titles {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.bc-section__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--bc-brown);
}

.bc-section__count {
    margin-top: 2px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--bc-muted);
}

/* ---------- Card do produto (comum a bloco e carrossel) ---------- */

.bc-section .bc-product {
    background: var(--bc-card);
    border: 1px solid rgba(70, 38, 15, 0.06);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(59, 36, 22, 0.06);
}

.bc-section .bc-product:hover {
    border-color: var(--bc-gold-soft);
    box-shadow: 0 10px 22px rgba(59, 36, 22, 0.12);
}

.bc-section .bc-product__title {
    color: var(--bc-text) !important;
}

/* Descrição cortada em 2 linhas pelo CSS (o HTML traz o texto inteiro) */
.bc-section .bc-product__desc {
    margin: 0;
    color: var(--bc-muted) !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bc-section .bc-product__price {
    color: var(--bc-brown) !important;
    font-weight: 800;
}

.bc-section .bc-product:hover .bc-product__price {
    color: var(--bc-gold-text) !important;
}

.bc-section .bc-product__add {
    background-color: var(--bc-brown);
    color: #fff;
    box-shadow: 0 4px 10px rgba(42, 21, 8, 0.30);
}

.bc-section .bc-product__add:hover {
    background-color: var(--bc-gold);
    color: var(--bc-brown);
    box-shadow: 0 6px 14px rgba(42, 21, 8, 0.35);
}

.bc-section .bc-product__add:active {
    background-color: var(--bc-gold) !important;
}

/* ---------- Card em linha (categorias do tipo bloco) ---------- */

.bc-product--row {
    display: flex;
    align-items: stretch;
    gap: 14px;
    height: 100%;
    padding: 14px;
}

.bc-product--row .bc-product__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.bc-product--row .bc-product__title {
    margin-bottom: 4px;
    font-size: 1.02rem !important;
    font-weight: 700;
    line-height: 1.25;
}

.bc-product--row .bc-product__desc {
    font-size: 0.84rem !important;
    line-height: 1.35 !important;
}

.bc-product--row .bc-product__price {
    margin-top: auto;
    padding-top: 8px;
    font-size: 1.05rem;
}

/* Foto + botão "+" encaixado no canto da foto */
.bc-product__media {
    position: relative;
    flex: 0 0 auto;
    align-self: flex-start;
}

.bc-product--row .bc-product__thumb {
    width: 112px;
    height: 112px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background-color: var(--bc-cream);
    background-size: cover;
    background-position: center;
    color: var(--bc-gold);
    font-size: 1.6rem;
}

.bc-section .bc-product__media .bc-product__add {
    position: absolute;
    right: -6px;
    bottom: -6px;
    width: 34px;
    height: 34px;
    border: 3px solid #fff;
}

@media (max-width: 576px) {
    .bc-product--row {
        gap: 12px;
        padding: 12px;
    }

    .bc-product--row .bc-product__thumb {
        width: 96px;
        height: 96px;
    }

    .bc-section__title {
        font-size: 1.02rem;
    }
}

/* ---------- Card vertical (categorias do tipo carrossel) ---------- */

.bc-section .bc-product--vertical {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    height: 100%;
    padding: 12px;
}

.bc-section .bc-product--vertical .bc-product__media {
    align-self: stretch;
}

.bc-section .bc-product--vertical .bc-product__thumb {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background-color: var(--bc-cream);
    background-size: cover;
    background-position: center;
    color: var(--bc-gold);
    font-size: 2rem;
}

.bc-section .bc-product--vertical .bc-product__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    margin-top: 12px;
}

.bc-section .bc-product--vertical .bc-product__title {
    margin-bottom: 4px;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.25;
}

.bc-section .bc-product--vertical .bc-product__desc {
    font-size: 0.82rem;
    line-height: 1.35;
}

/* Preço sempre no rodapé: alinha os cards do mesmo slide */
.bc-section .bc-product--vertical .bc-product__price {
    margin-top: auto;
    padding-top: 6px;
    font-size: 1.02rem;
}

@media (max-width: 768px) {
    .bc-section .bc-product--vertical .bc-product__media .bc-product__add {
        width: 30px;
        height: 30px;
        right: -4px;
        bottom: -4px;
        border-width: 2px;
        font-size: 0.8rem;
    }
}

/* ---------- Carrossel na paleta ---------- */

.bc-section .bc-carousel__btn {
    background-color: rgba(70, 38, 15, 0.6);
}

.bc-section .bc-carousel__btn:hover {
    background-color: var(--bc-brown);
}

.bc-section .bc-carousel__indicators button {
    background-color: var(--bc-brown);
}

/* ---------- Busca/filtro sem resultado (Views/Home/_BuscaVazia.cshtml) ----------
   Mesmo padrão do carrinho vazio: ícone em círculo creme, título, texto e botão marrom. */

.bc-vazio {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 32px 24px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    background: var(--bc-card);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(59, 36, 22, 0.08);
    font-family: Inter, system-ui, sans-serif;
}

.bc-vazio__icone {
    width: 64px;
    height: 64px;
    margin-bottom: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F3EBE0;
    color: #8A6A4A;
}

.bc-vazio__titulo {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #2B1A0E;
}

.bc-vazio__texto {
    margin: 0;
    max-width: 320px;
    font-size: 14px;
    line-height: 1.5;
    color: #6F5A46;
}

.bc-vazio__btn {
    margin-top: 10px;
    height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #4A2C17;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(74, 44, 23, 0.25);
    transition: background .2s, transform .1s;
}

.bc-vazio__btn:hover { background: #3A2111; }
.bc-vazio__btn:active { transform: scale(.99); }

.bc-vazio__btn:focus-visible {
    outline: 2px solid #7A4A24;
    outline-offset: 2px;
}

/* ---------- Card carregando (clique em adicionar, script no Home/Index) ----------
   O "+" vira um spinner e o card fica levemente esmaecido até o produto abrir. */

@keyframes bc-card-spin {
    to { transform: rotate(360deg); }
}

.bc-product.is-loading {
    pointer-events: none;
    cursor: progress;
}

.bc-product.is-loading .bc-product__thumb,
.bc-product.is-loading .bc-product__info {
    opacity: .6;
    transition: opacity .15s ease;
}

.bc-product.is-loading .bc-product__add > i,
.bc-product.is-loading .bc-product__add > svg {
    opacity: 0;
}

.bc-product.is-loading .bc-product__add::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bc-card-spin .7s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .bc-product.is-loading .bc-product__add::after { animation-duration: 1.6s; }
}
