.phorkhom-header,
.phorkhom-header * {
  box-sizing: border-box;
}

body {
  padding-top: 72px;
}

.phorkhom-header {
  background: #f7f6f4;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
  color: #24221f;
  flex: 0 0 auto;
  left: 0;
  min-height: 72px;
  padding: 16px 120px;
  position: fixed;
  right: 0;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.phorkhom-header__inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1600px;
  min-height: 40px;
  position: relative;
  width: 100%;
}

.phorkhom-header__brand {
  display: block;
  flex: 0 0 auto;
  height: 40px;
  width: 178px;
}

.phorkhom-header__brand img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.phorkhom-header__nav {
  align-items: center;
  display: flex;
  gap: 24px;
}

.phorkhom-header__link,
.phorkhom-header__account {
  color: #59554f;
  cursor: pointer;
  font-family: "CrimsonText-SemiBold", Georgia, serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease,
    box-shadow 160ms ease, transform 160ms ease;
}

.phorkhom-header__link:hover,
.phorkhom-header__link:focus-visible {
  color: #24221f;
}

.phorkhom-header__account {
  align-items: center;
  background: #24221f;
  border-radius: 8px;
  color: #fcfcfc;
  display: flex;
  justify-content: center;
  min-height: 32px;
  padding: 6px 16px;
  white-space: nowrap;
}

.phorkhom-header__account:hover,
.phorkhom-header__account:focus-visible {
  background: #3b3833;
  box-shadow: 0 5px 14px rgba(36, 34, 31, 0.22);
  color: #ffffff;
  transform: translateY(-1px);
}

.phorkhom-header__toggle {
  display: none;
}

@media (max-width: 1024px) {
  .phorkhom-header {
    padding-left: 40px;
    padding-right: 40px;
  }

  .phorkhom-header__nav {
    gap: 16px;
  }
}

@media (max-width: 767px) {
  body {
    padding-top: 66px;
  }

  .phorkhom-header {
    min-height: 64px;
    padding: 12px 20px;
  }

  .phorkhom-header__inner {
    min-height: 40px;
  }

  .phorkhom-header__brand {
    height: 32px;
    width: 142px;
  }

  .phorkhom-header__toggle {
    align-items: center;
    background: transparent;
    border: 1px solid #d9d5ce;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 4px;
    height: 42px;
    justify-content: center;
    margin-left: auto;
    padding: 0;
    touch-action: manipulation;
    width: 42px;
  }

  .phorkhom-header__toggle span {
    background: #24221f;
    border-radius: 2px;
    display: block;
    height: 2px;
    transition: opacity 160ms ease, transform 160ms ease;
    width: 20px;
  }

  .phorkhom-header.is-menu-open .phorkhom-header__toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .phorkhom-header.is-menu-open .phorkhom-header__toggle span:nth-child(2) {
    opacity: 0;
  }

  .phorkhom-header.is-menu-open .phorkhom-header__toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .phorkhom-header__nav {
    align-items: stretch;
    background: #f7f6f4;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 20px rgba(36, 34, 31, 0.16);
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px;
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    width: min(280px, calc(100vw - 40px));
    z-index: 110;
  }

  .phorkhom-header.is-menu-open .phorkhom-header__nav {
    display: flex;
  }

  .phorkhom-header__link {
    align-items: center;
    display: flex;
    font-size: 16px;
    min-height: 48px;
    padding: 12px 14px;
  }

  .phorkhom-header__account {
    font-size: 16px;
    margin-top: 4px;
    min-height: 44px;
    padding: 10px 14px;
  }
}

@media (max-width: 389px) {
  .phorkhom-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .phorkhom-header__brand {
    height: 28px;
    width: 124px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .phorkhom-header *,
  .phorkhom-header *::before,
  .phorkhom-header *::after {
    transition-duration: 0.01ms !important;
  }
}
