/**
 * Shopping Cart Styles
 */

/* Cart Button in Nav */
.btn-sepet {
  display: inline-block;
  position: relative;
  margin: 0 8px;
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #ff4d4d;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Cart Overlay */
.cart-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.cart-container {
  background-color: white;
  width: 90%;
  max-width: 500px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #eee;
}

.cart-header h3 {
  margin: 0;
}

.close-cart {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.cart-items {
  padding: 15px;
  overflow-y: auto;
  max-height: 50vh;
}

.cart-item {
  display: flex;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.cart-item-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  margin-right: 15px;
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-title {
  font-weight: bold;
  margin-bottom: 5px;
}

.cart-item-price {
  color: #666;
}

.cart-item-actions {
  display: flex;
  align-items: center;
}

.quantity-btn {
  background: none;
  border: 1px solid #ddd;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  cursor: pointer;
}

.cart-item-quantity {
  margin: 0 10px;
}

.remove-item {
  background: none;
  border: none;
  color: #ff4d4d;
  cursor: pointer;
  margin-left: 10px;
}

.cart-footer {
  padding: 15px;
  border-top: 1px solid #eee;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  margin-bottom: 15px;
}

.send-order-btn, .clear-cart-btn {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.send-order-btn {
  background-color: #4caf50;
  color: white;
}

.clear-cart-btn {
  background-color: #f44336;
  color: white;
}

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

/* Cart Button in Product Page */
.cart-button-container {
  text-align: center;
  margin-top: 15px;
  margin-bottom: 15px;
}

#add-to-cart-btn {
  background-color: #4caf50;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
  width: 100%;
  max-width: 300px;
}

#add-to-cart-btn:hover {
  background-color: #45a049;
}

#add-to-cart-btn i {
  margin-right: 8px;
}

/* Cart Notification */
.cart-notification {
  position: fixed;
  top: 15%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #4caf50;
  color: white;
  padding: 12px 20px;
  border-radius: 4px;
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.3s;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  text-align: center;
  min-width: 200px;
}

.cart-notification.show {
  opacity: 0.8;
}

/* Coupon Popup Styles */
.coupon-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}

.coupon-popup-content {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.coupon-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.coupon-popup-header h3 {
  margin: 0;
  color: #333;
}

.close-coupon {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
  padding: 0;
}

.close-coupon:hover {
  color: #333;
}

.coupon-popup-body {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.coupon-input {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

.coupon-input:focus {
  outline: none;
  border-color: #009a9a;
}

.coupon-buttons {
  display: flex;
  gap: 10px;
}

.apply-coupon-btn, .remove-coupon-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  flex: 1;
}

.apply-coupon-btn {
  background-color: #009a9a;
  color: white;
}

.apply-coupon-btn:hover {
  background-color: #008080;
}

.remove-coupon-btn {
  background-color: #ff4d4d;
  color: white;
}

.remove-coupon-btn:hover {
  background-color: #ff3333;
}

/* Coupon button in cart */
.cart-coupon {
  background: none;
  border: none;
  color: #009a9a;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.cart-coupon:hover {
  background-color: rgba(0, 154, 154, 0.1);
}

.cart-coupon svg {
  width: 20px;
  height: 20px;
}

/* Animation for popup */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.coupon-popup.show {
  display: flex;
  animation: fadeIn 0.3s ease-in-out;
}

/* Add CSS styles for the coupon discount display in the cart */

/* Coupon discount section */
.cart-discount {
  margin-top: 15px;
  padding: 12px;
  background-color: #f1f8e9;
  border-radius: 8px;
  border-left: 4px solid #4caf50;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.discount-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
  color: #555;
}

.discount-amount {
  color: #4caf50;
  font-weight: bold;
  font-size: 16px;
}

.discount-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #ccc;
}

.discount-total span:first-child {
  font-size: 15px;
  color: #555;
}

.discounted-price {
  color: #e53935;
  font-size: 18px;
}

/* Coupon badge on the coupon button */
#coupon {
  position: relative;
}

.coupon-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #e53935;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Apply button animation */
.apply-coupon-btn {
  transition: all 0.3s ease;
}

.apply-coupon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Message styling */
.coupon-messages {
  transition: all 0.3s ease;
}

.coupon-message {
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.4;
}

.coupon-message.success {
  background-color: #e8f5e9;
  color: #2e7d32;
  border-left: 4px solid #2e7d32;
}

.coupon-message.error {
  background-color: #ffebee;
  color: #c62828;
  border-left: 4px solid #c62828;
}

.coupon-message.info {
  background-color: #e3f2fd;
  color: #1565c0;
  border-left: 4px solid #1565c0;
} 