/* Chat Widget */
.chat-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-end;
}

.chat-widget .chat-bubble {
  background: #fff;
  border-radius: 30px;
  padding: 10px 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #8d1212;
  border: 1px solid #eee;
  transition: 0.3s;
}

.chat-widget .chat-bubble span {
  font-weight: 700;
  font-size: 0.9rem;
}

.chat-widget .chat-bubble i {
  font-size: 1.2rem;
}

.chat-widget .chat-bubble:hover {
  transform: scale(1.05);
}

.chat-widget .cart-badge {
  width: 60px;
  height: 60px;
  background-color: #f1c40f;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  position: relative;
  transition: 0.3s;
}

.chat-widget .cart-badge i {
  font-size: 1.5rem;
  color: #552c10;
}

.chat-widget .cart-badge .count {
  position: absolute;
  top: 0;
  right: 0;
  background-color: #e74c3c;
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.chat-widget .cart-badge:hover {
  transform: scale(1.1);
}

.chat-modal {
  display: none;
  position: fixed;
  bottom: 0;
  right: 0;
  margin-right: 20px;
  width: 350px;
  height: 500px;
  background: white;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.chat-modal.show {
  display: block;
  transform: translateY(0);
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-header {
  background: #552c10;
  color: white;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h3 {
  margin: 0;
  font-size: 18px;
}

.close-chat {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

.chat-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background: #f8f9fa;
}

.message {
  margin-bottom: 15px;
  padding: 10px 15px;
  border-radius: 10px 0 0 0;
  max-width: 80%;
}

.message.bot {
  background: #e9ecef;
  align-self: flex-start;
}

.message.user {
  background: #552c10;
  color: white;
  align-self: flex-end;
  margin-left: auto;
}

.chat-input {
  display: flex;
  padding: 15px;
  background: white;
  border-top: 1px solid #dee2e6;
}

.chat-input input {
  flex: 1;
  padding: 10px;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  outline: none;
}

.chat-input button {
  background: #552c10;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 50%;
  margin-left: 10px;
  cursor: pointer;
}

/* Responsive Chat */
@media screen and (max-width: 768px) {
  .chat-modal {
    width: 360px;
    height: 70vh;
    bottom: 0;
    right: 0;
    margin-right: 0;
    border-radius: 0;
  }
}

@media screen and (max-width: 600px) {
  .chat-widget {
    bottom: 30px;
    right: 10px;
  }
}