.btn,
.nav-link,
.navbar-brand {
  display: flex;
  color: var(--petfood-green-dark);
  line-height: 60px;
  height: 60px;
}

.logo-img {
  margin-right: 10px;
}

.footer,
.no-products,
.product-body {
  text-align: center
}

.btn-dark {
  background-color: var(--petfood-green-dark) !important;
}

.btn-dark:hover {
  background-color: var(--petfood-green) !important;
}

:root {
  --petfood-green: #4caf50;
  --petfood-green-dark: #235226;
  --petfood-green-light: #b3ffb9;
  --petfood-accent: #43a047;
  --bs-border-color: #dee2e6;
  --bs-body-color: #212529;
  --transition-duration: 0.2s
}

html {
  scroll-padding-top: 200px;
  scroll-behavior: smooth;
  user-select: none;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  color: var(--bs-body-color);
  background: linear-gradient(135deg, #e4ffe7, #f3fff3);
  min-height: 100vh;
  display: flex;
  flex-direction: column
}

a {
  text-decoration: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem
}

.product-title {
  margin-bottom: .5rem;
  font-weight: 700
}

.navbar {
  top: 0;
}

.navbar .container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  flex-direction: row
}

.navbar-center {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%
}

.navbar-actions,
.navbar-nav {
  align-items: center;
  display: flex
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition-duration);
  margin: auto;
  border-radius: 5px;
  padding: .1rem 1rem;
}

.btn,
.category-btn,
.nav-link {
  cursor: pointer;
  transition: all var(--transition-duration);
  text-decoration: none
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.navbar-nav {
  list-style: none;
  gap: 1rem;
  flex-wrap: wrap
}

.nav-link {
  padding: .5rem 1rem;
  border-radius: .375rem
}

.btn:hover,
.nav-link.active,
.nav-link:hover {
  background-color: var(--petfood-green);
  color: #fff
}

/* Desktop layout */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.navbar-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  /* let it wrap instead of overflow */
  overflow: visible;
  /* fixes overlay issue */
  white-space: normal;
  background: transparent;
  /* remove any stray background */
  align-items: center;
  justify-content: center;
  padding: .5rem 0;
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}





.product-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.product-text {
  flex-grow: 1;
}

.actions {
  text-align: center;
}

#cartTotals .checkout-btn {
  margin-top: 20px;
}




.search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 300px;
  transition: all .5s;
}

.search-form:focus-within {
  max-width: 98vw;
}

.search-input {
  flex: 1;
  padding: 0.5rem;
  border: none;
  background-color: var(--petfood-green-light);
  border-radius: 0.375rem;
  color: var(--petfood-green-dark);
  font-weight: 500;
  height: 37px;
}

.search-input::placeholder {
  color: var(--petfood-green-dark);
  opacity: 0.8;
  font-weight: 400;
}

.search-input:focus,
.search-input:hover {
  border: 2px solid var(--petfood-green-dark);
  outline: none;
}

.search-button {
  padding: 0.5rem 1rem;
  background-color: var(--petfood-green-dark);
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-weight: 600;
  cursor: pointer;
}





.btn {
  padding: .5rem 1rem;
  border: none;
  background-color: var(--petfood-green-light);
  border-radius: .375rem;
  display: inline-flex;
  gap: .5rem;
  font-size: 1.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  align-items: center;
  color: var(--petfood-green-dark);
  height: 37px !important;
}

.btn-outline-dark {
  border-color: #212529;
  color: #212529
}

.btn-outline-dark:hover {
  background-color: #212529;
  color: #fff
}

.cart-btn {
  position: relative;
  padding: .5rem 1rem;
  max-height: 37px;
  justify-self: center;
}

.cart-atag {
  max-height: 37px;
}

.cart-btn svg {
  fill: var(--petfood-green-dark);
}

.cart-btn:hover svg {
  fill: #fff;
}

.badge {
  position: absolute;
  background-color: #ff0000;
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: .75rem;
  font-weight: 700;
  bottom: 2px;
  right: 5px;
  line-height: 20px;
}


.category-filters {
  background-color: #fff !important;
  padding: 0.5rem 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  border-bottom: 0;
  overflow: hidden;
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  /* Prevent wrapping */
  overflow: hidden;
}

