/* ============================================================
   THE BATH & BODY SPOT — Navigation & Announcement Bar
   ============================================================ */

/* ── Announcement Bar ────────────────────────────── */
#announcement-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  height: var(--bar-height);
  background: linear-gradient(90deg, var(--blush-mid) 0%, var(--pink-soft) 50%, var(--blush-mid) 100%);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.bar-marquee-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.bar-marquee {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
  width: max-content;
}

.bar-marquee:hover {
  animation-play-state: paused;
}

.bar-item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0 var(--sp-12);
  font-family: var(--font-label);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-dark);
}

.bar-item span.bar-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--rose-gold);
  flex-shrink: 0;
}

.bar-close {
  flex-shrink: 0;
  width: var(--bar-height);
  height: var(--bar-height);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-mid);
  transition: color var(--ease-fast), background var(--ease-fast);
  cursor: pointer;
  font-size: 16px;
}

.bar-close:hover {
  color: var(--text-dark);
  background: rgba(0,0,0,0.06);
}

/* ── Main Navigation ─────────────────────────────── */
#main-nav {
  position: fixed;
  top: var(--bar-height);
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  height: 92px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border-bottom: 1px solid rgba(244, 194, 194, 0.45);
  transition: background var(--ease-med), box-shadow var(--ease-med), top var(--ease-med);
}

#main-nav.scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 4px 24px rgba(200, 80, 110, 0.08);
}

#main-nav.bar-hidden {
  top: 0;
}

.nav-inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--sp-6);
  padding: 0 var(--container-pad);
  max-width: var(--container-max);
  margin: 0 auto;
}

/* ── Left — Nav Links ────────────────────────────── */
.nav-left {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

.nav-link {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--text-mid);
  position: relative;
  padding: var(--sp-1) 2px;
  transition: color var(--ease-med);
  cursor: pointer;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: linear-gradient(90deg, #8B3D50, #C9546A, #E8748A);
  transition: width 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-radius: var(--radius-full);
}

.nav-link:hover {
  color: #C9546A;
}

.nav-link.active {
  color: #8B3D50;
  font-weight: 600;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ── Center — Brand Logo ─────────────────────────── */
.nav-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease-silk);
}

.nav-logo:hover {
  transform: scale(1.02);
}

/* ── Text Brand Logo ─────────────────────────────── */
.nav-brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.03em;
  background: linear-gradient(
    120deg,
    #8B3D50 0%,
    #C9546A 22%,
    #E8748A 48%,
    #C9546A 74%,
    #8B3D50 100%
  );
  background-size: 260% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  animation: brandShimmer 4s linear infinite;
  filter: drop-shadow(0 4px 18px rgba(139, 61, 80, 0.38));
}

@keyframes brandShimmer {
  0%   { background-position: 260% center; }
  100% { background-position: -260% center; }
}

.nav-brand-slogan {
  display: block;
  font-family: var(--font-display);
  font-size: 13px; /* Increased from 11px */
  font-weight: 500; /* Increased weight for visibility */
  font-style: italic;
  letter-spacing: 0.12em;
  color: var(--rose-gold-dark);
  text-align: center;
  white-space: nowrap;
  margin-top: 2px;
  opacity: 1; /* Removed transparency */
}

/* ── Right — Icon Action Buttons ─────────────────── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  justify-content: flex-end;
}

.nav-action-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #A0606A;
  cursor: pointer;
  transition: all 0.25s var(--ease-silk);
  position: relative;
  border: 1.5px solid transparent;
  background: rgba(253, 232, 232, 0.5);
}

.nav-action-btn:hover {
  color: #8B3D50;
  background: rgba(244, 194, 194, 0.35);
  border-color: rgba(201, 84, 106, 0.25);
  box-shadow: 0 4px 16px rgba(201, 84, 106, 0.15);
  transform: translateY(-1px);
}

.nav-action-btn:active {
  transform: translateY(0);
}

.nav-action-btn svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.6;
  transition: transform 0.2s var(--ease-bounce);
}

#mobile-menu-btn {
  display: none;
}

.nav-action-btn:hover svg {
  transform: scale(1.12);
}

/* ── Cart Badge ──────────────────────────────────── */
.cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 19px;
  height: 19px;
  background: linear-gradient(135deg, #C9546A, #8B3D50);
  color: var(--white);
  border-radius: var(--radius-full);
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--white);
  transform: scale(0);
  transition: transform var(--ease-bounce);
  box-shadow: 0 2px 6px rgba(139, 61, 80, 0.3);
}

.cart-badge.visible {
  transform: scale(1);
}

.cart-badge.bump {
  animation: badgeBounce 0.4s var(--ease-bounce);
}

