/* Responsive Mobile & Tablet Off-Canvas Drill-Down Menu */
@media (max-width: 991px) {
  /* Quick Chips Bar */
  .quick-chips-bar {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .quick-chips-bar::-webkit-scrollbar {
    display: none;
  }
  .quick-chip-item {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    margin-right: 8px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  }
  .quick-chip-item:hover, .quick-chip-item:active {
    background: #e9ecef;
    color: #000;
    text-decoration: none;
  }

  /* Mobile Header Button */
  .mobile-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #c82333;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    margin-bottom: 10px;
  }
  .mobile-menu-trigger:hover {
    background: #bd2130;
    color: #ffffff;
  }

  /* Offcanvas Backdrop */
  .offcanvas-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  .offcanvas-backdrop.is-active {
    opacity: 1;
    visibility: visible;
  }

  /* Offcanvas Drawer Panel */
  .offcanvas-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 360px;
    height: 100vh;
    background: #ffffff;
    z-index: 99999;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 16px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .offcanvas-drawer.is-open {
    transform: translateX(0);
  }

  /* Offcanvas Header */
  .offcanvas-header {
    background: #2b2b2b;
    color: #ffffff;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-bottom: 1px solid #3d3d3d;
  }
  .offcanvas-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .offcanvas-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .offcanvas-close-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
  }
  .offcanvas-back-btn {
    background: #3a3a3a;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  .offcanvas-search-box {
    position: relative;
    width: 100%;
  }
  .offcanvas-search-input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    border-radius: 20px;
    border: none;
    background: #3a3a3a;
    color: #ffffff;
    font-size: 13px;
    outline: none;
  }
  .offcanvas-search-input::placeholder {
    color: #aaaaaa;
  }
  .offcanvas-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaaaaa;
    font-size: 12px;
  }

  /* Offcanvas Body & Drilldown Panels */
  .offcanvas-body {
    position: relative;
    flex: 1;
    overflow: hidden;
  }
  .drilldown-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
  }
  .drilldown-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background: #ffffff;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, visibility 0.3s ease;
  }
  .drilldown-panel.is-active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    z-index: 2;
  }
  .drilldown-panel.is-parent {
    transform: translateX(-30%);
    opacity: 0.5;
    visibility: hidden;
    z-index: 1;
  }

  /* Menu List & Links */
  .drilldown-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .drilldown-menu-item {
    border-bottom: 1px solid #f1f1f1;
  }
  .drilldown-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
  }
  .drilldown-menu-link:hover, .drilldown-menu-link:active {
    background: #f8f9fa;
    color: #c82333;
    text-decoration: none;
  }
  .drilldown-menu-link.view-all-link {
    background: #fff8e6;
    color: #856404;
    font-weight: 700;
    border-bottom: 2px solid #ffeeba;
  }
  .drilldown-arrow {
    color: #999;
    font-size: 12px;
  }
  .search-match-path {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 2px;
  }
}

@media (min-width: 992px) {
  .offcanvas-backdrop, .offcanvas-drawer, .mobile-menu-trigger, .quick-chips-bar {
    display: none !important;
  }
}
