/********************************************
    DEFAULT (HIDE MOBILE ON DESKTOP)
*********************************************/
.mobile-header,
.mobile-menu,
.mobile-menu-overlay {
  display: none !important;
}

/********************************************
    MOBILE MODE
*********************************************/
@media (max-width: 768px) {
  /***** HIDE DESKTOP HEADER *****/
  .site-header {
    display: none !important;
  }
  .mobile-header,
  .mobile-menu,
  .mobile-menu-overlay {
    display: none !important;
  }

  /****************************************
      MOBILE TOP BAR
  *****************************************/
  .mobile-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 14px 18px;

    background: transparent;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;

    z-index: 9999;
  }

  /* White → Black icon switch */
  .mobile-header .mh-icon svg {
    stroke: #ffffff;
    transition: stroke 0.25s ease;
  }

  .mobile-header .mh-logo img {
    height: 50px;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.686));
    transition: filter 0.25s ease;
  }

  /* Solid header on scroll */
  .mobile-header.scrolled {
    background: #000000;
    backdrop-filter: none;
  }

  .mobile-header.scrolled .mh-icon svg {
    stroke: #ffffff !important;
  }

  .mobile-header.scrolled .mh-logo img {
    filter: drop-shadow(0 0 6px rgb(255, 255, 255)) !important;
  }

  /* When menu is opened → icons must also be black */
  .mobile-menu.open ~ .mobile-header .mh-icon svg {
    stroke: #222 !important;
  }

  .mobile-menu.open ~ .mobile-header .mh-logo img {
    filter: none !important;
  }

  /****************************************
      ICONS
  *****************************************/
  .mh-icons {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .mh-icon {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
  }

  .mh-icon svg {
    width: 30px;
    height: 30px;
  }

  /****************************************
      OVERLAY
  *****************************************/
  .mobile-menu-overlay {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 9000;
  }

  .mobile-menu-overlay.show {
    opacity: 1;
    pointer-events: auto;
  }

  /****************************************
      MOBILE SLIDE PANEL
  *****************************************/
  .mobile-menu {
    display: block !important;
    position: fixed;
    top: 0;
    right: -80%;

    width: 80%;
    height: 100vh;
    padding: 20px;

    /* Glass effect on initial open */
    background: rgb(255, 255, 255);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    overflow-y: auto;
    transition: right 0.35s ease;

    z-index: 10000;
  }

  .mobile-menu.open {
    right: 0;
  }

  /* When scrolled inside → turn solid */
  .mobile-menu.scrolled {
    background: rgb(0, 0, 0) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /****************************************
      CLOSE BUTTON
  *****************************************/
  .mh-close {
    background: none;
    border: none;
    cursor: pointer;
    margin-bottom: 20px;
    padding: 6px;
  }

  .mh-close svg {
    width: 28px;
    height: 28px;
    stroke: #1a1a1a !important;
  }

  /****************************************
      MENU TRANSITION WRAPPER
  *****************************************/
  .menu-transition-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    min-height: calc(100vh - 70px);
  }

  /****************************************
      MAIN VIEW
  *****************************************/
  .menu-view {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    padding-bottom: 60px;
    background: #fff;
    transition: transform 0.35s ease, opacity 0.25s ease;
  }

  .main-view.active {
    transform: translateX(0);
  }

  .main-view.slide-left {
    transform: translateX(-100%);
  }

  /****************************************
      SUB VIEW
  *****************************************/
  .sub-view {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
  }

  .sub-view.active.show {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .sub-header {
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
  }

  .back-btn {
    background: none;
    border: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
  }

  .back-btn svg {
    width: 20px;
    height: 20px;
    stroke: #222;
  }

  .sub-title {
    font-size: 20px;
    font-weight: 700;
    margin: 14px 0;
  }

  .sub-category-label {
    font-size: 14px;
    font-weight: 600;
    color: #777;
    margin-bottom: 12px;
  }

  /****************************************
      MENU ITEMS
  *****************************************/
  .mobile-menu-list {
    list-style: none;
  }

  .menu-item {
    padding: 16px 0;
    border-bottom: 1px solid #f2f2f2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
  }

  .item-text {
    font-size: 17px;
    font-weight: 500;
    color: #222;
  }

  .arrow-icon {
    width: 18px;
    height: 18px;
    stroke: #444;
  }

  .sub-menu-list {
    list-style: none;
  }

  .sub-menu-item {
    padding: 14px 0;
    border-bottom: 1px solid #f4f4f4;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
  }

  .sub-menu-item img {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: 50%;
  }

  /****************************************
      BOTTOM MENU LINKS
  *****************************************/
  .menu-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
  }

  .bottom-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    font-size: 15px;
    color: #333;
  }

  .bottom-item svg {
    width: 20px;
    height: 20px;
    stroke: #222 !important;
  }
}
