/* main navigation  */
.main-nav {
  position: absolute;
  /* height: 100px; */
  /* width: 100%; */
  left: 0;
  right: 0;
  z-index: 99;
  .logo {
    grid-area: logo;
    min-height: 80px;
    width: 175px;
    display: flex;
    align-items: center;
  }
  .logo a {
    display: block;
    width: 100%;
    height: 100%; 
  }
  .logo img {
    width: 100%;
    height: clamp(50px, 100%, 70px);
    transition: all var(--animation-speed);
  }
}
.main-nav > .container-fluid {
  /* position: fixed; */
  padding: 0;
}
.main-nav > .container-fluid > .container-content {
  display: grid;
  grid-template: "logo . mobile" "links links links";
  grid-template-columns: 1fr 2fr auto;
  /* border: 1px solid white; */
}
@media (min-width: 1150px) {
  .main-nav > .container-fluid > .container-content {
    grid-template: "logo links";
    grid-template-columns: 1fr 2fr;
    grid-template-rows: 5rem;
  }
}
@media (min-width: 1150px) {
  .main-nav > .container-fluid > .container-content {
    grid-template-columns: 1fr 2fr;
  }
}

.mobile {
  grid-area: mobile;
  align-self: center;
  display: block;
}
@media (min-width: 1150px) {
  .mobile {
    display: none;
  }
}
.menus {
  grid-area: links;
  display: none;
  margin-top: 5%;
  visibility: hidden;
  opacity: 0;
  transition: all calc(var(--animation-speed) / 2);
}
.menus.active {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0%;
  visibility: visible;
  opacity: 1;
}
@media (min-width: 1150px) {
  .menus {
    display: flex;
    align-items: center;
    justify-content: end;
    margin-top: 0%;
    visibility: visible;
    opacity: 1;
  }
}
.menus ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
}
@media (min-width: 1150px) {
  .menus ul {
    gap: 0rem;
  }
}
@media (min-width: 1200px) {
  .menus ul {
    gap: 0.5rem;
  }
}
@media (min-width: 1300px) {
  .menus ul {
    gap: 1rem;
  }
}

.menus .menu {
  height: 100%;
  flex-direction: column;
}
@media (min-width: 1150px) {
  .menus .menu {
    flex-direction: row;
  }
}

.menus .menu li.sub-menu-column {
  position: relative;
}

.menus li:not(.shop) .item::after {
  display: block;
  content: "";
  width: calc(100% - 3em);
  border-bottom: 5px solid transparent;
}
.menus .item {
  height: initial;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  > .btn {
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75em 1em;
  }
}
@media (min-width: 1150px) {
  .menus .item {
    height: 100%;
  }
}
.menus :where(.btn, a) {
  border: 2px solid transparent;
  background-color: transparent;
  color: var(--color-ivory);
  font-weight: 800;
  line-height: 19px;
  letter-spacing: 0.25em;
  text-align: left;
  padding: 0.75em 1.5em;
  text-decoration: none;
}
.menus .shop .btn {
  border: 3px solid var(--color-ivory);
  &:hover {
    border: 3px solid var(--color-gold);
  }
}
.menu > li:hover .item::after,
.menus .item:has(.btn.active)::after,
.menus .item:has(.btn:hover)::after {
  border-bottom: 5px solid var(--color-gold);
}

@media (min-width: 1150px) {
  .menu > li .sub-menu {
    opacity: 0;
    visibility: hidden;
    transition: opacity calc(var(--animation-speed) / 4), visibility calc(var(--animation-speed) / 4);
  }
  .menu > li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
  }
}

/* sub menu  */
.main-nav .sub-menu {
  /* position: absolute; */
  /* left: 0; */
  /* right: 0; */
  /* bottom: 0; */
  display: grid;
  grid-template-columns: repeat(auto-fit, 250px);
  justify-content: center;
  gap: 1rem;
  background-color: var(--color-ivory);
  /* transform: translateY(100%); */
}

