/* ── SHARED BOTTOM NAVIGATION & CONTACT POPUP ── */

/* Variables required for bottom nav */
:root {
  --yellow:       #FFCC33;
  --yellow-light: #FFFBEB;
  --navy:         #1F2937;
  --grey-muted:   #6B7280;
  --border:       #E5E7EB;
  --bg-card:      #FFFFFF;
  --r-nav:        20px;
  --r-pill:       100px;
  --nav-h:        62px;
  --font:         'DM Sans', sans-serif;
}

/* ── 9. FLOATING BOTTOM NAV ──────────────────────────────────────────── */
#bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 480px;
  height: var(--nav-h);
  z-index: 999;
  background: rgba(31, 41, 55, 0.82);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border-radius: var(--r-nav);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 8px 32px rgba(0,0,0,0.28), 0 2px 8px rgba(0,0,0,0.16);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 18px;
  border-radius: 14px;
  cursor: pointer;
  flex: 1;
  transition: background 0.15s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.nav-item:hover {
  background: rgba(255,255,255,0.06);
}

.nav-icon {
  stroke: rgba(255,255,255,0.5);
  transition: stroke 0.15s ease;
}

.nav-label {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
  letter-spacing: 0.2px;
  transition: color 0.15s ease;
}

.nav-item.nav-active {
  background: rgba(255, 204, 51, 0.15);
}

.nav-item.nav-active .nav-icon {
  stroke: var(--yellow);
}

.nav-item.nav-active .nav-label {
  color: var(--yellow);
  font-weight: 600;
}

.nav-cart-badge {
  position: absolute;
  top: 6px;
  right: 10px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--yellow);
  color: var(--navy);
  font-size: 8px;
  font-weight: 700;
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── 10. CONTACT POPUP ───────────────────────────────────────────────── */
#contact-popup {
  position: fixed;
  bottom: calc(var(--nav-h) + 24px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  width: calc(100% - 32px);
  max-width: 480px;
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.14), 0 8px 32px rgba(0,0,0,0.10);
  padding: 10px 16px 16px;
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  /* Needed to anchor the absolute-positioned close button */
  position: fixed;
}

#contact-popup.popup-open {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

/* ── POPUP CLOSE BUTTON ─────────────────────────────────────────────── */
#popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  color: var(--grey-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  transition: background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

#popup-close:hover {
  background: #D1D5DB;
  color: var(--navy);
}

#popup-close:active {
  transform: scale(0.93);
}

.popup-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 12px;
  display: block;
}

.popup-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--grey-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}

/* ── SOCIAL ROW (3 equal-width icon+label buttons) ───────────────────── */
.popup-social-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.popup-social-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 6px 11px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  line-height: 1.25;
  transition: opacity 0.15s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.popup-social-btn:active { transform: scale(0.95); }

.btn-facebook  { background: #1877F2; }
.btn-messenger { background: linear-gradient(135deg, #0084FF, #A033FF); }
.btn-whatsapp  { background: #25D366; }

/* ── FORM ROW (Complaints, Suggestions, Make a Wish) ─────────────────── */
.popup-section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--grey-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.popup-form-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.popup-form-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 4px 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #F9FAFB;
  cursor: pointer;
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  line-height: 1.25;
  transition: background 0.15s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.popup-form-btn:hover  { background: #F3F4F6; }
.popup-form-btn:active { transform: scale(0.95); }

/* ── FULL-WIDTH POPUP BUTTONS (e.g. Campus Essential Info) ───────────── */
.popup-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  margin-top: 8px;
  transition: opacity 0.15s ease, transform 0.1s ease;
  border: none;
  -webkit-tap-highlight-color: transparent;
}

.popup-btn:first-of-type { margin-top: 0; }
.popup-btn:active { transform: scale(0.97); }

.popup-btn-icon { flex-shrink: 0; }
.popup-btn-arrow { margin-left: auto; flex-shrink: 0; }

.btn-contacts { background: #F3F4F6; color: var(--navy); border: 1px solid var(--border) !important; }

/* ── SIDE-BY-SIDE POPUP BUTTON ROW (Campus Info + Sell on Aaral) ─────── */
.popup-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.popup-btn-row .popup-btn {
  flex: 1;
  margin-top: 0;
  width: auto;
  font-size: 12px;
  padding: 13px 10px;
  gap: 7px;
}

.btn-sell {
  background: #FFFBEB;
  color: var(--navy);
  border: 1px solid #FDE68A !important;
}

#popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  z-index: 997;
  display: none;
  pointer-events: none; /* FIX 1: never block page interactions when not active */
}