/* =====================================================
   NUMNAM — Site Header + Hamburger + Fullscreen Menu
   ===================================================== */

/* ── Simplified single-row fixed header ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nn-header-h, 100px);
  z-index: 1004;
  background-color: rgba(255, 254, 250, 0.94);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  backdrop-filter: blur(20px) saturate(1.3);
  border-bottom: 1px solid var(--line, #FFD6E5);
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

/* Top accent strip */
.site-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #FF6B8A 0%, #FFD93D 33%, #4ECDC4 66%, #9B8EC4 100%);
  z-index: 2;
}

.site-header.scrolled {
  background-color: rgba(255, 254, 252, 0.99);
  box-shadow: 0 4px 20px rgba(255, 107, 138, 0.12);
}

/* Header inner row: logo on left, actions on right */
.site-header-inner {
  width: min(1400px, 100%);
  height: 100%;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 48px;
  width: auto;
  display: block;
}

@media (max-width: 767px) {
  .site-header {
    height: 78px;
  }

  .site-header-inner {
    padding: 0 0.9rem;
  }

  .brand-logo-img {
    height: 42px;
  }

  .header-icon-btn,
  .hamburger-btn {
    width: 40px;
    height: 40px;
  }
}

@media (min-width: 1024px) {
  .site-header {
    height: 120px;
  }

  .brand-logo-img {
    height: 100px;
  }
}

/* Header right actions group */
.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Icon button base */
.header-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text, #2D2D3F);
  transition: background 0.2s, color 0.2s;
  position: relative;
  text-decoration: none;
}

.header-icon-btn:hover {
  background: rgba(255, 107, 138, 0.08);
  color: var(--brand-1, #FF6B8A);
}

.header-icon-btn.active {
  color: var(--brand-1, #FF6B8A);
}

/* Cart badge */
.cart-icon-link {
  position: relative;
}

/* Number tag (cart count) */
.number-tag {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--brand-1, #FF6B8A);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  padding: 0 3px;
  font-family: "Inter", sans-serif;
  transition: transform 0.3s ease;
}

.number-tag.bounce {
  animation: badge-bounce 0.45s ease;
}

@keyframes badge-bounce {

  0%,
  100% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.35);
  }

  70% {
    transform: scale(0.9);
  }
}

/* ── Hamburger button ── */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 10px 8px;
  border-radius: 8px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.hamburger-btn:hover {
  background: rgba(255, 107, 138, 0.08);
}

.burger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text, #2D2D3F);
  border-radius: 2px;
  transform-origin: center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.25s ease,
    width 0.25s ease;
}

/* Burger → X when active */
.hamburger-btn.active .burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.active .burger-line:nth-child(2) {
  opacity: 0;
  width: 0;
}

.hamburger-btn.active .burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Search overlay (inside header) ── */
.search-overlay {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 254, 250, 0.98);
  border-bottom: 1px solid var(--line, #FFD6E5);
  padding: 14px 20px;
  z-index: 10;
  box-shadow: 0 8px 24px rgba(45, 45, 63, 0.08);
}

.search-overlay-form {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}

