@media (min-width: 768px) {
    .mobile-cart-content {
      top: 0;
      right: 0;
      border-radius: 20px 0 0 20px;
      transform: translateX(100%);
      animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
  
    .mobile-cart-modal.active .mobile-cart-content {
      transform: translateX(0);
    }
}

@keyframes slideIn {
    from {
      transform: translateX(100%);
    }
    to {
      transform: translateX(0);
    }
}
  
@keyframes slideUp {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
}

.mobile-cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    /* z-index: 1100; */
    z-index: 3000000000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
  
.mobile-cart-modal.active {
    display: block;
    opacity: 1;
}
  
.mobile-cart-content {
    position: fixed;
    background: var(--bs-body-bg);
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 320px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-cart-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--bs-border-color);
}
  
.mobile-cart-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}
  
.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--bs-body-color);
    cursor: pointer;
    padding: 5px;
}

.mobile-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}
  
.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 8px;
    position: relative;
    transition: all 0.2s ease;
}
  
.cart-item-image {
    width: 70px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: grayscale(1);
}
  
.mobile-cart-footer {
    padding: 16px;
    border-top: 1px solid #eee;
    background: #fff;
}
  
.cart-actions {
    margin-bottom: 12px;
}
  
.clear-cart-btn {
    width: 100%;
    padding: 10px;
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
    /* border-radius: 6px; */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}
  
.clear-cart-btn:hover {
    background: #f8f9fa;
    border-color: #ddd;
    color: #666;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 12px;
}

.total-price {
  font-weight: 600;
  color: var(--dorsa-yellow);
  font-size: 1rem;
}

.checkout-btn {
    width: 100%;
    padding: 12px;
    background: #181818;
    color: #fff;
    border: none;
    /* border-radius: 6px; */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
}

.checkout-btn:hover {
    background: #292929;
}

.empty-cart {
    text-align: center;
    padding: 32px 16px;
    color: #666;
}

.empty-cart i {
    font-size: 2.5rem;
    color: #ddd;
    margin-bottom: 12px;
}

.empty-cart p {
    font-size: 0.9rem;
    margin: 0;
    color: #666;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 0.9rem;
    color: var(--dorsa-black);
    font-weight: 600;
    margin: 0 0 8px 0;
}

.cart-item-price.discount {
    color: #dc3545;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.cart-item-details .quantity-btn {
    width: 24px;
    height: 24px;
    padding: 12px;
    background: inherit;
    border: 1px solid #181818;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    color: #181818;
    transition: all 0.2s ease;
}

.cart-item-details .quantity-btn i {
    font-size: 20px;
    line-height: 1;
}

.cart-item-details .quantity-btn:hover {
  border-color: var(--dorsa-yellow);
  color: var(--dorsa-yellow);
}

.quantity-value {
    min-width: 30px;
    text-align: center;
    font-size: 0.9rem;
    color: #333;
    font-weight: bold;
}

.remove-item {
  position: absolute;
  top: 8px;
  left: 8px;
  background: none;
  border: none;
  color: #777777;
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.remove-item:hover {
  color: #dc3545;
}

@media (max-width: 767.99px) {
    .mobile-cart-modal {
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(5px);
    }
    .mobile-cart-content {
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 80vh;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        opacity: 1 !important;
    }
    .mobile-cart-modal.active .mobile-cart-content {
        transform: translateY(0);
    }
}

.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000000001;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.confirm-modal.active {
    opacity: 1;
}
.confirm-modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}
.confirm-modal.active .confirm-modal-content {
    transform: translateY(0);
}
.confirm-message {
    margin-bottom: 20px;
    font-size: 16px;
    color: #333;
}
.confirm-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.confirm-btn {
    padding: 8px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}
.confirm-yes {
    background: #dc3545;
    color: white;
}
.confirm-yes:hover {
    background: #c82333;
}
.confirm-no {
    background: #6c757d;
    color: white;
}
.confirm-no:hover {
    background: #5a6268;
}

.cart-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translate(-50%, -20px);
    z-index: 3000000001;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.cart-message .message-content {
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    max-width: 90vw;
}

.cart-message.error .message-content {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.cart-message.success .message-content {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.cart-message i {
    font-size: 20px;
    flex-shrink: 0;
}

.cart-message span {
    font-size: 14px;
    line-height: 1.4;
    text-align: right;
    flex: 1;
}