/* Table scroll on mobile */
.table-responsive {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* Prevent column wrapping */
.product-table th,
.product-table td {
  white-space: nowrap;
  text-align: center;
}

.product-table th {
  background-color: #555;
  color: white;
}

/* Floating checkout bar */
.checkout-bar {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #222;
  color: #fff;
  padding: 10px 0;
  z-index: 1000;
  border-top: 1px solid #444;
}

.category-btn.active {
  background-color: #0d6efd;
  /* Bootstrap primary color */
  color: #fff !important;
  border-color: #0d6efd;
  box-shadow: 0 0 5px rgba(13, 110, 253, 0.6);
}

.product-name {
  min-width: 300px;
  max-width: 300px;
  white-space: wrap !important;
}

/* Reduce padding on small screens */
@media (max-width: 576px) {
  .product-table th,
  .product-table td {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
  }

  .checkout-content {
    flex-direction: column;
    gap: 5px;
  }

  .product-name {
    min-width: 200px;
    max-width: 200px;
    white-space: wrap !important;
  }
}

/* Quantity Controls Wrapper */
.quantity-controls {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
}

/* Input */
.quantity-controls .qty-input {
  width: 55px !important;
  text-align: center;
  border: none !important;
  outline: none;
  box-shadow: none;
  font-weight: 600;
}

/* Remove gap from Bootstrap utilities */
.quantity-controls .btn {
  border-radius: 0;
  /* reset default */
  margin: 0 !important;
  padding: 0.25rem 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.25s ease;
}

/* Minus button (red, left rounded) */
.quantity-controls .minus {
  background-color: #dc3545;
  border: none;
  color: #fff;
  border-radius: 6px 0 0 6px;
}

.quantity-controls .minus:hover {
  background-color: #c82333;
  transform: scale(1.05);
}

/* Plus button (green, right rounded) */
.quantity-controls .plus {
  background-color: #28a745;
  border: none;
  color: #fff;
  border-radius: 0 6px 6px 0;
}

.quantity-controls .plus:hover {
  background-color: #218838;
  transform: scale(1.05);
}

/* Active Click Effect */
.quantity-controls .btn:active {
  transform: scale(0.9);
}

.subtotal {
  min-width: 100px;
  max-width: 100px;
}

/* Small screen adjustments */
@media (max-width: 576px) {
  .quantity-controls .qty-input {
    width: 45px !important;
    font-size: 0.9rem;
  }

  .quantity-controls .btn {
    font-size: 14px;
    padding: 0.2rem 0.5rem;
  }
}
