/* Responsive table styling */
.table-responsive {
  overflow-x: auto;
  overflow-y: hidden; /* Prevent vertical scrolling */
  -webkit-overflow-scrolling: touch; /* For smoother scrolling on iOS */
  border-radius: 8px; /* Apply border-radius to the container */
}

/* --- Order Page Specific Responsiveness --- */

/* General adjustments for smaller screens */
@media (max-width: 992px) {
  .hero-section h1 {
    font-size: 3.5rem;
  }
  .hero-section p {
    font-size: 1.2rem;
  }
  .container {
    padding: 1.5rem;
  }
  .container h2 {
    font-size: 2.5rem;
  }
  .order-page-item-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 columns for medium screens */
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 6rem 0;
  }
  .hero-section h1 {
    font-size: 2.5rem;
  }
  .hero-section p {
    font-size: 1rem;
  }
  .container {
    padding: 1rem;
    margin: 2rem auto; /* Adjust margin */
  }
  .container h2 {
    font-size: 2rem;
  }
  .search-container #search-bar {
    width: 80%; /* Make search bar wider */
  }
  .order-page-item-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns for smaller screens */
    gap: 1rem; /* Reduce gap */
  }
  .menu-item img {
    height: 150px; /* Adjust image height */
  }
  .menu-item h3 {
    font-size: 1.2rem;
  }
  .menu-item p {
    font-size: 0.9rem;
  }
  .btn-primary {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }
  #show-cart-btn {
    bottom: 15px; /* Adjust button position */
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
  /* Cart View */
  #order-summary .cart-item span {
    font-size: 1rem;
  }
  #order-summary .cart-item button {
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
  }
  #order-summary .cart-total h3 {
    font-size: 1.5rem;
  }
  #order-confirmation-modal .modal-content {
    width: 90%;
    max-width: none;
  }
  .category-section h3 {
    font-size: 2rem; /* Adjust category title size */
  }
  .cart-item-controls .quantity-input {
    width: 50px; /* Smaller quantity input */
    margin: 0 5px;
  }
  .cart-item-controls .item-total-price {
    width: 80px; /* Smaller total price display */
  }
}

@media (max-width: 576px) {
  .hero-section {
    padding: 4rem 0;
  }
  .hero-section h1 {
    font-size: 2rem;
  }
  .search-container #search-bar {
    width: 90%; /* Full width search bar */
  }
  .order-page-item-grid {
    grid-template-columns: repeat(
        2,
        1fr
      ); /* 2 columns for extra small screens */
  }
  .category-section h3 {
    font-size: 1.8rem;
  }
  #show-cart-btn {
    width: calc(100% - 30px); /* Almost full width button */
    left: 15px;
    transform: translateX(0);
  }
  #order-summary .cart-total {
    flex-direction: column;
    align-items: center;
  }
  #order-summary .cart-total .btn-primary {
    width: 100%;
    margin-top: 10px;
  }
  .cart-item-controls {
    flex-wrap: wrap; /* Allow controls to wrap */
    justify-content: flex-end;
  }
  .cart-item-controls .quantity-input,
  .cart-item-controls .item-total-price,
  .cart-item-controls .remove-item-btn {
    flex-basis: 100%; /* Make them stack */
    text-align: center;
    margin: 5px 0;
  }
}