.search-overlay-input {
  flex: 1;
  height: 44px;
  border: 1px solid var(--line, #FFD6E5);
  border-radius: 999px;
  padding: 0 1rem;
  font-size: 0.95rem;
  outline: none;
  background: #fff;
  color: var(--text, #2D2D3F);
}

.search-overlay-input:focus {
  border-color: var(--brand-1, #FF6B8A);
}

.search-overlay-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--muted, #5e6478);
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.search-suggest-box {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line, #FFD6E5);
  border-radius: 1rem;
  z-index: 20;
  box-shadow: 0 12px 28px rgba(45, 45, 63, 0.1);
  overflow: hidden;
}

/* ── Fullscreen overlay menu ── */
.nn-fullscreen-menu {
  position: fixed;
  inset: 0;
  --nn-header-clearance: 120px;
  --nn-board-ratio: 1.1395;
  --nn-board-max-w: min(980px, calc(100vw - 24px));
  --nn-board-max-h: min(860px, calc(100vh - var(--nn-header-clearance) - 16px));
  --nn-board-w: min(var(--nn-board-max-w), calc(var(--nn-board-max-h) * var(--nn-board-ratio)));
  --nn-board-h: min(var(--nn-board-max-h), calc(var(--nn-board-max-w) / var(--nn-board-ratio)));
  --nn-board-top-safe: clamp(11.5rem, 24vh, 16rem);
  --nn-board-bottom-safe: clamp(2.2rem, 6vh, 3.6rem);
  --nn-board-side-safe: clamp(2rem, 6vw, 4.2rem);
  z-index: 1002;
  background: linear-gradient(rgba(255, 253, 250, 0.75), rgba(255, 253, 250, 0.75)),
    url("/assets/images/bg_products.png") center center / cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow-y: auto;
  overflow-x: hidden;
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.4s;
}

.nn-fullscreen-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Animated signboard drop */
.nn-fullscreen-menu::before {
  content: '';
  position: absolute;
  top: var(--nn-header-clearance);
  left: 50%;
  width: var(--nn-board-w);
  height: var(--nn-board-h);
  background-image: url("/assets/images/659d92d67d3c7025e7633126_PinkSign.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% 100%;
  transform: translate(-50%, calc(-120%)) scale(0.98);
  transform-origin: top center;
  opacity: 0;
  transition: transform 0.72s cubic-bezier(0.2, 0.95, 0.3, 1), opacity 0.5s ease;
  pointer-events: none;
  z-index: 1;
}

.nn-fullscreen-menu.open::before {
  transform: translate(-50%, 0) scale(1);
  opacity: 1;
}

/* Inner 3-column layout – CSS Grid for true horizontal centering */
.nn-fullscreen-menu__inner {
  position: absolute;
  top: var(--nn-header-clearance);
  left: 50%;
  width: var(--nn-board-w);
  height: var(--nn-board-h);
  padding: var(--nn-board-top-safe) var(--nn-board-side-safe) var(--nn-board-bottom-safe);
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(260px, 1.4fr) minmax(110px, 0.8fr);
  align-items: start;
  justify-items: center;
  gap: 0;
  transform: translate(-50%, 36px);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.28s,
    opacity 0.42s ease 0.28s;
  z-index: 2;
}

.nn-fullscreen-menu.open .nn-fullscreen-menu__inner {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* Left: utility / footer links */
.nn-menu-foot {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: flex-start;
  min-width: 0;
  padding-top: clamp(1.5rem, 4vh, 2.5rem);
}

.nn-menu-foot a {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nn-menu-foot a:hover {
  color: #ffffff;
}

.nn-menu-copyright {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  display: block;
}

/* Center: main nav links */
.nn-menu-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(0.05rem, 0.9vh, 0.45rem);
  padding-top: clamp(1.5rem, 4vh, 2.5rem);
  width: 100%;
  max-width: min(92%, 460px);
  grid-column: 2;
}

.nn-menu-link {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.15rem, 2.55vw, 2.35rem);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.03em;
  color: #ffffff;
  text-decoration: none;
  text-align: center;
  text-transform: uppercase;
  transition: color 0.2s, transform 0.2s;
  position: relative;
  white-space: nowrap;
}

.nn-menu-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  right: 50%;
  height: 3px;
  background: rgba(255, 255, 255, 0.8);
  transition: left 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    right 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 2px;
}

.nn-menu-link:hover::after,
.nn-menu-link.active::after {
  left: 0;
  right: 0;
}

.nn-menu-link:hover {
  color: rgba(255, 255, 255, 0.75);
  transform: translateY(-1px);
}

.nn-menu-link.active {
  color: rgba(255, 255, 255, 0.75);
}

/* Right: social links */
.nn-menu-social {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  padding-top: 0;
  align-self: center;
  justify-content: center;
  justify-self: center;
  width: 100%;
  max-width: 150px;
  grid-column: 3;
}

.nn-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.nn-social-link:hover {
  background: var(--brand-1, #FF6B8A);
  border-color: var(--brand-1, #FF6B8A);
  color: #fff;
  transform: scale(1.08);
}

.nn-menu-social-auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.nn-social-auth-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  transition: color 0.2s;
}

.nn-social-auth-link:hover {
  color: #ffffff;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nn-fullscreen-menu {
    --nn-header-clearance: 78px;
    /* Mobile-only stretch: make board taller so all links + social/auth fit */
    --nn-board-ratio: 0.62;
    --nn-board-max-w: calc(100vw - 8px);
    --nn-board-max-h: calc(100vh - var(--nn-header-clearance) - 6px);
    --nn-board-top-safe: clamp(5.6rem, 12vh, 7.2rem);
    --nn-board-bottom-safe: clamp(1.8rem, 5.8vh, 3rem);
    --nn-board-side-safe: clamp(0.8rem, 3.2vw, 1.2rem);
  }

  .nn-fullscreen-menu::before {
    background-size: 100% 100%;
  }

  .nn-fullscreen-menu__inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    gap: 0;
  }

  .nn-menu-main {
    grid-column: auto;
    max-width: 100%;
    width: 100%;
    padding-top: 0;
    gap: clamp(0.04rem, 0.38vh, 0.18rem);
    flex: 1;
    justify-content: center;
  }

  .nn-menu-social {
    grid-column: auto;
    width: 100%;
    max-width: 100%;
    padding-top: 0.45rem;
    padding-bottom: 0.55rem;
    margin-top: auto;
    transform: translateY(-15px);
    gap: 0.5rem;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    align-content: end;
    border-top: 1px solid rgba(255, 255, 255, 0.28);
  }

  .nn-menu-social>.nn-social-link {
    order: 1;
  }

  .nn-menu-link {
    font-size: clamp(1.21rem, 5.2vw, 1.53rem) !important;
    line-height: 1.01;
  }

  .nn-social-link {
    width: 32px;
    height: 32px;
  }

  .nn-social-link svg {
    width: 18px;
    height: 18px;
  }

  .nn-menu-social-auth {
    order: 2;
    flex: 0 0 100%;
    margin-top: 0.1rem;
    padding-top: 0;
    border-top: none;
    gap: 0.55rem;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .nn-social-auth-link {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
  }
}

@media (max-height: 860px) and (min-width: 769px) {
  .nn-fullscreen-menu {
    --nn-board-top-safe: clamp(8.7rem, 21vh, 12.4rem);
    --nn-board-bottom-safe: clamp(1.2rem, 4vh, 2.4rem);
    --nn-board-side-safe: clamp(1.15rem, 4vw, 2.2rem);
  }

  .nn-menu-main {
    padding-top: clamp(1rem, 3vh, 1.6rem);
    gap: clamp(0.05rem, 0.55vh, 0.24rem);
  }

  .nn-menu-link {
    font-size: clamp(0.94rem, 1.95vw, 1.62rem);
  }

  .nn-menu-social {
    padding-top: 0;
    gap: 0.55rem;
  }

  .nn-social-link {
    width: 42px;
    height: 42px;
  }

  .nn-menu-social {
    max-width: 130px;
  }

  .nn-social-auth-link {
    font-size: 0.72rem;
    letter-spacing: 0.03em;
  }
}

@media (max-height: 700px) {
  .nn-fullscreen-menu {
    --nn-board-top-safe: clamp(5.7rem, 15vh, 7.3rem);
    --nn-board-bottom-safe: clamp(0.75rem, 2.2vh, 1.15rem);
    --nn-board-side-safe: clamp(0.7rem, 3vw, 1.2rem);
  }

  .nn-menu-main {
    padding-top: 0.4rem;
    gap: 0.04rem;
  }

  .nn-menu-link {
    font-size: clamp(0.82rem, 2.05vw, 1.2rem);
  }

  .nn-menu-social {
    padding-top: 0;
    gap: 0.34rem;
  }
}

/* Prevent body scroll when menu is open */
body.nn-menu-open {
  overflow: hidden;
}

/* Dedicated close button inside fullscreen menu */
.nn-menu-close-btn {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  border-radius: 50%;
  transition: background 0.2s;
  z-index: 10;
}

.nn-menu-close-btn:hover {
  background: rgba(255, 107, 138, 0.1);
}

.nn-menu-close-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  position: absolute;
}

.nn-menu-close-btn span:first-child {
  transform: rotate(45deg);
}

.nn-menu-close-btn span:last-child {
  transform: rotate(-45deg);
}

/* Page main padding-top to clear the fixed header */
.page {
  padding-top: var(--nn-header-h, 100px);
}