/* ── Wishlist Badge ───────────────────────────────── */
.wishlist-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  background: linear-gradient(135deg, #C9956E, #A87250);
  color: var(--white);
  border-radius: var(--radius-full);
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
  transform: scale(0);
  transition: transform var(--ease-bounce);
  box-shadow: 0 2px 6px rgba(168, 114, 80, 0.3);
}

.wishlist-badge.visible {
  transform: scale(1);
}

/* ── Mobile Hamburger ────────────────────────────── */
#mobile-menu-btn {
  display: none;
}

/* ── Mobile Nav Drawer ───────────────────────────── */
#mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 82vw;
  max-width: 340px;
  height: 100vh;
  background: var(--white);
  z-index: var(--z-drawer);
  transform: translateX(-100%);
  transition: transform var(--ease-silk);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
}

#mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav-header {
  padding: var(--sp-6) var(--sp-6) var(--sp-4);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-nav-header img {
  height: 48px;
}

.mobile-nav-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-mid);
  transition: all var(--ease-fast);
}

.mobile-nav-close:hover {
  background: var(--blush-light);
  color: var(--pink-vibrant);
}

.mobile-nav-links {
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  flex: 1;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-4);
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 17px;
  font-style: italic;
  color: var(--text-mid);
  transition: all var(--ease-fast);
  cursor: pointer;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: var(--blush-light);
  color: #C9546A;
}

.mobile-nav-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.mobile-nav-footer {
  padding: var(--sp-6);
  border-top: 1px solid var(--border-soft);
}

.mobile-nav-footer .btn {
  width: 100%;
}

/* ── Search Overlay ──────────────────────────────── */
#search-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(254, 242, 242, 0.97);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--sp-16) var(--container-pad);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease-med);
}

#search-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.search-close {
  position: absolute;
  top: var(--sp-8);
  right: var(--sp-8);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-mid);
  transition: all var(--ease-fast);
  font-size: 24px;
}

.search-close:hover {
  background: var(--blush-mid);
  color: var(--text-dark);
}

.search-box {
  width: 100%;
  max-width: 640px;
  margin-top: var(--sp-8);
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: 16px 24px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1.5px solid var(--border-soft);
}

.search-input-wrap svg {
  width: 22px;
  height: 22px;
  color: var(--text-light);
  flex-shrink: 0;
}

#search-input {
  flex: 1;
  font-family: var(--font-body);
  font-size: var(--text-xl);
  color: var(--text-dark);
  background: transparent;
  border: none;
  outline: none;
}

#search-input::placeholder {
  color: var(--text-placeholder);
}

.search-results {
  width: 100%;
  max-width: 640px;
  margin-top: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: all var(--ease-fast);
  animation: fadeInUp 0.3s ease both;
}

.search-result-item:hover {
  background: var(--blush-light);
  transform: translateX(4px);
}

.search-result-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--blush-light);
}

.search-result-info h4 {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-dark);
}

.search-result-info p {
  font-size: var(--text-sm);
  color: var(--text-light);
}

.search-no-results {
  text-align: center;
  color: var(--text-light);
  font-size: var(--text-lg);
  margin-top: var(--sp-8);
  font-family: var(--font-display);
  font-style: italic;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .nav-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  #mobile-menu-btn {
    display: flex;
  }
}

@media (max-width: 600px) {
  #main-nav {
    height: auto;
    min-height: 74px;
    padding-top: var(--sp-2);
    padding-bottom: var(--sp-2);
  }

  .nav-brand-name {
    font-size: clamp(22px, 7vw, 30px); /* Increased font size */
    white-space: nowrap; /* Prevent wrapping so it stays horizontally balanced */
    line-height: 1.1;
    text-align: center;
  }

  .nav-brand-slogan {
    font-size: 10px; /* Increased from 8px for better visibility */
    letter-spacing: 0.08em;
    font-weight: 500;
  }

  .nav-actions {
    gap: 2px;
  }

  .nav-action-btn {
    width: 40px;
    height: 40px;
  }

  .nav-action-btn svg {
    width: 18px;
    height: 18px;
  }

  #wishlist-btn,
  #search-btn {
    display: none;
  }

  /* Mobile Search Bar Optimizations */
  #search-overlay {
    padding: var(--sp-12) var(--sp-4);
  }

  .search-close {
    top: var(--sp-4);
    right: var(--sp-4);
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .search-input-wrap {
    padding: 12px 16px;
    gap: var(--sp-3);
  }

  .search-input-wrap svg {
    width: 18px;
    height: 18px;
  }

  #search-input {
    font-size: var(--text-base);
  }

  .search-box {
    margin-top: var(--sp-12);
  }
}
