/* public/css/cart-drawer.css
   Drawer lateral usando Bootstrap modal (#cartDrawer)
*/

#cartDrawer .modal-dialog {
  position: fixed;
  right: 0;
  top: 0;
  margin: 0;
  height: 100%;
  width: 420px;
  max-width: 94vw;
  transform: translateX(100%);
  transition: transform .22s ease;
  pointer-events: none;
}

#cartDrawer.show .modal-dialog {
  transform: translateX(0);
}

#cartDrawer .modal-dialog * {
  pointer-events: auto;
}

#cartDrawer .modal-content {
  height: 100%;
  border-radius: 0;
  border: 0;
}

#cartDrawer .modal-header {
  border-bottom: 1px solid rgba(0,0,0,.08);
}

#cartDrawer .modal-title {
  font-weight: 700;
}

.cart-drawer__body {
  padding: 0;
  overflow: auto;
  background: #fafafa;
}

.cart-drawer__items {
  padding: 12px;
}

.cd-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 12px;
  margin-bottom: 10px;
}

.cd-item__img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  flex: 0 0 64px;
  background: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cd-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cd-item__mid {
  flex: 1;
  min-width: 0;
}

.cd-item__name {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.1;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cd-item__meta {
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 6px;
}

.cd-item__meta .warn {
  color: #b7791f;
  font-weight: 700;
}

.cd-item__price {
  font-size: 12px;
  color: #111;
  margin-top: 2px;
}

.cd-item__right {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.cd-qty {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cd-qty input {
  width: 54px;
  text-align: center;
  padding: 4px 6px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.14);
  font-size: 13px;
}

.cd-actions {
  display: flex;
  gap: 6px;
}

.cart-drawer__footer {
  border-top: 1px solid rgba(0,0,0,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.cart-drawer__total {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.cart-drawer__total span {
  color: #6c757d;
  font-size: 12px;
}

.cart-drawer__total strong {
  font-size: 18px;
}

.cart-drawer__footerBtns {
  display: flex;
  gap: 8px;
  align-items: center;
}
