/* Header styles for ModaStreetShop */

.mss-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(249, 246, 240, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(17, 17, 17, 0.06);
}

.mss-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.mss-header__brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.mss-header__logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: #111111;
}

.mss-header__logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 17, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Playfair Display", serif;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #f7f2e9 0%, #f0e4d3 45%, #fefaf5 100%);
}

.mss-header__logo-text {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mss-header__nav {
  flex: 1 1 auto;
}

.mss-header__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
}

.mss-header__nav-link {
  position: relative;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: #222222;
  padding-bottom: 0.25rem;
}

.mss-header__nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: #b68a4a;
  transition: width 0.18s ease-out;
}

.mss-header__nav-link:hover::after,
.mss-header__nav-link:focus-visible::after {
  width: 100%;
}

.mss-header__nav-link:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 3px;
}

.mss-header__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.mss-header__icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 17, 0.16);
  color: #111111;
  text-decoration: none;
  background-color: #fdfbf8;
}

.mss-header__icon-link:hover {
  background-color: #f4ecdf;
}

.mss-header__icon-link:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 3px;
}

.mss-header__cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background-color: #111111;
  color: #f8f4ee;
  font-size: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Mobile toggle */
.mss-header__toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 0.3rem;
  border-radius: 999px;
  cursor: pointer;
}

.mss-header__toggle:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 3px;
}

.mss-header__toggle-bar {
  display: block;
  width: 20px;
  height: 1.5px;
  background-color: #111111;
  border-radius: 999px;
}

.mss-header__toggle-bar + .mss-header__toggle-bar {
  margin-top: 5px;
}

/* Mobile layout */
@media (max-width: 768px) {
  .mss-header__inner {
    padding-inline: 1rem;
  }

  .mss-header__toggle {
    display: inline-flex;
    flex-shrink: 0;
    flex-direction: column;
  }

  .mss-header__nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: rgba(249, 246, 240, 0.98);
    border-bottom: 1px solid rgba(17, 17, 17, 0.08);
    transform-origin: top;
    transform: scaleY(1);
  }

  .mss-header__nav-list {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 1.25rem 1.25rem;
    gap: 0.9rem;
  }

  .mss-header__nav-link {
    font-size: 0.9rem;
  }

  /* JS-enhanced state: menu collapsed by default */
  .mss-header--js .mss-header__nav {
    max-height: 0;
    overflow: hidden;
    transform: scaleY(0.96);
    opacity: 0;
    transition: max-height 0.22s ease-out, opacity 0.18s ease-out, transform 0.18s ease-out;
  }

  .mss-header--js.mss-header--menu-open .mss-header__nav {
    max-height: 320px;
    opacity: 1;
    transform: scaleY(1);
  }

  .mss-header--menu-open .mss-header__toggle-bar:first-child {
    transform: translateY(3px) rotate(42deg);
  }

  .mss-header--menu-open .mss-header__toggle-bar:last-child {
    transform: translateY(-3px) rotate(-42deg);
  }

  .mss-header__actions {
    gap: 0.4rem;
  }
}

@media (max-width: 480px) {
  .mss-header__logo-text {
    font-size: 0.95rem;
  }

  .mss-header__logo-mark {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
}
