/* ====== Cart Drawer ====== */
.cart-drawer-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.cart-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 90vw;
  height: 100%;
  background: #fff;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  font-family: 'Outfit', 'Montserrat', sans-serif;
}
.cart-drawer.open {
  right: 0;
}

/* Header */
.cart-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #e8e8e8;
  flex-shrink: 0;
}
.cart-drawer__title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}
.cart-drawer__close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  transition: color 0.2s;
}
.cart-drawer__close:hover {
  color: #000;
}
.cart-drawer__close svg {
  width: 20px;
  height: 20px;
}

/* Body */
.cart-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

/* Empty state */
.cart-drawer__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  height: 100%;
}
.cart-drawer__empty-icon {
  margin-bottom: 20px;
}
.cart-drawer__empty-icon svg {
  width: 80px;
  height: 80px;
  color: #ccc;
}
.cart-drawer__empty-text {
  font-size: 16px;
  color: #666;
  margin-bottom: 20px;
}
.cart-drawer__empty-link {
  color: #F3AEAB;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
}
.cart-drawer__empty-link:hover {
  color: #e88e8b;
}

/* Cart Items */
.cart-drawer__items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cart-drawer__item {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  animation: cartItemFadeIn 0.3s ease;
}

@keyframes cartItemFadeIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.cart-drawer__item-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid #eee;
}
.cart-drawer__item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-drawer__item-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-drawer__item-name {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 4px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-drawer__item-variant {
  font-size: 12px;
  color: #888;
  margin-bottom: 8px;
}

.cart-drawer__item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-drawer__item-price {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}
.cart-drawer__item-compare {
  font-size: 12px;
  color: #999;
  text-decoration: line-through;
  margin-left: 6px;
}

/* Quantity controls */
.cart-drawer__qty {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
}
.cart-drawer__qty button {
  width: 30px;
  height: 30px;
  background: #fafafa;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.cart-drawer__qty button:hover {
  background: #eee;
}
.cart-drawer__qty-value {
  width: 34px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  line-height: 30px;
}

.cart-drawer__item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  padding: 2px;
  margin-left: 8px;
  transition: color 0.2s;
}
.cart-drawer__item-remove:hover {
  color: #e44;
}
.cart-drawer__item-remove svg {
  width: 16px;
  height: 16px;
}

/* Footer */
.cart-drawer__footer {
  border-top: 1px solid #e8e8e8;
  padding: 16px 20px 20px;
  flex-shrink: 0;
  background: #fafafa;
}
.cart-drawer__subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.cart-drawer__subtotal-label {
  font-size: 15px;
  font-weight: 500;
  color: #333;
}
.cart-drawer__subtotal-value {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}
.cart-drawer__savings {
  font-size: 13px;
  color: #27ae60;
  margin-bottom: 14px;
  text-align: right;
}
.cart-drawer__checkout {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: #F3AEAB;
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
  font-family: inherit;
}
.cart-drawer__checkout:hover {
  background: #e99e9b;
}
.cart-drawer__checkout:active {
  transform: scale(0.98);
}
.cart-drawer__continue {
  display: block;
  text-align: center;
  margin-top: 10px;
  color: #666;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  width: 100%;
}
.cart-drawer__continue:hover {
  color: #333;
}

/* Toast notification */
.cart-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #1a1a1a;
  color: #fff;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  z-index: 100000;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  font-family: 'Outfit', 'Montserrat', sans-serif;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.cart-toast.show {
  opacity: 1;
  transform: translateY(0);
}
.cart-toast .cart-toast__check {
  display: inline-block;
  margin-right: 8px;
  color: #27ae60;
}

/* Badge on cart icon */
.cart-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #F3AEAB;
  color: #000;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
}
.cart-count-badge:empty,
.cart-count-badge[data-count="0"] {
  display: none;
}

#cart-icon-bubble {
  position: relative;
}
