/* ==========================================
   GLOBAL VARIABLES & RESET
   ========================================== */
:root {
  --primary-wine: #a70a0a;
  --primary-green: #006b3c;
  --accent-gold: #db8e11;
  --clean-white: #ffffff;
  --light-bg: #f8f9fa;
  --dark-text: #212529;
  --gray-muted: #6c757d;
  --border-color: #e2e8f0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s ease-in-out;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--dark-text);
  background-color: var(--light-bg);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-align: center;
}

.btn-wine {
  background-color: var(--primary-wine);
  color: var(--clean-white) !important;
}

.btn-wine:hover {
  background-color: #521523;
}

.btn-green {
  background-color: var(--primary-green);
  color: var(--clean-white) !important;
}

.btn-green:hover {
  background-color: #143116;
}

/* ==========================================
   RESPONSIVE NAVBAR & HAMBURGER FLOW
   ========================================== */
.navbar {
  background-color: var(--clean-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
}

.navbar-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-wine);
  letter-spacing: 1px;
}

#menu-toggle {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--primary-wine);
  cursor: pointer;
  display: none; /* Hidden on Desktop */
  line-height: 1;
}

/* Navigation Link List */
#nav-links {
  display: flex;
  align-items: center;
}

#nav-links ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

#nav-links a {
  font-weight: 600;
  color: var(--dark-text);
}

#nav-links a:hover {
  color: var(--primary-green);
}

a .soupah-soup-logo {
  width: 4rem;
  height: 4rem;
}

/* Mobile Media Query Navigation Logic */
@media (max-width: 768px) {
  #menu-toggle {
    display: block; /* Show hamburger button on mobile */
  }

  #nav-links {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    transition:
      max-height 0.4s ease-in-out,
      opacity 0.3s ease-in-out;
    opacity: 0;
  }

  /* When JS toggles display or class .active */
  #nav-links.active,
  #nav-links[style*="display: block"] {
    display: block !important;
    max-height: 350px;
    opacity: 1;
    margin-top: 1rem;
  }

  #nav-links ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.8rem 0;
    border-top: 1px solid var(--border-color);
  }

  #nav-links li {
    width: 100%;
  }

  #nav-links a {
    display: block;
    width: 100%;
  }
}

/* ==========================================
   CARDS & GRID STYLING
   ========================================== */
.product-card,
.category-card {
  background: var(--clean-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.product-card:hover,
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* ==========================================
   SITE FOOTER
   ========================================== */
.site-footer {
  background-color: var(--primary-wine);
  color: var(--clean-white);
  padding: 3rem 0 1.5rem 0;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h3,
.footer-col h4 {
  color: var(--accent-gold);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-col p {
  font-size: 0.95rem;
  opacity: 0.9;
  line-height: 1.5;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 0.6rem;
}

.footer-col ul a {
  color: var(--clean-white);
  opacity: 0.85;
}

.footer-col ul a:hover {
  opacity: 1;
  color: var(--accent-gold);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1.5rem;
  font-size: 0.88rem;
  opacity: 0.8;
}

/* ==========================================================================
   Responsive Navigation Rules
   ========================================================================== */
.navbar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

#menu-toggle {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--gray-muted);
  cursor: pointer;
  display: none; /* Hidden on Desktop by default */
  line-height: 1;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-item {
  color: var(--clean-white);
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.2s ease;
}

.nav-item:hover {
  opacity: 0.85;
}

.active-link {
  color: var(--accent-amber) !important;
}

.btn-nav {
  width: auto;
  padding: 0.4rem 1rem;
}

/* --- Mobile View (< 768px) --- */
@media (max-width: 767.98px) {
  .navbar-flex {
    flex-direction: column;
    align-items: flex-start;
  }

  #menu-toggle {
    display: block; /* Show hamburger button on mobile */
  }

  #nav-links {
    display: none; /* Collapse links on mobile */
    width: 100%;
    margin-top: 1rem;
  }

  #nav-links.active {
    display: block !important; /* Revealed when clicked */
  }

  .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  .nav-menu li {
    width: 100%;
  }

  .btn-nav {
    display: inline-block;
    text-align: center;
  }
}

/* --- Desktop View (>= 768px) --- */
@media (min-width: 768px) {
  .navbar-top {
    width: auto;
  }

  #menu-toggle {
    display: none !important; /* Force hide hamburger on Desktop */
  }

  #nav-links {
    display: flex !important; /* Force display links on Desktop */
    align-items: center;
  }
}
