/* Carrinho do site: botao no cabecalho, painel lateral e aviso. Usa os tokens
   (--green-*, --line...) e as classes .btn/.contact-head/.panel-close das paginas. */
.cart-btn {
    position: relative;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid var(--green-800);
    border-radius: 8px;
    background: var(--white);
    color: var(--green-900);
    cursor: pointer;
}
.cart-btn svg { width: 24px; height: 24px; }
.cart-count {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    padding: 0 5px;
    border-radius: 11px;
    background: var(--gold);
    color: #3a2c00;
    font-size: 11px;
    font-weight: 950;
}
.cart-count[hidden] { display: none; }
.cart-btn.bump { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.15); } }

.cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(7, 61, 29, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.cart-overlay.is-open { opacity: 1; pointer-events: auto; }
.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 46;
    width: min(400px, 100%);
    display: flex;
    flex-direction: column;
    background: var(--white);
    box-shadow: -18px 0 40px rgba(0,0,0,.18);
    transform: translateX(100%);
    transition: transform .25s ease;
}
.cart-drawer.is-open { transform: none; }
.cart-drawer .contact-head { align-items: center; }
.cart-items { flex: 1; overflow: auto; padding: 8px 20px; }
.cart-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #edf1ed;
}
.cart-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; background: #f0f4ee; }
.cart-item h4 { margin: 0 0 4px; color: var(--green-950); font-size: 13px; text-transform: uppercase; }
.cart-item small { color: var(--muted); font-weight: 700; }
.qty { display: inline-flex; align-items: center; margin-top: 8px; border: 1px solid var(--line); border-radius: 6px; }
.qty button {
    width: 30px;
    height: 30px;
    border: 0;
    background: none;
    color: var(--green-900);
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
}
.qty span { min-width: 26px; text-align: center; font-weight: 900; font-size: 14px; }
.line-total { text-align: right; font-weight: 950; color: var(--green-900); font-size: 14px; }
.remove {
    display: block;
    margin: 8px 0 0 auto;
    border: 0;
    background: none;
    color: #8a1f1f;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}
.cart-empty { padding: 48px 8px; text-align: center; color: var(--muted); font-weight: 700; }
.cart-foot { padding: 18px 20px 22px; border-top: 1px solid var(--line); background: var(--green-50); }
.cart-row { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--muted); font-size: 14px; font-weight: 700; }
.cart-row.total { margin: 10px 0 16px; color: var(--green-950); font-size: 20px; font-weight: 950; }
.cart-foot .btn { width: 100%; border: 0; cursor: pointer; }
.cart-foot .btn + .btn { margin-top: 10px; border: 1px solid var(--green-800); }
.cart-foot .btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 60;
    transform: translate(-50%, 20px);
    opacity: 0;
    border-radius: 8px;
    padding: 12px 18px;
    background: var(--green-950);
    color: var(--white);
    font-size: 14px;
    font-weight: 800;
    box-shadow: var(--shadow);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.cart-item-link { color: inherit; }
.cart-item h4 a:hover { color: var(--green-700); text-decoration: underline; }

/* Atalho da area do cliente no cabecalho (fica ao lado do carrinho). */
.account-link {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    color: var(--green-900);
}
.account-link:hover { border-color: var(--green-800); }
.account-link svg { width: 24px; height: 24px; }