@media (min-width: 1150px) {
  .main-nav .sub-menu {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    transform: translateY(100%);
  }
  .main-nav .menu > li:has(.sub-menu.column)  {
    /* sub nav self width  */
    position: relative;
  }
  .main-nav .sub-menu.column {
    display: grid;
    grid-template-columns: 250px;
    justify-content: start;
    gap: 0;
    /* sub nav self width  */
    right: -50%;
    left: -50%;
    grid-template-columns: initial;
  }
}
.main-nav .sub-menu li:hover {
  background-color: color-mix(in lch, var(--color-ivory) 80%, #fff);
}
.main-nav .sub-menu .sub-item {
  display: block;
  /* font-size: 1rem; */
  font-weight: 800;
  /* line-height: 1; */
  letter-spacing: 0.15em;
  text-align: center;
  /* margin: 1rem; */
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-dark-char);
}
.main-nav .sub-menu .image {
  width: auto;
  height: 150px;
}
.main-nav .whiskey .sub-menu .name {
  margin-top: 1rem;
}

/* hamburger  */
.btn.btn-main-nav-hamburger {
  --hamburger-width: 30px;
  --hamburger-height: 30px;
  padding: 0;
  width: var(--hamburger-width);
  height: var(--hamburger-height);
  cursor: pointer;
  border: 1px solid transparent;
  background-color: transparent;
}
ul.hamburger {
  display: grid;
  padding: 0;
  margin: 0;
  height: var(--hamburger-height);
  width: var(--hamburger-width);
  grid-template-rows: 33% 33% 33%;
}
ul.hamburger li {
  --hamburger-item-height: 5px;
  height: 5px;
  background: #fff;
  content: "";
  position: relative;
  transition: all calc(var(--animation-speed) / 4) ease-in-out;
  list-style-type: none;
}

ul.hamburger li:nth-child(1) {
  top: calc(0% + 0px);
}
ul.hamburger li:nth-child(2) {
  top: calc(50% - calc(var(--hamburger-item-height) / 2));
}
ul.hamburger li:nth-child(3) {
  top: calc(100% - var(--hamburger-item-height));
}
.mobile.active ul.hamburger li:nth-child(1) {
  top: calc(100% + var(--hamburger-item-height));
  transform: rotate(45deg);
}
.mobile.active ul.hamburger li:nth-child(2) {
  transform: scaleX(0);
}
.mobile.active ul.hamburger li:nth-child(3) {
  top: calc(0% - var(--hamburger-item-height));
  transform: rotate(-45deg);
}

.mobile.active ~ .menus li:is(.whiskey, .about) .item .btn::after {
  content: "";
  background: url('/wp-content/themes/yellowstonebourbon/imgs/chevron-right.svg') no-repeat center center / contain;
  /* background-color: grey; */
  --chevron-size: 1.5em;
  width: var(--chevron-size);
  height: var(--chevron-size);
  margin-left: 0.25em;
  display: inline-block;
  transition: all calc(var(--animation-speed) / 4);
}
.mobile.active ~ .menus .item .btn.active::after {
  transform: rotate(90deg);
}
.mobile.active ~ .menus .sub-menu {
  display: none;
}
.mobile.active ~ .menus .sub-menu.active {
  display: grid;
}

/* overlay  */
body .main-nav-overlay {
  background-color: #000;
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--animation-speed);
}
body:has(.main-nav .menus.active) .main-nav-overlay {
  opacity: 0.75;
  visibility: visible;
}
@media (min-width: 1150px) {
  body:has(.main-nav:hover, .main-nav .menus.active) .main-nav-overlay {
    opacity: 0.75;
    visibility: visible;
  }
}

/* password protected pages */
.post-password-required {
   background: var(--color-gold);
   color: var(--color-ivory);
   position: relative;
   z-index: 100;
}