/* Estilos do Cardápio do Cliente - Mobile-First & Moderno */

.menu-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
}

@media (max-width: 900px) {
  .menu-layout {
    grid-template-columns: 1fr;
    padding: 1rem;
    padding-bottom: 80px; /* Espaço para o botão flutuante do carrinho no celular */
  }
  .cart-sidebar {
    display: none; /* Carrinho vira um modal bottom-sheet no celular */
  }
}

/* Banner do Restaurante */
.restaurant-banner {
  background: linear-gradient(rgba(11, 15, 25, 0.4), rgba(11, 15, 25, 0.9)), url('https://images.unsplash.com/photo-1555396273-367ea4eb4db5?w=1200&auto=format&fit=crop&q=60') no-repeat center;
  background-size: cover;
  padding: 4rem 2rem 2rem;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.restaurant-name {
  font-size: 2.25rem;
  font-weight: 800;
  color: #fff;
}

.restaurant-badge {
  align-self: flex-start;
  background: var(--success);
  color: #fff;
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Categoria Slider */
.categories-bar {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  scrollbar-width: none;
}

.categories-bar::-webkit-scrollbar {
  display: none;
}

.category-tab {
  padding: 0.6rem 1.25rem;
  border-radius: 30px;
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.category-tab.active, .category-tab:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Listagem de Itens */
.category-section {
  margin-bottom: 2.5rem;
}

.category-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  border-left: 4px solid var(--primary);
  padding-left: 0.75rem;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.product-card {
  display: flex;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 140px;
  transition: var(--transition);
  background: rgba(22, 30, 46, 0.4);
  border: 1px solid var(--border-color);
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 71, 87, 0.4);
  box-shadow: var(--shadow);
}

.product-img {
  width: 120px;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
  flex-shrink: 0;
}

.discount-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--danger);
  color: #fff;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.product-details {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.product-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.product-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-price-col {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.prod-original-price {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}

.prod-original-price.slashed {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.prod-discount-price {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--success);
}

.add-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
}

.add-btn:hover {
  transform: scale(1.1);
  background: var(--primary-hover);
}

/* Carrinho Lateral */
.cart-sidebar {
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 4rem);
  position: sticky;
  top: 2rem;
}

.cart-title {
  font-size: 1.25rem;
  font-weight: 700;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-empty {
  padding: 3rem 0;
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.cart-empty-icon {
  font-size: 2.5rem;
  opacity: 0.5;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

.cart-item-details {
  flex: 1;
  padding-right: 1rem;
}

.cart-item-name {
  font-weight: 600;
}

.cart-item-price {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-tertiary);
  padding: 0.25rem 0.5rem;
  border-radius: 20px;
}

.qty-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-weight: 700;
  cursor: pointer;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.cart-totals {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 500;
}

.total-row.grand-total {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--success);
}

/* Modal Bottom-Sheet Celular */
.mobile-cart-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  z-index: 99;
}

@media (max-width: 900px) {
  .mobile-cart-bar.active {
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
  }
}

.mobile-cart-info {
  display: flex;
  flex-direction: column;
}

.mobile-cart-qty {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.mobile-cart-total {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--success);
}

/* Checkout Progress Indicator */
.checkout-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  position: relative;
}

.checkout-steps::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border-color);
  z-index: 1;
  transform: translateY(-50%);
}

.step-item {
  position: relative;
  z-index: 2;
  background: var(--bg-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  transition: var(--transition);
}

.step-item.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-tertiary);
  box-shadow: 0 0 10px rgba(255, 71, 87, 0.3);
}

.step-item.completed {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

/* 3D Flip Card Simulation */
.flip-card {
  perspective: 1000px;
  width: 100%;
  height: 190px;
  margin: 1.5rem 0;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.card-front {
  background: linear-gradient(135deg, #3867d6 0%, #4b7bec 100%);
  color: #fff;
  text-align: left;
}

.card-back {
  background: linear-gradient(135deg, #4b6584 0%, #2f3640 100%);
  color: #fff;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem 0; /* Espaço para a tarja preta */
}

.card-chip {
  width: 45px;
  height: 35px;
  background: #f1c40f;
  border-radius: 4px;
}

.card-number {
  font-size: 1.25rem;
  letter-spacing: 2px;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}

.card-row {
  display: flex;
  justify-content: space-between;
}

.card-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2px;
}

.card-holder, .card-expiry {
  font-size: 0.9rem;
  font-weight: 500;
}

.card-stripe {
  background: #000;
  height: 40px;
  width: 100%;
  margin-top: 10px;
}

.card-signature {
  background: #fff;
  color: #000;
  padding: 0.3rem 1rem;
  text-align: right;
  width: 80%;
  margin: 0 auto;
  border-radius: 4px;
  font-weight: 700;
  font-style: italic;
}

/* PIX QR Code & Copy Info */
.pix-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

.pix-qr {
  width: 160px;
  height: 160px;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pix-key-box {
  width: 100%;
  display: flex;
  gap: 0.5rem;
}

/* Payment Toggles Checkboxes */
.payment-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.payment-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.payment-label:hover {
  border-color: var(--primary);
}

.payment-label input[type="radio"] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
}

.payment-label.selected {
  border-color: var(--primary);
  background: rgba(255, 71, 87, 0.05);
}

.payment-info-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}
