/**
 * G-INVITE / GIFTALAYA — Universal Public Navigation Styles
 * Shared responsive navbar across public catalog & discovery pages:
 * index.html, wedding-templates.html, birthday-templates.html
 */

:root {
  --site-nav-height: 68px;
  --site-nav-bg: rgba(255, 255, 255, 0.94);
  --site-nav-border: #ece6df;
  --site-nav-brand: #744b9e;
  --site-nav-text: #2c2523;
  --site-nav-muted: #6b635b;
}

/* 1. Header Shell */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--site-nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--site-nav-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  transition: all 0.25s ease;
  width: 100%;
}

.site-header .container,
.site-header .site-nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.site-header .nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--site-nav-height);
  gap: 16px;
  box-sizing: border-box;
}

/* 2. Brand Group */
.site-header .brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-header .brand-logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.site-header .brand-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: #f1ecf7;
  color: var(--site-nav-brand);
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

/* 3. Navigation Links (Desktop) */
.site-header .nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header .nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--site-nav-text);
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 6px 0;
}

.site-header .nav-link:hover,
.site-header .nav-link.active {
  color: var(--site-nav-brand);
}

.site-header .nav-link .nav-icon {
  font-size: 14px;
  line-height: 1;
  margin-right: 5px;
  display: inline-block;
}

/* Distinctive "My Projects" Pill Styling */
.site-header #nav-my-projects {
  list-style: none;
}

.site-header #nav-my-projects a.nav-link,
#primary-navigation #nav-my-projects a {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fbf7fe;
  border: 1px solid #ebdcf5;
  color: #693b8d !important;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 1px 3px rgba(116, 75, 158, 0.08);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header #nav-my-projects a.nav-link::before,
#primary-navigation #nav-my-projects a::before {
  content: '📂';
  font-size: 13px;
  line-height: 1;
}

.site-header #nav-my-projects a.nav-link:hover,
#primary-navigation #nav-my-projects a:hover {
  background: #f3e6fa;
  border-color: #d8bfe8;
  color: #552778 !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(116, 75, 158, 0.15);
}

/* 4. Action Group (Desktop) */
.site-header .nav-cta-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.site-header .btn-nav-template,
.site-header .btn-nav-create-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #744b9e 0%, #d04a9b 100%);
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
  white-space: nowrap;
}

.site-header .btn-nav-template:hover,
.site-header .btn-nav-create-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.site-header .mobile-menu-btn {
  display: none;
  background: #ffffff;
  border: 1px solid var(--site-nav-border);
  cursor: pointer;
  color: var(--site-nav-text);
  padding: 8px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.site-header .mobile-menu-btn:hover {
  background: #f8f6f3;
  border-color: #d8cec3;
}

.site-header .mobile-nav-create {
  display: none;
}

/* 5. Mobile & Tablet Responsiveness (<= 1024px) */
@media (max-width: 1024px) {
  .site-header {
    --site-nav-height: 60px;
  }

  .site-header .nav-wrap {
    flex-wrap: wrap;
    min-height: 60px;
  }

  .site-header .mobile-menu-btn {
    display: inline-flex;
  }

  .site-header.nav-ready .nav-links {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 0 16px;
    border-top: 1px solid var(--site-nav-border);
    margin-top: 8px;
    background: transparent;
  }

  .site-header.nav-ready.is-nav-open .nav-links {
    display: flex;
    animation: siteNavSlideDown 0.2s ease-out;
  }

  .site-header .nav-link {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 15px;
  }

  .site-header .nav-link:hover,
  .site-header .nav-link.active {
    background: #f8f4fb;
  }

  .site-header .mobile-nav-create {
    display: block;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--site-nav-border);
  }

  .site-header .mobile-nav-create .btn-nav-template,
  .site-header .mobile-nav-create .btn-nav-create-cta,
  .site-header .mobile-nav-create .btn-open-category-modal {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 14px;
  }

  /* Hide desktop CTA button on mobile header to avoid congestion */
  .site-header .nav-cta-group .btn-nav-template,
  .site-header .nav-cta-group .btn-nav-create-cta {
    display: none;
  }
}

