/* ==========================================================================
   Nexo Burger - Estilos do Sistema de Pedidos & Carrinho
   ========================================================================== */

/* ─── Botão do Carrinho no Cabeçalho ─────────────────────────────────────── */
.btn-cart {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.88rem;
  position: relative;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-cart:hover {
  background: var(--bg-card-hover);
  border-color: var(--brand-orange);
  color: #fff;
  transform: translateY(-1px);
}

.btn-cart.has-items {
  border-color: var(--brand-orange);
  background: rgba(255, 90, 0, 0.12);
  color: #fff;
  box-shadow: 0 0 16px rgba(255, 90, 0, 0.25);
}

.cart-badge {
  background: var(--brand-orange);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  min-width: 20px;
  text-align: center;
  box-shadow: 0 0 10px var(--brand-orange-glow);
}

/* ─── Link WhatsApp no Cabeçalho ─────────────────────────────────────────── */
.header-whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid rgba(37, 211, 102, 0.25);
  color: #25D366;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.header-whatsapp-link:hover {
  background: rgba(37, 211, 102, 0.2);
  border-color: #25D366;
  color: #25D366;
  transform: translateY(-1px);
}

/* ─── Barra Flutuante de Pedido / Carrinho (Sticky Cart Bar) ─────────────── */
.sticky-cart-bar {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 950;
  animation: slideUpCart 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpCart {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.sticky-cart-content {
  background: #181818;
  border: 2px solid var(--brand-orange);
  border-radius: var(--radius-full);
  padding: 0.5rem 0.6rem 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.75), 0 0 25px rgba(255, 90, 0, 0.3);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.sticky-cart-content:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.85), 0 0 30px rgba(255, 90, 0, 0.4);
}

.sticky-cart-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.sticky-cart-badge-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sticky-cart-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.sticky-cart-qty {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--brand-orange);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: var(--radius-full);
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
  border: 2px solid #181818;
}

.sticky-cart-pricing {
  display: flex;
  flex-direction: column;
}

.sticky-cart-sublabel {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sticky-cart-price {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.btn-sticky-checkout {
  background: var(--brand-orange);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: 0.7rem 1.35rem;
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background var(--transition-fast);
  box-shadow: 0 4px 14px var(--brand-orange-glow);
}

.btn-sticky-checkout:hover {
  background: var(--brand-orange-hover);
}

@media (max-width: 768px) {
  .sticky-cart-bar {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
  .sticky-cart-content {
    width: 100%;
    justify-content: space-between;
    padding: 0.55rem 0.65rem 0.55rem 1rem;
    gap: 0.75rem;
  }
}

/* ─── Customizações Interativas no Modal do Produto ─────────────────────── */
.custom-section {
  margin-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.custom-group {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.custom-group-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
}

.custom-group-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.custom-group-rule {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.custom-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.custom-option-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.custom-option-label:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.custom-option-label.selected {
  border-color: var(--brand-orange);
  background: rgba(255, 90, 0, 0.08);
}

.custom-option-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
}

.custom-option-price {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--brand-orange);
}

.custom-notes-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 0.75rem;
  font-size: 0.88rem;
  font-family: inherit;
  resize: vertical;
  min-height: 65px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.custom-notes-input:focus {
  border-color: var(--brand-orange);
}

/* Seletor de Quantidade & Ação do Modal */
.dialog-order-action-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.qty-stepper {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.25rem;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  background: var(--bg-card);
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.qty-btn:hover {
  background: var(--brand-orange);
  color: #fff;
}

.qty-value {
  width: 36px;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.btn-add-to-cart {
  flex: 1;
  background: var(--brand-orange);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 0.85rem 1.25rem;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px var(--brand-orange-glow);
}

.btn-add-to-cart:hover {
  background: var(--brand-orange-hover);
  transform: translateY(-1px);
}

/* ─── Modal / Drawer do Carrinho ─────────────────────────────────────────── */
.cart-dialog {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 540px;
  width: 100%;
  margin: auto;
  border-radius: var(--radius-lg);
  color: var(--text-main);
  outline: none;
}

.cart-dialog::backdrop {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.cart-container {
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
}

.cart-header {
  padding: 1.25rem 1.5rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cart-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.cart-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.cart-close-btn:hover {
  background: var(--brand-orange);
  color: #fff;
}

.cart-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Lista de Itens no Carrinho */
.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cart-item-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.cart-item-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.cart-item-price {
  font-weight: 700;
  color: var(--brand-orange);
  font-size: 0.95rem;
  white-space: nowrap;
}

.cart-item-customizations {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.cart-item-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 2px 4px;
  gap: 6px;
}

.btn-cart-qty {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.btn-cart-qty:hover {
  background: var(--brand-orange);
  color: #fff;
}

.cart-qty-val {
  font-size: 0.88rem;
  font-weight: 800;
  min-width: 18px;
  text-align: center;
  color: #fff;
}

.btn-remove-item {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-remove-item:hover {
  color: #ff4d4d;
  background: rgba(255, 77, 77, 0.1);
}

.btn-add-more-items {
  background: rgba(255, 90, 0, 0.05);
  border: 1.5px dashed var(--brand-orange);
  color: var(--brand-orange);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
}

.btn-add-more-items:hover {
  background: var(--brand-orange);
  color: #fff;
  border-style: solid;
}

/* Formulário de Finalização */
.checkout-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.checkout-section-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brand-gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.delivery-type-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.delivery-type-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.delivery-type-btn.active {
  border-color: var(--brand-orange);
  background: rgba(255, 90, 0, 0.12);
  color: #fff;
}

.delivery-type-btn .type-icon {
  font-size: 1.3rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  border-color: var(--brand-orange);
}

/* Footer do Carrinho */
.cart-footer {
  padding: 1.25rem 1.5rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.cart-totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.cart-totals-row.grand-total {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.cart-totals-row.grand-total .total-amount {
  color: var(--brand-orange);
  font-family: var(--font-heading);
}

.btn-submit-order {
  background: var(--brand-orange);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 0.9rem 1.5rem;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 18px var(--brand-orange-glow);
}

.btn-submit-order:hover {
  background: var(--brand-orange-hover);
  transform: translateY(-1px);
}

.btn-submit-order:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ─── Modal de Confirmação / Sucesso ─────────────────────────────────────── */
.order-success-card {
  text-align: center;
  padding: 2.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.success-icon-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  color: var(--status-open);
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.order-code-box {
  background: var(--bg-surface);
  border: 1px dashed var(--brand-orange);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.5rem;
  margin: 0.5rem 0;
}

.order-code-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.order-code-val {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--brand-orange);
}
