/* Menu lateral — mobile */

@media (min-width: 761px) {
  .head__menu-btn,
  .mobile-drawer {
    display: none !important;
  }
}

@media (max-width: 760px) {
  .head__menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 10px;
    background: #f0ebe3;
    color: var(--fg);
    cursor: pointer;
    flex-shrink: 0;
  }

  .head__menu-btn svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
  }

  .head__menu-btn:active {
    transform: scale(0.96);
  }

  .has-minimal-header .head__menu-btn {
    display: none !important;
  }

  .head .head__row {
    grid-template-columns: auto 1fr auto !important;
    grid-template-areas:
      "menu brand actions"
      "searchrow searchrow searchrow" !important;
  }

  .head__menu-btn {
    grid-area: menu;
  }

  .head .brand {
    grid-area: brand;
    min-width: 0;
  }

  .head__actions {
    grid-area: actions;
  }

  .mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 600;
    pointer-events: none;
    visibility: hidden;
  }

  .mobile-drawer.is-open {
    pointer-events: auto;
    visibility: visible;
  }

  body.mobile-drawer-open {
    overflow: hidden;
  }

  .mobile-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 12, 10, 0.45);
    opacity: 0;
    transition: opacity 0.22s ease;
  }

  .mobile-drawer.is-open .mobile-drawer__backdrop {
    opacity: 1;
  }

  .mobile-drawer__panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(292px, 86vw);
    max-width: 100%;
    background: #fff;
    box-shadow: 4px 0 24px rgba(13, 12, 10, 0.12);
    transform: translateX(-105%);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: calc(0.65rem + env(safe-area-inset-top, 0px)) 0 calc(1rem + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
  }

  .mobile-drawer.is-open .mobile-drawer__panel {
    transform: translateX(0);
  }

  .mobile-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem 0.65rem;
    border-bottom: 1px solid rgba(42, 37, 32, 0.08);
  }

  .mobile-drawer__head .brand__logo {
    max-height: 40px !important;
    max-width: 40px !important;
  }

  .mobile-drawer__head .brand__name {
    font-size: 0.75rem !important;
  }

  .mobile-drawer__close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: #f0ebe3;
    color: var(--fg);
    cursor: pointer;
  }

  .mobile-drawer__close svg {
    width: 20px;
    height: 20px;
  }

  .mobile-drawer__user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    margin: 0 0.65rem;
    border-radius: 12px;
    background: linear-gradient(180deg, #faf8f4 0%, #f5f0e8 100%);
    border: 1px solid rgba(42, 37, 32, 0.06);
  }

  .mobile-drawer__avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: "Oswald", sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    background: var(--gold-deep, #9a7840);
  }

  .mobile-drawer__name {
    margin: 0 0 0.1rem;
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--fg);
  }

  .mobile-drawer__email {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 52vw;
  }

  .mobile-drawer__section {
    padding: 0.5rem 0.65rem 0.25rem;
  }

  .mobile-drawer__section--muted {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(42, 37, 32, 0.08);
  }

  .mobile-drawer__label {
    margin: 0 0 0.35rem;
    padding: 0 0.2rem;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .mobile-drawer__list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .mobile-drawer__list--inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.65rem;
  }

  .mobile-drawer__link {
    display: block;
    padding: 0.55rem 0.5rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--fg);
    text-decoration: none;
  }

  .mobile-drawer__link:hover,
  .mobile-drawer__link:focus-visible {
    background: #f5f0e8;
    color: var(--gold-deep);
  }

  .mobile-drawer__link.is-active {
    background: rgba(197, 160, 89, 0.16);
    color: var(--gold-deep);
  }

  .mobile-drawer__link--sm {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.25rem;
  }

  .mobile-drawer__foot {
    padding: 0.65rem 0.85rem 0.35rem;
  }

  .mobile-drawer__logout {
    display: block;
    text-align: center;
    padding: 0.55rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
  }

  .mobile-drawer__cta {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  body.page-account .account-nav {
    display: none !important;
  }

  body.page-account .account-layout {
    grid-template-columns: 1fr;
  }
}
