.cart-btn {
  position: relative;
  display: inline-block;
}
.cart-btn i {
  font-size: 16px;
}
.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: #000000;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
/* Sidebar a destra */
.cart-sidebar {
position: fixed;
top: 0;
right: -100%; /* inizialmente nascosta fuori dallo schermo */
height: 100vh;
width: 300px;
background-color: #fff;
box-shadow: -2px 0 8px rgba(0,0,0,0.2); /* ombra interna a sinistra */
z-index: 9999;
transition: right 0.4s ease;
display: flex;
flex-direction: column;
}

.cart-sidebar.open {
right: 0;
}

/* Header barra */
.cart-header {
display: flex;
align-items: center;
justify-content: space-between;
background-color: #996379;
color: #fff;
padding: 16px;
font-size: 16px;
}

/* Pulsante chiusura */
.close-btn {
background: none;
border: none;
color: #fff;
font-size: 24px;
cursor: pointer;
}

/* Contenuto scrollabile */
.cart-content {
flex: 1;
overflow-y: auto;
padding: 16px;
}

/* Overlay sfondo */
.cart-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.3);
z-index: 9998;
opacity: 0;
pointer-events: none;
transition: opacity 0.3s ease;
}

.cart-overlay.show {
opacity: 1;
pointer-events: auto;
}
.cart-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
  }
  
  .item-img {
    flex: 0 0 20%;
    max-width: 20%;
    padding-right: 8px;
  }
  
  .item-img img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
  }
  
  .item-info {
    flex: 0 0 70%;
    max-width: 70%;
    font-size: 14px;
    color: #333;
  }
  
  .item-title {
    font-weight: bold;
    margin: 0 0 4px 0;
  }
  
  .item-details {
    margin: 0;
    font-size: 12px;
    color: #777;
  }
  
  .item-remove {
    flex: 0 0 10%;
    max-width: 10%;
    text-align: right;
  }
  
  .remove-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #996379;
    cursor: pointer;
    line-height: 1;
  }
/* Footer fisso */
.cart-footer {
    padding: 16px;
    background-color: #f7f7f7;
    border-top: 1px solid #ddd;
    position: sticky;
    bottom: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: bold;
    color: #333;
  }
  
  .checkout-btn {
    padding: 10px;
    background-color: #996379;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
  }
  
  .checkout-btn:hover {
    background-color: #7e4d63;
  }
/* Responsive per mobile */
@media (max-width: 768px) {
.cart-sidebar {
  width: 100%;
}
}