/**
 * Summit 3D — header layout, logo sizing, mobile drawer, admin bar offsets.
 */

/* ======================================================
   SITE HEADER SHELL
====================================================== */

#site-header,
.summit-site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  background: #000;
  overflow-x: clip;
}

.summit-header-inner,
#site-header .container-summit {
  width: 100%;
  max-width: 1280px;
  height: 88px;
  margin: 0 auto;
  padding: 0 24px;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 24px;
}

.summit-header-brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

/* Logo — explicit dimensions so intrinsic PNG size never blows up the layout */
#site-header .summit-header-logo,
.summit-header-logo {
  display: block;
  width: auto;
  height: 56px;
  max-width: min(42vw, 100px);
  max-height: 56px;
  object-fit: contain;
  flex: 0 0 auto;
}

#mobile-menu-panel .summit-mobile-menu-head img,
.summit-mobile-logo {
  display: block;
  width: auto;
  height: 58px;
  max-width: 130px;
  max-height: 58px;
  object-fit: contain;
}

/* ======================================================
   DESKTOP NAV
====================================================== */

.summit-desktop-nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  flex: 0 0 auto;
}

.summit-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  color: rgba(243, 234, 217, 0.75);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease;
}

.summit-nav-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 180ms ease;
}

.summit-nav-link:hover,
.summit-nav-link.is-active {
  color: #f3ead9;
}

.summit-nav-link:hover::after,
.summit-nav-link.is-active::after {
  transform: scaleX(1);
}

/* ======================================================
   HEADER ACTIONS
====================================================== */

.summit-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  flex: 0 0 auto;
}

.summit-header-icon,
#site-header .summit-icon-btn,
#site-header #mobile-menu-open {
  position: relative;
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: rgba(243, 234, 217, 0.8);
  text-decoration: none;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease;
}

.summit-header-icon:hover {
  color: #f3ead9;
  background: rgba(243, 234, 217, 0.1);
}

.summit-header-icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

.summit-cart-count {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--teal);
  color: #111;
  font-size: 10px;
  font-weight: 700;
}

.summit-cart-count.hidden {
  display: none;
}

.summit-mobile-menu-button {
  display: none;
}

/* ======================================================
   MOBILE DRAWER
====================================================== */

.summit-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
}

.summit-mobile-menu.hidden {
  display: none;
}

.summit-mobile-menu-backdrop,
#mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.summit-mobile-menu-panel,
#mobile-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(88vw, 360px);
  z-index: 51;
  display: flex;
  flex-direction: column;
  background: #000;
  border-left: 1px solid rgba(243, 234, 217, 0.1);
  box-shadow: -18px 0 50px rgba(0, 0, 0, 0.45);
}

.summit-mobile-menu-head {
  min-height: 76px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(243, 234, 217, 0.1);
}

.summit-mobile-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(243, 234, 217, 0.18);
  border-radius: 50%;
  background: transparent;
  color: #f3ead9;
  cursor: pointer;
}

.summit-mobile-nav,
#mobile-menu-nav {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
}

.summit-mobile-nav-link,
#mobile-menu-nav a {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 14px;
  color: rgba(243, 234, 217, 0.76);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.summit-mobile-nav-link:hover,
#mobile-menu-nav a:hover {
  color: #f3ead9;
  background: rgba(243, 234, 217, 0.06);
}

.summit-mobile-nav-link.is-active {
  color: #f3ead9;
  background: rgba(243, 234, 217, 0.1);
  border-color: rgba(243, 234, 217, 0.15);
}

.summit-mobile-menu-footer {
  padding: 16px;
  border-top: 1px solid rgba(243, 234, 217, 0.1);
}

.summit-mobile-shop-button {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--teal);
  color: #111;
  font-weight: 600;
  text-decoration: none;
}

/* ======================================================
   RESPONSIVE
====================================================== */

@media (min-width: 641px) {
  #site-header .summit-header-logo,
  .summit-header-logo {
    height: 64px;
    max-height: 64px;
    max-width: 125px;
  }
}

@media (min-width: 1024px) {
  #site-header .summit-header-logo,
  .summit-header-logo {
    height: 78px;
    max-height: 78px;
    max-width: 150px;
  }

  #site-header nav[aria-label="Main navigation"] {
    gap: 0.125rem;
  }

  #site-header nav[aria-label="Main navigation"] a {
    padding-inline: 0.875rem;
  }
}

@media (max-width: 1023px) {
  .summit-header-inner,
  #site-header .container-summit {
    height: 76px;
    padding: 0 20px;
    gap: 12px;
  }

  .summit-desktop-nav {
    display: none !important;
  }

  .summit-mobile-menu-button {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .summit-header-inner,
  #site-header .container-summit {
    height: 70px;
    padding: 0 12px;
    gap: 5px;
  }

  #site-header .summit-header-logo,
  .summit-header-logo {
    height: 56px;
    max-height: 56px;
    max-width: min(42vw, 100px);
  }

  .summit-header-actions {
    gap: 1px;
  }

  .summit-header-icon,
  #site-header .summit-icon-btn,
  #site-header #mobile-menu-open {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .summit-header-icon svg {
    width: 19px;
    height: 19px;
  }
}

@media (max-width: 360px) {
  .summit-header-inner,
  #site-header .container-summit {
    padding: 0 8px;
  }

  #site-header .summit-header-logo,
  .summit-header-logo {
    height: 50px;
    max-height: 50px;
    max-width: 85px;
  }

  #site-header .summit-icon-btn,
  #site-header #mobile-menu-open {
    width: 35px;
    height: 35px;
    min-width: 35px;
  }
}

@media (max-width: 359px) {
  #site-header .container-summit {
    gap: 0.375rem;
  }
}

@media (min-width: 1280px) {
  #site-header nav[aria-label="Main navigation"] a {
    padding-inline: 1rem;
  }
}

/* ======================================================
   WORDPRESS ADMIN BAR
====================================================== */

.admin-bar #site-header,
.admin-bar .summit-site-header {
  top: 32px;
}

.admin-bar #scroll-progress {
  top: 32px;
}

.admin-bar #mobile-menu-panel {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar #site-header,
  .admin-bar .summit-site-header {
    top: 46px;
  }

  .admin-bar #scroll-progress {
    top: 46px;
  }

  .admin-bar #mobile-menu-panel {
    top: 46px;
  }
}
