/* --- Floating Cart --- */
#floating-cart {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 65px;
  height: 65px;
  background: radial-gradient(circle at 30% 30%, #f5e6a8, #d4af37);
  color: #fff;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: grab;
  z-index: 1060;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden; /* For the ripple effect */
}

#floating-cart:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

#floating-cart:active {
  cursor: grabbing;
  transform: scale(0.95);
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #e74c3c;
  color: white;
  border-radius: 50%;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: bold;
  border: 2px solid white;
}

/* --- Ripple Effect --- */
.ripple {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.7);
  transform: scale(0);
  animation: ripple-effect 0.6s linear;
}

@keyframes ripple-effect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* --- Cart Popup Panel --- */
#cart-popup {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background-color: var(--brand-primary);
  box-shadow: -5px 0 25px rgba(0,0,0,0.15);
  z-index: 1055;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
}

#cart-popup.is-visible {
  transform: translateX(0);
}

.cart-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--brand-secondary);
}

.cart-popup-header h3 {
  margin: 0;
  font-family: 'Playfair Display', serif;
}

#close-cart-popup {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--brand-text);
}

#cart-popup-content {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
}

.cart-popup-footer {
  padding: 20px;
  border-top: 1px solid var(--brand-secondary);
}

.cart-popup-footer .btn {
  width: 100%;
  padding: 15px;
  text-transform: uppercase;
  font-weight: bold;
}
