/* ── Outwater Grill — Mobile Responsive Fixes ── */

@media (max-width: 768px) {

  /* ── Force body/html no overflow ── */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* ── Fix outer containers ── */
  .kiosk-subcategory,
  .kiosk-menu,
  .kiosk-category {
    padding: 8px !important;
    overflow-x: hidden !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  .content {
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    padding: 0 !important;
  }

  /* ── SUBCATEGORY GRID — core fix ── */
  /* Override the inline style set by Vue gridStyle() */
  .subcategory-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px 0 !important;
    box-sizing: border-box !important;
    justify-content: stretch !important;
  }

  /* ── SUBCATEGORY CARD ── */
  .subcategory-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .subcategory-image {
    width: 100% !important;
    height: 110px !important;
    min-height: 110px !important;
    box-sizing: border-box !important;
  }

  .subcategory-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .subcategory-info {
    padding: 8px 10px !important;
    overflow: hidden !important;
  }

  .subcategory-name {
    font-size: 13px !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
  }

  .subcategory-count {
    font-size: 11px !important;
  }

  .subcategory-arrow {
    display: none !important;
  }

  /* ── CATEGORY GRID (KioskCategoryComponent) ── */
  .category-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    justify-content: stretch !important;
  }

  .category-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* ── ITEM/MENU GRID (KioskMenuComponent) ── */
  .item-grid,
  .menu-grid,
  .kiosk-menu-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .item-card,
  .menu-item-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* ── HEADER ── */
  .top {
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 8px !important;
    margin-bottom: 12px !important;
  }

  .header-actions {
    gap: 6px !important;
    flex-wrap: wrap !important;
  }

  /* Hide button text, show only icons */
  .back-btn span,
  .search-btn span,
  .reorder-btn span,
  .order-now-btn span {
    display: none !important;
  }

  .back-btn,
  .search-btn,
  .reorder-btn {
    padding: 8px !important;
    border-radius: 8px !important;
  }

  .order-now-btn {
    padding: 8px 12px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
  }

  .cart-btn {
    width: 40px !important;
    height: 40px !important;
  }

  /* ── VIEW ALL CARD ── */
  .view-all-card {
    padding: 12px !important;
    gap: 12px !important;
  }

  .view-all-text h3 {
    font-size: 14px !important;
  }

  .view-all-text p {
    font-size: 12px !important;
  }

  /* ── ITEM DETAIL MODAL ── */
  .item-details-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: flex-end !important;
  }

  .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    border-radius: 20px 20px 0 0 !important;
    padding-bottom: 80px !important;
  }

  .details-grid {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }

  .image-section {
    width: 100% !important;
  }

  .item-image {
    width: 100% !important;
    height: 200px !important;
    max-height: 200px !important;
    object-fit: cover !important;
  }
}

/* ── Single column on very small screens ── */
@media (max-width: 360px) {
  .subcategory-grid,
  .category-grid,
  .item-grid,
  .menu-grid {
    grid-template-columns: 1fr !important;
  }
}