#cart-container {
  position: absolute;
  display: inline-block;
}

#cart-dropdown {
  display: none;
  position: absolute;
  box-sizing: border-box;
  width: 300px;
  background: white;
  border-radius: 10px;
  /*box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);*/
  z-index: 1000;
  
  background-image: linear-gradient(
  135deg,
  rgba(255, 95, 109, 1),
  rgba(255, 195, 113, 1),
  rgba(71, 232, 145, 1),
  rgba(94, 231, 223, 1),
  rgba(180, 144, 202, 1),
  rgba(255, 95, 109, 1),
  rgba(255, 255, 255, 1),
    rgba(255, 255, 255, 1),
    rgba(255, 255, 255, 1),
    rgba(255, 255, 255, 1)
  );
  
  background-size: 400% 400%;
  box-shadow: 0 0 15px rgba(100, 100, 255, 0.6);
  color: black;
  font-family: Roboto;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease, background-image 5s ease, box-shadow 1s ease, filter 1s ease;
  filter: brightness(1.2) blur(0.3px);

  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  overflow: hidden;
  
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* IE 10+ */
  user-select: none;         /* Standard syntax */
  -webkit-tap-highlight-color: transparent;
  
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  animation: explodeGlow 0.5s ease-out forwards, rainbowRipple .2s ease forwards;
}

#cart-dropdown:active {
  transform: scale(0.96);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.cart-container {
  position: relative;
  display: inline-block;
}

#cart-toggle {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

.hidden {
  display: none;
}

@keyframes rainbowRipple {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

@keyframes explodeGlow {
  0% {
    box-shadow: 
      0 0 15px 5px rgba(255, 255, 255, 0.9),   /* first shadow */
      0 0 30px 15px rgba(0, 100, 255, 0.5);        /* second shadow */
    filter: brightness(2) blur(1px);
  }
  100% {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    filter: brightness(1.2) blur(0.3px);
  }
}

#cart-item-name {
  flex: 1; /* allows it to shrink if needed */
    white-space: nowrap;         /* ❗ Keep text on a single line */
    overflow: hidden;            /* ❗ Hide the overflowed text */
    text-overflow: ellipsis;     /* ✅ Show "..." at the end */
    max-width: 70%; /* optional: control how much space it takes */
}

#cart-empty-message {
  text-align: center;
  justify-content: center;
}

#cart-dropdown ul {
  list-style: none;
  padding: 0;
  border-radius: 5px;
  margin: 10px;
}

#checkout-arrow {
  width: 25px;
  padding: 0;
  margin: 0;
  vertical-align: middle;
}

#item-total-text {
  flex: 1;
  color: black;
  text-align: right;
  justify-content: right;
  white-space: nowrap;
}

#checkout-text {
  flex: 1;
  text-align: left;
  justify-content: left;
}

#cart-title {
  flex: 1;
  align-content: left;
  text-align: left;
  justify-content: left;
  padding: 10px;
  font-weight: bold;
}

#checkout-link {
  text-decoration: none;
}

#header-icon {
  
}

#cart-checkout {
  background-color: #f0f0f0;
  display: flex;
  flex-direction: row;
  color: black;
  border-radius: 9999px;
  padding: 5px;
  padding-right: 10px;
  padding-left: 10px;
  box-sizing: border-box;
  
  align-content: center;
  vertical-align: middle;
  
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 255, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  cursor: pointer;
  overflow: hidden;
  
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* IE 10+ */
  user-select: none;         /* Standard syntax */
  -webkit-tap-highlight-color: transparent;
}

#cart-checkout:active {
  transform: scale(0.96);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

#cart-dropdown li {
  background-color: #f0f0f0;
  display: flex;
  flex-direction: row;
  text-align: left;
  color: black;
  border-radius: 9999px;
  margin: 5px;
  padding: 5px;
  vertical-align: middle;
  align-content: center;
  
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  cursor: pointer;
  overflow: hidden;
  
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* IE 10+ */
  user-select: none;         /* Standard syntax */
  -webkit-tap-highlight-color: transparent;
}

#cart-dropdown li:active {
  transform: scale(0.96);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.cart-toggle {
  cursor: pointer;
  color: black;
  text-align: left;
  justify-content: left;

  -webkit-user-select: none; /* Safari */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* IE 10+ */
  user-select: none;         /* Standard syntax */
  -webkit-tap-highlight-color: transparent;
  
  font-family: sans-serif;
    display: flex;
    background-color: #f0f0f0;
    border-color: rgb(0, 123, 255);
    padding: 10px;
    border-radius: 9999px;
    flex-direction: row;
    align-items: center;
    font-weight: bold;
  
  font-size: 16px;
      border: 1px solid rgba(255, 255, 255, 0.4);
      background: rgba(255, 255, 255, 0.15);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
      transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
      position: relative;
      overflow: hidden;
}

.remove-btn {
  font-family: sans-serif;
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* IE 10+ */
  user-select: none;         /* Standard syntax */
  -webkit-tap-highlight-color: transparent;

  vertical-align: middle;
  align-content: center;

  color: red;
  cursor: pointer;
  font-size: 0.9em;
  margin-left: 5px;
}

    .cart-toggle:hover {
      background: rgba(200, 200, 200, 0.15);
    }

    .cart-toggle:active {
      transform: scale(0.96);
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    }

    .ripple-effect {
      position: absolute;
      border-radius: 50%;
      background: rgba(0, 122, 255, 0.2);
      transform: scale(0);
      animation: ripple 0.5s linear;
      pointer-events: none;
    }

    @keyframes ripple {
      to {
        transform: scale(4);
        opacity: 0;
      }
    }