.category-btn {
  padding: 0.5rem 1rem;
  background-color: var(--petfood-green-light);
  color: var(--petfood-green-dark);
  border-radius: 0.375rem;
  white-space: nowrap;
  max-height: 37px;
}

.filter-dropdown {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.dropdown {
  display: none;
  line-height: 0px;
  width: 37px;
  padding: .5rem .5rem;
  margin-right: 5px;
}

.filter-buttons .dropdown {
  color: var(--petfood-green-dark);
}




.category-btn.active,
.category-btn:hover {
  background-color: var(--petfood-green-dark);
  color: #fff
}

.main-content {
  flex: 1;
  padding: 2rem 0
}



/* Footer content */
.footer {
  background-color: var(--petfood-green-dark);
  color: #fff;
  padding: 1rem 0;
  margin-top: auto;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.contact a {
  color: var(--petfood-green-light);
  text-decoration: none;
  margin: 0 0.5rem;
}

.contact a:hover {
  font-weight: 600;
}

/* Socials container */
.footer-socials {
  display: flex;
  justify-content: center;
  gap: 1rem;
  /* space between icons */
  margin-top: 1.5rem;
}

/* Individual social links */
.socials {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 45px;
  height: 45px;
  border-radius: 8px;
  background: var(--petfood-green-light);
  color: var(--petfood-green-dark);
  font-size: 22px;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.socials:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

footer h4 {
  margin-top: 2rem;
  font-weight: 400;
  text-align: center;
}









/* Mobile dropdown */
@media (max-width:625px) {
  .dropdown {
    display: block;
  }

  #navbarNav button,
  #navbarNav a {
    background: none;
    width: 100%;
  }

  #navbarNav .badge {
    left: 30px
  }

  #navbarNav button:hover,
  #navbarNav a:hover,
  #navbarNav .category-btn.active {
    background: var(--petfood-green-light);
    color: var(--petfood-green-dark);
    transition: all var(--transition-duration);
    border-radius: .375rem;
  }

  #navbarNav .cart-btn:hover svg {
    fill: var(--petfood-green-dark);
  }

  #navbarNav input {
    background: none;
    width: 100%;
  }

  .search-form button {
    width: auto !important;
  }

  #navbarNav input:hover,
  #navbarNav input:focus {
    color: var(--petfood-green-dark);
    border: 2px solid var(--petfood-green-dark);
  }

  #navbarNav {
    max-height: 0;
    padding: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
    opacity: 0;
  }

  #navbarNav.navbar-dropdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: absolute;
    top: 60px;
    /* adjust to height of nav */
    left: 0;
    width: 100vw;
    height: calc(100vh - 60px);
    max-height: calc(100vh - 60px);
    background-color: #fff;
    padding: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 1;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .filter-buttons {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
  }
}

@media (max-width:380px) {
  .navbar-brand {
    margin: 0;
    padding: 0;
    left: 5px;
  }
}

@media (max-width:350px) {
  .navbar-brand {
    font-size: 1rem;
  }
}

@media (max-width:280px) {
  .navbar-brand {
    font-size: .5rem;
  }
}

@media (max-width:200px) {
  .navbar-brand {
    font-size: 0;
  }
}

@media (max-width:480px) {
  .container {
    padding: 0 1rem
  }

  .category-btn {
    white-space: nowrap
  }
}






/* Hide number input spinners for Chrome, Safari, Edge */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Hide for Firefox */
input[type=number] {
  appearance: textfield;
  -moz-appearance: textfield;
}

#scrollToTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: #fff;
  border: 3px solid black;
  border-radius: 50%;
  display: none;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 1000;
  transition-duration: .5s;
}

#scrollToTopBtn:hover {
  background-color: #cece;
  transition-duration: .5s;
}





/* ---------- Toasts ---------- */
#toastContainer {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #222;
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  font-size: 0.95rem;
  opacity: 0;
  transform: translateY(-10px);
  animation: toast-in 200ms ease forwards, toast-out 400ms ease 4.6s forwards;
}

.toast.success {
  background-color: #16a34a;
}

/* green */
.toast.error {
  background-color: #dc2626;
}

/* red */
.toast.info {
  background-color: #2563eb;
}

/* blue */

@keyframes toast-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}