/* =============================================================================
   Site Variables
   ============================================================================= */
:root {
  --brand-red: #cc0000;
  --text-dark: #1a1a1a;
  --text-mid: #555;
  --text-muted: #888;
  --border: #e0e0e0;
  --bg-overview: #f4f4f4;
}

/* =============================================================================
   Base / Reset helpers
   ============================================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* =============================================================================
   Navbar
   ============================================================================= */
.site-navbar {
/*
  border-bottom: 1px solid var(--border);
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
*/
  position: relative;
  padding: 0;
  z-index: 104099;
}

.brand-text {
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--brand-red);
  letter-spacing: 0.04em;
}

/* Nav links */
.navbar-nav .nav-link {
  font-size: 1.11rem;
  font-weight: 500;
  color: var(--text-dark) !important;
  padding: 0.5rem 0.85rem !important;
  white-space: nowrap;
  transition: color 0.15s;
}

.navbar-toggler .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(238, 32, 49, 1)' stroke-width='4' stroke-linecap='round' stroke-miterlimit='10' d='M4 8h24M4 16h24M4 24h24'/%3E%3C/svg%3E");
  
}
.navbar-toggler:not(.collapsed) .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(238, 32, 49, 1)' stroke-width='3' stroke-linecap='round' stroke-miterlimit='10' d='M8 8l16 16M8 24L24 8'/%3E%3C/svg%3E");
}

.navbar-toggler {
  border: 1px solid var(--brand-red) !important;
}
.navbar-toggler:focus,
.navbar-toggler:active {
  outline: none;
  box-shadow: none;
}



a.nav-link:active {
  color: var(--brand-red) !important;
}

.dropdown-item {
  font-size: 1.11rem;
  font-weight: 500;
}

.dropdown-item:hover {
  background: none;
  color: var(--brand-red) !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: var(--brand-red) !important;
  text-decoration: none;
}

/* Products link — always red + bold */
.products-link {
  color: var(--brand-red) !important;
  font-weight: 700;
}

.products-link.active,
.products-link[aria-expanded="true"] {
  color: var(--brand-red) !important;
}

/* Dropdown caret (replaces Bootstrap's) */
.mega-caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 5px;
  vertical-align: middle;
  border-top: 5px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  transition: transform 0.2s;
}

.products-link[aria-expanded="true"] .mega-caret {
  transform: rotate(-180deg);
}

/* =============================================================================
   Mega-menu container
   ============================================================================= */
.mega-dropdown {
  position: static !important; /* let .site-navbar be the offset parent */
  z-index: 99999999;
}

/* Regular dropdowns also anchor to .site-navbar so their top matches the mega menu */
/*
.navbar-nav .nav-item.dropdown:not(.mega-dropdown) {
  position: static;
}
*/

.navbar-nav .nav-item.dropdown:not(.mega-dropdown) .dropdown-menu {
  position: absolute;
  margin-top:1.5em !important;
  border-radius: 0;
  background: #fff;
  border-top: 2px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  
}



.mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: min(1140px, calc(100vw - 2rem));
  background: #fff;
  border-top: 2px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  z-index: 1035999;
}

.mega-menu.mega-menu--open {
  display: block;
}

/* =============================================================================
   Inner flex layout
   ============================================================================= */
.mega-inner {
  align-items: stretch;
}

/* ──────────────────────────────────────────────────────────────
   Left: Overview panel
   ────────────────────────────────────────────────────────────── */
.mega-overview {
  width: 225px;
  min-width: 225px;
  background: var(--bg-overview);
  border-right: 1px solid var(--border);
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.mega-blk-hd, .mega-sec-hd {
  font-family: ITC-Franklin-Gothic-Std-Demi;
  font-weight: bold;
  font-size: 1rem;
  text-transform: uppercase;
  color: #000;
  margin-bottom: 12px;
}

.mega-overview-body {
  font-size: .9rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 22px;
}

.mega-cta {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 9px 20px;
  border-radius: 2px;
  white-space: nowrap;
}

/* ──────────────────────────────────────────────────────────────
   Centre: Product category sections
   ────────────────────────────────────────────────────────────── */
.mega-centre {
  padding: 22px 28px;
  border-right: 1px solid var(--border);
  min-width: 0; /* allow flex shrink */
}

/* ──────────────────────────────────────────────────────────────
   Right panel
   ────────────────────────────────────────────────────────────── */
.mega-right {
  width: 250px;
  min-width: 250px;
  padding: 22px 22px;
}

/* =============================================================================
   Section headings & dividers
   ============================================================================= */
.mega-sec {
  margin-bottom: 6px;
}

.mega-sec-hd {
  font-face: ITC-Franklin-Gothic-Std-Demi;
  font-weight: bold;
  font-size: 1rem;
  text-transform: uppercase;
  color: #000;
  margin-bottom: 14px;
}

.mega-hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 14px 0 18px;
}

/* =============================================================================
   Product Item  (.mpi)
   ============================================================================= */
.mpi {
  display: flex;
  align-items: flex-start;
  margin-bottom: 14px;
}

/* Icon box */
.mpi-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mpi-icon svg,
.mpi-icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

/* Text block */
.mpi-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mpi-name {
  font-size: 1.1rem;
  font-weight: bold;
  color: #000;
  line-height: 1.3;
  text-decoration: none;
}

.mpi-name:hover {
  color: var(--brand-red);
  text-decoration: none;
}

.mpi-parts {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1.4;
}

.mpi-parts:hover {
  color: var(--brand-red);
  text-decoration: none;
}

/* Sub-navigation (Breading Stations variants) */
.mpi-sub {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
}

.mpi-sub li a {
  font-size: 1.1rem;
  color: #000;
  text-decoration: none;
  line-height: 2;
  display: block;
}

.mpi-sub li a:hover {
  color: var(--brand-red);
}

/* =============================================================================
   Responsive — mobile/tablet collapse
   ============================================================================= */
@media (max-width: 991.98px) {
  /* Restore mega-dropdown to relative so the menu stacks below the toggle */
  .mega-dropdown {
    position: relative !important;
  }

  .mega-menu {
    position: static !important;
    width: 100% !important;
    left: auto !important;
    transform: none !important;
    border-top: 2px solid var(--brand-red);
    border-bottom: 1px solid var(--border);
    box-shadow: none !important;
  }

  .mega-inner {
    flex-direction: column;
  }

  .mega-overview,
  .mega-right {
    width: 100%;
    min-width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .mega-centre {
    border-right: none;
    padding: 16px;
    width: 100%;
  }

  .mega-right {
    width: 100%;
    padding: 16px;
  }

  /* Stack product items full-width on small screens */
  .mega-centre .col-md-4,
  .mega-centre .col-md-6,
  .mega-centre .col-md-8 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}
