/* =============================================
   ROYAL SPIRULINA — SHARED COMPONENTS
   Nav, Footer, Cards, Tags
   ============================================= */

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 16px;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 58, 42, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
  transition: all var(--transition-slow);
}

.nav.scrolled {
  height: var(--nav-height-scrolled);
  background: rgba(10, 58, 42, 0.98);
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 20px;
}

.nav-logo-img {
  height: 60px !important;
  width: auto;
  display: block;
  transition: height 0.3s ease;
}

.nav.scrolled .nav-logo-img {
  height: 48px !important;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: rgba(255,255,255,0.7);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color var(--transition);
  position: relative;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--gold);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.nav-active {
  color: var(--gold);
}

.nav-links a.nav-active::after {
  width: 100%;
}

.nav-cta {
  padding: 8px 20px;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold) !important;
  font-size: 10px !important;
  letter-spacing: 2px !important;
  cursor: pointer;
  transition: all var(--transition);
}

.nav-cta:hover {
  background: var(--gold) !important;
  color: var(--emerald) !important;
}

.nav-cta::after {
  display: none !important;
}

/* Nav actions (cart + hamburger) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-cart {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--gold);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color var(--transition);
  white-space: nowrap;
}

.nav-cart:hover {
  color: var(--gold-light, #D4B96A);
}

.nav-cart::after {
  display: none !important;
}

.nav-cart-badge {
  display: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--emerald);
  font-size: 10px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.nav-cart-badge.has-items {
  display: flex;
}

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  background: none;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--gold);
  transition: all var(--transition);
}

.nav-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 4px);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -4px);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--charcoal);
  padding: 80px var(--content-padding) 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-brand h3 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 16px;
}

.footer-brand h3 span {
  color: var(--gold);
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255,255,255,0.45);
  font-weight: 300;
}

.footer-col h4 {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  text-decoration: none;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  font-weight: 300;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--gold);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-bottom p {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  font-weight: 300;
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-social {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: rgba(255,255,255,0.45);
  font-size: 11px;
  font-weight: 600;
  transition: all var(--transition);
}

.footer-social:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ===== PRODUCT TAGS ===== */
.product-tag {
  padding: 5px 12px;
  border: 1px solid rgba(10,58,42,0.2);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--emerald-mid);
  font-weight: 600;
  border-radius: 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  /* backdrop-filter on .nav creates a new containing block, which breaks
     position: fixed on .nav-links.open (overlay positions relative to nav
     instead of viewport). Remove it at mobile so the overlay spans full screen. */
  .nav {
    backdrop-filter: none;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 58, 42, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    z-index: 999;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 14px;
    letter-spacing: 2px;
  }

  .nav-hamburger {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  :root {
    --content-padding: 6%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .cta-email {
    flex-direction: column;
    gap: 12px;
  }

  .cta-email input {
    border-right: 1px solid rgba(201,168,76,0.3);
  }
}