/* Header styles for Beautycosma */

.bc-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #ffffffcc;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.bc-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

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

.bc-header__logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #ffeef5, #f0dce8);
  border: 1px solid rgba(204, 160, 189, 0.45);
}

.bc-header__logo-text {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: 0.03em;
  color: #1f1a1d;
}

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

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

.bc-header__nav-link {
  position: relative;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: #4a3c45;
  text-decoration: none;
  padding: 0.3rem 0;
}

.bc-header__nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #f2a9c2, #c9a4d8);
  transition: width 0.22s ease;
}

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

.bc-header__nav-link:hover,
.bc-header__nav-link:focus-visible {
  color: #2f2530;
}

.bc-header__nav-link:focus-visible {
  outline: 2px solid #c89abf;
  outline-offset: 4px;
}

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

.bc-header__action-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 167, 191, 0.5);
  color: #4a3c45;
  background-color: #fff;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.bc-header__action-link:hover,
.bc-header__action-link:focus-visible {
  background-color: #f9f3f7;
  color: #2f2530;
  border-color: #c89abf;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
}

.bc-header__action-link:focus-visible {
  outline: 2px solid #c89abf;
  outline-offset: 3px;
}

.bc-header__cart-count {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #e28faf;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Mobile toggle */

.bc-header__toggle {
  position: relative;
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 167, 191, 0.5);
  background-color: #ffffff;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.bc-header__toggle-bar {
  width: 1.3rem;
  height: 2px;
  border-radius: 999px;
  background-color: #4a3c45;
  display: block;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.bc-header__toggle-bar + .bc-header__toggle-bar {
  margin-top: 0.25rem;
}

/* Open state, controlled by JS via .is-open on .bc-header */

.bc-header.is-open .bc-header__toggle-bar:nth-child(1) {
  transform: translateY(14px) rotate(45deg);
}

.bc-header.is-open .bc-header__toggle-bar:nth-child(2) {
  opacity: 0;
}

.bc-header.is-open .bc-header__toggle-bar:nth-child(3) {
  transform: translateY(-14px) rotate(-45deg);
}

/* Responsive layout */

@media (max-width: 768px) {
  .bc-header__inner {
    padding-inline: 1rem;
  }

  .bc-header__toggle {
    display: inline-flex;
    flex-direction: column;
  }

  .bc-header__nav {
    position: fixed;
    inset-inline: 0;
    top: 3.65rem;
    background-color: #ffffffee;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.18s ease-out, opacity 0.18s ease-out;
  }

  .bc-header.is-open .bc-header__nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .bc-header__nav-list {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0.75rem 1.25rem 1.25rem;
    gap: 0.25rem;
  }

  .bc-header__nav-link {
    display: block;
    padding: 0.55rem 0.25rem;
    font-size: 0.98rem;
  }

  .bc-header__nav-link::after {
    display: none;
  }

  .bc-header__actions {
    gap: 0.35rem;
  }
}

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

  .bc-header__inner {
    gap: 0.5rem;
  }
}
