
#cart-menu{
  position: fixed;
  top: 120px;   /* 👈 pushes it below header */
  right: -350px;
  left: auto;
  color: gold;
  font-size: 12px;
  width: 320px;
  height: 500px;
  background: rgba(20, 10, 25, 0.65);
  backdrop-filter: blur(15px);
  border-left: 1px solid rgba(247, 231, 161, 0.25);
  box-shadow: -10px 0 40px rgba(0,0,0,0.35);
  padding: 15px;
  z-index: 2000;
  overflow: hidden;
  border-left: 2px solid #f3c4d6;
  border-radius: 18px 0 0 18px;
  font-family: Arial, sans-serif;
  transition: left 0.5s ease;
}

#cart-menu::-webkit-scrollbar {
  width: 6px;
}

#cart-menu::-webkit-scrollbar-thumb {
  background: #aaa;
  border-radius: 10px;
}

#cart-menu::-webkit-scrollbar-thumb:hover {
  background: #555;
}

#cart-menu.open{
  right: 0;
}

/* 🔥 RTL MODE (Arabic) */
html[dir="rtl"] #cart-menu {
  left: -350px;
  right: auto;
}

/* OPEN (RTL) */
html[dir="rtl"] #cart-menu.open {
  left: 0;
}

/* SCROLL AREA */
.cart-items{
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 5px;
}


.cart-item {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: center;

  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(247, 231, 161, 0.12);

  padding: 10px;
  border-radius: 14px;

  backdrop-filter: blur(8px);

  box-shadow: 0 6px 15px rgba(0,0,0,0.2);

  transition: 0.3s;
}

/* IMAGE */
.cart-item img{
  width: 45px;
  height: 45px;
  border-radius: 12px;
  object-fit: cover;
}

/* TEXT */
.cart-item p {
  font-size: 15px;
  font-weight: bold;
  margin: 0;
  color: #F7E7A1;
  letter-spacing: 0.3px;
}

.cart-item small {
   color: #F7E7A1; /* 🔥 same as total */
  opacity: 0.8; /* 👈 keeps hierarchy (lighter look) */

  font-size: 12px;
}

/* QUANTITY BUTTONS */
.cart-item button{
  background: #f3c4d6;
  border: none;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
}

.cart-item button:hover{
  background: #b6f0a9;
}

/* ➖ ➕ buttons */
.cart-item div button {
  width: 18px;
  height: 18px;

  border-radius: 50%;

  background: linear-gradient(135deg, #f7d9a6, #d4af37); /* soft gold */
  color: white;

  border: 1px solid rgba(247, 231, 161, 0.2);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 14px;
  font-weight: bold;

  margin: 0 4px;

  box-shadow: 0 3px 10px rgba(0,0,0,0.25);

  cursor: pointer;

  transition: 0.2s ease;
}

.cart-item div button:hover {
  transform: scale(1.15);
  box-shadow: 0 0 12px rgba(247, 231, 161, 0.4);
  background: linear-gradient(135deg, #59e90b, #900022);
}


.delete-btn{
  position: absolute;
  right: 8px;
  left: auto;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 100%;
   background: linear-gradient(135deg, #5e0016, #2a000a);
  color: #F7E7A1;
  color: white;
  border: 1px solid rgba(247, 231, 161, 0.25);
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: 0.2s ease;
}
/* RTL → button on LEFT */
html[dir="rtl"] .delete-btn {
  left: 8px;
  right: auto;
}

.delete-btn:hover {
  background: linear-gradient(135deg, #7a001c, #3a000f);
  transform: translateY(-50%) scale(1.2);
  box-shadow: 0 0 14px rgba(255, 77, 109, 0.4);
}

.cart-item:hover .delete-btn{
  opacity: 1;
}

/* FOOTER */
.cart-footer {
  margin-top: 12px;
  padding: 12px;

  text-align: center;
  font-size: 16px;
  font-weight: bold;

  color: #F7E7A1;

  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(247, 231, 161, 0.2);

  border-radius: 14px;

  backdrop-filter: blur(10px);

  box-shadow: 0 6px 20px rgba(0,0,0,0.25);

  text-shadow: 0 0 8px rgba(247,231,161,0.3);
}



/* BUY BUTTON */
.buy-btn {
  width: 100%;
  margin-top: 10px;
  padding: 12px;

  background: linear-gradient(135deg, #F7E7A1, #ff85a2);
  color: #1a0f1f;

  border: none;
  border-radius: 14px;

  font-weight: bold;
  font-size: 15px;

  box-shadow: 0 0 20px rgba(247,231,161,0.3);

  transition: 0.3s;
}

.buy-btn:hover {
  box-shadow: 0 0 30px rgba(247,231,161,0.5);
}



.panier-button{
  position: relative;
}

#cart-count{
  position: absolute;
  bottom: -5px;
  right: -5px;
  background: red;
  color: white;
  font-size: 12px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes shake {
  0% { transform: rotate(0); }
  25% { transform: rotate(10deg); }
  50% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
  100% { transform: rotate(0); }
}

.panier-button.shake {
  animation: shake 0.4s ease;
}

.flying-product {
  position: fixed;
  width: 50px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
  z-index: 9999;
  transition: all 0.8s ease;
  pointer-events: none;
}


.hidden{
  display: none;
}

.popup{
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: black;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  opacity: 0;
  transition: 0.3s;
  z-index: 9999;
}
.popup.show{
  opacity: 1;
  top: 80px;
}

@media (max-width: 768px) {
  .product:hover {
    transform: none;
    box-shadow: none;
  }

  .add-to-cart:hover {
    transform: none;
  }
}
