/* base helpers (keep your sticky header space in main layout) */

#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  background: #fff;
}

body {
  padding-top: 80px; /* adjust to match header height */
}

.header .logo-icon { width: 48px; height: 48px; }

/* Desktop ≥1200px */
@media (min-width: 1200px) {
  #navmenu {
    display: flex !important;
    align-items: center;
  }

  /* Mobile/Tablet <1200px: hidden, opens as dropdown under header */
@media (max-width: 1199.98px) {
  #navmenu { display: none !important; }
  #navmenu.open {
    display: block !important;
    position: absolute;
    top: 100%;           /* directly under header row */
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    z-index: 1000;
  }
  #navmenu ul { list-style: none; margin: 0; padding: .75rem 1rem; }
  #navmenu li + li { margin-top: .5rem; }
  #navmenu a { display: block; padding: .5rem .6rem; border-radius: 6px; }
}

  #navmenu ul {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  #navmenu a {
    position: relative;
    color: #212529 !important;
    text-decoration: none !important;
    font-weight: 400;
    padding: .3rem .6rem;
    border-radius: 5px;
    transition:
      background-color .28s cubic-bezier(.22,1,.36,1),
      color .18s linear,
      transform .12s ease;
    will-change: background-color, color, transform;
  }
  #navmenu a.active,
  #navmenu a[aria-current="page"] {
    background-color: #1e3a8a;
    color: #fff !important;
  }
  #navmenu a:hover,
  #navmenu a:focus-visible {
    background-color: #1e3a8a;
    color: #fff !important;
    outline: 0;
  }
  #navmenu a:active {
    transform: translateY(1px) scale(0.98);
    background-color: #0b5ed7;
  }
}

/* Mobile & tablet <1200px: hidden by default, can be toggled via .open */
@media (max-width: 1199.98px) {
  #navmenu { display: none !important; }
  #navmenu.open {
    display: block !important;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,.06);
  }
  #navmenu ul { list-style: none; margin: 0; padding: .75rem 1rem; }
  #navmenu li + li { margin-top: .5rem; }
  #navmenu a {
    display: block;
    padding: .5rem .6rem;
    border-radius: 6px;
    color: #212529 !important;
    text-decoration: none !important;
  }
  #navmenu a.active { background: #1e3a8a; color: #fff !important; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  #navmenu a { transition: none !important; }
}

/* Header actions */
.header .header-actions .mobile-nav-toggle {
  border: 0;
  background: transparent;
  padding: .25rem .5rem;
  line-height: 1;
}
.header .header-actions .mobile-nav-toggle i { font-size: 2rem; color: #212529; }

.header .header-actions .btn-cart {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .9rem;
  border-radius: 9999px;
  background: #facc15;
  border: 1px solid rgba(0,0,0,.06);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  color: #212529;
}
.header .header-actions .btn-cart i { color: #212529; font-size: 1.1rem; line-height: 0; }
.header .header-actions .btn-cart:hover { background: #eab308; color: #212529; }
.header .header-actions .btn-cart:active { transform: translateY(1px); }

/* Avoid underline effect on cart in desktop */
@media (min-width: 768px) {
  .btn-cart::after { content: none !important; }
}


/* --- CART DROPDOWN --- */
.cart-dropdown {
  max-height: 320px;
  overflow-y: auto;
  padding: 0.5rem 0;
}
.cart-dropdown li.dropdown-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .75rem;
}
.cart-dropdown img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
}
.cart-dropdown .fw-semibold {
  font-size: .9rem;
}
.cart-dropdown .text-muted.small {
  font-size: .8rem;
}


@media (max-width: 576px) {
  .cart-dropdown {
    min-width: 100vw;
    left: 0 !important;
    right: 0 !important;
  }
}


/* Toast stack container */
#toast-stack{
  position: fixed;
  top: 120px;   /* below header */
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
}

/* Base toast style (applies to all types) */
#toast-stack > div{
  min-width: 280px;
  padding: 12px 20px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  font-weight: 500;
  transform: translateX(120%);   /* start off-screen */
  opacity: 0;
  display: none; /* hidden until JS shows */
}

/* INFO (yellow) */
.info-toast{ background: #ffc107; color: #000; }

/* SUCCESS (green) */
.success-toast{ background: #28a745; color: #fff; font-weight: 600; }

/* ERROR (red) */
.error-toast{ background: #dc3545; color: #fff; font-weight: 600; }

/* Slide in */
@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* Slide out */
@keyframes slideOut {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(120%); opacity: 0; }
}

/* Classes toggled by JS */
.toast-show { 
  display: block !important;
  animation: slideIn 0.4s ease forwards;
}
.toast-hide { 
  animation: slideOut 0.4s ease forwards;
}

#hero, #training, #about-us, #contact-3 {
  scroll-margin-top: 90px;
}
