/* Cart Drawer Backdrop Overlay */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Cart Drawer */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 450px;
  height: 100%;
  background: #ffffff;
  box-shadow: -5px 0 35px rgba(0, 0, 0, 0.15);
  z-index: 1060;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.cart-drawer.active {
  transform: translateX(0);
}

/* Header */
.cart-drawer-header {
  padding: 24px;
  border-bottom: 1px solid #f1f1f1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #6b1616;
  color: #ffffff;
}

.cart-drawer-header h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 20px;
  margin: 0;
}

.cart-drawer-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.cart-drawer-close:hover {
  transform: scale(1.15);
}

/* Body / Product List */
.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.cart-drawer-item {
  display: flex;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid #f1f1f1;
  align-items: center;
}

.cart-drawer-item img {
  width: 75px;
  height: 75px;
  object-fit: cover;
  border-radius: 8px;
  background: #f9f9f9;
  border: 1px solid #eee;
}

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

.cart-item-title {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #222;
  margin-bottom: 6px;
  line-height: 1.3;
}

.cart-item-price {
  font-weight: 600;
  color: #6b1616;
  font-size: 15px;
  margin-bottom: 8px;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-qty-selector {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.cart-qty-selector button {
  background: #f9f9f9;
  border: none;
  width: 28px;
  height: 28px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.cart-qty-selector button:hover {
  background: #eee;
}

.cart-qty-selector span {
  width: 32px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
}

.cart-item-remove {
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 15px;
  cursor: pointer;
  transition: color 0.2s ease;
}

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

/* Empty Cart State */
.cart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #888;
  text-align: center;
}

.cart-empty-state i {
  font-size: 56px;
  color: #e2e2e2;
  margin-bottom: 20px;
}

.cart-empty-state p {
  font-size: 16px;
  margin-bottom: 20px;
}

/* Footer & Subtotal */
.cart-drawer-footer {
  padding: 24px;
  border-top: 1px solid #f1f1f1;
  background: #fafafa;
}

.cart-drawer-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.cart-drawer-subtotal span:first-child {
  font-size: 15px;
  color: #555;
  font-weight: 500;
}

.cart-drawer-subtotal span:last-child {
  font-size: 20px;
  font-weight: 700;
  color: #6b1616;
}

.cart-checkout-btn {
  background: #25d366;
  color: #fff;
  border: none;
  border-radius: 8px;
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
}

.cart-checkout-btn:hover {
  background: #128c7e;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

/* Checkout Modal */
.checkout-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.checkout-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.checkout-modal {
  background: #ffffff;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(30px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.checkout-modal-backdrop.active .checkout-modal {
  transform: translateY(0);
}

.checkout-modal-header {
  background: #6b1616;
  color: #fff;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.checkout-modal-header h4 {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 18px;
}

.checkout-modal-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.checkout-modal-body {
  padding: 24px;
}

.checkout-form-group {
  margin-bottom: 16px;
}

.checkout-form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 14px;
  color: #333;
}

.checkout-form-group input,
.checkout-form-group select,
.checkout-form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.checkout-form-group input:focus,
.checkout-form-group select:focus,
.checkout-form-group textarea:focus {
  outline: none;
  border-color: #6b1616;
}

.checkout-form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.checkout-submit-btn {
  background: #25d366;
  color: #fff;
  border: none;
  border-radius: 8px;
  width: 100%;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.3s ease;
  margin-top: 10px;
}

.checkout-submit-btn:hover {
  background: #128c7e;
}

/* Navbar Cart Badge Adjustments */
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-right .icon {
  position: relative;
  cursor: pointer;
}

.nav-right .cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #6b1616;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.whatsapp-badge-product {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25d366;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(37,211,102,0.2);
}

.whatsapp-badge-product:hover {
  background: #128c7e;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37,211,102,0.3);
}

/* Styles for Quantity section inside product details */
.cart-section {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}

.cart-section .qty {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  background: #fdfdfd;
}

.cart-section .qty button {
  background: #f9f9f9;
  border: none;
  width: 40px;
  height: 40px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cart-section .qty button:hover {
  background: #eee;
}

.cart-section .qty span {
  width: 48px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #222;
}

.cart-section .add-btn {
  background: #6b1616;
  color: #fff;
  border: 1px solid #6b1616;
  border-radius: 6px;
  padding: 0 35px;
  height: 40px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cart-section .add-btn:hover {
  background: transparent;
  color: #6b1616;
}
