.cartContainer {
  padding: 15px;
  transition: all 0.3s ease;
  height: 92vh;
  overflow: auto;
  scrollbar-width: none;
}

.cartLayout {
  max-width: 100%;
  padding: 16px 16px 12vh;
}

.cartItem {
  padding: 16px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cartContent {
  width: 100%;
}

.cartItems {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 0;
}

.container::-webkit-scrollbar {
  display: none;
}

.menuItemImage {
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
  width: 90px;
  height: 80px;
  margin-bottom: 6px;
}

.menuItemImage:hover {
  transform: scale(1.05);
}

.itemDescription {
  font-size: 12px !important;
  transition: color 0.3s ease;
}

.tableNumberCard :global(.ant-select-selector) {
  border-radius: 888px !important;
}

.tableNumberCard :global(.ant-select-selection-overflow) {
  top: 5px !important;
}

.couponApplyIcon {
  margin-left: 8px;
  font-size: 14px;
}

.donateHandIcon {
  color: var(--primary);
  font-size: 24px;
}

/* Desktop Cart Layout Styles */
.desktopCartContainer {
  max-width: 100vw;
  margin: 0 auto;
  padding: 40px 24px;
  min-height: 100vh;
}

.desktopSectionHeader {
  border-bottom: 1px solid var(--border);
}

.desktopEmptyCart {
  text-align: center;
  padding: 80px 40px;
  border-radius: 20px;
  border: 2px dashed rgba(0, 0, 0, 0.1);
}

.desktopEmptyCartIcon {
  margin-bottom: 24px;
  opacity: 0.6;
}

.desktopEmptyCartIcon svg {
  width: 80px;
  height: 80px;
  color: rgba(0, 0, 0, 0.3);
}

.desktopCartItemsSection {
  margin-top: 40px;
}

.desktopCartItems {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.desktopCartItem {
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.desktopImageContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 16px;
}

.desktopMenuItemImage {
  object-fit: cover;
  transition: transform 0.3s ease;
}

.desktopCartItem:hover .desktopMenuItemImage {
  transform: scale(1.05);
}

.desktopItemDetails {
  padding: 8px 0;
}

.desktopItemDescription {
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.65);
}

.desktopPriceContainer {
  margin-top: 16px;
}

.desktopPrice {
  font-size: 18px;
  color: #1890ff;
}

.desktopActionsContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  margin-top: 4px;
}

.desktopRecommendationsSection {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.desktopRecommendationsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.desktopRecommendationCard {
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
}

.desktopRecommendationCard:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 0, 0, 0.12);
}

.desktopRecommendationContent {
  position: relative;
  padding: 16px;
}

.desktopQuickAddButton {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
}

.desktopRecommendationCard:hover .desktopQuickAddButton {
  opacity: 1;
  transform: scale(1);
}

.desktopQuickAddIcon {
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
  border: none;
  box-shadow: 0 4px 16px rgba(24, 144, 255, 0.3);
}

.desktopQuickAddIcon:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(24, 144, 255, 0.4);
}

.desktopRecommendationImage {
  border-radius: 16px;
  margin-bottom: 16px;
  transition: transform 0.3s ease;
}

.desktopRecommendationCard:hover .desktopRecommendationImage {
  transform: scale(1.05);
}

.desktopRecommendationInfo {
  text-align: center;
}

.desktopRecommendationName {
  font-size: 16px;
  margin-bottom: 8px;
  line-height: 1.4;
}

.desktopRecommendationPrice {
  font-size: 14px;
  color: #1890ff;
  font-weight: 600;
}

/* Desktop Sidebar Styles */
.desktopSidebar {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 20px;
}

.desktopSidebarCard {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  overflow: hidden;
}

.desktopSidebarCard:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

.desktopTipCard {
  background: linear-gradient(135deg, #fff7e6 0%, #fff2d9 100%);
  border: 1px solid rgba(255, 183, 0, 0.2);
}

.desktopTipHeader {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.desktopTipIcon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 183, 0, 0.1);
  border-radius: 12px;
}

