/* ═══════════════════════════════════════════════════════════
   SACOLA (CART) — styles
   ═══════════════════════════════════════════════════════════ */

/* ── Cart bottom bar ───────────────────────────────────────── */
.cart-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1500;
  background: #1a1a1a;
  color: #fff;
  padding: 11px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -4px 20px rgba(0,0,0,.35);
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.cart-bar.visible { transform: translateY(0); }

.cart-bar-info { font-size: .83rem; color: #bbb; }
.cart-bar-info strong { color: #fff; font-size: 1.05rem; margin-left: 6px; }

.cart-bar-btn {
  background: #25d366;
  color: #fff;
  border: none;
  padding: 9px 20px;
  border-radius: 25px;
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: background .2s;
}
.cart-bar-btn:hover { background: #128c7e; }

/* ── Cart overlay ──────────────────────────────────────────── */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1600;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.cart-overlay.visible { opacity: 1; pointer-events: all; }

/* ── Cart drawer ───────────────────────────────────────────── */
.cart-drawer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-height: 82vh;
  background: #fff;
  z-index: 1700;
  border-radius: 18px 18px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 -6px 30px rgba(0,0,0,.25);
}
.cart-drawer.open { transform: translateY(0); }

.cart-drawer-handle {
  width: 38px; height: 4px;
  background: #ddd; border-radius: 2px;
  margin: 10px auto 4px;
}

.cart-drawer-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 10px 18px 10px;
  border-bottom: 1px solid #f0f0f0;
}
.cart-drawer-header h3 { font-size: 1rem; font-weight: 700; margin: 0; color: #111; }

.cart-drawer-close {
  background: none; border: none;
  font-size: 1.35rem; color: #666;
  cursor: pointer; padding: 4px 8px;
  border-radius: 50%; transition: background .15s;
}
.cart-drawer-close:hover { background: #f0f0f0; }

/* ── Cart items list ───────────────────────────────────────── */
.cart-items { flex: 1; overflow-y: auto; padding: 6px 16px; }

.cart-empty { text-align: center; padding: 40px 20px; color: #bbb; }
.cart-empty i { font-size: 2.8rem; margin-bottom: 10px; display: block; }

.cart-item {
  display: flex; gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid #f0f0f0;
  align-items: flex-start;
}
.cart-item:last-child { border-bottom: none; }

.cart-item-img {
  width: 58px; height: 58px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-nome {
  font-weight: 600; font-size: .88rem;
  color: #111; margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.cart-item-detalhe {
  font-size: .72rem; color: #888;
  line-height: 1.45; margin-bottom: 3px;
}
.cart-item-detalhe .extra-tag {
  color: #c8a000; font-weight: 600;
}

.cart-item-preco {
  font-weight: 700; font-size: .9rem;
  color: var(--primary-color, #50a7b0);
}

.cart-qty-row {
  display: flex; align-items: center; gap: 7px; margin-top: 5px;
}

.qty-btn {
  width: 26px; height: 26px;
  border: 1.5px solid #ddd; background: #fff;
  border-radius: 50%;
  font-size: 1rem; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; color: #333; transition: border-color .15s, color .15s;
}
.qty-btn:hover { border-color: var(--primary-color, #50a7b0); color: var(--primary-color, #50a7b0); }

.qty-val { font-weight: 700; font-size: .9rem; min-width: 20px; text-align: center; }

.cart-remove {
  background: none; border: none;
  color: #ccc; font-size: .8rem;
  cursor: pointer; padding: 4px;
  flex-shrink: 0; margin-top: 3px;
  transition: color .15s;
}
.cart-remove:hover { color: #dc3545; }

/* ── Cart footer ───────────────────────────────────────────── */
.cart-footer {
  padding: 14px 18px 18px;
  border-top: 2px solid #f0f0f0;
  background: #fff;
}

.cart-total-row {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 12px;
}
.cart-total-label { font-size: .95rem; color: #444; }
.cart-total-value { font-size: 1.25rem; font-weight: 700; color: #111; }

.btn-checkout {
  width: 100%; background: #25d366;
  color: #fff; border: none;
  padding: 13px; border-radius: 28px;
  font-size: .95rem; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  gap: 8px; transition: background .2s, transform .15s;
}
.btn-checkout:hover { background: #128c7e; transform: scale(1.01); }
.btn-checkout i { font-size: 1.1rem; }

/* ── Add-to-cart button on cards ─────────────────────────── */
.btn-add-cart {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--primary-color, #50a7b0);
  color: #fff; border: none;
  border-radius: 20px; padding: 5px 11px;
  font-size: .73rem; font-weight: 700;
  cursor: pointer; margin-top: 6px;
  transition: filter .2s, transform .15s;
}
.btn-add-cart:hover { filter: brightness(85%); transform: scale(1.04); }

/* ── Toast feedback ────────────────────────────────────────── */
.cart-toast {
  position: fixed;
  bottom: 80px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a1a1a; color: #fff;
  padding: 8px 18px; border-radius: 20px;
  font-size: .82rem; font-weight: 600;
  z-index: 2500; pointer-events: none;
  opacity: 0; transition: opacity .25s, transform .25s;
  white-space: nowrap;
}
.cart-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.cart-toast i { color: #25d366; margin-right: 5px; }

/* ═══════════════════════════════════════════════════════════
   PIZZA FLAVOR SELECTOR MODAL
   ═══════════════════════════════════════════════════════════ */

.pizza-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.pizza-overlay.open { opacity: 1; pointer-events: all; }

.pizza-modal {
  background: #fff; border-radius: 18px 18px 0 0;
  width: 100%; max-width: 600px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.pizza-overlay.open .pizza-modal { transform: translateY(0); }

.pizza-modal-header {
  padding: 14px 18px 10px;
  border-bottom: 1px solid #f0f0f0;
  display: flex; align-items: center; gap: 10px;
}
.pizza-modal-header h3 {
  font-size: .95rem; font-weight: 700;
  margin: 0; flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pizza-modal-close {
  background: none; border: none; font-size: 1.4rem;
  color: #888; cursor: pointer; padding: 2px;
}

.pizza-modal-body { flex: 1; overflow-y: auto; padding: 14px 18px; }

/* Step labels */
.step-label {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .5px;
  color: #999; font-weight: 700; margin-bottom: 8px; margin-top: 14px;
}
.step-label:first-child { margin-top: 0; }

/* Tamanho selector */
.tamanho-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px; margin-bottom: 4px;
}
.tam-btn {
  border: 2px solid #e0e0e0; background: #fff;
  border-radius: 10px; padding: 10px 8px;
  text-align: center; cursor: pointer;
  transition: all .2s;
}
.tam-btn.sel {
  border-color: var(--dynamic-primary, #50a7b0);
  background: color-mix(in srgb, var(--dynamic-primary, #50a7b0) 8%, white);
}
.tam-nome  { font-weight: 700; font-size: .85rem; display: block; }
.tam-preco { font-size: .73rem; color: #888; display: block; margin-top: 2px; }
.tam-qtd   { font-size: .68rem; font-weight: 700; color: #d97706; display: block; margin-top: 3px; }

/* Num sabores selector */
.num-sabores-row { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 4px; }
.ns-btn {
  border: 2px solid #e0e0e0; background: #fff;
  border-radius: 20px; padding: 5px 14px;
  font-size: .8rem; font-weight: 600; cursor: pointer;
  transition: all .2s;
}
.ns-btn.sel {
  border-color: var(--dynamic-primary, #50a7b0);
  background: var(--dynamic-primary, #50a7b0);
  color: #fff;
}

/* Sabores selecionados */
.sel-info {
  font-size: .78rem; color: #666;
  background: #f8f8f8; border-radius: 8px;
  padding: 7px 12px; margin-bottom: 10px;
}

/* Grupo e chips */
.grupo-label {
  font-size: .75rem; font-weight: 700; color: #aaa;
  text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 7px;
}
.sabores-chips { display: flex; flex-direction: column; gap: 0; margin-bottom: 14px; }

.sabor-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid #f0f0f0;
}
.sabor-row:last-child { border-bottom: none; }

.sbr-btn {
  width: 26px; height: 26px; flex-shrink: 0;
  border-radius: 50%; border: none;
  font-size: 1rem; font-weight: 700; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s, color .12s;
}
.sbr-add { background: var(--dynamic-primary, #50a7b0); color: #fff; }
.sbr-add:disabled { background: #e0e0e0; color: #bbb; cursor: not-allowed; }
.sbr-rem { background: #fee2e2; color: #dc2626; }

.sabor-nome-txt { flex: 1; font-size: .85rem; color: #222; }
.sabor-row.sel .sabor-nome-txt { font-weight: 600; color: var(--dynamic-primary, #50a7b0); }

.sabor-frac-badge {
  font-size: .68rem; font-weight: 700; white-space: nowrap;
  background: var(--dynamic-primary, #50a7b0); color: #fff;
  border-radius: 10px; padding: 2px 7px;
}

.sabor-extra-tag { font-size: .68rem; color: #ddb800; font-weight: 700; white-space: nowrap; }

/* ── Modo visualização: seletor de pizza apenas para consulta ── */
.pizza-view-note {
  display: none;
}
.modo-visualizacao .pizza-view-note {
  display: block;
  text-align: center;
  font-size: .75rem;
  color: #888;
  margin-top: 10px;
}
.modo-visualizacao .btn-add-sacola,
.modo-visualizacao .pizza-qty-row {
  display: none !important;
}

/* ── Pizza modal footer ────────────────────────────────────── */
.pizza-modal-footer {
  padding: 12px 18px 16px;
  border-top: 2px solid #f0f0f0;
  background: #fff;
}
.pizza-price-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.pizza-price-label { font-size: .85rem; color: #555; }
.pizza-price-val { font-size: 1.2rem; font-weight: 700; color: #111; }

.pizza-qty-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pizza-qty-btn {
  width: 32px; height: 32px;
  border: 2px solid #ddd; background: #fff;
  border-radius: 50%; font-size: 1.1rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color .15s;
}
.pizza-qty-btn:hover { border-color: var(--dynamic-primary, #50a7b0); }
.pizza-qty-val { font-weight: 700; font-size: .95rem; min-width: 24px; text-align: center; }

.btn-add-sacola {
  width: 100%; background: var(--dynamic-primary, #50a7b0);
  color: #fff; border: none;
  padding: 13px; border-radius: 28px;
  font-size: .95rem; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  gap: 8px; transition: filter .2s, transform .15s;
}
.btn-add-sacola:hover:not(:disabled) { filter: brightness(88%); transform: scale(1.01); }
.btn-add-sacola:disabled { background: #ccc; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════════
   SUBITEM SELECTOR MODAL
   ═══════════════════════════════════════════════════════════ */

.subitens-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subitem-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  user-select: none;
}

.subitem-option:hover {
  border-color: var(--dynamic-primary, #50a7b0);
  background: color-mix(in srgb, var(--dynamic-primary, #50a7b0) 6%, white);
}

.subitem-option.sel {
  border-color: var(--dynamic-primary, #50a7b0);
  background: color-mix(in srgb, var(--dynamic-primary, #50a7b0) 10%, white);
}

.subitem-opt-nome {
  font-weight: 600;
  font-size: .9rem;
  color: #222;
}

.subitem-opt-preco {
  font-weight: 700;
  font-size: .9rem;
  color: var(--dynamic-primary, #50a7b0);
  flex-shrink: 0;
  margin-left: 12px;
}

/* ═══════════════════════════════════════════════════════════
   DELIVERY SECTION (inside cart footer)
   ═══════════════════════════════════════════════════════════ */

#cart-delivery-section {
  margin-bottom: 12px;
}

.delivery-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.dtog-btn {
  flex: 1;
  padding: 9px 6px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #777;
  transition: all .15s;
  font-family: inherit;
}
.dtog-btn.dtog-active {
  border-color: var(--dynamic-primary, #50a7b0);
  background: color-mix(in srgb, var(--dynamic-primary, #50a7b0) 10%, white);
  color: var(--dynamic-primary, #50a7b0);
}

.delivery-field { margin-bottom: 6px; }

.delivery-label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  color: #777;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.cart-input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: .85rem;
  outline: none;
  font-family: inherit;
  transition: border-color .15s;
  box-sizing: border-box;
}
.cart-input:focus { border-color: var(--dynamic-primary, #50a7b0); }

.delivery-retirada-info {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 12px;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 10px;
  font-size: .82rem;
  color: #15803d;
  margin-bottom: 6px;
}
.delivery-retirada-info i { font-size: 1rem; margin-top: 2px; flex-shrink: 0; }
.delivery-retirada-info strong { display: block; font-weight: 700; }
.delivery-retirada-info span { color: #555; font-size: .78rem; display: block; margin-top: 2px; }
