/* =========================================================
   SACH & VOGUE HAIR — Independent mobile drawer
   File: css/mobile-drawer.css
   Responsibility: ONLY the custom .sv-mobile-trigger + .sv-mobile-drawer.
   Active <= 1199px. Hidden >= 1200px.
   (Olivero native nav hiding lives in css/mega-menu.css, loads last.)
   ========================================================= */

/* Default: custom mobile trigger + drawer hidden (shown only on mobile) */
.sv-mobile-trigger,
.sv-mobile-drawer {
  display: none;
}

/* =========================================================
   MOBILE ONLY: <= 1199px
   ========================================================= */
@media (max-width: 1199px) {

  .sv-mobile-trigger {
    position: fixed;
    top: 14px;
    right: 16px;
    z-index: 100000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #111;
    -webkit-tap-highlight-color: transparent;
  }

  .sv-mobile-trigger__bars,
  .sv-mobile-trigger__bars::before,
  .sv-mobile-trigger__bars::after {
    content: "";
    display: block;
    width: 24px;
    height: 1.5px;
    background: currentColor;
    transition: transform 0.2s ease;
  }

  .sv-mobile-trigger__bars { position: relative; }
  .sv-mobile-trigger__bars::before { position: absolute; top: -7px; left: 0; }
  .sv-mobile-trigger__bars::after  { position: absolute; top: 7px;  left: 0; }

  .sv-mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 100001;
    width: 100vw;
    height: 100dvh;
    background: #fdfcfa;
    color: #1a1a1a;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.22s ease, transform 0.22s ease;
  }

  .sv-mobile-drawer.is-open {
    display: block;
    opacity: 1;
    transform: none;
  }

  .sv-mobile-drawer__inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 20px 24px 34px;
  }

  .sv-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 24px;
    border-bottom: 1px solid #ece7df;
  }

  .sv-mobile-brand {
    font-size: 13px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 600;
    color: #1a1a1a;
  }

  .sv-mobile-close {
    width: 44px;
    height: 44px;
    margin: -8px -10px -8px 0;
    border: 0;
    background: transparent;
    color: #1a1a1a;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .sv-mobile-nav { margin: 0; padding: 0; }

  .sv-mobile-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
  }

  .sv-mobile-item {
    margin: 0;
    border-bottom: 1px solid #eee9e1;
  }

  .sv-mobile-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 2px;
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: 0.01em;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 300;
  }

  .sv-mobile-link:hover,
  .sv-mobile-link:focus { color: #9b7a3f; }

  .sv-mobile-arrow {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-top: 1.5px solid #cfc8bb;
    border-right: 1.5px solid #cfc8bb;
    transform: rotate(45deg);
  }

  /* Sub-links (level-2) rendered flat + indented inside the drawer */
  .sv-mobile-sublist {
    list-style: none;
    margin: 0 0 14px;
    padding: 0 0 0 4px;
  }

  .sv-mobile-subitem { margin: 0; }

  .sv-mobile-sublink {
    display: block;
    padding: 12px 2px;
    font-size: 16px;
    line-height: 1.3;
    color: #6b665e;
    text-decoration: none;
    font-weight: 400;
  }

  .sv-mobile-sublink:hover,
  .sv-mobile-sublink:focus { color: #9b7a3f; }

  .sv-mobile-utility { margin-top: auto; padding-top: 28px; }

  .sv-mobile-utility-link,
  .sv-mobile-utility-text {
    display: block;
    padding: 13px 2px;
    font-size: 15px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .sv-mobile-utility-link {
    color: #34322f;
    text-decoration: none;
    font-weight: 600;
  }

  .sv-mobile-utility-link:hover,
  .sv-mobile-utility-link:focus { color: #9b7a3f; }

  .sv-mobile-utility-text {
    color: #6b665e;
    font-weight: 600;
  }
}

/* Body scroll lock while custom drawer is open (mobile) */
html.sv-mobile-open,
body.sv-mobile-open {
  overflow: hidden !important;
  touch-action: none;
}

/* =========================================================
   DESKTOP: >= 1200px — custom mobile UI must never appear
   ========================================================= */
@media (min-width: 1200px) {
  .sv-mobile-trigger,
  .sv-mobile-drawer {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  html.sv-mobile-open,
  body.sv-mobile-open {
    overflow: auto !important;
    touch-action: auto !important;
  }
}
