/* === Header === */
.header {
  position: relative;
  top: 0;
  width: 100%;
  z-index: 10050;
  background-color: #0f1319; /* THIRSTLOCK navy solid */
  backdrop-filter: none; /* remove glass blur cleanly */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 160px;
  overflow: visible;
  transition: top 0.3s ease;
}

.header.hidden {
  opacity: 0;
  pointer-events: none; /* prevent clicks when hidden */
}

.header .logo {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header .logo img {
  height: 120px;
  width: auto;
  margin-top: 40px; /* prevents top clipping */
  margin-bottom: 40px; /* allows it to hang slightly below the header */
}

.header .logo span {
  font-family: "Sarpanch", sans-serif;
  font-size: 5rem;
  font-weight: 700;
  color: #ffa500;
}

.site-nav {
  display: none;
  flex-direction: column;
  background-color: #1b2b34;
  position: absolute;
  top: 100%;
  right: calc(2rem + 80px); /* keep clear of 64px boot + gap */
  width: auto;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.05);
  z-index: 999;
}

.site-nav.active {
  display: flex;
}

/* ensure the dropdown wins and draws above overlays */
header.header .site-nav.active {
  display: flex !important;
}

.site-nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0; /* consistent vertical padding */
  white-space: nowrap; /* consistent no wrapping */
  transition: color 0.3s ease;
}

.site-nav a:hover {
  color: #ffa500;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* keep the boot button clickable above the dropdown */
.header .header-icons {
  position: relative;
  z-index: 10200;
}
#hamburgerBtn {
  position: relative;
  z-index: 10210;
}

.cart-icon {
  font-size: 1.8rem;
  color: white;
  text-decoration: none;
  cursor: pointer;
}
/* === Responsive Adjustments === */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem;
    height: auto;
  }

  .header .logo span {
    font-size: 1.6rem;
    text-align: center;
  }

  .features {
    flex-direction: column;
    align-items: center;
  }

  .gallery-row {
    flex-direction: column;
  }
}

/* TM styling*/
.tm {
  font-size: 1em; /* bigger for clarity */
  vertical-align: text-top; /* less aggressive than super */
  position: relative;
  top: -0.275em; /* brings it down */
}

.tm-header {
  display: inline-block;
  transform: scale(0.3) translateY(-0.75em); /* lowers it */
  transform-origin: left center; /* centers vertical anchor */
  margin-left: 0.1em;
}

.bootprint-icon img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: inline-block;
  filter: none;
  margin-top: -4px;
}

.bootprint-icon {
  display: inline-block;
  cursor: pointer;
}

.cart-icon img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: inline-block;
}

.bootprint-icon,
.cart-icon {
  display: inline-block;
  cursor: pointer;
  transition: transform 0.18s;
  position: relative;
}

.icon-label {
  position: absolute;
  bottom: -1.5rem;
  left: 50%;
  transform: translateX(-50%) scale(1); /* Start at normal size */
  background: #222;
  color: #fff;
  padding: 0.15em 0.65em;
  border-radius: 0.5em;
  font-size: 0.7rem;
  font-family: "Space Grotesk", sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
  white-space: nowrap;
  z-index: 20;
}

.bootprint-icon:hover .icon-label,
.cart-icon:hover .icon-label {
  opacity: 1;
  transform: translateX(-50%) scale(1.3); /* Scales up to 130% */
}

/*Tighter header for mobile*/
.bootprint-icon:hover,
.cart-icon:hover {
  transform: scale(1.15);
  transition: transform 0.18s;
  z-index: 1;
}

.icon-label {
  position: absolute;
  bottom: -1.5rem;
  left: 50%;
  transform: translateX(-50%) scale(1);
  /* ... */
}

.bootprint-icon:hover .icon-label,
.cart-icon:hover .icon-label {
  opacity: 1;
  transform: translateX(-50%) scale(1.3);
}

/* === Mobile Header Tight Layout (≤768px) — Option B === */
@media (max-width: 768px) {
  /* Keep header in one line and tighter */
  .header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    padding: 0.35rem 0.75rem;
    height: 72px; /* predictable height */
    gap: 0.5rem;
  }

  /* Allow children to shrink and not overflow */
  .header > * {
    min-width: 0;
  }

  /* Logo group tighter */
  .header .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* was 2rem */
  }

  /* Logo image ~56px, no vertical margins */
  .header .logo img {
    height: 56px;
    width: auto;
    margin: 0;
  }

  /* Brand text ~1.25rem, allow shrinking on narrow screens */
  .header .logo span {
    font-size: 1.75rem;
    line-height: 1.1;
    white-space: nowrap;
  }

  /* Icons: tighter and smaller (≈32px) */
  .header-icons {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* was 1rem */
    flex: 0 0 auto;
  }
  .bootprint-icon img,
  .cart-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: inline-block;
  }

  /* Disable hover zoom on touch to avoid layout jitter */
  .bootprint-icon:hover,
  .cart-icon:hover {
    transform: none;
  }

  /* Hide floating labels on mobile (optional; uncomment to keep smaller instead)
  .icon-label { display: none; }
  */

  /* Alternative to keep labels but reduce size/offset instead of hiding: */
  .icon-label {
    font-size: 0.6rem;
    bottom: -1.2rem;
    transform: translateX(-50%) scale(1);
  }
  .bootprint-icon:hover .icon-label,
  .cart-icon:hover .icon-label {
    transform: translateX(-50%) scale(1); /* no scale-up */
  }

  /* Keep nav available without forcing column layout on mobile */
  .site-nav {
    position: absolute; /* unchanged behavior for your boot menu toggle */
    right: 0.75rem;
    top: 100%;
  }
}