.desktopTipButtons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.desktopTipButton {
  height: 44px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.desktopTipButton:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.desktopCheckoutButton {
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
  border: none;
  box-shadow: 0 6px 24px rgba(24, 144, 255, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.desktopCheckoutButton:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(24, 144, 255, 0.4);
  background: linear-gradient(135deg, #40a9ff 0%, #69c0ff 100%);
}

.desktopCheckoutButton:active {
  transform: translateY(0);
}

.cartItems :global(.ant-card-hoverable:hover) {
  box-shadow: 0 0 0 0 !important;
}

[data-theme="dark"] .menuItemImage {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .itemDescription {
  color: rgba(255, 255, 255, 0.75) !important;
}

/* Keyframe animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== AGGREGATED MEDIA QUERIES ===== */

/* Mobile devices (max-width: 768px) */
@media (max-width: 768px) {
  /* Mobile input handling */
  .cartContainer input,
  .cartContainer textarea,
  .cartContainer select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .cartContainer input:focus,
  .cartContainer textarea:focus,
  .cartContainer select:focus {
    outline: none;
    -webkit-tap-highlight-color: transparent;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .cartContainer input[type="text"],
  .cartContainer input[type="email"],
  .cartContainer input[type="tel"],
  .cartContainer input[type="number"],
  .cartContainer textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
  }
}

/* Tablet devices (min-width: 769px and max-width: 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .cartLayout {
    padding: 24px;
  }

  .cartItem {
    padding: 20px;
    border-radius: 16px;
  }

  .cartContainer {
    padding: 24px;
  }

  .cartItems {
    gap: 20px;
    margin-bottom: 32px;
  }

  .container {
    gap: 20px;
    padding: 12px 0;
  }

  .menuItemImage {
    border-radius: 12px;
  }

  .itemDescription {
    font-size: 14px !important;
  }

  .couponApplyIcon {
    margin-left: 10px;
    font-size: 16px;
  }

  .donateHandIcon {
    font-size: 28px;
  }
}

/* Desktop devices (min-width: 1025px) */
@media (min-width: 1025px) {
  .cartLayout {
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
  }

  .cartItem {
    padding: 24px;
    border-radius: 20px;
  }

  .cartContainer {
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
  }

  .cartItems {
    gap: 24px;
    margin-bottom: 40px;
  }

  .container {
    gap: 24px;
    padding: 16px 0;
  }

  .menuItemImage {
    border-radius: 16px;
  }

  .itemDescription {
    font-size: 16px !important;
  }

  .couponApplyIcon {
    margin-left: 12px;
    font-size: 18px;
  }

  .donateHandIcon {
    font-size: 32px;
  }
}

/* Large screens (min-width: 768px) */
@media (min-width: 768px) {
  .cartContainer:focus,
  .menuItemImage:focus {
    outline-offset: 4px;
  }
}

/* Extra large desktop screens (min-width: 1440px) */
@media (min-width: 1440px) {
  .desktopCartContainer {
    max-width: 100vw;
    padding: 0 32px 32px 32px;
  }

  .desktopRecommendationsGrid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
  }

  .desktopCartItems {
    gap: 16px;
  }

  .desktopSidebar {
    gap: 16px;
  }

  .desktopEmptyCart {
    padding: 100px 60px;
  }

  .desktopEmptyCartIcon svg {
    width: 100px;
    height: 100px;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: no-preference) {
  .cartItems {
    animation: fadeInUp 0.6s ease-out;
  }

  .container {
    animation: fadeInUp 1s ease-out;
  }

  .desktopCartItem {
    animation: fadeInUp 0.6s ease-out;
  }

  .desktopRecommendationCard {
    animation: fadeInUp 0.6s ease-out;
    animation-delay: calc(var(--animation-order, 0) * 0.1s);
  }

  .desktopSidebarCard {
    animation: fadeInRight 0.6s ease-out;
    animation-delay: calc(var(--animation-order, 0) * 0.1s);
  }
}

/* Hover effects for devices that support hover */
@media (hover: hover) {
  .menuItemImage:hover {
    transform: scale(1.05);
  }

  [data-theme="dark"] .orderSummary:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  }
}

/* Print styles */
@media print {
  .cartContainer {
    background-color: white !important;
    color: black !important;
  }

  .container {
    display: none !important;
  }

  .desktopCartContainer {
    background: none;
    box-shadow: none;
  }

  .desktopSidebarCard {
    box-shadow: none;
    border: 1px solid #000;
  }
}

/* Focus states for accessibility */
.cartContainer:focus,
.menuItemImage:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.desktopCartItem:focus-within,
.desktopRecommendationCard:focus-within,
.desktopSidebarCard:focus-within {
  outline: 2px solid #1890ff;
  outline-offset: 2px;
}

.desktopCheckoutButton:focus {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}
