/* ---------- GLOBAL RESET ---------- */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  height: 100%;
  scroll-behavior: smooth;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* ---------- THEME COLORS ---------- */
:root {
  --navy: #0b1b3a;
  --navy-dark: #07122b;
  --navy-light: #1c2f5c;
  --white: #ffffff;
  --accent: #d9d9d9;
  --highlight: #00b4ff;
  --shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

/* ---------- BASE LAYOUT ---------- */
body {
  display: flex;
  flex-direction: column;
  background-color: var(--navy);
  color: var(--white);
  text-shadow: var(--shadow);
  min-height: 100vh;
  text-align: center;
}




/* ---------- NAV BAR ---------- */
.global-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--navy-dark);
  padding: 0.6rem 1.2rem;
  min-height: 55px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  width: 100%;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--white);
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--highlight);
}

.nav-links a.active {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

/* Mobile Nav */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.8rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background-color: var(--navy-light);
    width: 100%;
    padding: 1rem 0;
    gap: 0.8rem;
  }

  .nav-links.open {
    display: flex;
  }
}

/* ---------- MAIN LAYOUT ---------- */
main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 1vh 1rem;
  width: 100%;
  max-width: 100vw;
}

/* ---------- PAGE CARD (Restored + Unified Spacing) ---------- */
.page-card {
  /*background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);*/
  width: clamp(320px, 88vw, 1000px);
  padding: clamp(1.2rem, 2.5vw, 2.5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
font-size: 0.75rem;
min-height: 250px;
height: 200px;

;
}

.page-content {
  flex: 1;
}

/* match product page spacing */
.page-content h1 + p {
  margin-bottom: 0.8rem;
}

/* ========= AUTH PAGES (login, signup, portal) ========= */
/* ---------- AUTH CARD (Matches product-card styling, but form-friendly) ---------- */
.auth-card {
  background-color: rgba(255, 255, 255, 0.1);         /* same as product-card */
  border: 1px solid rgba(255, 255, 255, 0.25);        /* same border */
  border-radius: 10px;                                /* same radius */
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);          /* same shadow */
  width: clamp(280px, 70vw, 420px);                   /* wider than product-card */
  padding: 1.2rem 1rem;                               /* more padding for forms */
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;                                        /* spacing between elements */
  margin: 0 auto;                                     /* center it */
}


.auth-title {
  margin: 0 0 0.35rem 0;
  font-size: 1.25rem;
  font-weight: 800;
}

.auth-subtext {
  margin: 0 0 0.8rem 0;
  font-size: 0.95rem;
  color: #e6eef7;
}

.auth-message {
  margin: 0 0 0.6rem 0;
  font-weight: 700;
  color: #ffe082;            /* friendly yellow notice */
}

.auth-form {
  width: 100%;
  display: grid;
  gap: 0.6rem;
  justify-items: center;
}

.auth-form .form-input,
.auth-form textarea.form-input {
  width: 85%;
  text-align: left;
  font-size: 0.95rem;
}

.auth-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin: 0.4rem 0 0.2rem 0;
}

.auth-toggle-btn {
  border: 2px solid rgba(255,255,255,0.85);
  background: transparent;
  color: var(--white);
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}

.auth-toggle-btn:hover {
  transform: scale(1.03);
  background: rgba(255,255,255,0.12);
}

.auth-toggle-btn.active {
  background: var(--highlight);
  color: #001628;
  border-color: var(--highlight);
}

.auth-submit {
  width: 50%;
  margin: 0.3rem auto 0.6rem auto;
}


/* ---------- PRODUCT CARDS (Uniform Height + Space-Between + Auto-Shrink) ---------- */
.product-card {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  width: 100%;
  max-width: 260px;
  min-width: 180px;
  height: 210px;
  padding: 0.25rem;
  text-align: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ---------- PRODUCT GRID (3 across on desktop, responsive) ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem; /* ↓ reduced vertical spacing */
  width: 100%;
  margin-top: 0.4rem; /* ↓ less top space */
  margin-bottom: 0.4rem; /* ↓ less bottom space */
  justify-items: center;
  align-items: stretch;
}


@media (min-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.product-grid.single {
  grid-template-columns: 1fr !important;
  justify-items: center;
}


/* ---------- BUTTON GROUP ---------- */
.btn-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.2rem;
  padding-bottom: 0.6rem;
}

.btn-group .btn {
  width: 160px;
  white-space: nowrap;
}

/* ---------- BUTTONS ---------- */
.btn,
button {
  background: linear-gradient(90deg, var(--white), var(--accent));
  color: var(--navy);
  font-weight: bold;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  text-decoration: none;
}

.btn:hover,
button:hover {
  background: var(--white);
  color: black;
  transform: scale(1.03);
}

/* ---------- FOOTER ---------- */
footer {
  background-color: rgba(0, 0, 0, 0.15);
  color: #ccc;
  font-size: 0.85rem;
  padding: 0.6rem 0;
  width: 100%;
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.3);
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

#root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#root main {
  flex: 1;
}

/* DEBUG: tighten vertical spacing hard */
.product-grid {
  row-gap: 0.4rem !important;     /* rows only */
  column-gap: 1rem !important;    /* keep columns comfortable */
  margin-top: 0.4rem !important;
  margin-bottom: 0.4rem !important;
}

.product-grid > .product-card {
  margin: 0 !important;           /* kill any stray margins on cards */
}

.product-card h3,
.product-card p,
.product-card .fun-fact {
  margin-top: 0.25rem !important; /* tame inner spacing */
  margin-bottom: 0.25rem !important;
}



