/* =========================
   CART TABLE STYLING
   ========================= */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.cart-table th,
.cart-table td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: center;
}

.cart-summary {
  text-align: right;
  font-size: 1.2rem;
  font-weight: bold;
}

.qty-input {
  width: 60px;
  text-align: center;
}

.remove-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
}

/* =========================
   CART ACTIONS
   ========================= */
.cart-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.cart-actions .btn {
  min-width: 180px;
  background-color: #00b4d8; /* Accent blue */
}

.cart-actions .btn:hover {
  background-color: #0093ad;
  transform: translateY(-1px);
}

.cart-browse {
  min-width: 180px;
  background-color: #0077b6; /* Synthonics brand blue */
  color: #fff;
}

.cart-browse:hover {
  background-color: #005f8d;
  transform: translateY(-1px);
  color: #fff;
}

/* =========================
   EMPTY CART STATE
   ========================= */
.empty-cart {
  text-align: center;
  padding: 2rem 1rem;
  color: #555;
}

.empty-cart img {
  max-width: 150px;
  margin-bottom: 1rem;
  opacity: 0.85;
}

.empty-cart h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: #0077b6;
}

.empty-cart p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: #777;
}

.empty-cart .btn {
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
}

/* =========================
   CART ICON + BADGE
   ========================= */
.cart-link {
  position: relative;
  list-style: none;
}

.cart-link .bi-cart {
  font-size: 1.4rem;
  vertical-align: middle;
  transition: transform 0.2s ease;
}

/* Hover/tap micro-interaction */
.cart-link:hover .bi-cart {
  transform: scale(1.15);
}

/* Badge styling */
.cart-count {
  position: absolute;
  top: -6px;
  right: -10px;
  background: #6c757d; /* muted grey for 0 */
  color: #fff;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 50%;
  line-height: 1;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
  transition: background 0.2s ease, transform 0.2s ease;
  display: inline-block; /* always visible */
}

/* Active state when count > 0 */
.cart-count.active {
  background: #1977cc; /* Synthonics brand blue */
  color: #fff;
}

/* Pop animation */
.cart-count.pop {
  animation: popScale 0.3s ease;
}

@keyframes popScale {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}


/* =========================
   CART TOAST NOTIFICATION
   ========================= */
.cart-toast {
  position: fixed;
  bottom: -60px; /* start hidden below viewport */
  left: 50%;
  transform: translateX(-50%);
  background-color: #0077b6; /* Synthonics brand blue */
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
  pointer-events: none; /* avoid blocking clicks */
}

/* Show state */
.cart-toast.show {
  bottom: 30px; /* visible position */
  opacity: 1;
}



@media (max-width: 991px) {
  #navmenu {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* space between cart and toggle */
  }

  .cart-link {
    list-style: none;
    margin: 0;
  }

  .cart-link .bi-cart {
    font-size: 1.4rem;
    vertical-align: middle;
  }

  .cart-link .cart-count {
    top: 9px;
    right: 9px;
  }
}


/* =========================
   CART TOAST NOTIFICATION
   ========================= */
.cart-toast {
  position: fixed;
  bottom: -60px; /* start hidden below viewport */
  left: 50%;
  transform: translateX(-50%);
  background-color: #0077b6; /* default: Synthonics blue */
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
  pointer-events: none; /* avoid blocking clicks */
}

/* Show state */
.cart-toast.show {
  bottom: 30px; /* visible position */
  opacity: 1;
}

/* Success toast */
.cart-toast.success {
  background-color: #22BB33;
}

/* Error toast */
.cart-toast.error {
  background-color: #dc3545; /* Bootstrap danger red */
}