@media (max-width: 480px) {
  .site-header .site-nav-container,
  .site-header .container {
    padding: 0 14px;
  }

  .site-header .brand-tag {
    display: none;
  }

  .site-header .brand-logo-img {
    height: 28px;
  }

  .site-header .btn-nav-login {
    padding: 6px 10px;
    font-size: 12px;
    max-width: 110px;
  }
}

@keyframes siteNavSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   UNIVERSAL NAV LINK PILL STYLES (.btn-nav-link)
   ========================================================= */
.btn-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #e2ded8;
  color: #1b1918;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-nav-link:hover {
  background: #f3efe9;
  border-color: #cbbeaf;
  color: #1b1918;
}

/* =========================================================
   CATEGORY / OCCASIONS SELECTION MODAL POPUP
   ========================================================= */
.cat-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cat-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cat-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 10, 22, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cat-modal-dialog {
  position: relative;
  z-index: 10;
  max-width: 640px;
  width: 100%;
  background: #ffffff;
  border-radius: 28px;
  padding: 36px 32px 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.3);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
}

.cat-modal-overlay.is-open .cat-modal-dialog {
  transform: scale(1) translateY(0);
}

.cat-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f4efe9;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #57504a;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cat-modal-close:hover {
  background: #e8e0d6;
  color: #1a1715;
  transform: rotate(90deg);
}

.cat-modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.cat-modal-pill {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: #f1ecf7;
  color: #744b9e;
  padding: 4px 12px;
  border-radius: 9999px;
  margin-bottom: 8px;
}

.cat-modal-title {
  font-family: inherit;
  font-size: 28px;
  font-weight: 800;
  color: #1a1514;
  margin: 0 0 6px;
  line-height: 1.25;
}

.cat-modal-desc {
  font-size: 14px;
  color: #6b6661;
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Options 2x2 Grid */
.cat-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.cat-option-card {
  display: flex;
  flex-direction: column;
  background: #faf8f5;
  border: 1.5px solid #ebe5dc;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: #1b1918;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.cat-option-card:not(.cat-option-disabled):hover {
  transform: translateY(-4px);
  border-color: #744b9e;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(116, 75, 158, 0.16);
}

.cat-option-media {
  position: relative;
  width: 100%;
  height: 120px;
  overflow: hidden;
  background: #e2ded8;
}

.cat-option-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.cat-option-card:not(.cat-option-disabled):hover .cat-option-media img {
  transform: scale(1.08);
}

.cat-option-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 9999px;
  backdrop-filter: blur(8px);
}

.cat-option-badge.live {
  background: rgba(255, 255, 255, 0.92);
  color: #744b9e;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.cat-option-badge.soon {
  background: rgba(243, 244, 246, 0.9);
  color: #6b7280;
}

.cat-option-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.cat-option-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cat-option-title-row h4 {
  font-size: 16px;
  font-weight: 700;
  color: #1a1715;
  margin: 0;
}

.cat-arrow-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ede6f4;
  color: #744b9e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.cat-option-card:hover .cat-arrow-icon {
  background: #744b9e;
  color: #ffffff;
  transform: translateX(3px);
}

.cat-option-content p {
  font-size: 12px;
  color: #6b6661;
  line-height: 1.45;
  margin: 0;
}

/* Disabled Coming Soon state */
.cat-option-disabled {
  opacity: 0.65;
  cursor: default;
  background: #f8fafc;
  border-style: dashed;
}

.cat-option-disabled .cat-option-media img {
  filter: grayscale(0.85);
}

.cat-pill-soon {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  background: #e2e8f0;
  padding: 2px 7px;
  border-radius: 8px;
}

/* Modal Footer */
.cat-modal-footer {
  text-align: center;
  padding-top: 14px;
  border-top: 1px solid #f0ebe4;
  font-size: 12.5px;
  color: #78716c;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-footer-link {
  font-weight: 700;
  color: #744b9e;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

.cat-footer-link:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .cat-options-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .cat-modal-dialog {
    padding: 28px 20px 22px;
    border-radius: 20px;
  }
  .cat-modal-title {
    font-size: 22px;
  }
}
