/* ═══════════════════════════════════════════════════════════════════
   CHIC CHARMS — Global Bottom Navigation Stylesheet
   Single shared stylesheet — do not duplicate the navigation per page.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* Shared geometry contract used by product-sticky-cta.css. */
  --cc-safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --cc-bottom-nav-height: 72px;
  --cc-bottom-nav-total-height: calc(
    var(--cc-bottom-nav-height) + var(--cc-safe-area-bottom)
  );
}

/* --- Chic Charms Unified Bottom Nav --- */
.cc-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  box-sizing: border-box;
  width: 100%;
  max-width: 440px;
  height: var(--cc-bottom-nav-total-height);
  min-height: var(--cc-bottom-nav-total-height);
  z-index: 60;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 0;
  padding: 8px 8px calc(8px + var(--cc-safe-area-bottom));
  background: rgba(255, 248, 247, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(215, 193, 197, 0.5);
  box-shadow: 0 -2px 16px rgba(78, 45, 38, 0.06);
}

.cc-bottom-nav a {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-sizing: border-box;
  min-width: 0;
  max-width: 80px;
  min-height: 44px;
  padding: 6px 2px;
  color: #534346;
  text-decoration: none;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  font-family: 'Jost', 'Plus Jakarta Sans', system-ui, sans-serif;
  transition: color 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.cc-bottom-nav a:active {
  color: #8e4559;
  background: rgba(171, 93, 113, 0.06);
}

.cc-bottom-nav a.active,
.cc-bottom-nav a[aria-current="page"] {
  color: #8e4559;
  background: rgba(171, 93, 113, 0.10);
}

.cc-bottom-nav a svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.cc-bottom-nav a span {
  max-width: 100%;
  line-height: 1;
  white-space: nowrap;
}

/* --- Wishlist Badge --- */
.wishlist-count {
  position: absolute;
  top: 4px;
  right: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
  height: 14px;
  border: 1.5px solid #fff8f7;
  border-radius: 50%;
  background: #8e4559;
  color: white;
  font-family: sans-serif;
  font-size: 8px;
  font-weight: 700;
  pointer-events: none;
}

/* --- Body spacing: prevent content overlap on standard pages --- */
body.cc-nav-active {
  box-sizing: border-box;
  padding-bottom: var(--cc-bottom-nav-total-height) !important;
  overflow-x: hidden;
}

/* Fixed-bottom-nav page safety: keep mobile forms/footers clear of the nav. */
body.cc-nav-active .mobile-auth-container main,
body.cc-nav-active main.auth-page {
  padding-bottom: calc(112px + var(--cc-safe-area-bottom)) !important;
}

/* --- Desktop: hide bottom nav, remove global nav padding --- */
@media (min-width: 769px) {
  body.cc-nav-active {
    padding-bottom: 0 !important;
  }

  .cc-bottom-nav {
    display: none !important;
  }
}
