
/* ═════ Carrito "Arma tu pedido" ═════ */
.menu-item { flex-wrap: wrap; }
.add-row { display: flex; gap: 8px; width: 100%; justify-content: flex-end; margin-top: 8px; grid-column: 1 / -1; }
.add-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--selva); background: transparent; color: var(--selva); font: 600 13px/1 var(--font); cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.add-btn span { font-size: 16px; line-height: 0; }
.add-btn:hover { background: var(--selva); color: var(--crema); }
.add-btn:focus-visible { outline: 3px solid var(--oro); outline-offset: 2px; }
.add-btn.is-added { animation: add-pop .45s var(--ease); background: var(--oro); border-color: var(--oro); color: #142422; }
@keyframes add-pop { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }

.cart-fab { position: fixed; z-index: 55; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; padding: 12px 14px 12px 20px; border: 0; border-radius: 999px; background: var(--oro); color: #142422; font: 700 15px/1 var(--font); box-shadow: 0 18px 40px -12px rgba(0,0,0,.55); cursor: pointer; }
.cart-fab[hidden] { display: none; }
.cart-fab-count { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; background: #142422; color: var(--oro); font-size: 13px; }
.cart-fab-total { padding-left: 10px; border-left: 1px solid rgba(20,36,34,.25); }
.cart-fab.is-bump { animation: add-pop .45s var(--ease); }

.cart { margin: 0 0 0 auto; padding: 0; border: 0; width: min(460px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; background: #f6f0e2; color: #142422; }
.cart::backdrop { background: rgba(10,20,18,.55); backdrop-filter: blur(3px); }
.cart[open] { animation: cart-in .45s var(--ease); }
@keyframes cart-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.cart-inner { height: 100%; display: flex; flex-direction: column; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 22px 10px; }
.cart-head h2 { margin: 0; font-size: 2rem; font-stretch: 75%; font-weight: 750; letter-spacing: -.02em; }
.cart-x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #e6dcc6; color: #142422; font-size: 24px; cursor: pointer; }
.cart-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 22px 16px; }
.cart-lines { list-style: none; margin: 0 0 18px; padding: 0; }
.cart-line { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(20,36,34,.12); }
.cart-line strong { display: block; font-size: 15px; }
.cart-line small { display: block; font-size: 12.5px; color: #5d6b67; }
.line-total { font-weight: 700; font-size: 14px; min-width: 64px; text-align: right; }
.qty { display: inline-flex; align-items: center; border: 1px solid rgba(20,36,34,.25); border-radius: 999px; }
.qty button { width: 32px; height: 32px; border: 0; background: none; font-size: 18px; color: #142422; cursor: pointer; }
.qty output { min-width: 20px; text-align: center; font-weight: 700; }
.cart-empty { padding: 40px 0; text-align: center; color: #5d6b67; }
.cart-fields fieldset { border: 0; margin: 0 0 14px; padding: 0; }
.cart-fields legend, .c-field > span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.cart-fields .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cart-fields .chip { padding: 9px 14px; border-radius: 999px; border: 1.5px solid rgba(20,36,34,.3); background: transparent; color: #142422; font: 600 14px/1 var(--font); cursor: pointer; }
.cart-fields .chip[aria-pressed="true"] { background: #1d3130; border-color: #1d3130; color: #f6f0e2; }
.c-field { display: block; margin-bottom: 14px; }
.c-field small { font-weight: 400; color: #5d6b67; }
.c-field input, .c-field select { width: 100%; height: 46px; padding: 0 12px; border: 1px solid rgba(20,36,34,.25); border-radius: 10px; background: #fffdf8; color: #142422; font: 400 15px var(--font); }
.c-field input:focus, .c-field select:focus { outline: none; border-color: var(--oro); box-shadow: 0 0 0 3px rgba(180,158,119,.3); }
.cart-foot { padding: 14px 22px max(18px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(20,36,34,.12); background: #f6f0e2; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.cart-total strong { font-size: 1.5rem; }
.cart-hint { margin: 0 0 8px; font-size: 13px; color: #5d6b67; }
.cart-err { margin: 0 0 8px; color: #a12d22; font-size: 14px; font-weight: 600; }
.cart-err:empty { display: none; }
.cart-send { width: 100%; justify-content: center; }
.cart-send svg, .cart-done .btn svg { width: 20px; height: 20px; }
.cart-done { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 30px; text-align: center; background: #f6f0e2; }
.cart-done[hidden] { display: none; }
.cart-done-mark { width: 72px; height: 54px; color: var(--oro); }
.cart-done h3 { margin: 0; font-size: 1.8rem; }
.cart-done p { margin: 0; color: #4b5956; }
.cart-code strong { font-size: 1.3rem; color: #1d3130; }
.cart-done .btn { width: 100%; justify-content: center; }
.cart-inner { position: relative; }
@media (max-width: 819px) { .cart-fab { bottom: max(16px, env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .cart[open], .cart-fab.is-bump, .add-btn.is-added { animation: none; } }

.cart, .cart * { box-sizing: border-box; }
.c-field[hidden], .cart-fields[hidden], .cart-foot[hidden], .cart-hint[hidden], .cart-empty[hidden] { display: none; }
